SR2010 - Modding

What Can I Do?

So far you can modify the following areas of the game.

  • Scenario Parameters
  • Terrain Types
  • Map Resources
  • Map Population
  • Units and Facility Data
  • Technology and Research
  • Ministers and Advisors
  • Orders
  • Player Configuration Data


Many elements of modding can be found in the official Map Editor Documentation found on the official website;http://www.battlegoat.com/customize_mod.php

For information on creating a custom scenario for scratch, see the scenario design tutorials;http://www.battlegoat.com/tutorial_mapdesign.php

Comma Delimited Format

Comma Delimited Format or Comma-Separated Values is a spreadsheet file format with a .CSV extension. One can easily read this into excel or modify by hand with notepad. You can also use OpenOffice for creating the .CSV files required.

When exporting to .CSV it is important to assure that your program is using commas to separate the data. Check your .CSV file by opening it with Notepad or some other basic text editor. The lines should look like this;

1,,Conscript,0 Infantry,*,,,-,10,70,0.05,0.10

if your data is in quotation marks or separated by semicolons it will not import correctly.

Scenario Parameters

Inital Scenario Parameters are set in the .GMC file. This file is located in the /Custom folder.

The .GMC file is made up of three sections; Scenario info, Setup Defaults and Players' Data.

More details to follow.

Terrain Types

/Custom/terfile.csv is the file to mod.

Contains:

  • Name of Terrain Type (this is over-ridden by Localization files in non-English languages)
  • Unimproved Production of Terrain for each of 8 primary Resource types
  • Maximum "Improved" Production of Terrain when Facilities are built
  • Population multiplier of Unimproved Terrain hex
  • Average Temperatures and Rainfall (not used in SR2010)
  • Movement Cost values for Terrain
  • Defense values for Terrain
  • Maximum Entrenchment of Terrain
  • Flag if Terrain is 'Naval', 'Low Visibility', 'High Ground', or (unused) 'Freezable'
  • Special features of Terrain - Desert, Alpine, Tropical
  • Location of Terrain graphic on Terrain page


In the mapeditor, terrain within the Terrain tab is divided into rows for each terrain type and there are 16 tiles for each type. While each tile in a type has the same name, each tile has different statistics and usually follows a common pattern.

Terrain Tiles
Terrain Tile Description Population Resources Notes
Tile 1 Barren None None  
Tile 2 Depleted Low None  
Tile 3 Remote None Low  
Tile 4 Basic Moderate Some  
Tile 5 Agri Normal Agri Produces Agri without Upgrade
Tile 6 Ore Normal Ore Has some Coal and Petrol potential
Tile 7 Petrol Normal Petrol Has some Coal potential
Tile 8 Coal Normal Coal Has some Ore and Petrol potential
Tile 9 Uranium Normal Uranium Has some Coal and Ore potential
Tile 10 Timber Normal Timber Has some Fresh Water potential
Tile 11 Water Normal Water Has some Agri Potential
Tile 12 Hydroelectric Normal Hydro Has some Fresh Water potential, needed for Hydroelectric Upgrades
Tile 13 High 1/Pop 1 See Notes Varies Either High Ground type or High Population type
Tile 14 High 2/Pop 2 See Notes Varies Less population if high, more if not, than previous
Tile 15 High 3/Pop 3 See Notes Varies Less population if high, more if not, than previous
Tile 16 High 4/Pop 4 See Notes Varies Less population if high, more if not, than previous

Water, Rough Desert, Swamp and Tundra Types do not follow this patter as they have less tiles per type and a lack of certain resources.

The exact values for each terrain tile can be seen in the map editor under the Ter Def tab.

To import changes to the Terrain, select the "Import Terrain" button in the mapeditor. The data file will be created in /Custom/DATA/ folder. The name of the file will be DEFAULT.TER. To use a custom terrain file, select the popup to edit Map Terrain/Owner info from the first MAP tab of the editor. At the bottom of that popup you can specify the new terrain file name. This will keep the terrain data unchanged for other maps. This must be changed before importing the file.

Movement Costs

Map Resources

Resources in the game are generated in two ways. First is by default output from certain terrain tiles, second is from upgrading tiles with resource potential. In both cases, it is the terrain that determines the resource output.

To place a potential for a resource, select a terrain tile which has a potential as shown under the "Max" colummn in the Ter Def tab. Select a map location to place it.

To create actual resource production, select a terrain tile which has a potential as shown under the "Default" colummn in the Ter Def tab. Select a map location to place it.

