This repository was archived by the owner on Apr 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
GameModules
exelix edited this page Aug 23, 2018
·
9 revisions
GameModules are the hardest plugin to implement, their job is to open and save levels, instantiate new objects and properties. A GameModule to work needs at least three other classes: ILevelObj, ILevel and IObjList implementations. These interfaces are used to excange data with the editor window. This page will offer a limited explaination, it's better to use the Odyssey and other modules as examples
Here I'll explain the purpose of each property and function:
-
ModuleNameis the module name shown in the credits -
ModelsFoldershould not contain spaces, it's the folder where the extracted models of this extension are saved -
GetClassConvertersContains a list of Types and TypeConverters to correctly display custom types in the propertygrid -
ReservedPropNamesthis is an array of properties (names) the editor won't allow to remove from objects -
ModelFieldPropNamesthis is an array of properties (names) that will make the editor reload the model for the current object when changed -
IsAddListSupportedif the editor allows adding new object lists. -
IsPropertyEditingSupportedif the editor allows removing or adding properties -
ViewFormis a reference to the editor window you should set it in the InitModule function. -
AutoHideListan array of list names that will automatically set to hidden when loading a level -
InitModule(...)called as soon as the editor window is initialized up, here you should set the ViewForm property and register MenuExtensions related to your module. -
FormLoaded()called after the editor window is shown, here you should do your startup checks like setup your base models -
ParseArgs(string[] Args)the editor form args are handled here -
LoadLevel(string path = null)andNewLevel(string path = null)open or create a level, if the path is null should show an OpenFileDialog, return your ILevel implementation or null if the user cancelled - ``
- ``