User Tools

Site Tools


besiege:modding:example-guides:creatingmod

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
besiege:modding:example-guides:creatingmod [2018/06/18 16:39]
von
besiege:modding:example-guides:creatingmod [2018/07/10 14:56] (current)
spaar
Line 5: Line 5:
 For complete documentation of the different concepts involved in creating mods, see [[..:​creating mods|Introduction to Modding]]. For complete documentation of the different concepts involved in creating mods, see [[..:​creating mods|Introduction to Modding]].
  
-===== The directory, very basic metadata ​=====+===== createmod ​=====
  
-Note: You can skip/​automate many of the first steps using the ''​[[..:​moddevelopment#​shortcuts|createmod]]''​ console command.+The recommended way of starting a new is using the ''​[[..:​moddevelopment#​shortcuts|createmod]]''​ console command
 +That means starting up the game, opening the console and executing ''​createmod <name of the mod>''​.
  
-Each mod lives in its own directory. Simple mods can be located in ''​Besiege_Data/​Mods/'' ​(and all mods are when installed manually by users) but for more complex mods a different project layout is recommended. Please ​see [[..:​ModDevelopment#​project-layout|Project Layout]] ​for more information.+A second parameter ​can optionally ​be given to the command, to store the mod outside of the ''​Besiege_Data/​Mods/'' ​directory, ​see the documentation for the command ​for details.
  
-The directory ​should be named after the mod it contains.+This will create a directory ​for your mod in ''​Besiege_Data/​Mods/''​ (or another directory, if specified). The directory has one subdirectory,​ with a ''​Mod.xml''​ file in it.
  
-  * Create ​the directory ​(e.g. ''​Besiege_Data/​Mods/​ExampleMod''​)+This file is called ​the mod manifest and it contains all the important information required to load the mod. The directory ​containing it is the only directory that the game considers when loading the mod. 
 +That means all files that are required to be read by the game to load it must be in there, but you can use the directory above to store other files related to your project, ​e.g. source code or files from Blender, Maya, Photoshop, etc.
  
-Basic information about the mod itself as well as about its contents are contained in the mod manifest file. This is always called ''​Mod.xml''​ and has to be located directly in the folder created above.+===== Basic Manifest Elements =====
  
-For more information on the elements that a mod manifest can contain, see [[..:​Manifest|Mod Manifest]].+Open up the Mod.xml fileIt has already been populated with all the important elements and examples for how they are used.
  
-  * Create a plain text file called ​''​Mod.xml''​.+You'll need to edit at least ''​Author'' and ''​Description''​ elements. Take a moment to read through the files to understand the other elements and what options there are.
  
-The mod manifest ​is an XML file with some simple elementsstarting with basic metadata about the mod:+Note: By default, a mod is assumed to work correctly in multiplayer after it was created. If you intend your mod only for singleplayer usechange ​the ''​MultiplayerCompatible''​ element appropriately.
  
-  * Add basic information to the manifest. +Some other elements that are useful for most mods are the ''​Debug''​ and ''​Icon''​ elements.
- +
-''​xml <Mod> <​Name>​Example Mod</​Name>​ <​Author>​Your Name</​Author>​ <​Version>​1.0.0</​Version>​ <​Description>​ Some short description of what the mod does, should not be longer than two lines. </​Description>​ </​Mod>''​ +
- +
-===== Some other manifest elements ===== +
- +
-There is one more manifest element that is required for the mod to be loaded: A mod has to specify whether it is capable of working correctly in multiplayer. +
- +
-  * Add the MultiplayerCompatible element. +
- +
-''<​MultiplayerCompatible>​True</​MultiplayerCompatible>''​ +
- +
-Some other elements that are useful for most modsare the ''​Debug''​ and ''​Icon''​ elements.+
  
 Again, see [[..:​Manifest|the mod manifest]] for a full list of available elements. Again, see [[..:​Manifest|the mod manifest]] for a full list of available elements.
besiege/modding/example-guides/creatingmod.txt · Last modified: 2018/07/10 14:56 by spaar