Confirmedusers
13,514
edits
Ninjanomnom (talk | contribs) m (Double checked information and added version) |
Mirotworez (talk | contribs) (Marked this version for translation) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{GameVersion| | <languages/><translate> | ||
<!--T:1--> | |||
{{GameVersion|?.??}} | |||
<!--T:2--> | |||
Most code mods will work fine when loaded by the game at the default time. | Most code mods will work fine when loaded by the game at the default time. | ||
<!--T:3--> | |||
However, ModSystems can specify a particular place in the pipeline when they should be loaded by the game, by overriding the method <code>ModSystem.ExecuteOrder()</code> and returning a value between 0.0 and 1.0, inclusive. | However, ModSystems can specify a particular place in the pipeline when they should be loaded by the game, by overriding the method <code>ModSystem.ExecuteOrder()</code> and returning a value between 0.0 and 1.0, inclusive. | ||
<!--T:4--> | |||
The following are some example mod systems from the base game and when they are loaded (from the API comments on [https://github.com/anegostudios/vsapi/blob/master/Common/API/ModSystem.cs#L45 ModSystem.ExecuteOrder]): | The following are some example mod systems from the base game and when they are loaded (from the API comments on [https://github.com/anegostudios/vsapi/blob/master/Common/API/ModSystem.cs#L45 ModSystem.ExecuteOrder]): | ||
<!--T:5--> | |||
<syntaxhighlight lang="c#"> | <syntaxhighlight lang="c#"> | ||
/// <summary> | /// <summary> | ||
Line 31: | Line 37: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<!--T:6--> | |||
To provide a concrete example, if you would like your ModSystem to be loaded as early as possible in the game's pipeline, you could configure your code similar to the following: | To provide a concrete example, if you would like your ModSystem to be loaded as early as possible in the game's pipeline, you could configure your code similar to the following: | ||
<syntaxhighlight lang="c#"> | <syntaxhighlight lang="c#"> | ||
Line 40: | Line 47: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<!--T:7--> | |||
{{Navbox/modding|Vintage Story}} | {{Navbox/modding|Vintage Story}} | ||
</translate> |