Modding:Adding Code at Startup: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 20: Line 20:
* When the list of active mods changes
* When the list of active mods changes
|| Not specific to a particular game and won't be called again if the player loads a different save. Code runs only once when the main menu loads during executable startup and is not called again unless the player modifies their approved/active mods while the game is running. In that case, the new mod configuration is "hotloaded" and mod-sensitive cache code is called again.
|| Not specific to a particular game and won't be called again if the player loads a different save. Code runs only once when the main menu loads during executable startup and is not called again unless the player modifies their approved/active mods while the game is running. In that case, the new mod configuration is "hotloaded" and mod-sensitive cache code is called again.
|-
| '''Blueprint Preload''' ||
* When the main menu first loads
* When the list of active mods changes
|| Runs at the same time as Mod-Sensitive Cache code, but has a different load framework, as described below.
|-
|-
| '''Game-Based Cache''' ||
| '''Game-Based Cache''' ||
Line 25: Line 30:
* When an existing save is loaded
* When an existing save is loaded
|| Called every time the game context changes (i.e. new game or load game). Code is called before the player object exists and before world generation, so this option is not suitable if you need to manipulate the player.
|| Called every time the game context changes (i.e. new game or load game). Code is called before the player object exists and before world generation, so this option is not suitable if you need to manipulate the player.
|-
| '''Blueprint Preload''' ||
* When the main menu first loads
* When the list of active mods changes
|| Runs at the same time as Mod-Sensitive Cache code, but has a different load framework, as described below.
|-
|-
| '''PlayerMutator''' ||
| '''PlayerMutator''' ||