- 1 Game Structure
- 1.1 .sd7 or .sdz
- 1.2 .sdd directories
- 1.3 Directory Structure
- 1.3.1 root of game folder
- 1.3.2 anims\
- 1.3.3 bitmaps\
- 1.3.4 features\
- 1.3.5 gamedata\
- 1.3.6 icons\
- 1.3.7 LuaRules\
- 1.3.8 LuaUI\
- 1.3.9 objects3d\
- 1.3.10 scripts\
- 1.3.11 sidepics\
- 1.3.12 sounds\
- 1.3.13 units\
- 1.3.14 unitpics\
- 1.3.15 unittextures\
- 1.3.16 weapons\
.sd7 or .sdz
A mod is presented as an sd7 or sdz file. This is just a zip file of the individual files comprising the game.
You can unzip the sd7 or sdz file by renaming it to .zip, and using a zip tool to unzip it.
sd7 / sdz files are created using 7zip.
You can avoid using the archives altogether by storing the whole mod directory structure in an .sdd directory. This is useful for game development because the changes you make are visible without any additional step.
On Linux one can also symlink the development directories from the Spring's mod directory:
ln -s ~/projects/caspring/games/zk ~/.spring/games/zk.sdd
root of game folder
image files for mouse cursors
pictures that will be displayed when the game loads.
images that are used for the unit tracks
.lua FeatureDef files
- Corpse and map-static feature definitions. The corpse files are similar to UnitDefs but usually contain a less data, such as what model to use as the wreckage, how much metal the wreck will give if reclaimed, etc. Some games choose to subsume these into the UnitDef instead of having separate files.Subfolders are allowed.
Various files that control global things or setup graphic & sound resources.
images for unit symbols and radar icons
various files to make Lua scripts work such as gadget handler
Lua gadgets: scripts that control the gameplay
config files read by Lua gadgets
Lua widget: scripts that make up the user interface or do other unsynced things
- This contains the actual 3D model that units and features use in-game. Most units have a variety of different pieces that are put together in a hierarchy type form (for instance, a tank has a hull, a turret attached to that, and a barrel attached to that). The model tag determines what model is used.
- This contains all of the animation scripting for the units. Scripts work by calling on pieces of the unit's model to do things, such as rotate a turret to aim at a target, or emit smoke when the unit is damaged. The pieces named in the script file must reflect actual parts of the unit's.
Faction icons read by lobby etc.
.lua UnitDef files
- Contains most of the active data that a unit uses, such as its health, a list of which weapons it has, speed, metal/energy cost, whether it is a construction unit or not, so on and so forth. Subfolders are allowed.
.dds or .png buildmenu pictures
- Unit pictures are those little thumbnails which show up in the build menus of units in-game. They're just a little graphical representation of the unit so people know what they're building when they click it. Assigned via the buildpic tag.
.dds, .tga or .png image texture files.
- Image files which are stretched over the unit. Texture 1 contains the diffuse and team colour and texture 2 controls reflectivity, specular, glow and 1-bit transparency. Subfolders are allowed.
.lua WeaponDef files
- Most units have weapons. The characteristics of these weapons, from its behaviour to how it acts in the air, is determined in the weapon file. Some games choose to subsume these into the UnitDef instead of having separate files. Subfolders are allowed.