mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
This patch allows techs to optionally define a property "placeBelow"
specifying a combination of class requirements. The selection panel then
tries to place their research button below the training button whose
unit matches these classes -- if there is only and exactly one.
This is useful for techs only affecting a single type of unit: it e.g.
allows always placing the fishing nets research button below the fishing
boats training button.
To prevent duplicating information in "placeBelow" (e.g. from
"affects"), it can also be set to two magic values: "{AffectedUnit}" and
"{UnlockedUnit}". In practice, many techs use those, but class
combination remain useful for granular control in very specific cases.
Regarding tech pairs, as explained in a comment, their two research
buttons can now be placed in three different arrangements (with
descending preference):
1. Vertically below a single training button.
2. Horizontally below two adjacent training buttons.
3. Horizontally adjacent in the bottom row (below no training buttons).
Vertically in the third and fourth rows (below no training button) --
how it was previously -- is no longer done as it'd conflict with and
doesn't fit the new layout and the clear separation between "generic"
and "specific" techs.
Whenever a research button can't be placed in their preferred location
because it is already occupied, the code simply falls back to the default
position in the bottom row.
This patch also adds a new game option to hide the new small arrows above
the research buttons in order to give more experienced players who already
know the techs well the possibility to reduce visual clutter. By
default, the arrows are shown.
24 lines
767 B
JSON
24 lines
767 B
JSON
{
|
|
"genericName": "Tyrtean Paeans",
|
|
"description": "Paeans were battle hymns that were sung by the Hoplites when they charged the enemy lines. One of the first known Paeans was composed by Tirteus, a warrior poet of Sparta, during the First Messenian War.",
|
|
"cost": {
|
|
"food": 200,
|
|
"metal": 100
|
|
},
|
|
"requirements": {
|
|
"all": [
|
|
{ "tech": "phase_village" },
|
|
{ "civ": "spart" }
|
|
]
|
|
},
|
|
"requirementsTooltip": "Unlocked in Village Phase.",
|
|
"icon": "walk.png",
|
|
"researchTime": 30,
|
|
"tooltip": "Champion Hoplites +10% movement speed.",
|
|
"modifications": [
|
|
{ "value": "UnitMotion/WalkSpeed", "multiply": 1.1 }
|
|
],
|
|
"affects": ["Champion Melee Infantry !Hero"],
|
|
"placeBelow": "{AffectedUnit}",
|
|
"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
|
|
}
|