feat: add initial People Playground mod development kit

This commit is contained in:
2026-01-06 06:35:51 +03:00
parent b89c805060
commit 27da387c5a
1095 changed files with 40267 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
URL: https://wiki.studiominus.nl/details/lifecycle.html
Title: People Playground Modding - Mod Lifecycle
==================================================
Mod Lifecycle
Mods have a simple lifecycle. A lifecycle describes when a mod is created, what it does during its lifetime, and when it is destroyed.
1. Load
Main menu loaded
mod.json is found and interpreted. All referenced scripts are read.
2. Compile
Mod loaded
All loaded scripts are compiled and written to a DLL by the compiler server. The DLL is loaded into memory. OnLoad is called.
3. Execute
Map loaded or catalog updated
ModAPI.ModMetaData is set and `Main` is called.
4. Termination
Game is exited
OnUnload is called. All resources are freed.
Note that OnLoad is only called if the mod is active after compilation. If it's inactive (the default), it will call OnLoad once activated and never again.
A mod may spit out errors in the compilation stage (or other stages). The errors are always logged to the Logs folder.