Changing Mystery Box Special Weapon Probabilities?
-
Hey there!
I was wondering, similar to that previous thread a while ago about adding/removing Mystery Box weapons for a given map if there was a way to modify probabilities of special weapons?
I heard that the probabilities of special weapons is an additional bit of code separate from the regular weapons probabilities code, and for that reason I'm not sure if it's even possible to modify the probability value
I wanna go for a vanilla+/vanilla lite style of modification, not change anything in such a way as to make it too crazy.
What I'm looking to do is take the Origins probability (which I assume is greater than all other maps and lesser than the Buried probability) for the Ray Gun Mk II and apply it to all other maps using a GSC script, and make this runnable on my Plutonium Dedicated Server
The probabilities for obtaining the Ray Gun Mk II on all other maps besides Buried and Origins is historically considered very low. As for exact numbers, I cannot find any. The only mention of specifics I can find is that Die Rise is considered to have a 1% chance for the Ray Gun Mk II. I can attest, I don't ever remember getting the Ray Gun Mk II on Die Rise in 2013 and in my test of 50 box hits last night on Plutonium T6 I got 0 Mk IIs.
Anecdotally, I've gathered that the Survival maps have the lowest chance outside of Die Rise, but not quite as low, while all other maps have similar probabilities (excluding Die Rise).
I was also wondering if it would be possible to even VIEW the probability values of the Ray Gun Mk II on each map?
i.e
TranZit: ???
Die Rise: 1%
MoTD: ???
Buried: 10%?
Origins: 5%?
(as an example)Does anyone have any knowledge of how the special weapons/Ray Gun Mk II are calculated and what the approximate values are? And or how to modify these values for each map using a GSC script? (Maybe we can make something that you can publish to the Releases section for all to use to modify Special Weapon box probabilities?)
Thanks so much!
-
rudemario basically if you look at how maps/mp/zombies/_zm_magicbox::treasure_chest_chooseweightedrandomweapon works you can see how it is done. how i understand it is it has an array of weapons that it randomizes and then iterates through until it finds a weapon that is valid and i think there are some things that are build in in the validation process that makes weapons like the ray gun less likely to be chosen but in theory if you know each element of the array and these rules then you can get the probablity of each weapon using your stochastic skills. and yes you can change the probablity yourself by making a mod and modify the list of weapons or these rules
-
chicken emoji Thanks for the reply, much appreciated.
I went to go have a look at _zm_magicbox::treasure_chest_chooseweightedrandomweapon but I could not find it in the path you listed on the T6 stock scripts github: https://github.com/plutoniummod/t6-scripts/tree/main/ZM/Maps/Die Rise/maps/mp/zombies
It doesn't seem to be here or in the TranZit folder. Am I looking in the wrong location?
Thanks for your help!
-
rudemario this is the path in the stock scripts
-
chicken emoji Found it there, thanks to your help.
Looking through the script, with my limited knowledge of scripting, it would appear that level.customrandomweaponweights is passed to the Mystery Box Randomization code and I would assume this value is unique per level.
Now, my issue is I appear to be out of my depth, because I don't know where this value is stored, how it's assigned, etc.
I'm gonna try to do some learning using some GSC tutorials to figure out how this works.
My current theory is to find the value that produces Origin's Ray Gun Mk II probability and transplant that value into each of the other maps probability value for that weapon. (in this case their level.customrandomweaponweights
If it turns out there's some custom weighting that's applied in the Mystery Box method somewhere after the regular random weapon calculation is done (if chosenweapon == RayGunMkII, reroll if value is >=1 as an example) then I'll have to come up with some idea of how to approach that.
I'm not that experienced at scripting so I don't want to pretend to know more than I do.
-
rudemario level.customrandomweights can be used to modify the array and it doesnt seem to be used by the game to change any probablities.
What you have to look at is the constellation of the array and treasure_chest_canplayerreceiveweapon and based on the frequency of the appearance of a weapon in the array and the validation chances that treasure_chest_canplayerreceiveweapon gives it, you can determine the probability of a weapon being chosen.
treasure_chest_canplayerreceiveweapon is basically the validation process and for example in tranzit if the weapon to be validated is the ray gun or the ray gun mark 2 it has a 2/3 chance of making it invalid which means that they both have less chance to be chosen. you can check that in maps/mp/zm_transit::transit_special_weapon_magicbox_check which is stored in level.special_weapon_magicbox_check when tranzit is played and executed in maps/mp/zombies/_zm_magicbox::treasure_chest_canplayerreceiveweapon
-
in case you have discord if you want i can try to explain it step by step so you know under which circumstances it would allow a weapon to be chosen as the box weapon and maybe even try to figure out the percentages behind it because it sounds interesting
-
chicken emoji hey! Yeah, I'd really appreciate your help, it would be interesting to come up with a probability list for weapons in a given map. It would be cool to validate the 1% die rise claim on the wiki lol.
My Discord is rudemario#9106
-
rudemario Looking at the stock scripts around mark 2 doesn't indicate anywhere it's a 1% chance to obtain the weapon even on die rise. You could increase the chances by removing unwanted weapons in the box that most people don't ever use. Like SMR, War Machine, etc. I've obtain mark 2 many times on die rise with just a few hits.
-
RedxSkull The goal is to increase the probability of the Ray Gun Mk II, not to remove the other weapons from the box. I want to modify the calculation or the validation rules or the array in some way, while still preserving the regular contents of the box, similar to how Origins or Buried doesn't remove weapons but increases the probability of obtaining a Ray Gun Mk II in relation to the other weapons (ray gun Mk II probability goes up, other weapons are less likely now because of that)