Editing Modding Tutorials/Application Startup

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 17: Line 17:
 
|-
 
|-
 
| class="TutorialCodeTable-description" | '''1'''
 
| class="TutorialCodeTable-description" | '''1'''
| class="TutorialCodeTable-description" | '''Load mod config data''' (the list of active mod)
+
| class="TutorialCodeTable-description" | '''Build Mod List'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.ModsConfig constructor
+
Verse.LoadedModManager.LoadAllActiveMods()
 
</source>
 
</source>
 
|-
 
|-
 
| class="TutorialCodeTable-description" | '''2'''
 
| class="TutorialCodeTable-description" | '''2'''
| class="TutorialCodeTable-description" | '''Build mod list from mod folders'''
+
| class="TutorialCodeTable-description" | '''Load mod load folders'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.ModLister.RebuildModList();
+
Verse.LoadedModManager.LoadModContent();
 
</source>
 
</source>
 
|-
 
|-
 
| class="TutorialCodeTable-description" | '''3'''
 
| class="TutorialCodeTable-description" | '''3'''
| class="TutorialCodeTable-description" | '''Initialize mods'''
+
| class="TutorialCodeTable-description" | '''Load all mod assemblies in mod list order'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.InitializeMods()
 
 
</source>
 
</source>
 
|-
 
|-
 
| class="TutorialCodeTable-description" | '''4'''
 
| class="TutorialCodeTable-description" | '''4'''
| class="TutorialCodeTable-description" | '''Load mod assemblies''' (also create Mod subclass instances) (also queues up loading for audio, graphics, strings, and asset bundles, which doesn't execute until steps 30-33)
+
| class="TutorialCodeTable-description" | '''Instantiate Mod subclasses'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.LoadModContent()
 
 
Verse.LoadedModManager.CreateModClasses()
 
Verse.LoadedModManager.CreateModClasses()
 
</source>
 
</source>
Line 56: Line 54:
 
| class="TutorialCodeTable-description" | '''Load translation keys from Defs (very rarely used)'''
 
| class="TutorialCodeTable-description" | '''Load translation keys from Defs (very rarely used)'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.TKeySystem.Parse()
 
 
</source>
 
</source>
 
|-
 
|-
Line 74: Line 71:
 
| class="TutorialCodeTable-description" | '''Register Def inheritance (Name and ParentName)'''
 
| class="TutorialCodeTable-description" | '''Register Def inheritance (Name and ParentName)'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.XmlInheritance.TryRegister()
+
Verse.LoadedModManager.ParseAndProcessXML()
 
</source>
 
</source>
 
|-
 
|-
Line 80: Line 77:
 
| class="TutorialCodeTable-description" | '''Apply Def inheritance'''
 
| class="TutorialCodeTable-description" | '''Apply Def inheritance'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.ParseAndProcessXML()
 
 
</source>
 
</source>
 
|-
 
|-
Line 86: Line 82:
 
| class="TutorialCodeTable-description" | '''Load Defs from XML into Def classes. References to other Defs are registered and not resolved until step 20'''
 
| class="TutorialCodeTable-description" | '''Load Defs from XML into Def classes. References to other Defs are registered and not resolved until step 20'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.ParseAndProcessXML()
 
 
</source>
 
</source>
 
|-
 
|-
Line 92: Line 87:
 
| class="TutorialCodeTable-description" | '''Warn if any patches failed'''
 
| class="TutorialCodeTable-description" | '''Warn if any patches failed'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.ClearCachedPatches()
 
 
</source>
 
</source>
 
|-
 
|-
Line 104: Line 98:
 
| class="TutorialCodeTable-description" | '''Store Defs into <code>DefDatabase</code>'''
 
| class="TutorialCodeTable-description" | '''Store Defs into <code>DefDatabase</code>'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.GenGeneric.InvokeStaticMethodOnGenericType() -> AddAllInMods
+
Verse.PlayDataLoader.DoPlayLoad()
 
</source>
 
</source>
 
|-
 
|-
Line 198: Line 192:
 
| class="TutorialCodeTable-description" | '''Load audio files from mods'''
 
| class="TutorialCodeTable-description" | '''Load audio files from mods'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.LoadModContent() -> Verse.ModContentPack.ReloadContent() -> VerseModContentPack.ReloadContentInt()
 
 
</source>
 
</source>
 
|-
 
|-
Line 204: Line 197:
 
| class="TutorialCodeTable-description" | '''Load textures from mods'''
 
| class="TutorialCodeTable-description" | '''Load textures from mods'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.LoadModContent() -> Verse.ModContentPack.ReloadContent() -> VerseModContentPack.ReloadContentInt()
 
 
</source>
 
</source>
 
|-
 
|-
Line 210: Line 202:
 
| class="TutorialCodeTable-description" | '''Load strings from mods'''
 
| class="TutorialCodeTable-description" | '''Load strings from mods'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.LoadModContent() -> Verse.ModContentPack.ReloadContent() -> VerseModContentPack.ReloadContentInt()
 
 
</source>
 
</source>
 
|-
 
|-
Line 216: Line 207:
 
| class="TutorialCodeTable-description" | '''Load asset bundles from mods'''
 
| class="TutorialCodeTable-description" | '''Load asset bundles from mods'''
 
| <source lang="xml">
 
| <source lang="xml">
Verse.LoadedModManager.LoadModContent() -> Verse.ModContentPack.ReloadContent() -> VerseModContentPack.ReloadContentInt()
 
 
</source>
 
</source>
 
|-
 
|-

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page: