Packaging A Mod for GSB 2

This is a technical guide for modders who wish to add new modded content to Gratuitous Space Battles 2. No special software or tools or experience is required, just an ability to read this guide and type text into notepad or the text editor of your choice!

GSB2 loads content into a number of packages, each of which can be turned on or off. You can even turn off the GSB2 core package and have no content at all, if you want to make a total conversion mod. Do not attempt this without one installed :D. The game looks for two different locations and loads mods happily from either one. One of these is the games program files folder, where 'official' mods are installed and sometimes only installers can write data, and the other is the games dedicated modding folder, which is writable by all computer users. The official mods have a list of files inside a folder called 'installs' in the programs data folder (see below)

If you look in that folder you should find (at least) a file called gsb2_base.txt. This serves as a good 'sample' file for how you create a mod, and the content is as follows:


name = gsb2_base

An internal name for the mod, this must be unique


Do *not* leave blank. this is the path, from the games root folder, which acts as the base folder for all the data in this mod. usually a folder with the name of the mod,with a 'data' folder inside it.

guiname = Gratuitous Space Battles 2

This is the text used as a 'human-readable' title for the mod in the mod control panel

author = Positech Games

This gets displayed in the mod control panel

description = This is the basic game. Only disable this mod if you have a total conversion mod installed.

This description is shown in the mod control panel

texture = gsb2_mod.jpg

A graphic displayed in the mod control panel, can be inside any mod folder

enabled = 1

Always iniitally set to 1, this is toggled by the mod control panel

As you can see, the vast majority of the data is just fluff for the games dedicated 'mod control panel' to use to display nice graphical options to the player. GSB2 lets players enable and disable mdos without uninstalling them or removing the files. You can access the mod control panel from the games main menu. The other main feature of this file is to tell the game where to look for the mod. In the case of these official mods, its a subfolder of the gratuitous space battles 2 folder. For example, you might create a folder called 'mymod' whose full path would be something like C:\program files\gratuitous space battles 2\mymod. In this case, there would be a 'data' folder inside mymod, and inside that would be files for new ship modules, new graphics, new components, and so on...

So this is all well and good, but what about non-official mods, ones submitted to steam workshop for example? Well they can be found in this folder: \my documents\my games\gratuitousspacebattles2\mods. The folder will look something like this:

If you have subscribed to steam workshop ships, each will have a folder here, created aurtomatically. Each folder is a mod, and they work exactly like the 'official' ones in the other folder, although in this case, the game looks for the file describing the mod in a slightly different way. The game looks in the 'mods' folder onm startup, goes through every subfolder (each is considered to be a mod) and opens the only text file in each one. Thus, do not put multiple files in each folder! It then behaves just like the other system, registering each mod with the control panel. The only difference is that you don't need a 'data' foilder this time, you can just stick in the other folders (ships, components, hulls whatever...) and they will be found. If you have steam, its a good idea to subscribe to a ship just to see how that folder gets populated.

That is how you get your mods to show up in Gratuitous Space Battles 2. If you have any questions, head over to the official modding forums.

Positech Games