Changes between Version 5 and Version 6 of Technology_Templates


Ignore:
Timestamp:
Oct 3, 2012, 11:17:10 PM (12 years ago)
Author:
historic_bruno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Technology_Templates

    v5 v6  
    1 Technology template files use the json format and are put in simulation/data/technologies.
     1Technology template files use the [wiki:JSON JSON] format and are put in [source:/ps/trunk/binaries/data/mods/public/simulation/data/technologies simulation/data/technologies] (see [wiki:Mod_Layout mod layout]).
    22
    33The technologies available to be researched from a building are defined by
     
    5757'''requirements''': This defines what is required for the tech to be available for research.  Currently (20/04/2012) the available requirements are:
    5858
    59 { "tech": "town_phase"} - This tech must be researched
     59 * { "tech": "town_phase"} - This tech must be researched
    6060
    61 { "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.
     61 * { "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.
    6262
    63 { "all": [{...}, {...}, ...]} - All of the requirements in the list must be met.
     63 * { "all": [{...}, {...}, ...]} - All of the requirements in the list must be met.
    6464
    65 { "any": [{...}, {...}, ...]} - At least one of the requirements in the list must be met.
     65 * { "any": [{...}, {...}, ...]} - At least one of the requirements in the list must be met.
    6666
    6767'''requirementsTooltip''': A human readable version of the requirements to be displayed in the tooltip.
     
    7272
    7373'''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:[[BR]]
    74 ''multiplier'' - adds (multiplier-1)*originalValue to the property.  Note this is not cumulative.[[BR]]
    75 ''add'' - adds this number to the property.  Can be negative.[[BR]]
    76 ''replace'' - this replaces the existing value (useful if no original value exists).  The ordering of multiple replaces is not defined.[[BR]]
     74 * ''multiplier'' - adds (multiplier-1)*originalValue to the property.  Note this is not cumulative.[[BR]]
     75 * ''add'' - adds this number to the property.  Can be negative.[[BR]]
     76 * ''replace'' - this replaces the existing value (useful if no original value exists).  The ordering of multiple replaces is not defined.[[BR]]
    7777Note that the code does no validity checking for the modification, the technology writer is responsible.
    7878
     
    8181=== Technology Pairs ===
    8282
    83 A technology pair has a pair json file which is added to the list of tokens in ProductionQueue.  It has the following format:
     83A technology pair has a pair json file which is added to the list of tokens in !ProductionQueue.  It has the following format:
    8484{{{
    8585#!js