Skip to content

Commit 90e3f99

Browse files
committed
Release v0.28.0
1 parent fe2df22 commit 90e3f99

File tree

9 files changed

+81
-36
lines changed

9 files changed

+81
-36
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2026-02-20
2+
3+
* release v0.28.0
4+
15
2025-02-03
26

37
* Fix/finish migrating for 0ad 0.27.0

mod.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "10ad",
3-
"version": "0.27.1",
4-
"label": "10 A.D. Empires Ascendant",
3+
"version": "0.28.0",
4+
"label": "10 A.D.",
55
"description": "Increased capacity and gather rates, and fewer houses required",
66
"dependencies": [
7-
"0ad=0.27.0"
7+
"0ad=0.28.0"
88
],
99
"url": "https://github.com/0ad-matters/10ad",
1010
"author_name": "Andy Alt",

simulation/data/technologies/phase_city_athen.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
"replaces": ["phase_city"],
2020
"icon": "city_phase.png",
2121
"researchTime": 1,
22-
"tooltip": "Advance to City Phase, which unlocks more entities and technologies. Civic Centers +50% territory influence radius. Structures +9 capture points regeneration rate per garrisoned unit. Workers +10% metal gather rate.",
22+
"tooltip": "Advance to City Phase, which unlocks more entities and technologies. Civic Centers +25% territory influence radius. Structures +20% damage and +1 capture points regeneration rate for garrisoned units. Workers +10% metal gather rate.",
2323
"modifications": [
24-
{ "value": "Capturable/GarrisonRegenRate", "add": 9, "affects": "Structure" },
24+
{ "value": "Capturable/GarrisonRegenRate", "add": 1, "affects": "Structure" },
2525
{ "value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1, "affects": "Worker" },
26-
{ "value": "TerritoryInfluence/Radius", "multiply": 1.5, "affects": "CivCentre" }
26+
{ "value": "Attack/Ranged/Damage/Pierce", "multiply": 1.2, "affects": "Structure" },
27+
{ "value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre" }
2728
],
2829
"soundComplete": "interface/alarm/alarm_phase.xml"
2930
}

simulation/data/technologies/phase_city_generic.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
22
"genericName": "City Phase",
33
"specificName": {
4+
"brit": "Dūnon",
5+
"cart": "Qart",
6+
"gaul": "Dūnon",
47
"han": "Jùn",
8+
"iber": "Iltir",
9+
"kush": "Ri",
510
"mace": "Megalopolis",
11+
"maur": "Pura",
612
"ptol": "Megalopolis",
13+
"rome": "Urbs",
714
"sele": "Megalopolis",
815
"spart": "Megalopolis"
916
},
@@ -23,10 +30,11 @@
2330
"replaces": ["phase_city"],
2431
"icon": "city_phase.png",
2532
"researchTime": 1,
26-
"tooltip": "Advance to City Phase, which unlocks more entities and technologies. Civic Centers +50% territory influence radius. Structures +9 capture points regeneration rate per garrisoned unit.",
33+
"tooltip": "Advance to City Phase, which unlocks more entities and technologies. Civic Centers +25% territory influence radius. Structures +20% damage and +1 capture points regeneration rate for garrisoned units.",
2734
"modifications": [
28-
{ "value": "Capturable/GarrisonRegenRate", "add": 9, "affects": "Structure" },
29-
{ "value": "TerritoryInfluence/Radius", "multiply": 1.5, "affects": "CivCentre" }
35+
{ "value": "Capturable/GarrisonRegenRate", "add": 1, "affects": "Structure" },
36+
{ "value": "Attack/Ranged/Damage/Pierce", "multiply": 1.2, "affects": "Structure" },
37+
{ "value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre" }
3038
],
3139
"soundComplete": "interface/alarm/alarm_phase.xml"
3240
}

simulation/data/technologies/phase_city_pers.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"genericName": "City Phase",
3-
"description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology. This is the Persian city phase, where stable training rates are decreased because of the 'Times of War' bonus.",
3+
"specificName": { "pers": "Vazaraka Vardana"},
4+
"description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology. This is the Persian city phase.\nThe 'Times of War' bonus decreases the batch training time in Stables. Large batches will benefit more than small batches.\nIn mathematical terms: The training time of one batch gets divided by `batchSize^0.1`.",
45
"cost": {
56
"stone": 0,
67
"metal": 0
@@ -16,11 +17,12 @@
1617
"replaces": ["phase_city"],
1718
"icon": "city_phase.png",
1819
"researchTime": 1,
19-
"tooltip": "Advance to City Phase, which unlocks more entities and technologies. Civic Centers +50% territory influence radius. Structures +9 capture points regeneration rate per garrisoned unit. Stable −10% batch training time.",
20+
"tooltip": "Advance to City Phase, which unlocks more entities and technologies. Civic Centers +25% territory influence radius. Structures +20% damage and +1 capture points regeneration rate for garrisoned units. Decrease batch training time of units trained in Stables.",
2021
"modifications": [
21-
{ "value": "Capturable/GarrisonRegenRate", "add": 9, "affects": "Structure" },
22+
{ "value": "Capturable/GarrisonRegenRate", "add": 1, "affects": "Structure" },
2223
{ "value": "Trainer/BatchTimeModifier", "add": -0.1, "affects": "Stable" },
23-
{ "value": "TerritoryInfluence/Radius", "multiply": 1.5, "affects": "CivCentre" }
24+
{ "value": "Attack/Ranged/Damage/Pierce", "multiply": 1.2, "affects": "Structure" },
25+
{ "value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre" }
2426
],
2527
"soundComplete": "interface/alarm/alarm_phase.xml"
2628
}

