Configuring XML Files

Overriding the XML Configurations

This guide will get you started with editing the XML files.

Most of the Mars Simulation Project’s configuration files are primarily written in XML format. Some are in JSON.

At the beginning of a sim (whether it is starting a brand new sim, or loading from a new sim), the values/attributes/properties contained in these xml files will be read into your local machine’s Java VM memory.

Most attributes and properties are designed to tolerate a range of values. However, they are not all created equal to have the same degree of user customization.

Note that when saving a sim, it will not alter any XML files.

Location

At startup, they are being copied into user’s home directory. Players may manipulate these XML files in /.mars-sim/xml folder. The file can be editted in this location but changes will be overwritten when a new simulation starts unless the file name is added to the exception.txt file.

Backup

It is recommended that you make a backup of the original xml configuration file before editing them as edited XML files often contain errors that may result in a failure for mars-sim to boot up.

Whenever a new build or version of mars-sim is executed, it will attempt to compare the version content of the version.txt file in the /.mars-sim/xml folder to determine if it matches the core engine’s build version.

If they don’t match, mars-sim will attempt to backup the existing XML files on user home into a new directory inside the backup folder.

List of XML files

File nameDescription
buildings.xmlDefine new buildings with functions
construction.xmlDefine type of foundations, frames and buildings
country/country_name.xmlDefine settler’s names for a country
crew/crew_name.xmlStore a crew roster
scenario/scenario_name.xmlDefine the default settlement scenario
settlement/settlement_name.xmlDefine the building placements for a settlement template phase
building_packages.xmlDefine building packages for use in settlement templates
buildings.xmlDefine building placement for use in settlement templates
construction.xmlDefine a list of foundations, frames and buildings that can be constructed
crops.xmlDefine food crops grown in greenhouses
food_production.xmlDefine food technology related processes
governance.xmlDefine country and sponsor objectives and mission agendas, as well as settlement and rover naming scheme
landmarks.xmlDefine landmarks on the surface of Mars
malfunctions.xmlDefine malfunctions that can occur in the sim
manufacturing.xmlDefine manufacturing processes
meals.xmlDefine main dish and side dish recipes
medical.xmlDefine illnesses or treatments
minerals.xmlDefine mineral types
part_packages.xmlDefine part packages for initial settlements or resupplies from Earth
parts.xmlDefine parts
people.xmlDefine properties related to people
resource_process.xmlDefine resource processes
resources.xmlDefine resources
resupplies.xmlDefine initial settlement resupply packages from Earth
robots.xmlDefine robot types
settlements.xmlDefine properties related to settlements
simulation.xmlDefine simulation properties
vehicles.xmlDefine properties related to rovers, luvs, and drones