8,290
edits
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Modding Info}}{{ | {{Modding Info}}{{Modding Topic Prerequisites | Modding:C Sharp Scripting}} | ||
If your mod has some element of randomness, you're gonna be looking for a function to call. However, calling the built in <code>Next()</code> function in the Random Class built into C# will net you some compilation errors. The best practice is to use the random functions inside <code>XRL/Rules/Stat.cs</code>. Below are the different random functions inside Caves of Qud and what they are used for. | If your mod has some element of randomness, you're gonna be looking for a function to call. However, calling the built in <code>Next()</code> function in the Random Class built into C# will net you some compilation errors. The best practice is to use the random functions inside <code>XRL/Rules/Stat.cs</code>. Below are the different random functions inside Caves of Qud and what they are used for. |