simulation/data/technologies/phase_town_athen.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
"replaces": ["phase_town"],
2020
"icon": "town_phase.png",
2121
"researchTime": 1,
22-
"tooltip": "Advance to Town Phase, which unlocks more entities and technologies. Civic Centers +30% territory influence radius. Structures +7 capture points regeneration rate per garrisoned unit. Workers +10% metal gather rate.",
22+
"tooltip": "Advance to Town Phase, which unlocks more entities and technologies. Civic Centers +25% territory influence radius. Structures +20% damage and +0.5 capture points regeneration rate for garrisoned units. Workers +10% metal gather rate.",
2323
"modifications": [
24-
{ "value": "Capturable/GarrisonRegenRate", "add": 7, "affects": "Structure" },
24+
{ "value": "Capturable/GarrisonRegenRate", "add": 0.5, "affects": "Structure" },
2525
{ "value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1, "affects": "Worker" },
26-
{ "value": "TerritoryInfluence/Radius", "multiply": 1.3, "affects": "CivCentre" }
26+
{ "value": "Attack/Ranged/Damage/Pierce", "multiply": 1.2, "affects": "Structure" },
27+
{ "value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre" }
2728
],
2829
"soundComplete": "interface/alarm/alarm_phase.xml"
2930
}

simulation/data/technologies/phase_town_generic.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
22
"genericName": "Town Phase",
33
"specificName": {
4+
"brit": "Bona",
5+
"cart": "Ir",
6+
"gaul": "Bona",
47
"han": "Xìan",
8+
"iber": "Contrebia",
9+
"kush": "Dmj",
510
"mace": "Kōmopolis",
11+
"maur": "Nayara",
612
"ptol": "Kōmopolis",
13+
"rome": "Oppidum",
714
"sele": "Kōmopolis",
815
"spart": "Kōmopolis"
916
},
@@ -23,10 +30,11 @@
2330
"replaces": ["phase_town"],
2431
"icon": "town_phase.png",
2532
"researchTime": 1,
26-
"tooltip": "Advance to Town Phase, which unlocks more entities and technologies. Civic Centers +30% territory influence radius. Structures +7 capture points regeneration rate per garrisoned unit.",
33+
"tooltip": "Advance to Town Phase, which unlocks more entities and technologies. Civic Centers +25% territory influence radius. Structures +20% damage and +0.5 capture points regeneration rate for garrisoned units.",
2734
"modifications": [
28-
{ "value": "Capturable/GarrisonRegenRate", "add": 7, "affects": "Structure" },
29-
{ "value": "TerritoryInfluence/Radius", "multiply": 1.3, "affects": "CivCentre" }
35+
{ "value": "Capturable/GarrisonRegenRate", "add": 0.5, "affects": "Structure" },
36+
{ "value": "Attack/Ranged/Damage/Pierce", "multiply": 1.2, "affects": "Structure" },
37+
{ "value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre" }
3038
],
3139
"soundComplete": "interface/alarm/alarm_phase.xml"
3240
}

simulation/data/technologies/phase_town_pers.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"genericName": "Town Phase",
3-
"description": "Advances from a small village to a bustling town, ready to expand rapidly. This is the Persian town phase, where stable training rates are decreased because of the 'Times of War' bonus.",
3+
"specificName": {"pers": "Vardana"},
4+
"description": "Advances from a small village to a bustling town, ready to expand rapidly. This is the Persian town phase.\nThe 'Times of War' bonus dercreases the batch training time in Stables. Large batches will benefit more than small batches.\nIn mathematical terms: The training time of one batch gets divided by `batchSize^0.1`.",
45
"cost": {
56
"food": 0,
67
"wood": 0
@@ -16,11 +17,12 @@
1617
"replaces": ["phase_town"],
1718
"icon": "town_phase.png",
1819
"researchTime": 1,
19-
"tooltip": "Advance to Town Phase, which unlocks more entities and technologies. Civic Centers +30% territory influence radius. Structures +7 capture points regeneration rate per garrisoned unit. Stable −10% batch training time.",
20+
"tooltip": "Advance to Town Phase, which unlocks more entities and technologies. Civic Centers +25% territory influence radius. Structures +20% damage and +0.5 capture points regeneration rate for garrisoned units. Decrease batch training time of units trained in Stables.",
2021
"modifications": [
21-
{ "value": "Capturable/GarrisonRegenRate", "add": 7, "affects": "Structure" },
22+
{ "value": "Capturable/GarrisonRegenRate", "add": 0.5, "affects": "Structure" },
2223
{ "value": "Trainer/BatchTimeModifier", "add": -0.1, "affects": "Stable" },
23-
{ "value": "TerritoryInfluence/Radius", "multiply": 1.3, "affects": "CivCentre" }
24+
{ "value": "Attack/Ranged/Damage/Pierce", "multiply": 1.2, "affects": "Structure" },
25+
{ "value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre" }
2426
],
2527
"soundComplete": "interface/alarm/alarm_phase.xml"
2628
}

