Garry's Mod

Garry's Mod

Zbyt mało ocen
Ban Randomseed
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Content Type: Addon
Addon Type: Tool
Rozmiar pliku
Zamieszczono
1.333 KB
28 czerwca 2020 o 11:49
1 lista zmian ( zobacz )

Zasubskrybuj, aby pobrać
Ban Randomseed

W 1 kolekcji stworzonej przez miniduikboot
KnighTTTs Server Pack
Przedmioty: 177
Opis
Ban Randomseed prevent other addons from seeding the RNG used by Garry's Mod. The default RNG isn't very good, but one of the issues it has that makes it bad is that when seeds that are very close by are used, the nth item after reseeding is not sufficiently random, for all values of n up to 30 on Linux. This can lead to a relatively similar role distribution in TTT or to other issues, as often the RNG is regularly reseeded with a timestamp. See this post[gist.github.com] for more context.

This addon proposes the nuclear option to solve bad RNG issues by completely forbidding reseeding: seed the RNG, call it 30 times to warm it up properly, then override the math.randomseed[wiki.facepunch.com] function. Every time this function is then called the caller will be logged, so you can discover who is reseeding your RNG.

This addon may break certain addons that depend on a certain state of the RNG, for example the TTT awards screen. Please use with caution.

--
The picture of the dice used in the icon are from Wikipedia User PierreSelim and is used under CC BY 3.0: https://en.wikipedia.org/wiki/Diceware#/media/File:Dice_-_1-2-4-5-6.jpg

This addon is licensed under the Unlicense
Komentarzy: 6
dolpin 2.0 30 lipca 2023 o 13:38 
use a dedicated server
Captain Bright Noa 20 lipca 2023 o 21:22 
It says "addon too new to use old API"; is there a way to fix this?
miniduikboot  [autor] 29 czerwca 2020 o 10:41 
You can mess with math.random (and one way to do that is by seeding the RNG, which this addon blocks). If you really want to mess with math.random you can override that function in a similar to how I overrided the math.randomseed function, but that will break all users of the RNG in Gmod, so I'd highly recommend against that.
NextKurome76TheSoldier 29 czerwca 2020 o 10:31 
yeah, what i meant was math.random, but i guess this one can't be messed with
miniduikboot  [autor] 29 czerwca 2020 o 10:27 
Probably not, this addon only changes the math.randomseed function and the item you were talking about doesn't use that function.
NextKurome76TheSoldier 29 czerwca 2020 o 7:55 
could this finally possibly break the qtg invincible npc?