1
0
forked from mirrors/0ad

Move PopulationBonus from cmpCost to new cmpPopulation.

Since PopBonus is not a cost.

Patch by: @lonehawk
Differential Revision: D2948
Comments by: @Angen, @Nescio, @wraitii
Closes #4081

This was SVN commit r24394.
This commit is contained in:
Freagarach
2020-12-14 18:17:59 +00:00
parent 014c2922f2
commit 7f77cf2f3e
61 changed files with 340 additions and 135 deletions
@@ -2,10 +2,7 @@
<Entity filtered="">
<AIProxy merge=""/>
<BuildRestrictions merge=""/>
<!-- Don't provide population bonuses yet (but still do take up population cost) -->
<Cost merge="">
<PopulationBonus>0</PopulationBonus>
</Cost>
<Cost merge=""/>
<Decay merge=""/>
<Health>
<Initial>1</Initial>
@@ -23,6 +20,10 @@
</Obstruction>
<OverlayRenderer merge=""/>
<Ownership merge=""/>
<!-- Don't provide population bonuses yet. -->
<Population>
<Bonus>0</Bonus>
</Population>
<Position merge=""/>
<RallyPoint merge=""/>
<RallyPointRenderer merge=""/>
@@ -304,9 +304,6 @@ function GetTemplateDataHelper(template, player, auraTemplates, modifiers = {})
if (template.Cost.Population)
ret.cost.population = getEntityValue("Cost/Population");
if (template.Cost.PopulationBonus)
ret.cost.populationBonus = getEntityValue("Cost/PopulationBonus");
if (template.Cost.BuildTime)
ret.cost.time = getEntityValue("Cost/BuildTime");
}
@@ -407,6 +404,11 @@ function GetTemplateDataHelper(template, player, auraTemplates, modifiers = {})
"time": getEntityValue("Pack/Time"),
};
if (template.Population && template.Population.Bonus)
ret.population = {
"bonus": getEntityValue("Population/Bonus")
};
if (template.Health)
ret.health = Math.round(getEntityValue("Health/Max"));
@@ -24,7 +24,7 @@ var g_AlwaysDisplayFriendlyFire = false;
function getCostTypes()
{
return g_ResourceData.GetCodes().concat(["population", "populationBonus", "time"]);
return g_ResourceData.GetCodes().concat(["population", "time"]);
}
function resourceIcon(resource)
@@ -663,8 +663,7 @@ function getEntityCostComponentsTooltipString(template, entity, buildingsCountTo
let costs = [];
for (let type of getCostTypes())
// Population bonus is shown in the tooltip
if (type != "populationBonus" && totalCosts[type])
if (totalCosts[type])
costs.push(sprintf(translate("%(component)s %(cost)s"), {
"component": resourceIcon(type),
"cost": totalCosts[type]
@@ -857,13 +856,13 @@ function getRequiredTechnologyTooltip(technologyEnabled, requiredTechnology, civ
*/
function getPopulationBonusTooltip(template)
{
let popBonus = "";
if (template.cost && template.cost.populationBonus)
popBonus = sprintf(translate("%(label)s %(populationBonus)s"), {
"label": headerFont(translate("Population Bonus:")),
"populationBonus": template.cost.populationBonus
});
return popBonus;
if (!template.population || !template.population.bonus)
return "";
return sprintf(translate("%(label)s %(bonus)s"), {
"label": headerFont(translate("Population Bonus:")),
"bonus": template.population.bonus
});
}
/**
@@ -144,6 +144,7 @@
{ "nick": "Link Mauve", "name": "Emmanuel Gil Peyrot" },
{ "nick": "LittleDev" },
{ "nick": "livingaftermidnight", "name": "Will Dull" },
{ "nick": "lonehawk", "name": "Vignesh Krishnan" },
{ "nick": "Louhike" },
{ "nick": "lsdh" },
{ "nick": "Ludovic", "name": "Ludovic Rousseau" },
@@ -321,6 +321,7 @@ function displaySingle(entState)
getGatherTooltip,
getSpeedTooltip,
getGarrisonTooltip,
getPopulationBonusTooltip,
getProjectilesTooltip,
getResourceTrickleTooltip,
getLootTooltip
@@ -109,7 +109,7 @@ for (let i = 0; i < numPlayers; ++i)
// Fortress
// To take into account houses that offer a lower population bonus
if (Engine.GetTemplate("structures/" + civ + "/house").Cost.PopulationBonus <= 5)
if (Engine.GetTemplate("structures/" + civ + "/house").Population.Bonus <= 5)
{
var wall = ["gate", "tower", "long",
"cornerIn", "long", "barracks", "tower", "long", "tower", "house", "long",
@@ -194,7 +194,7 @@ m.Template = m.Class({
"isRepairable": function() { return this.get("Repairable") !== undefined; },
"getPopulationBonus": function() { return +this.get("Cost/PopulationBonus"); },
"getPopulationBonus": function() { return +this.get("Population/Bonus"); },
"resistanceStrengths": function() {
let resistanceTypes = this.get("Resistance");
@@ -46,7 +46,7 @@ PETRA.ResearchManager.prototype.researchPopulationBonus = function(gameState, qu
if (!tech[1]._template.modifications)
continue;
// TODO may-be loop on all modifs and check if the effect if positive ?
if (tech[1]._template.modifications[0].value !== "Cost/PopulationBonus")
if (tech[1]._template.modifications[0].value !== "Population/Bonus")
continue;
queues.minorTech.addPlan(new PETRA.ResearchPlan(gameState, tech[0]));
break;
@@ -256,7 +256,7 @@ AIInterface.prototype.OnTemplateModification = function(msg)
let newValue = ApplyValueModificationsToTemplate(valName, oldValue, msg.player, template);
// Apply the same roundings as in the components
if (valName === "Player/MaxPopulation" || valName === "Cost/Population" ||
valName === "Cost/PopulationBonus")
valName === "Population/Bonus")
newValue = Math.round(newValue);
// TODO in some cases, we can have two opposite changes which bring us to the old value,
// and we should keep it. But how to distinguish it ?
@@ -305,7 +305,7 @@ AIInterface.prototype.OnGlobalValueModification = function(msg)
let newValue = ApplyValueModificationsToEntity(valName, oldValue, ent);
// Apply the same roundings as in the components
if (valName === "Player/MaxPopulation" || valName === "Cost/Population" ||
valName === "Cost/PopulationBonus")
valName === "Population/Bonus")
newValue = Math.round(newValue);
// TODO in some cases, we can have two opposite changes which bring us to the old value,
// and we should keep it. But how to distinguish it ?
@@ -4,7 +4,6 @@ Cost.prototype.Schema =
"<a:help>Specifies the construction/training costs of this entity.</a:help>" +
"<a:example>" +
"<Population>1</Population>" +
"<PopulationBonus>15</PopulationBonus>" +
"<BuildTime>20.0</BuildTime>" +
"<Resources>" +
"<food>50</food>" +
@@ -16,9 +15,6 @@ Cost.prototype.Schema =
"<element name='Population' a:help='Population cost'>" +
"<data type='nonNegativeInteger'/>" +
"</element>" +
"<element name='PopulationBonus' a:help='Population cap increase while this entity exists'>" +
"<data type='nonNegativeInteger'/>" +
"</element>" +
"<element name='BuildTime' a:help='Time taken to construct/train this entity (in seconds)'>" +
"<ref name='nonNegativeDecimal'/>" +
"</element>" +
@@ -29,7 +25,6 @@ Cost.prototype.Schema =
Cost.prototype.Init = function()
{
this.populationCost = +this.template.Population;
this.populationBonus = +this.template.PopulationBonus;
};
Cost.prototype.GetPopCost = function()
@@ -37,10 +32,6 @@ Cost.prototype.GetPopCost = function()
return this.populationCost;
};
Cost.prototype.GetPopBonus = function()
{
return this.populationBonus;
};
Cost.prototype.GetBuildTime = function()
{
@@ -69,28 +60,13 @@ Cost.prototype.GetResourceCosts = function(owner)
return costs;
};
Cost.prototype.OnOwnershipChanged = function(msg)
{
if (msg.from != INVALID_PLAYER)
{
let cmpPlayer = QueryPlayerIDInterface(msg.from);
if (cmpPlayer)
cmpPlayer.AddPopulationBonuses(-this.GetPopBonus());
}
if (msg.to != INVALID_PLAYER)
{
let cmpPlayer = QueryPlayerIDInterface(msg.to);
if (cmpPlayer)
cmpPlayer.AddPopulationBonuses(this.GetPopBonus());
}
};
Cost.prototype.OnValueModification = function(msg)
{
if (msg.component != "Cost")
return;
// foundations shouldn't give a pop bonus and a pop cost
// Foundations shouldn't have a pop cost.
var cmpFoundation = Engine.QueryInterface(this.entity, IID_Foundation);
if (cmpFoundation)
return;
@@ -100,18 +76,11 @@ Cost.prototype.OnValueModification = function(msg)
var popCostDifference = newPopCost - this.populationCost;
this.populationCost = newPopCost;
// update the population bonuses
var newPopBonus = Math.round(ApplyValueModificationsToEntity("Cost/PopulationBonus", +this.template.PopulationBonus, this.entity));
var popDifference = newPopBonus - this.populationBonus;
this.populationBonus = newPopBonus;
var cmpPlayer = QueryOwnerInterface(this.entity);
if (!cmpPlayer)
return;
if (popCostDifference)
cmpPlayer.AddPopulation(popCostDifference);
if (popDifference)
cmpPlayer.AddPopulationBonuses(popDifference);
};
Engine.RegisterComponentType(IID_Cost, "Cost", Cost);
@@ -304,6 +304,12 @@ GuiInterface.prototype.GetEntityState = function(player, ent)
"progress": cmpPack.GetProgress()
};
let cmpPopulation = Engine.QueryInterface(ent, IID_Population);
if (cmpPopulation)
ret.population = {
"bonus": cmpPopulation.GetPopBonus()
};
let cmpUpgrade = Engine.QueryInterface(ent, IID_Upgrade);
if (cmpUpgrade)
ret.upgrade = {
@@ -1190,7 +1196,6 @@ GuiInterface.prototype.SetBuildingPlacementPreview = function(player, cmd)
* 'stone': ...,
* 'metal': ...,
* 'population': ...,
* 'populationBonus': ...,
* }
* }
*
@@ -1342,7 +1347,7 @@ GuiInterface.prototype.SetWallPlacementPreview = function(player, cmd)
let result = {
"pieces": [],
"cost": { "population": 0, "populationBonus": 0, "time": 0 }
"cost": { "population": 0, "time": 0 }
};
for (let res of Resources.GetCodes())
result.cost[res] = 0;
@@ -1619,7 +1624,7 @@ GuiInterface.prototype.SetWallPlacementPreview = function(player, cmd)
// copied over, so we need to fetch it from the template instead).
// TODO: We should really use a Cost object or at least some utility functions for this, this is mindless
// boilerplate that's probably duplicated in tons of places.
for (let res of Resources.GetCodes().concat(["population", "populationBonus", "time"]))
for (let res of Resources.GetCodes().concat(["population", "time"]))
result.cost[res] += tplData.cost[res];
}
@@ -0,0 +1,67 @@
function Population() {}
Population.prototype.Schema =
"<a:help>Specifies the Population cap increase generated by this entity.</a:help>" +
"<a:example>" +
"<Bonus>15</Bonus>" +
"</a:example>" +
"<element name='Bonus' a:help='Population cap increase while this entity exists.'>" +
"<data type='nonNegativeInteger'/>" +
"</element>";
Population.prototype.Init = function()
{
this.bonus = +this.template.Bonus;
};
/**
* @return {number} - The population space provided by this entity.
*/
Population.prototype.GetPopBonus = function()
{
return this.bonus;
};
Population.prototype.RecalculateValues = function()
{
this.bonus = Math.round(ApplyValueModificationsToEntity("Population/Bonus", +this.template.Bonus, this.entity));
};
Population.prototype.OnOwnershipChanged = function(msg)
{
if (msg.from != INVALID_PLAYER)
{
let cmpPlayer = QueryPlayerIDInterface(msg.from);
if (cmpPlayer)
cmpPlayer.AddPopulationBonuses(-this.bonus);
}
if (msg.to != INVALID_PLAYER)
{
this.RecalculateValues();
let cmpPlayer = QueryPlayerIDInterface(msg.to);
if (cmpPlayer)
cmpPlayer.AddPopulationBonuses(this.bonus);
}
};
Population.prototype.OnValueModification = function(msg)
{
if (msg.component != "Population")
return;
// Foundations shouldn't give a pop bonus.
if (Engine.QueryInterface(this.entity, IID_Foundation))
return;
let oldPopBonus = this.bonus;
this.RecalculateValues();
let popDifference = this.bonus - oldPopBonus;
if (!popDifference)
return;
let cmpPlayer = QueryOwnerInterface(this.entity);
if (cmpPlayer)
cmpPlayer.AddPopulationBonuses(popDifference);
};
Engine.RegisterComponentType(IID_Population, "Population", Population);
@@ -0,0 +1 @@
Engine.RegisterInterface("Population");
@@ -6,6 +6,7 @@ Engine.LoadComponentScript("interfaces/Cost.js");
Engine.LoadComponentScript("interfaces/Foundation.js");
Engine.LoadComponentScript("interfaces/Health.js");
Engine.LoadComponentScript("interfaces/ModifiersManager.js");
Engine.LoadComponentScript("interfaces/Population.js");
Engine.LoadComponentScript("interfaces/StatisticsTracker.js");
Engine.LoadComponentScript("interfaces/TerritoryDecay.js");
Engine.LoadComponentScript("interfaces/Trigger.js");
@@ -20,6 +20,7 @@ Engine.LoadComponentScript("interfaces/Health.js");
Engine.LoadComponentScript("interfaces/Loot.js");
Engine.LoadComponentScript("interfaces/Market.js");
Engine.LoadComponentScript("interfaces/Pack.js");
Engine.LoadComponentScript("interfaces/Population.js");
Engine.LoadComponentScript("interfaces/ProductionQueue.js");
Engine.LoadComponentScript("interfaces/Promotion.js");
Engine.LoadComponentScript("interfaces/Repairable.js");
@@ -0,0 +1,111 @@
Engine.LoadHelperScript("Player.js");
Engine.LoadComponentScript("interfaces/Foundation.js");
Engine.LoadComponentScript("interfaces/Player.js");
Engine.LoadComponentScript("interfaces/Population.js");
Engine.LoadComponentScript("Population.js");
const player = 1;
const entity = 11;
let entPopBonus = 5;
Engine.RegisterGlobal("ApplyValueModificationsToEntity",
(valueName, currentValue, entity) => currentValue
);
AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
"GetPlayerByID": () => player
});
let cmpPopulation = ConstructComponent(entity, "Population", {
"Bonus": entPopBonus
});
// Test ownership change adds bonus.
let cmpPlayer = AddMock(player, IID_Player, {
"AddPopulationBonuses": bonus => TS_ASSERT_EQUALS(bonus, entPopBonus)
});
let spy = new Spy(cmpPlayer, "AddPopulationBonuses");
cmpPopulation.OnOwnershipChanged({ "from": INVALID_PLAYER, "to": player });
TS_ASSERT_EQUALS(spy._called, 1);
// Test ownership change removes bonus.
cmpPlayer = AddMock(player, IID_Player, {
"AddPopulationBonuses": bonus => TS_ASSERT_EQUALS(bonus, -entPopBonus)
});
spy = new Spy(cmpPlayer, "AddPopulationBonuses");
cmpPopulation.OnOwnershipChanged({ "from": player, "to": INVALID_PLAYER });
TS_ASSERT_EQUALS(spy._called, 1);
// Test value modifications.
// Test no change.
Engine.RegisterGlobal("ApplyValueModificationsToEntity",
(valueName, currentValue, entity) => currentValue
);
cmpPlayer = AddMock(player, IID_Player, {
"AddPopulationBonuses": () => TS_ASSERT(false)
});
cmpPopulation.OnValueModification({ "component": "bogus" });
cmpPopulation.OnValueModification({ "component": "Population" });
// Test changes.
AddMock(entity, IID_Ownership, {
"GetOwner": () => player
});
let difference = 3;
Engine.RegisterGlobal("ApplyValueModificationsToEntity",
(valueName, currentValue, entity) => currentValue + difference
);
cmpPlayer = AddMock(player, IID_Player, {
"AddPopulationBonuses": bonus => TS_ASSERT_EQUALS(bonus, difference)
});
spy = new Spy(cmpPlayer, "AddPopulationBonuses");
// Foundations don't count yet.
AddMock(entity, IID_Foundation, {});
cmpPopulation.OnValueModification({ "component": "Population" });
TS_ASSERT_EQUALS(spy._called, 0);
DeleteMock(entity, IID_Foundation);
cmpPopulation.OnValueModification({ "component": "Population" });
TS_ASSERT_EQUALS(spy._called, 1);
// Reset to no bonus.
cmpPlayer = AddMock(player, IID_Player, {
"AddPopulationBonuses": bonus => TS_ASSERT_EQUALS(bonus, -3)
});
difference = 0
Engine.RegisterGlobal("ApplyValueModificationsToEntity",
(valueName, currentValue, entity) => currentValue + difference
);
spy = new Spy(cmpPlayer, "AddPopulationBonuses");
cmpPopulation.OnValueModification({ "component": "Population" });
TS_ASSERT_EQUALS(spy._called, 1);
// Test negative change.
difference = -2;
Engine.RegisterGlobal("ApplyValueModificationsToEntity",
(valueName, currentValue, entity) => currentValue + difference
);
cmpPlayer = AddMock(player, IID_Player, {
"AddPopulationBonuses": bonus => TS_ASSERT_EQUALS(bonus, difference)
});
spy = new Spy(cmpPlayer, "AddPopulationBonuses");
cmpPopulation.OnValueModification({ "component": "Population" });
TS_ASSERT_EQUALS(spy._called, 1);
// Test newly created entities also get affected by modifications.
difference = 3;
Engine.RegisterGlobal("ApplyValueModificationsToEntity",
(valueName, currentValue, entity) => currentValue + difference
);
cmpPlayer = AddMock(player, IID_Player, {
"AddPopulationBonuses": bonus => TS_ASSERT_EQUALS(bonus, entPopBonus + difference)
});
spy = new Spy(cmpPlayer, "AddPopulationBonuses");
cmpPopulation.OnOwnershipChanged({ "from": INVALID_PLAYER, "to": player });
TS_ASSERT_EQUALS(spy._called, 1);
@@ -17,7 +17,7 @@
"researchTime": 40,
"tooltip": "Houses +20% population cap bonus.",
"modifications": [
{ "value": "Cost/PopulationBonus", "multiply": 1.2 }
{ "value": "Population/Bonus", "multiply": 1.2 }
],
"affects": ["House"],
"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
@@ -12,7 +12,7 @@
"researchTime": 40,
"tooltip": "Houses +20% population cap bonus.",
"modifications": [
{ "value": "Cost/PopulationBonus", "multiply": 1.2 }
{ "value": "Population/Bonus", "multiply": 1.2 }
],
"affects": ["House"],
"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
@@ -3,10 +3,7 @@
<AIProxy merge=""/>
<AutoBuildable merge=""/>
<BuildRestrictions merge=""/>
<!-- Don't provide population bonuses yet (but still do take up population cost) -->
<Cost merge="">
<PopulationBonus>0</PopulationBonus>
</Cost>
<Cost merge=""/>
<Decay merge=""/>
<Fogging merge=""/>
<Footprint merge=""/>
@@ -25,6 +22,10 @@
</Obstruction>
<OverlayRenderer merge=""/>
<Ownership merge=""/>
<!-- Don't provide population bonuses yet. -->
<Population>
<Bonus>0</Bonus>
</Population>
<Position merge=""/>
<RallyPoint merge=""/>
<RallyPointRenderer merge=""/>
@@ -2,7 +2,6 @@
<Entity>
<Cost>
<Population>0</Population>
<PopulationBonus>0</PopulationBonus>
<BuildTime>0</BuildTime>
<Resources>
<food>0</food>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_barracks">
<Cost>
<PopulationBonus>4</PopulationBonus>
<Resources>
<wood>300</wood>
<stone>0</stone>
@@ -22,6 +21,9 @@
<wood>60</wood>
<stone>0</stone>
</Loot>
<Population>
<Bonus>4</Bonus>
</Population>
<Obstruction>
<Static width="20.0" depth="20.0"/>
</Obstruction>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_dock">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Footprint>
<Square width="12.0" depth="24.0"/>
<Height>8.0</Height>
@@ -14,6 +11,9 @@
<Civ>brit</Civ>
<SpecificName>Counos</SpecificName>
</Identity>
<Population>
<Bonus>2</Bonus>
</Population>
<Obstruction>
<Static width="10.0" depth="22.0"/>
</Obstruction>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_economic_farmstead">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Footprint>
<Square width="12.0" depth="12.0"/>
</Footprint>
@@ -16,6 +13,9 @@
<Obstruction>
<Static width="10.0" depth="10.0"/>
</Obstruction>
<Population>
<Bonus>2</Bonus>
</Population>
<VisualActor>
<Actor>structures/britons/farmstead.xml</Actor>
<FoundationActor>structures/fndn_3x3.xml</FoundationActor>
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_forge">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Identity>
<Civ>brit</Civ>
<SpecificName>Gobanion</SpecificName>
</Identity>
<Population>
<Bonus>2</Bonus>
</Population>
<VisualActor>
<Actor>structures/britons/blacksmith.xml</Actor>
</VisualActor>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_fortress">
<Cost>
<PopulationBonus>12</PopulationBonus>
</Cost>
<Footprint replace="">
<Circle radius="17.0"/>
<Height>18.0</Height>
@@ -17,6 +14,9 @@
<Obstruction>
<Static width="29.0" depth="29.0"/>
</Obstruction>
<Population>
<Bonus>12</Bonus>
</Population>
<ProductionQueue>
<Entities datatype="tokens">
units/{civ}/champion_infantry
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_economic_market">
<Cost>
<PopulationBonus>5</PopulationBonus>
</Cost>
<Footprint>
<Square width="26.0" depth="24.0"/>
<Height>8.0</Height>
@@ -17,6 +14,9 @@
<Obstruction>
<Static width="25.0" depth="23.0"/>
</Obstruction>
<Population>
<Bonus>5</Bonus>
</Population>
<VisualActor>
<Actor>structures/britons/market.xml</Actor>
<FoundationActor>structures/fndn_6x6.xml</FoundationActor>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_economic_storehouse">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Footprint>
<Square width="18.0" depth="18.0"/>
</Footprint>
@@ -10,6 +7,9 @@
<Civ>brit</Civ>
<SpecificName>Capanon</SpecificName>
</Identity>
<Population>
<Bonus>2</Bonus>
</Population>
<Obstruction>
<Static width="16.0" depth="16.0"/>
</Obstruction>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="structures/cart/house">
<Cost>
<PopulationBonus>15</PopulationBonus>
<BuildTime>75</BuildTime>
<Resources>
<wood>225</wood>
@@ -19,6 +18,9 @@
<Loot>
<wood>45</wood>
</Loot>
<Population>
<Bonus>15</Bonus>
</Population>
<VisualActor>
<Actor>structures/carthaginians/apartment.xml</Actor>
</VisualActor>
@@ -13,7 +13,6 @@
<GarrisonRegenRate>10</GarrisonRegenRate>
</Capturable>
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>500</BuildTime>
<Resources>
<wood>300</wood>
@@ -52,6 +51,9 @@
<Obstruction>
<Static width="42.0" depth="58.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<Position>
<Floating>true</Floating>
<FloatDepth>0.0</FloatDepth>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_house">
<Cost>
<PopulationBonus>2</PopulationBonus>
<Resources>
<food>0</food>
<wood>50</wood>
@@ -23,6 +22,9 @@
<Obstruction>
<Static width="7.0" depth="7.0"/>
</Obstruction>
<Population>
<Bonus>2</Bonus>
</Population>
<ProductionQueue disable=""/>
<StatusBars>
<HeightOffset>7.0</HeightOffset>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_house">
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>300</BuildTime>
<Resources>
<food>0</food>
@@ -23,6 +22,9 @@
<Obstruction>
<Static width="10.0" depth="14.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue disable=""/>
<VisualActor>
<Actor>structures/celts/longhouse.xml</Actor>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_barracks">
<Cost>
<PopulationBonus>4</PopulationBonus>
<Resources>
<wood>300</wood>
<stone>0</stone>
@@ -25,6 +24,9 @@
<Obstruction>
<Static width="20.0" depth="20.0"/>
</Obstruction>
<Population>
<Bonus>4</Bonus>
</Population>
<VisualActor>
<Actor>structures/celts/barracks.xml</Actor>
<FoundationActor>structures/fndn_6x6.xml</FoundationActor>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_dock">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Footprint>
<Square width="12.0" depth="24.0"/>
<Height>8.0</Height>
@@ -17,6 +14,9 @@
<Obstruction>
<Static width="10.0" depth="22.0"/>
</Obstruction>
<Population>
<Bonus>2</Bonus>
</Population>
<VisualActor>
<Actor>structures/celts/dock.xml</Actor>
<FoundationActor>structures/fndn_celt_dock.xml</FoundationActor>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_economic_farmstead">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Footprint>
<Square width="19.0" depth="18.0"/>
</Footprint>
@@ -13,6 +10,9 @@
<Obstruction>
<Static width="17.0" depth="16.0"/>
</Obstruction>
<Population>
<Bonus>2</Bonus>
</Population>
<VisualActor>
<Actor>structures/gauls/farmstead.xml</Actor>
</VisualActor>
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_forge">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Identity>
<Civ>gaul</Civ>
<SpecificName>Gobanion</SpecificName>
</Identity>
<Population>
<Bonus>2</Bonus>
</Population>
<VisualActor>
<Actor>structures/gauls/blacksmith.xml</Actor>
</VisualActor>
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_fortress">
<Cost>
<PopulationBonus>12</PopulationBonus>
</Cost>
<Identity>
<Civ>gaul</Civ>
<SpecificName>Dunon</SpecificName>
</Identity>
<Population>
<Bonus>12</Bonus>
</Population>
<ProductionQueue>
<Entities datatype="tokens">
units/{civ}/champion_infantry
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_economic_market">
<Cost>
<PopulationBonus>5</PopulationBonus>
</Cost>
<Footprint>
<Square width="26.0" depth="24.0"/>
<Height>8.0</Height>
@@ -17,6 +14,9 @@
<Obstruction>
<Static width="25.0" depth="23.0"/>
</Obstruction>
<Population>
<Bonus>5</Bonus>
</Population>
<VisualActor>
<Actor>structures/gauls/market.xml</Actor>
<FoundationActor>structures/fndn_6x6.xml</FoundationActor>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_economic_storehouse">
<Cost>
<PopulationBonus>2</PopulationBonus>
</Cost>
<Footprint>
<Square width="15.0" depth="17.0"/>
</Footprint>
@@ -13,6 +10,9 @@
<Obstruction>
<Static width="13.0" depth="15.0"/>
</Obstruction>
<Population>
<Bonus>2</Bonus>
</Population>
<VisualActor>
<Actor>structures/gauls/storehouse.xml</Actor>
</VisualActor>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_house">
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>200</BuildTime>
<Resources>
<wood>100</wood>
@@ -32,6 +31,9 @@
<Obstruction>
<Static width="20.0" depth="20.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.7</BatchTimeModifier>
<Entities datatype="tokens">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic">
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>200</BuildTime>
<Resources>
<food>0</food>
@@ -29,6 +28,9 @@
<Obstruction>
<Static width="26.0" depth="30.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue disable=""/>
<TerritoryInfluence>
<Root>false</Root>
@@ -4,7 +4,6 @@
<Category>Stoa</Category>
</BuildRestrictions>
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>110</BuildTime>
<Resources>
<food>0</food>
@@ -32,6 +31,9 @@
<Obstruction>
<Static width="26.0" depth="10.5"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue disable=""/>
<RallyPoint disable=""/>
<TerritoryInfluence>
@@ -9,7 +9,6 @@
<DefaultArrowCount>2</DefaultArrowCount>
</BuildingAI>
<Cost>
<PopulationBonus>5</PopulationBonus>
<BuildTime>200</BuildTime>
<Resources>
<wood>50</wood>
@@ -38,6 +37,9 @@
<Obstruction>
<Static width="14.0" depth="14.0"/>
</Obstruction>
<Population>
<Bonus>5</Bonus>
</Population>
<StatusBars>
<HeightOffset>17.0</HeightOffset>
</StatusBars>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_fortress">
<Cost>
<PopulationBonus>15</PopulationBonus>
<BuildTime op="mul">1.5</BuildTime>
<Resources>
<stone>1200</stone>
@@ -20,6 +19,9 @@
<Obstruction>
<Static width="27.0" depth="27.0"/>
</Obstruction>
<Population>
<Bonus>15</Bonus>
</Population>
<ProductionQueue>
<Entities datatype="tokens">
units/{civ}/champion_infantry
@@ -7,7 +7,6 @@
<Category>TempleOfAmun</Category>
</BuildRestrictions>
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>300</BuildTime>
<Resources>
<stone>500</stone>
@@ -38,6 +37,9 @@
<Obstruction>
<Static width="28" depth="56.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue>
<Entities datatype="tokens">
units/{civ}/champion_infantry_amun
@@ -2,7 +2,6 @@
<Entity parent="template_structure_special">
<Cost>
<BuildTime>200</BuildTime>
<PopulationBonus>10</PopulationBonus>
<Resources>
<stone>200</stone>
<metal>200</metal>
@@ -30,6 +29,9 @@
<Obstruction>
<Static width="36.0" depth="12.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.7</BatchTimeModifier>
<Entities datatype="tokens">
@@ -5,7 +5,6 @@
</BuildRestrictions>
<Cost>
<BuildTime>300</BuildTime>
<PopulationBonus>10</PopulationBonus>
<Resources>
<stone>300</stone>
<metal>200</metal>
@@ -38,6 +37,9 @@
<Obstruction>
<Static width="30.0" depth="30.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.8</BatchTimeModifier>
<Entities datatype="tokens">
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_house">
<Cost>
<PopulationBonus>15</PopulationBonus>
</Cost>
<Footprint>
<Square width="25.0" depth="14.0"/>
<Height>10.0</Height>
@@ -17,6 +14,9 @@
<Obstruction>
<Static width="23.0" depth="12.0"/>
</Obstruction>
<Population>
<Bonus>15</Bonus>
</Population>
<TerritoryInfluence>
<Radius>25</Radius>
</TerritoryInfluence>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_house">
<Cost>
<PopulationBonus>10</PopulationBonus>
</Cost>
<Footprint>
<Square width="17.0" depth="14.0"/>
<Height>10.0</Height>
@@ -17,6 +14,9 @@
<Obstruction>
<Static width="15.0" depth="12.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<VisualActor>
<Actor>props/structures/persians/alt_building_05.xml</Actor>
</VisualActor>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_house">
<Cost>
<PopulationBonus>15</PopulationBonus>
</Cost>
<Footprint>
<Square width="30.0" depth="17.0"/>
<Height>10.0</Height>
@@ -17,6 +14,9 @@
<Obstruction>
<Static width="28.0" depth="15.0"/>
</Obstruction>
<Population>
<Bonus>15</Bonus>
</Population>
<TerritoryInfluence>
<Radius>26</Radius>
</TerritoryInfluence>
@@ -2,7 +2,6 @@
<Entity parent="template_structure_special">
<Cost>
<BuildTime>300</BuildTime>
<PopulationBonus>10</PopulationBonus>
<Resources>
<wood>200</wood>
<stone>400</stone>
@@ -34,6 +33,9 @@
<Obstruction>
<Static width="38.5" depth="22.5"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue disable=""/>
<Sound>
<SoundGroups>
@@ -47,7 +47,6 @@
<GarrisonRegenRate>3.0</GarrisonRegenRate>
</Capturable>
<Cost>
<PopulationBonus>5</PopulationBonus>
<BuildTime>250</BuildTime>
<Resources>
<wood>500</wood>
@@ -82,6 +81,9 @@
<Obstruction>
<Static width="36.0" depth="36.0"/>
</Obstruction>
<Population>
<Bonus>5</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.7</BatchTimeModifier>
<Entities datatype="tokens">
@@ -13,7 +13,6 @@
</Capturable>
<Cost>
<Population>0</Population>
<PopulationBonus>0</PopulationBonus>
<BuildTime>10</BuildTime>
<Resources>
<food>0</food>
@@ -52,7 +52,6 @@
<RegenRate>5.0</RegenRate>
</Capturable>
<Cost>
<PopulationBonus>20</PopulationBonus>
<BuildTime>500</BuildTime>
<Resources>
<wood>500</wood>
@@ -92,6 +91,9 @@
<Obstruction>
<Static width="30.0" depth="30.0"/>
</Obstruction>
<Population>
<Bonus>20</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.8</BatchTimeModifier>
<Entities datatype="tokens">
@@ -5,7 +5,6 @@
<GarrisonRegenRate>4.0</GarrisonRegenRate>
</Capturable>
<Cost>
<PopulationBonus>5</PopulationBonus>
<BuildTime>30</BuildTime>
<Resources>
<wood>75</wood>
@@ -40,6 +39,9 @@
<Obstruction>
<Static width="11.0" depth="11.0"/>
</Obstruction>
<Population>
<Bonus>5</Bonus>
</Population>
<ProductionQueue>
<Entities datatype="tokens">
units/{civ}/support_female_citizen_house
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_house">
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>50</BuildTime>
<Resources>
<wood>150</wood>
@@ -23,6 +22,9 @@
<Obstruction>
<Static width="14.0" depth="14.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<TerritoryInfluence>
<Radius>20</Radius>
<Weight>40000</Weight>
@@ -4,7 +4,6 @@
<Category>Stoa</Category>
</BuildRestrictions>
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>150</BuildTime>
<Resources>
<stone>100</stone>
@@ -42,6 +41,9 @@
<Obstruction>
<Static width="28.0" depth="20.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.7</BatchTimeModifier>
<Entities datatype="tokens">
@@ -4,7 +4,6 @@
structures/temple_heal
</Auras>
<Cost>
<PopulationBonus>5</PopulationBonus>
<BuildTime>200</BuildTime>
<Resources>
<stone>300</stone>
@@ -40,6 +39,9 @@
<Obstruction>
<Static width="17.5" depth="30.0"/>
</Obstruction>
<Population>
<Bonus>5</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.8</BatchTimeModifier>
<Entities datatype="tokens">
@@ -6,7 +6,6 @@
<Category>Dock</Category>
</BuildRestrictions>
<Cost>
<PopulationBonus>5</PopulationBonus>
<BuildTime>150</BuildTime>
<Resources>
<wood>200</wood>
@@ -38,6 +37,9 @@
<Obstruction>
<Static width="18.0" depth="18.0"/>
</Obstruction>
<Population>
<Bonus>5</Bonus>
</Population>
<Position>
<Floating>true</Floating>
<FloatDepth>0.0</FloatDepth>
@@ -45,7 +45,6 @@
<RegenRate>10.0</RegenRate>
</Capturable>
<Cost>
<PopulationBonus>10</PopulationBonus>
<BuildTime>500</BuildTime>
<Resources>
<stone>1000</stone>
@@ -80,6 +79,9 @@
<Obstruction>
<Static width="25.0" depth="25.0"/>
</Obstruction>
<Population>
<Bonus>10</Bonus>
</Population>
<ProductionQueue>
<BatchTimeModifier>0.8</BatchTimeModifier>
<Technologies datatype="tokens">
@@ -5,7 +5,6 @@
</Auras>
<Cost>
<BuildTime>100</BuildTime>
<PopulationBonus>2</PopulationBonus>
<Resources>
<wood>200</wood>
<stone>100</stone>
@@ -32,6 +31,9 @@
<Obstruction>
<Static width="16.0" depth="16.0"/>
</Obstruction>
<Population>
<Bonus>2</Bonus>
</Population>
<ProductionQueue disable=""/>
<RallyPoint disable=""/>
<Sound>
@@ -3,7 +3,6 @@
<AIProxy/>
<Cost>
<Population>1</Population>
<PopulationBonus>0</PopulationBonus>
<BuildTime>1</BuildTime>
<Resources>
<food>0</food>