Ticket #3208: TechnologyReplaceWithTechnologies.patch

File TechnologyReplaceWithTechnologies.patch, 8.8 KB (added by Niek, 9 years ago)

Now with modified technologies

  • binaries/data/mods/public/simulation/components/TechnologyManager.js

     
    337337        }
    338338    }
    339339
     340    if (template.replaces && template.replaces.length > 0)
     341    {
     342        for (var i of template.replaces)
     343        {
     344            if (i == "" || this.IsTechnologyResearched(i))
     345                continue;
     346
     347            var template = this.GetTechnologyTemplate(i);
     348            this.researchedTechs[i] = template;
     349        }
     350    }
     351
    340352    this.UpdateAutoResearch();
    341353
    342354    var cmpPlayer = Engine.QueryInterface(this.entity, IID_Player);
  • binaries/data/mods/public/simulation/data/technologies/phase_city.json

     
    11{
    22    "genericName": "City Phase",
    3     "requirements": { "any": [{"tech":"phase_city_generic"}, {"tech":"phase_city_athen"}]},
    4     "autoResearch": true,
    5     "modifications": [{"value": "TerritoryInfluence/Radius", "multiply": 1.50},
    6         {"value": "Health/Max", "multiply": 1.2, "affects": "CitizenSoldier"}],
     3    "specificName": {
     4        "mace": "Megalopolis",
     5        "spart": "Megalopolis",
     6        "athen": "Megalopolis"
     7    },
     8    "description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology.",
     9    "cost": {"food": 0, "wood": 0, "stone": 1000, "metal": 1000},
     10    "requirements": { "class": "Town", "number": 4 },
     11    "requirementsTooltip": "Requires 4 new Town Phase structures (except Walls and Civic Centers).",
     12    "supersedes": "phase_town",
     13    "icon": "city_phase.png",
     14    "researchTime": 80,
     15    "tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civic Centers increased by another +50%",
     16    "modifications": [{"value": "TerritoryInfluence/Radius", "multiply": 1.50}, {"value": "Health/Max", "multiply": 1.2, "affects": "CitizenSoldier"}],
    717    "affects": ["CivCentre", "Infantry", "Cavalry"],
    8     "soundComplete": "interface/alarm/alarm_phase.xml",
    9     "icon": "city_phase.png"
     18    "soundComplete": "interface/alarm/alarm_phase.xml"
    1019}
  • binaries/data/mods/public/simulation/data/technologies/phase_city_athen.json

     
    88    "requirements": { "class": "Town", "number": 4 },
    99    "requirementsTooltip": "Requires 4 new Town Phase structures (except Walls and Civic Centers).",
    1010    "supersedes": "phase_town_athen",
     11    "replaces": ["phase_city"],
    1112    "icon": "city_phase.png",
    1213    "researchTime": 80,
    1314    "tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civic Centers increased by another +50%. Silver Owls civ bonus grants an extra +10% metal gather rate to all workers.",
    14     "modifications": [{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1}],
    15     "affects": ["Worker"],
     15    "modifications": [{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1}, {"value": "TerritoryInfluence/Radius", "multiply": 1.50}, {"value": "Health/Max", "multiply": 1.2, "affects": "CitizenSoldier"}],
     16    "affects": ["Worker", "CivCentre", "Infantry", "Cavalry"],
    1617    "soundComplete": "interface/alarm/alarm_phase.xml"
    1718}
  • binaries/data/mods/public/simulation/data/technologies/phase_town.json

     
    11{
    22    "genericName": "Town Phase",
    3     "requirements": { "any": [{"tech":"phase_town_generic"}, {"tech":"phase_town_athen"}]},
    4     "autoResearch": true,
     3    "specificName": {
     4        "athen": "Komópolis",
     5        "mace": "Komópolis",
     6        "spart": "Komópolis"
     7    },
     8    "description": "Advances from a small village to a bustling town, ready to expand rapidly.",
     9    "cost": { "food": 800, "wood": 800, "stone": 0, "metal": 0 },
     10    "requirements": { "class": "Village", "number": 5 },
     11    "requirementsTooltip": "Requires 5 Village Phase structures (except Palisades and Farm Fields).",
     12    "supersedes": "phase_village",
     13    "icon": "town_phase.png",
     14    "researchTime": 80,
     15    "tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civic Centers increased by +30%",
    516    "modifications": [{"value": "TerritoryInfluence/Radius", "multiply": 1.30},
    617        {"value": "Health/Max", "multiply": 1.2, "affects": "CitizenSoldier"}],
    718    "affects": ["CivCentre", "Infantry", "Cavalry"],
    8     "soundComplete": "interface/alarm/alarm_phase.xml",
    9     "icon": "town_phase.png"
     19    "soundComplete": "interface/alarm/alarm_phase.xml"
    1020}
  • binaries/data/mods/public/simulation/data/technologies/phase_town_athen.json

     
    88    "requirements": { "class": "Village", "number": 5 },
    99    "requirementsTooltip": "Requires 5 Village Phase structures (except Palisades and Farm Fields).",
    1010    "supersedes": "phase_village",
     11    "replaces": ["phase_town"],
    1112    "icon": "town_phase.png",
    1213    "researchTime": 80,
    1314    "tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civic Centers increased by +30%. 'Silver Owls' civ bonus grants an extra +10% metal gather rate to all workers.",
    14     "modifications": [{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1}],
    15     "affects": ["Worker"],
     15    "modifications": [{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1}, {"value": "TerritoryInfluence/Radius", "multiply": 1.30}, {"value": "Health/Max", "multiply": 1.2, "affects": "CitizenSoldier"}],
     16    "affects": ["Worker", "CivCentre", "Infantry", "Cavalry"],
    1617    "soundComplete": "interface/alarm/alarm_phase.xml"
    1718}
  • binaries/data/mods/public/simulation/templates/structures/athen_civil_centre.xml

     
    1515      units/{civ}_cavalry_javelinist_b
    1616    </Entities>
    1717    <Technologies datatype="tokens">
    18       -phase_town_generic
     18      -phase_town
    1919      phase_town_athen
    20       -phase_city_generic
     20      -phase_city
    2121      phase_city_athen
    2222    </Technologies>
    2323  </ProductionQueue>
  • binaries/data/mods/public/simulation/templates/structures/ptol_military_colony.xml

     
    6464      units/{civ}_cavalry_javelinist_merc_b
    6565    </Entities>
    6666    <Technologies datatype="tokens">
    67       -phase_town_generic
    68       -phase_city_generic
     67      -phase_town
     68      -phase_city
    6969    </Technologies>
    7070  </ProductionQueue>
    7171  <Sound>
  • binaries/data/mods/public/simulation/templates/structures/sele_military_colony.xml

     
    6363      units/{civ}_cavalry_spearman_merc_b
    6464    </Entities>
    6565    <Technologies datatype="tokens">
    66       -phase_town_generic
    67       -phase_city_generic
     66      -phase_town
     67      -phase_city
    6868    </Technologies>
    6969  </ProductionQueue>
    7070  <Sound>
  • binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml

     
    9090      units/{civ}_support_female_citizen
    9191    </Entities>
    9292    <Technologies datatype="tokens">
    93       phase_town_generic
    94       phase_city_generic
     93      phase_town
     94      phase_city
    9595    </Technologies>
    9696  </ProductionQueue>
    9797  <ResourceDropsite>