ContentPack Autopopulating - TeamMoonstorm/MoonstormSharedUtils GitHub Wiki

ContentPack Autopopulating

Due to the modular nature of MoonstormSharedUtils (Being able to disable entire swathes of content and disabling items and equipments) MSU expects the end user to not have certain array fields in serializable content packs populated

this is because MSU will always expect these arrays to be empty, if for any reason a duplicate definition is found (Like having 2 of the same item defs in the ItemDefs array). the game will hang while trying to initialize the item internally (Such as setting it's item index, setting up stats, etc)

Below is a list of the arrays of the serializable content pack that MSU automatically populates alongside a module

Level of Autopopulation can be the following values:

  • None: Nothing autopopulates this field
  • Mild: Only certain types are populated, an example is how projectiles with CharacterBody components are auto populated into the body prefabs array (this is recommended by Ben)
  • Partial:
  • Complete: A module has the sole purpose of populating this array
Field Name Level of Autopopulation Populated By Extra Notes
Body Prefabs Mild ProjectileModule Only projectiles with CharacterBodies get populated into this array
Master Prefabs None None
Projectile Prefabs Complete Projectile Module
Game Mode Prefabs None None
Networked Object Prefabs Mild Projectile Module Projectiles have Network Identity, as such they need to go here
Skill Defs None None
Scene Defs Complete Scene Module
Item Defs Complete Pickup Module
Equipment Defs Complete Pickup Module
Buff Defs Complete Buff Module
Elite Defs Complete Elite Module
Unlockable Defs Complete UnlockablesModule
Survivor Defs None None
Artifact Defs Complete Artifact Module
Surface Defs None None
Networked Sound Defs None None
Music Track Defs None None
Game Ending Defs None None
Entity State Configurations None None
Entity State Types None None