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: Difference between revisions

From FIGHTORDER
imported>Abma
imported>Knorke
remade from scratch (started)
Line 1: Line 1:
= Game structure =
This are the files to be found in a Spring game. Optional files or folders such as "config\" folders for ie Lua scripts are not listed.
The mod file is just a plain zipped file in the .7z format.<br />
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:
<br />
;<b>units/</b>
: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".
:<b>*.fbi</b>
::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.


;<b>Objects3d/</b>
'''This page is unfinished'''
: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.
----


;<b>Scripts/</b>
='''<code>root of game folder</code>'''<br>=
: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.
[[Modinfo.lua]] and can also contain [[Modoptions.lua]] and [[AI:Development:Lang:Lua|LuaAI.lua]]
:<b>*.bos</b>
 
:: 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.
=='''<code>bitmaps\</code>'''<br>==
:<b>*.cob</b>
 
:: Compiled .bos files. These are the files that are being executed ingame.
=='''<code>bitmaps\loadpictures</code>'''<br>==
:<b>*.lua</b>
pictures that will be displayed when the game loads
:: Animation script files. These are executed(interprented) directly ingame.
 
==='''<code>bitmaps\tracks</code>'''<br>===
images that are used for the [[Units-UnitDefs#Decals|unit tracks]]
 
=='''<code>units\</code>'''<br>==
.lua or .fbi files [[Units-UnitDefs|that define the units.]]
Subfolders are allowed.
 
=='''<code>features\</code>'''<br>==
.lua or .fbi files [[Units-UnitDefs|that define features (wreckage and such)]]
Subfolders are allowed.
 
=='''<code>gamedata\</code>'''<br>==
[http://springrts.com/wiki/Category:Gamedata|various files] that control global things or setup graphic & sound resources.
 
=='''<code>icons\</code>'''<br>==
images for [[Icontypes.lua|unit symbols and radar icons]]
 
=='''<code>LuaRules\</code>'''<br>==
various files to make Lua scripts work such as gadget handler (?)
==='''<code>LuaRules\Gadgets</code>'''<br>===
[[Lua_Scripting|Lua gadgets]]: scripts that controll the gameplay
==='''<code>LuaRules\Configs</code>'''<br>===
config files read by Lua gadgets
 
=='''<code>LuaUI\</code>'''<br>==
==='''<code>LuaUI\widgets</code>'''<br>===
[[Lua_Scripting|Lua widget]]: scripts that make up the user interface or do other unsynced things
 
=='''<code>objects3d\</code>'''<br>==
[[Game_and_Unit_development#Modeling_.28.3do.2C_.s3o.29|3D files]] such as .3do or .3do to be used by features, units or weapons.
Subfolders are allowed.
 
=='''<code>unittextures\</code>'''<br>==
[[Game_and_Unit_development#Modeling_.28.3do.2C_.s3o.29|Textures for the 3D files]] Textures for the 3D models.
Subfolders are allowed.
 
=='''<code>scripts\</code>'''<br>==
[[Game_and_Unit_development#Unit_Scripting.2FAnimations_.28.cob.2C_.bos.2C_.lua.29|animation scripts]] for units
 
=='''<code>sidepics\</code>'''<br>==
[[Sidedata.lua|Faction icons]] read by lobby etc.
 
=='''<code>sounds\</code>'''<br>==
[[Sounds.lua|sound files]]
 
=='''<code>unitpics\</code>'''<br>==
[[Units:Buildpics|unit preview pictures for buildmenu]]
 
=='''<code>weapons\</code>'''<br>==
files that [[Weapon_Variables|define weapons]]
Subfolders are allowed.
 
[[Category:Game development]]

Revision as of 12:24, 22 October 2011

This are the files to be found in a Spring game. Optional files or folders such as "config\" folders for ie Lua scripts are not listed.

This page is unfinished


root of game folder

Modinfo.lua and can also contain Modoptions.lua and LuaAI.lua

bitmaps\

bitmaps\loadpictures

pictures that will be displayed when the game loads

bitmaps\tracks

images that are used for the unit tracks

units\

.lua or .fbi files that define the units. Subfolders are allowed.

features\

.lua or .fbi files that define features (wreckage and such) Subfolders are allowed.

gamedata\

files that control global things or setup graphic & sound resources.

icons\

images for unit symbols and radar icons

LuaRules\

various files to make Lua scripts work such as gadget handler (?)

LuaRules\Gadgets

Lua gadgets: scripts that controll the gameplay

LuaRules\Configs

config files read by Lua gadgets

LuaUI\

LuaUI\widgets

Lua widget: scripts that make up the user interface or do other unsynced things

objects3d\

3D files such as .3do or .3do to be used by features, units or weapons. Subfolders are allowed.

unittextures\

Textures for the 3D files Textures for the 3D models. Subfolders are allowed.

scripts\

animation scripts for units

sidepics\

Faction icons read by lobby etc.

sounds\

sound files

unitpics\

unit preview pictures for buildmenu

weapons\

files that define weapons Subfolders are allowed.