Simply extend the Planetbase.Technology class, and then register it with TypeList.getInstance().add(newTech). New technologies are fairly easy to implement. Two methods of note are the GetObjectPropertyValues and the LogException methods, as they are extremely useful for debugging. It contains features ranging from exceptioni logging to texture loading. The utils class is a static class for miscellaneous functions that (I think) will be useful to modders. To add the new building into the game, call TypeList.getInstance().add(new ()). OVerride the calculateCost method to set the required resources (metal, starch, etc.). Provide a texture for the menu icon, and a list of gameobject in an array from small to large. To create a new building, extend the BaseModuleType class (or the ModuleType class, not typically recommended). This will autoload the OBJ, generate a mesh, and load any related materials.
To load an obj (that isn't already in ModBase.ModObjects), call ObjLoader.LoadOBJFile(filename, texturelist). OBJ and MTL files can be dynamically loaded into gameobjects at runtime.
#PLANETBASE MODS INSTALL MOD#
This is useful if your mod dynamically generates other mods at runtime (like the XML Modloader mod) Putting a ModLoaderIgnoreAttribute attribute on a class extending ModBase will cause it not to be loaded, even if it is public and not abstract. A list of mods matching a given type can be found with Modloader.GetModByType(Type). The debug log, located in the Planetbase folder, contains extensive information on issues that arise while the game is running.Īll found mods are loaded into Modloader.ModList at the launch of the game. onGui can be overridden to draw on the screen. To activate the state, call GameManager.getInstance().setNewState(new ()). To add a new gamestate (such as a new screen, similar to Mod List), extend the GameState class. The name of the button is automatically translated. Instantiating an instance of the TitleMenu class will auto-register it to be displayed. Override the HandleAction method to handle button clicks.
To add a new button to the title menu, extend the TitleButton class. Click here for an example.īasePath, ModPath, and ModName provide information on the path of the Planetbase folder, Planetbase\Mod folder, and the name of the mod. Strings files use the same format as the native game. Copy the "Mods" folder to your "%homepath%\Documents\Planetbase" folder.Īll new mods (unless otherwise specified by the mod) are installed by placing their DLL file into the Planetbase\Mods folderSee here for more updated info: Īny files in \assets\png, \assets\obj, \assets\strings will be loaded into the ModTextures, ModObjects, and the global string dictionary.Place the extracted PlanetbaseFramework.dll file next the the Assembly-CSharp.dll file (typically in "C:\Program Files (x86)\Steam\steamapps\common\Planetbase\Planetbase_Data\Managed").
#PLANETBASE MODS INSTALL DOWNLOAD#
#PLANETBASE MODS INSTALL INSTALL#
In the game you play the role of the base architect and manager, telling your colonists where to build the structures they will need to survive. About This Game Planetbase is a strategy game where you guide a group of space settlers trying to establish an outpost on a remote planet.