Random Number Generator (0 - 999)
🟠 Updated over a year agoPreview
📋 About This Mod
This circuit is a random number generator, generating random integers from 0 to 999. The red block represents the output, while the green block represents the input which will decide when to activate a part of the circuit that increases randomness. It is recommended that it receives a button or single-tick input only once. This RNG circuit is based off of the LCG (Linear Congruential Generator) algorithm, which calculates a random value based on the following equation: next value = (multiplier * previous value + increment) mod modulus It uses a multiplier and increment of 3 which is an odd and prime number and is small enough to avoid causing repetitiveness in the random value generation, and uses a modulus of 1000 to limit the output between 0 and 999. The input indicated by the green block leads to a one-second delay loop which allows a generated seed to override the current input (the previous value) for the LCG every second. The seed is generated by adding 97 (a prime number) to itself repeatedly, displaying the new seed, and using a modulus to reset at 1000.
📊 Mod Details
- Game
- Terratech Mods
- Author
- 76561198846770253
- Version
- N/A
- Downloads
- 59
- Endorsements
- 0
- Category
- Techs, ReticuleResearch, Circuits & Systems
- Created
- 11/15/2024
- Updated
- 11/15/2024
🔧 How to Install TerraTech Mods
Subscribe on Steam Workshop. Mods auto-download and install. Launch the game to activate.
📖 Full step-by-step install guide for TerraTech →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for TerraTech commands, item IDs, and more.
Keep browsing — more TerraTech mods await