Has anyone figured out if it is even possible to mod or otherwise create new maps for the campaign game? I see text files available to them, but it looks like one has to open a separate text file for each star, even assuming one knew what all the data meant. Looks like a ‘lot’ of work if it is possible.
Hi Panpiper. This proves that it’s possible.
If you search farther back in the modding forum, I think that you should see a post (with a screenshot) from a player who said he created the entire Babylon 5 universe reasonably fast as a Galactic Conquest map.
Thank you Astro. I had looked through the last few pages of posts but saw no reference to map modding. I will promptly check out the thread you refereed to. Who knows, if it proves to be simple enough, I may even try my hand at it.
Hi, here is everything I know. I will use “…/gratuitous space battles/” to denote the root folder where the game is located on your machine.
In order to build your own campaign map the very least you will need to do is define a campaign map configuration file in “…/gratuitous space battles/campaign/maps/”, and planet configuration files (one for each planet you want on your map) anywhere in “…/gratuitous space battles/”.
[size=170]Campaign Map Configuration[/size]
Your map’s configuration file should be a .txt file in “…gratuitous space battles/campaign/maps/”. It should contain two sections: config and encounters. I’ll try and describe every field you must define each section.
Homeworld: This is the encounter ID of the planet that will serve as the homeworld (the starting planet for the player)
MapSizeX: This defines the width of your map.
MapSizeY: This defines the height of your map. You do not need to be afraid about exceeding a player’s resolution. If the map is large then GSB will let you scroll the map.
Name: This is the internal name for your campaign map, it should be unique.
GUIName: This is the name of your campaign map as shown to the user.
MapTexture: This is a file in “…/gratuitous space battles/campaign/data/bitmaps/ui/”. It is the background for your campaign map. It will be stretched/shrunk according to the player’s resolution. There is no need to match the dimensions of the MapTexture to your MapSizeX/MapSizeY values.
This is a list of file paths for your planet configuration files. Say you only had three planets in your map, then your encounters list would look something like this:
0 = campaign/data/path/to/planets/planet1.txt
1 = campaign/data/path/to/planets/planet2.txt
2 = campaign/data/path/to/planets/planet3.txt
Planet configuration files should exist anywhere in “…/gratuitous space battles/” (including its subdirectories).
There are five sections possible: config, terrain, variables, facilities, and hopcounts.
MapPosition.X: A number between 0 and 1 inclusive. Determines the position of your planet along the x-axis.
MapPosition.Y: A number between 0 and 1 inclusive. Determines the position of your planet along the y-axis.
The top left corner of your map is the origin and will always have the coordinates 0,0. The higher the Y coordinate, the lower the planet will appear on the map. The higher the X coordinate, the farther right the planet will appear. Examples: 1,1 is the bottom right corner of map; 0.5, 0.5 is the exact center of map.
EncounterID: This is a number that will be used to identify this planet internally. It should be unique.
wormholes: A list of encounter IDs (separated by commas) of planets you can travel to
backdrop: This is the backdrop that is shown during a battle at the planet, the file must be in “…gratuitous space battles/campaign/data/bitmaps/backdrops/”
icon: This is the graphic used to display the planet on the map. It must be a file in “…gratuitous space battles/campaign/data/bitmaps/planets/”
name: Internal name. Probably should be unique, but I don’t know for sure.
guiname: This is the name displayed to the user. It can be different then the name field.
starfield = I think this is the flag to toggle background stars when in battle. 0 turns the starfield off, 1 turns it on.
mapiconsize = This is the size of this planet’s icon on the map. The larger the number, the bigger the planet on the map.
enemyfleetcost = The higher the number, the larger an enemy fleet can be when attacking this planet (perhaps others can shed light on this)
shader = This is optional. You can add a shader to give your planet a different look. The file must exist somewhere in “…/gratuitous space battles/campaign/”. The default shaders are all in “…/gratuitous space battles/campaign/data/shaders/”.
You need to define one cryptic little line under this section. Here is an example of what it could look like:
0 = 654,367,1.0,spindle_planet1.dds,0,0,0,1.0,1.0,662,662,0,1
Start the field with a ‘0 =’ and give 13 parameters separated by commas. All I know for sure is:
- the first two parameters are the X,Y location of the planet image in pixels
- the 4th parameter is the planet image to display in the background during battle. Typically this should be the same as what you set as ‘icon’ in [config]
- the 10th and 11th are the width and height of the planet image respectively
The rest of the parameters appear to be always the same values in every planet’s configuration. Perhaps someone could add to this?
This section is optional. It is used to define planetary anomalies. Here are some examples you can use:
WEAPON_RANGE_MULTIPLIER,0.75 WEAPON_RANGE_MULTIPLIER,0.50 SHIELD_STRENGTH_MULTIPLIER,0.25 ENGINE_SPEED_MULTIPLIER,0.50 FIGHTERS_INOPERABLE FRIGATES_INOPERABLE CRUISERS_INOPERABLE SHIELDS_INOPERABLE REPAIR_INOPERABLE CLOAK_INOPERABLE TRACTOR_INOPERABLE
‘Multiplier’ variables above have an extra parameter after them. This is a number between 0 and 1 inclusive.
This section is also optional. It is a list of all facilities on your planet. If I wanted to add a small factory and academy to my planet I would add this under
0 = smallfactory 1 = smallacademy
Here is a list of the IDs of all (default) facilities for your convenience:
And yes, it is possible to add custom facilities.
Used to defines the distances between planets. A typical list may look like this:
0 = 96,8
1 = 95,7
2 = 94,6
The number before the ‘=’ character is for ordering the list (start at 0 and increment by 1 as you add more hopcount entries). The first number after ‘=’ is the encounter ID of a planet. The second number after ‘=’ is the number of warps or hops it would take to get from this planet to the planet with the same encounter ID you. So this:
0 = 96,8
would mean that it would take 8 hops to get to the planet with encounter id 96 from here. I remember reading somewhere that hopcounts are used in calculating the spread of “fear” between planets.
END OF KNOWLEDGE
If anyone sees any errors above or if there is anything confusing let me know.
For large maps, editing these configuration files is tedious (and painful). In order to create Atellian Expanse, I had to create my own campaign map editor to remove most of the difficulty. I have not made this editor public yet (it’s not done), though if you are still interested in building maps I am willing to send you the current version for you to use. You would also be helping me out in testing it before I release it to the community.
Wow! Thank you Ekalin, thank you very much. I thank you personally, but also I thank you on behalf of future generations. All the work you did to figure all that out is now preserved for posterity. Now I shall see what I can concoct map wise…
Ekalin, that is a superb tutorial for the subject. Outstanding work!!!
It is now cross-posted to the GSB Modding 101 guide that’s stickied at the top of this forum. Thank you for your time and persistence in corralling all of the required data together in one place and making it understandable.