simulation/helpers/InitGame.js

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ function PreInitGame()
1111
Engine.BroadcastMessage(MT_SkirmishReplace, {});
1212
Engine.FlushDestroyedEntities();
1313

14-
let numPlayers = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager).GetNumPlayers();
14+
const numPlayers = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager).GetNumPlayers();
1515
for (let i = 1; i < numPlayers; ++i) // ignore gaia
1616
{
17-
let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
17+
const cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
1818
if (cmpTechnologyManager)
1919
cmpTechnologyManager.UpdateAutoResearch();
2020

@@ -58,7 +58,7 @@ function PreInitGame()
5858
}
5959

6060
// Explore the map inside the players' territory borders
61-
let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
61+
const cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
6262
cmpRangeManager.ExploreTerritories();
6363
}
6464

@@ -74,7 +74,7 @@ function InitGame(settings)
7474

7575
if (settings.ExploreMap)
7676
{
77-
let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
77+
const cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
7878
for (let i = 1; i < settings.PlayerData.length; ++i)
7979
cmpRangeManager.ExploreMap(i);
8080
}
@@ -83,22 +83,41 @@ function InitGame(settings)
8383
for (let i = 0; i < settings.PlayerData.length; ++i)
8484
{
8585
const cmpPlayer = QueryPlayerIDInterface(i);
86-
cmpPlayer.SetCheatsEnabled(!!settings.CheatsEnabled);
8786

88-
if (settings.PlayerData[i] && !!settings.PlayerData[i].AI)
87+
if (settings.PlayerData[i])
8988
{
90-
cmpAIManager.AddPlayer(settings.PlayerData[i].AI, i, +settings.PlayerData[i].AIDiff, settings.PlayerData[i].AIBehavior || "random");
91-
cmpPlayer.SetAI(true);
89+
if (settings.PlayerData[i].Removed)
90+
{
91+
cmpPlayer.Defeat(undefined);
92+
continue;
93+
}
94+
else if (settings.PlayerData[i].AI)
95+
{
96+
cmpAIManager.AddPlayer(settings.PlayerData[i].AI, i, +settings.PlayerData[i].AIDiff, settings.PlayerData[i].AIBehavior || "random");
97+
cmpPlayer.SetAI(true);
98+
}
9299
}
93100

94-
if (settings.PopulationCap)
95-
cmpPlayer.SetMaxPopulation(settings.PopulationCap);
96-
97101
if (settings.AllyView)
98102
Engine.QueryInterface(cmpPlayer.entity, IID_TechnologyManager)?.ResearchTechnology(Engine.QueryInterface(cmpPlayer.entity, IID_Diplomacy).template.SharedLosTech);
99103
}
100-
if (settings.WorldPopulationCap)
101-
Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager).SetMaxWorldPopulation(settings.WorldPopulationCap);
104+
105+
{
106+
const popCap = settings.PopulationCap || 300;
107+
const cmpPopulationCapManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PopulationCapManager);
108+
const nonGaiaPlayers = settings.PlayerData.slice(1);
109+
if (nonGaiaPlayers.some(player => player.PopulationLimit))
110+
cmpPopulationCapManager.SetPerPlayerPopulationCaps(nonGaiaPlayers.map(player => player.PopulationLimit || popCap));
111+
else
112+
{
113+
if ([cmpPopulationCapManager.CAPTYPE_PLAYER_POPULATION, cmpPopulationCapManager.CAPTYPE_TEAM_POPULATION,
114+
cmpPopulationCapManager.CAPTYPE_WORLD_POPULATION].includes(settings.PopulationCapType))
115+
cmpPopulationCapManager.SetPopulationCapType(settings.PopulationCapType);
116+
else
117+
cmpPopulationCapManager.SetPopulationCapType(cmpPopulationCapManager.CAPTYPE_PLAYER_POPULATION);
118+
cmpPopulationCapManager.SetPopulationCap(popCap);
119+
}
120+
}
102121

103122
// Update the grid with all entities created for the map init.
104123
Engine.QueryInterface(SYSTEM_ENTITY, IID_Pathfinder).UpdateGrid();

0 commit comments

Comments
 (0)