Loading...
  OR  Zero-K Name:    Password:   
Back to List

random gun

PLAY THIS MOD


Maintained by AUrankSmokeDragon
Last updated 34 days ago
Created 4 months ago
download JSON metadata of random_gun
dont use this it modifies evey value and this causes crashes.. i will make a list of safe values to edit so that it does not crash randomly


Preview
Filter:    Player:  
sort
4 months ago
dont use this it modifies evey value and this causes crashes.. i will make a list of safe values to edit so that it does not crash randomly
+0 / -0
this mod is very fun!!

4x range seems Op, though. I think you should make the probability into a normal distribution, so that values in the centre are more likely than those on the edges (but such that it still sometimes possible to get 4x). This code does this:

https://pastebin.com/H2ZgMbmN
+1 / -0
4 months ago
good idea! tomorrow i will do as you suggested and create a list of sane weapon defs the code can edit. so that it nolonger includes random buggy things
+0 / -0
does this look better?
[Spoiler]
im going to store things here but i need to go out so when i get back ill finish the list and add special case code for colors so that you can get purple beams on mace =P

i had a bit of extra time so i pushed an update to check if a value was over 1.. this should drasticaly reduce crashes until i can finish the whitelist

[Spoiler]
+1 / -0
It seems your perc code does the same as before?
By normal distribution I meant a curve which looks like this:
https://www.scribbr.com/wp-content/uploads/2023/02/normal-distributions-comparison-example.webp
Plussing 2 random numbers together creates a normal distribution of probability.

This means that when you roll 2 dice (with 6 sides), you are more likely to get a 7 than a 2 or a 12, because it is in the centre of the range. If you instead rolled 1 die (with 12 sides), you would be just as likely to get a 7, 2 or 12.

In https://anydice.com/ enter "output 2d6" and "output 1d12" and see!
+0 / -0
well the good news is i dont think we need white lists so long as we target values above 1 tested no more crashes

what about this?

[Spoiler]
+0 / -0
this seems to be working great now.. perhaps i should now link the changes to metalcost

need to fix this the code does not lower the values correctly

added clamping and doubled the rarity of extremes:
[Spoiler]
+1 / -0
4 months ago
You have created a masterpiece, SmokeDragon
+1 / -0
thanks but im not sure im very good at this. i spend 2 days breaking the code and now im going to have to rework it compleatly so that commanders nolonger turn into invisible ghosts that cannot die

i need to just get it so that it gives a bonus from 1-400% normalised around 1% with no negative values .. but it seems very finicky. i tried like 40 different logics so i feel its best i resimplify the code so my brain can handle whats even going on
+0 / -0
If you're unsure what your code does, then download Geogebra and plop your function inside.

+1 / -0
updated to include reload, burst, projectiles.. values now scale randomly from 4x less up to 4x more
+0 / -0