Page 1 of 1
unit_relations.txt : tech lines - techs
Posted: Thu Jan 13, 2022 7:53 am
by Stratego (dev)
hi!
in the new file you can give a tech line (level up chain if a unit type)
like this:
Code: Select all
UNIT_ORC_SHAMAN->[TECH_ORC_UPGRADE_UNIT_WARRIOR_ELITE+TECH_ORC_UPGRADE_UNIT_SHAMAN_ELITE]->UNIT_ORC_SHAMAN_ELITE->[TECH_ORC_UPGRADE_UNIT_WARRIOR_MASTER+TECH_ORC_UPGRADE_UNIT_SHAMAN_MASTER]->UNIT_ORC_SHAMAN_MASTER;
or simpler case (one techupgrades)
Code: Select all
UNIT_ARCHER->[TECH_UPGRADE_UNIT_CROSSBOWMAN]->UNIT_CROSSBOWMAN->[TECH_UPGRADE_UNIT_ARCHER_E]->UNIT_ARCHER_E;
question1 is: is it needed to auto-put a TECH_UPGRADE_UNIT_ARCHER_E requires TECH_UPGRADE_UNIT_CROSSBOWMAN relation? (so we can avoid putting in this file next section (the requires section) like
Code: Select all
[TECH_UPGRADE_UNIT_CROSSBOWMAN]->TECH_UPGRADE_UNIT_ARCHER_E;
question2 is: is it already being in suchs realtion automatically?

lol
question3 is: what do we do with the multiple tech requirement things? we skip it and do auto relation only onsingle tech cases?
Re: unit_relations.txt : tech lines - techs
Posted: Thu Jan 13, 2022 5:01 pm
by Endru1241
Automatically adding relations to all required in line techs could create many bugs.
Just because unit needs it for being upgraded (so upgraded one requires is and non-upgraded is revoked by this set), doesn't mean all of requirements are also every single tech requirement.
Even in AoS if another upgrade for Ballista ship and Catapult ship were added auto-relation would make tech_siege_ships_upg2 require both heavy ballista and heavy catapult techs, which is wrong.
For AoF it would make real mess - armors lv2 requiring weapons lv1, magic power lv1 etc.
So just like you noticed multi-tech case won't work.
And if that one is out - making special hidden meaning to another case - single requirement upgrade lines - could create unclear file.
So imho:
Q1: Not really needed. Could be used for some techs ( in some variants more and in some less), but not sure if making rules more complicated would be outweighted by less file lines and easier, more natural single tech upgrade lines.
Q2: Hope it doesn't work like that already for multi-tech reqs.
Single tech requirement lines seem to always follow such schema, if that was what you meant.
Q3: Definitely skip. I have no idea how could it be made to not mess anything with multi-tech reqs.
Re: unit_relations.txt : tech lines - techs
Posted: Thu Jan 13, 2022 8:01 pm
by Stratego (dev)
maybe we can give the modder a "sign" option to make a tech be like this.
so if a tech is signed like "<-" than the previous bracket tech will be required to this tech to be invented, maybe working only on single tech cases
eg:
Code: Select all
UNIT_ARCHER->[TECH_UPGRADE_UNIT_CROSSBOWMAN]->UNIT_CROSSBOWMAN->[<-TECH_UPGRADE_UNIT_ARCHER_E]->UNIT_ARCHER_E;
but maybe this is also not a liked solution.
Re: unit_relations.txt : tech lines - techs
Posted: Thu Jan 13, 2022 9:22 pm
by Endru1241
Seems fine to me.
Distinctive enough to see it means something else.
And clever enough to give new ideas.
To avoid it being not used in case of multiple required techs there could be something like:
a) Single tech is always a requirement of any tech with <- and if more than one in previous brackets -> must used in that case before (at least one of them need to have ->).
b) Single tech is always a requirement of any tech with <- and in case of multiple techs in brackets before first is treated like a requirement, additional ones have to have ->
c) Single tech is always a requirement of any tech with <- and in case of multiple techs in brackets before all are treated like a requirement, unless at least one have ->
d) No matter if single or multiple - requirements passed to another level of techs need to have ->
So e.g. for a) that works:
Code: Select all
UNIT_ARCHER->[TECH_UPGRADE_UNIT_CROSSBOWMAN]->UNIT_CROSSBOWMAN->[<-TECH_UPGRADE_UNIT_ARCHER_E]->UNIT_ARCHER_E;
That won't:
Code: Select all
UNIT_ORC_SHAMAN->[TECH_ORC_UPGRADE_UNIT_WARRIOR_ELITE+TECH_ORC_UPGRADE_UNIT_SHAMAN_ELITE]->UNIT_ORC_SHAMAN_ELITE->[TECH_ORC_UPGRADE_UNIT_WARRIOR_MASTER+<-TECH_ORC_UPGRADE_UNIT_SHAMAN_MASTER]->UNIT_ORC_SHAMAN_MASTER;
But this is OK:
Code: Select all
UNIT_ORC_SHAMAN->[TECH_ORC_UPGRADE_UNIT_WARRIOR_ELITE+->TECH_ORC_UPGRADE_UNIT_SHAMAN_ELITE]->UNIT_ORC_SHAMAN_ELITE->[TECH_ORC_UPGRADE_UNIT_WARRIOR_MASTER+<-TECH_ORC_UPGRADE_UNIT_SHAMAN_MASTER]->UNIT_ORC_SHAMAN_MASTER;
Multiple techs required to unlock a higher tier tech.
Posted: Fri May 20, 2022 4:06 pm
by Hyuhjhih
Not opening a new topic since i believe it will fit here well.
The current unit_relation.txt provide the scope of unlocker tech line as
So, if mutiple techs are required to be researched(which are independent of each other) to unlock another tech, how should it be included?
- Like
Code: Select all
[TECH_SA_TO_SAN_FIGHTER+TECH_SA_TO_SAN_ELDER+TECH_SA_TO_SAN_RANGED]-> TECH_SA_TO_SANGOANS
- or like the old way
*in tech_sa_to_sangoans.jsonCode: Select all
"trnRequires":{"unitTypes":
["TECH_SA_TO_SAN_FIGHTER",
"TECH_SA_TO_SAN_ELDER",
"TECH_SA_TO_SAN_RANGED"]},
Re: unit_relations.txt : tech lines - techs
Posted: Fri May 20, 2022 5:25 pm
by Stratego (dev)
old way is obsolete , dont use it ever.
i think here this will the thing:
[TECH_A]-> UNIT1;
[TECH_B]-> UNIT1;
will mean unit1 will need both tech to be unlocked.
(important! this most not be a "level up" setting, that is defined in other part of this file, this can only be "locking")
Re: unit_relations.txt : tech lines - techs
Posted: Fri May 20, 2022 5:37 pm
by Hyuhjhih
Tkns. I guess it will work, probably.