Modding:General Best Practices: Difference between revisions
Jump to navigation
Jump to search
Modding:General Best Practices (view source)
Revision as of 18:45, 28 July 2019
, 18:45, 28 July 2019no edit summary
(add modding info box) |
imported>Koboldunderlord No edit summary |
||
Line 29: | Line 29: | ||
{{Main|Modding:Random Functions}} | {{Main|Modding:Random Functions}} | ||
To avoid conflicts and to keep consistency between seeds, Stat.Random() and Stat.Rnd() should not be called. The ideal is to use [[Modding:Random_Functions#GetSeededRandomGenerator.28string_Seed.29|GetSeededRandomGenerator()]] for your mod's randomness. The next best is calling RandomCosmetic() or Rnd2(). | To avoid conflicts and to keep consistency between seeds, Stat.Random() and Stat.Rnd() should not be called. The ideal is to use [[Modding:Random_Functions#GetSeededRandomGenerator.28string_Seed.29|GetSeededRandomGenerator()]] for your mod's randomness. The next best is calling RandomCosmetic() or Rnd2(). | ||
=ObjectBlueprint Definitions= | |||
==Stats== | |||
Prefer using <code>value</code> over <code>sValue</code>, unless you're creating a unique creature. When loading ObjectBlueprints, the code loads both <code>sValue</code> and <code>value</code> into a stat, then if <code>sValue</code> is set, prefers using that to set a stat over <code>value</code>. |