Technology template files use the JSON format and are put in simulation/data/technologies (see mod layout).

The technologies available to be researched from a building are defined by

  <Technologies datatype="tokens"> 

If a technology is required for training or building then use


The basic format is:

    "genericName": "Athenian Town Phase",
    "specificName": {
        "generic": "Generic Specific Town Name",
        "hele": "Greek Town"
    "cost": { "food": 100, "wood": 100, "stone": 0, "metal": 50 },
    "requirements": { "class": "Village", "numberOfTypes": 2 },
    "requirementsTooltip": "Requires two village structures",
    "supersedes": "village_phase",
    "replaces": ["town_phase"],
    "icon": "town_phase.png",
    "researchTime": 10,
    "autoResearch": false,
    "tooltip": "Advance to Town Phase",
    "modifications": [
        {"value": "ResourceGatherer/Rates/food.grain", "multiply": 15, "affects": "Spearman"},
        {"value": "ResourceGatherer/Rates/food.meat", "multiply": 10}
    "affects": ["Female", "CitizenSoldier Melee"]

specificName: The civ specific name will override the generic name if the player has that civ.

researchTime: This is the time it takes to research the technology in seconds.

supersedes: This is for techs which are in a sequence. The tech which it supercedes is a requirement (in addition to requirements). The GUI "stacks" the set of superceding icons so this tech will only be visible when the tech which it supercedes has been researched.

replaces: When a tech is meant to unlock the same features as a different tech, it can use the "replaces" key. In this case, town-phase buildings are unlocked by researching the phase_town, but as the Athenian faction has a separate town phase, it needs to tell this is a replacement for the regular town phase.

requirements: This defines what is required for the tech to be available for research. Currently (20/04/2012) the available requirements are:

  • { "tech": "town_phase"} - This tech must be researched
  • {"civ": "rome"} - The player must be this civ
  • { "class": "Village", "numberOfTypes": 2 } - this means that the player must own two different types of entity with the class Village, i.e. a house and a civil center meet the requirements but two houses does not.
  • { "all": [{...}, {...}, ...]} - All of the requirements in the list must be met.
  • { "any": [{...}, {...}, ...]} - At least one of the requirements in the list must be met.

requirementsTooltip: A human readable version of the requirements to be displayed in the tooltip.

icon: Icons should be placed in art/textures/ui/session/portraits/technologies.

autoResearch: If this is true then the technology will be instantly researched with no cost when the requirements are met. This could be useful for complicated technology setups or for civ specific bonuses. This is an optional field and if set then cost, researchTime etc. are not needed because it is not user visible.

modifications: This is an array of modifications that the technology makes. A modification specific affects attribute is pecific to this modification. The values to modify will be added on request. The available modifications are:

  • multiply - adds (multiply-1)*originalValue to the property. Note this is not cumulative.
  • add - adds this number to the property. Can be negative.
  • replace - this replaces the existing value (useful if no original value exists). The ordering of multiple replaces is not defined.

Note that the code does no validity checking for the modification, the technology writer is responsible.

affects: A list of sets of classes which determine which entities are affected by the modification. So the example above will affect females and melee citizen soldiers. So all of the classes within a string are required and it will affect an entity which matches any of the strings.

Note that it is possible to add one extra affects string per modification line. This string will be used as extra condition to apply the affect. The above modification would apply to "spearman females" (which don't exist) and "spearman melee citizen soldiers".

Technology Pairs

A technology pair has a pair json file which is added to the list of tokens in ProductionQueue. It has the following format:

    "genericName": "Tech Pair",
    "top": "techA",
    "bottom": "techB",
    "supersedes": "anotherTechPair"

Each of the technologies which are part of the pair should also have a "pair":"techPair" attribute linking them to the pair definition.

Last modified 3 weeks ago Last modified on Jun 9, 2015 8:06:48 AM