[HELP] Giving Weapons Random Criticals
17 Sep 2017, 01:09 AM
#1
![avatar of TheChosenOne](/images/no_av.png)
Posts: 59
Working on my mod, and I want to give certain weapons a critical chance when it penetrates. I looked at the sniper rifle weapon file along with the Riflemen AT Grenade. I practically copied the one from the AT Grenade. I gave the critical a small chance. Yet, I feel for being a 5% it happens almost too frequently. Any help is appreciated.
17 Sep 2017, 09:24 AM
#2
![avatar of SneakEye](/uploads/avatar/20401.jpg?updated=1467362299)
![Senior Modmaker Badge](/images/badges/badge_SENIOR_MODMAKER.png)
Posts: 817 | Subs: 5
How many choices do you have? and which weights?
The weights depend on the total sum of all weights in the random_action. If you set the weight in a random_choice at 5, but you have no other options, then it's actually 100%. So the real chance is:
your weight / the sum of all weights.
If you want only one critical, then make another empty choice with the weight 95.
The weights depend on the total sum of all weights in the random_action. If you set the weight in a random_choice at 5, but you have no other options, then it's actually 100%. So the real chance is:
your weight / the sum of all weights.
If you want only one critical, then make another empty choice with the weight 95.
17 Sep 2017, 10:22 AM
#3
![avatar of TheChosenOne](/images/no_av.png)
Posts: 59
How many choices do you have? and which weights?
The weights depend on the total sum of all weights in the random_action. If you set the weight in a random_choice at 5, but you have no other options, then it's actually 100%. So the real chance is:
your weight / the sum of all weights.
If you want only one critical, then make another empty choice with the weight 95.
Ok, I did not know about the random_choice needing another weight to consider the chance. I will have to add an empty action. Thank you.
PAGES (1)![down](/images/buttons/down_arrow.png)
![down](/images/buttons/down_arrow.png)
0 user is browsing this thread:
Livestreams
![]() |
![]() |
![]() |
33 | ||
![]() |
![]() |
![]() |
26 | ||
![]() |
![]() |
![]() |
22 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
288 | ||
![]() |
![]() |
![]() |
25 | ||
![]() |
![]() |
![]() |
13 | ||
![]() |
![]() |
![]() |
5 | ||
![]() |
![]() |
![]() |
4 | ||
![]() |
![]() |
![]() |
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.41662.870+14
- 2.659233.739+2
- 3.299158.654+3
- 4.286110.722-2
- 5.309114.730+5
- 6.12243.739-1
- 7.193100.659+3
- 8.10829.788+9
- 9.370283.567+3
- 10.1171650.643+2
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger
![Einhoven Country](/images/maps/4p_enhoven_country.jpg)
Einhoven Country
![Honor](/images/buttons/HONOR_icon.png)
Honor it
13
![Download](/images/buttons/DOWNLOAD_icon.png)
Download
1315
Board Info
581 users are online:
581 guests
0 post in the last 24h
18 posts in the last week
45 posts in the last month
18 posts in the last week
45 posts in the last month
Registered members: 51670
Welcome our newest member, Guterc93
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Guterc93
Most online: 2043 users on 29 Oct 2023, 01:04 AM