Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Gamedev:Structure

From FIGHTORDER
Revision as of 17:12, 17 November 2010 by imported>Pithikos (Mod structure)

Mod structure

The mod file is just a plain zipped file in the .7z format.
In this zip file there are actually very few folders and files that are de facto in every mod. For more about the de facto folders/files that are used in every mod you can read further on http://springrts.com/wiki/Mod_specification. The structure widely used for mods is as follows:

units/
This folder is the main folder for the units in the mod. Every unit in the mod must have its appropriate file in this folder. All files in this folder have the extension .fbi. For convention, the names given to the files are descriptive for the units. For example the arm commander's .fbi file is called "armcom.fbi".
*.fbi
files inside the ”units” folder have the extension .fbi. These files are simple text files with information about each unit used in the mod. No .fbi file, no unit! Keep in mind that this file just keeps information about each unit. It doesn't contain the actual 3d model of the unit that you see in game. Instead this file among other things tells the spring engine which 3d model to use for each unit.
Objects3d/
This folder contains the 3d models for each 3d object in the mod. That can be a model of a unit, a wreckage, a map object or something else. For each .fbi file in the ”units” folder there must be a corresponding 3d model in the ”Objects3d” folder.
Scripts/
This folder contains animations(which are script files) for the 3d models. Animations are not a must but they are necessary in case we make a non-static 3d model. With non-static we mean 3d models that can animate(walk, taget, shoot etc). In the other hand we might have static 3d objects. Examples of that could be decoration objects for a map like stones, trees, etc. Files in this folder can either be of the .cob or .lua format. Lua files are simple text files while .cob files are binary files/executables. Bos and cob are file formats used in the original Total Annihilation. The relation between them is that the .cob files are compiled .bos files. Bos files are not really executed at any point but are rather in the folder so you can see what each compiled file does.
*.bos
Animation script files. These are source files for .cos and are never executed. They are present in the folder just to give an intuition to developers of what the coresponding .cob file does.
*.cob
Compiled .bos files. These are the files that are being executed ingame.
*.lua
Animation script files. These are executed(interprented) directly ingame.