Garry's Mod

Garry's Mod

Nicht genug Bewertungen
Ban Randomseed
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
Content Type: Addon
Addon Type: Tool
Dateigröße
Veröffentlicht
1.333 KB
28. Juni 2020 um 11:49
1 Änderungshinweis (anzeigen)

Abonnieren zum Herunterladen
Ban Randomseed

In 1 Kollektion von miniduikboot
KnighTTTs Server Pack
177 Inhalte
Beschreibung
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
6 Kommentare
dolpin 2.0 30. Juli 2023 um 13:38 
use a dedicated server
Ciel 20. Juli 2023 um 21:22 
It says "addon too new to use old API"; is there a way to fix this?
miniduikboot  [Autor] 29. Juni 2020 um 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. Juni 2020 um 10:31 
yeah, what i meant was math.random, but i guess this one can't be messed with
miniduikboot  [Autor] 29. Juni 2020 um 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. Juni 2020 um 7:55 
could this finally possibly break the qtg invincible npc?