Login

russian armor

[HELP] Giving Weapons Random Criticals

17 Sep 2017, 01:09 AM
#1
avatar of TheChosenOne

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
Senior Modmaker Badge

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.
17 Sep 2017, 10:22 AM
#3
avatar of TheChosenOne

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.
1 user is browsing this thread: 1 guest

Livestreams

United Kingdom 195
United States 45
United States 15

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

828 users are online: 828 guests
0 post in the last 24h
7 posts in the last week
34 posts in the last month
Registered members: 49122
Welcome our newest member, Harda621
Most online: 2043 users on 29 Oct 2023, 01:04 AM