This is an old revision of the document!


Masterfile

A scenario can have a masterfile specified. If it has it will be loaded everytime the scenario is loaded. This way you can keep a number of scenarios keeping to the same rules while only having to update the masterfile.

The masterfile is just the filename, not its path. It is first looked for in the same directory as the scenario, and if it is not found there it is looked for in the “scenarios directory” as specified by the startup script.

Overwritten Datastructures

By loading a masterfile the following is overwritten:

* Bridge

* RoadTypes

* RiverTypes

* LocTypes

* SFTypes

* People (if read people)

* ItemTypes

* LandscapeTypes

* Research

* Historical units (on slot basis are they overwritten, not to be confused with ID basis) <Not present in AT>

* Stringlists (on slot basis are they overwritten, not to be confused with ID basis)

* Variants

* Rulevars

* Following settings: UseAI, SystemGfxDir, ScenarioDir, SoundDir, Rulesetname, Website

For all overwritten datastructures goes that only the slots defined in the masterfile are overwritten in the loading file. this means for example if a scenario has 20 landscape types and the master has only 10 that only the first 10 are overwritten.

Conditional Import

* Tempstrings are only imported is they are not empty (””)

* Events are overwritten but not when the the masterfile has an event without commands in a slot where there currently is an event with commands.

* Actioncards are overwritten but not when the masterfile has a card without executeevent in a slot where there currently is an event with executevent specified.

* Eventpictures are overwritten but not when the slot has a non-empty string in it and the masterfile has “empty.bmp” in it.

* Gameslots and Regimeslot names are and their show settings are overwritten but not when the slot has a non-empty string in it and the masterfile has the name “Empty”

Special Import

* Predef units are imported. If the same predef# (ID tag for units) is present in the loading scenario as well as the masterfile then that unit is overwritten with the info from the masterfile, if it is not new units are created to make place for the predef units in the masterfile.

 
masterfile.1295258243.txt.gz · Last modified: 2016/02/26 18:21 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki