Menu

Custom Settlement Template

Help
AcerM
2012-06-25
2012-11-16
  • AcerM

    AcerM - 2012-06-25

    Hi. I love the concept of this project. I have also recently read and greatly enjoyed Red Mars.
    I was wondering, can the settlement templates be edited or added too? I suspect I would need to edit some xml files. However, I am not certain how to do so and get my goal. What software? What parts of which files do I edit?

     
  • Scott Davis

    Scott Davis - 2012-06-26

    Hi acerm,

    You should be able to edit the configuration XML files for the simulation to create your own buildings and settlement templates.

    The simulation configuration XML files are stored in the jars/mars-sim-core-3.02.jar file.  They are located in the conf directory in the jar file and are defined by the dtd files in the dtd subdirectory.  The jar file is basically a zip file and should be openable with any application that opens zip files and you should be able to extract/replace any file within it.

    The two relevant XML files are settlements.xml and buildings.xml.  I would recommend extracting these and saving a backup copy of them.  You can then edit them adding new settlement templates and buildings as you wish.  Use the existing configuration as examples and the dtd files should show all currently possible options.  Keep in mind the dtd's are order-specific so, for example, a building's functions will need to be ordered as listed in the dtd (alphabetical) or it will throw an XML error.

    Once you are done editing the XML files, you should be able to replace in the jar file.  Start up the simulation and create a new simulation to have it read the updated configuration.

    Let me know if you have any problems.  I would like to create a GUI user interface for designing settlement templates sometime in the future, but for now it's just in an XML configuration file.

    Thanks,

    Scott Davis
    Mars Simulation Project
    http://mars-sim.sf.net
    scud1@users.sourceforge.net

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.