Some resources cannot be generated by default and require a map upgrade to be placed in order to generate the resource. Upgrades can draw on the potential from the hex in which they are located and any adjacent hex. If only the hex in which the upgrade is placed has a potential for the resource, the maximum capacity of the upgrade will be relatively low.

Map Population

Most terrain tiles have a base population assigned to them, however this can be increased in the Hex Upgr tab. Tiles that have been increased can only be decreased down to the base population of the tile. Further decreasing population in an area can only be done by replacing the terrain tile.

Units and Facility Data

DownArrow.png

Download SRUNITS_user.zip
Version compatibility: 4.6.1
Author: BattleGoat Studios
Notes: Update 6 data

/Custom/SRUNITS.csv is the file to mod.

File must be "Saved As" SRUNITS.CSV and placed in the /Custom folder to import. Import will fail if the .CSV file is open in your editor when selecting "Import" in the mapeditor. You will not get an error, it will simply not work.

The game's own mapeditor will compile the data when "import" is selected. After compiling the resulting file is /Custom/DATA/DEFAULT.UNI. It will apply to all scenarios in the Custom section where DEFAULT.UNI has been set for the equipment list to use within the mapeditor.

A quick way to test the import: - Change the name of CONSCRIPT to something obvious such as CONSCRIPTIO; - save the .csv file; - in the Mapeditor Import the Unit file and right away go to the units tab and see if the change is there (you may have to turn off the 'Filter to Region' checkbox). The name in the list should be changed.

Region Codes - Unit Classes

Technology and Research

/Custom/techtree.csv is the file to mod. Its rather simple, aside from the fact that the value modifiers have not been defined at the time of this writing.

Some significant elements of Research/Tech Tree items that can be adjusted:

  • Tech level when item becomes available to Research
  • Baseline cost of Researching the Tech
  • Baseline time (days) to Research the Tech

Note that cost and time are 'baselines' and not definite values, and will vary based on many regional factors including GDP/c, regional population, number of research centers, number of projects in research queue, etc.

The techtree file also allows adding new techs and changing pre-requisites, however this should be done with caution as it may be possible to create a tech 'loop' or break the tree progression, causing either erratic research issues or more serious problems.

After compiling the resulting file is /Custom/DATA/DEFAULT.TTR

Ministers and Advisors

/Custom/pplfile.csv is the file to mod.


After compiling the resulting file is /Custom/DATA/DEFAULT.PPL

Orders

File is Orders.CSV and placed in the /INI folder. No further support is provided at this time.

Custom Player Variables Files (CVars)

Every game scenario requires a Configuration file (referred to by BattleGoat Studios as CVars) with base data for elements such as literacy, birth rates and product efficiencies. Players must create one for new scenarios but some of the files for existing scenarios have been posted.

Once a CVars file has been completed, it must be imported into the editor. To import a CVars, save the file into the /Custom folder as a .CSV file. The file must have the same filename as the .GAM for the scenario but with the .CSV extension. Be sure to close the editor you are using to create the CVars file or it will not import. You will not get an error, it will simply not work.

Next, load the scenario into the Mapeditor. The .GAM, .MAP and .SCN files for the map must be in the /Custom folder to be loaded. The .GMT file must also be located in the /Localize/LocalXX/Custom folder if there is a .GMT specified in the .GAM (Or remove the reference from the .GAM). If the .GMT is not present but specified in the .GAM the map will not load properly. LocalXX refers to the language being used to play such as LocalEN or LocalPL.

Once the Scenario is loaded, use the IMPORT CVARS button in the CURRENT FILES box to import the file. Save the scenario to keep the changes.

Player Configuration Files

Compiling

In the Game Editor box of the Mapeditor “Map” tab are controls to load, save and quit. To the right of these buttons are the four main import buttons;

Position of the compile buttons.
  • Import Units
  • Import Cabinet
  • Import Techtree
  • Import Terrain File

These will create, in order, DEFAULT.UNI, DEFAULT.PPL, DEFAULT.TER and DEFAULT.TTR in the \Custom\DATA folder. These files are used for all custom scenarios. The file names for the Units, Cabinet and Techtree files may be altered to create custom files in the Scenarios/Upgrade Info popup by selecting the Edit button next to Scenarios/Upgrade Info in the second box. For example if PEOPLE INFO FILE is listed as NEWGOV instead of DEFAULT, when the cabinet is imported it will create NEWGOV.PPL. These filenames should be all caps.

Changes to the files in the \Maps\DATA folder are not supported by BattleGoat Studios as they are used by the Official Game Scenarios.

WARNING: Using this files in the /Maps/Data/ folders instead of the custom folders may make the game incompatible with others for multiplayer and updates may overwrite modded files.

Attachement: