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: 813 | 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

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

495 users are online: 1 member and 494 guests
Crecer13
21 posts in the last 24h
51 posts in the last week
105 posts in the last month
Registered members: 44659
Welcome our newest member, Yourcounselling
Most online: 2043 users on 29 Oct 2023, 01:04 AM