Closed denniske closed 10 months ago
Indeed, just as Burgundian eco upgrades need to be available one age earlier. Which is sadly a bit tricky to do with how the tech tree is constructed. But if you have a smart idea how to implement that in a generic way, go ahead 😬
Well I have so many manual overrides in the tech tree implementation in the aoe2companion app that I am sure I am not the right candidate for this job 😅 I will still take a look when I have some time.
What do you think about this?
const unitAges = {
BARRACKS: 'dark',
MILITIA: 'dark',
MAN_AT_ARMS: 'feudal',
LONG_SWORDSMAN: 'castle',
TWO_HANDED_SWORDSMAN: 'imperial',
CHAMPION: 'imperial',
LEGIONARY: 'imperial',
}
if (civ == 'armenians') {
unitAges['LONG_SWORDSMAN'] = 'feudal';
unitAges['TWO_HANDED_SWORDSMAN'] = 'castle';
}
const barracks = {
item: building(BARRACKS),
children: [{
item: unit(MILITIA),
children: [{
item: unit(MAN_AT_ARMS),
children: [{
item: unit(LONG_SWORDSMAN),
children: [{
item: unit(TWO_HANDED_SWORDSMAN),
children: [{
item: unit(CHAMPION)
}]
}, {
item: unit(uniqueunit(LEGIONARY))
}]
}]
}]
}]
};
// Now make a function that generates this from the above data:
let barrackslane = new Lane();
barrackslane.rows.dark_1.push(building(BARRACKS));
barrackslane.rows.dark_2.push(unit(MILITIA));
barrackslane.rows.feudal_1.push(unit(MAN_AT_ARMS));
barrackslane.rows.feudal_1.push(tech(SUPPLIES));
barrackslane.rows.feudal_1.push(unit(SPEARMAN));
barrackslane.rows.feudal_1.push(unit(EAGLE_SCOUT));
barrackslane.rows.castle_1.push(unit(LONG_SWORDSMAN));
barrackslane.rows.castle_1.push(tech(GAMBESONS));
barrackslane.rows.castle_1.push(unit(PIKEMAN));
barrackslane.rows.castle_1.push(unit(EAGLE_WARRIOR));
barrackslane.rows.castle_1.push(tech(SQUIRES));
barrackslane.rows.castle_1.push(tech(ARSON));
barrackslane.rows.imperial_1.push(unit(TWO_HANDED_SWORDSMAN));
barrackslane.rows.imperial_1.push(uniqueunit(LEGIONARY));
barrackslane.rows.imperial_2.push(unit(CHAMPION));
barrackslane.rows.imperial_1.push(unit(HALBERDIER));
barrackslane.rows.imperial_1.push(unit(ELITE_EAGLE_WARRIOR));
barrackslane.rows.imperial_1.push(uniqueunit(CONDOTTIERO));
barrackslane.rows.imperial_1.push(uniqueunit(FLEMISHPIKEMAN));
tree.lanes.push(barrackslane);
There also seems to be information about the age which units are available at per civ in the file civTechTrees.json in the aoe folder:
Age ID
Alright, so I had an idea:
It's already implemented as well. I think this works? :thinking:
Yes that looks good. Also this makes it easy to see which units are affected by the age shift 👍
The Armenians Militia and Spearman line need to go one line up: