Page 1 of 1

"UnitClass" requirement working with "Veteran-Build" effect?

Posted: Mon Sep 10, 2018 7:21 am
by Corbeau
Editing Effects page says that "UnitClass" requirement works only with "Veteran_Combat" and "Defend_Bonus". So, officially, it shouldn't work with "Veteran_Build". But it seems it does because LT43 ruleset is using this combination and it definitely worked: Catapults, cannons and stuff were built non-veteran even if there was barracks present. Can someone clarify this?

Re: "UnitClass" requirement working with "Veteran-Build" effect?

Posted: Mon Sep 10, 2018 8:45 am
by Caedo
Veteran_Build has always worked with UnitClass requirements; otherwise the whole idea of having separate barracks, port facility and airport would've never worked. To be honest, I wouldn't look at the wiki for things like that (that page is outdated anyways), but instead look at README.effects, and if it doesn't say anything there, try to figure out what should work, test it, and if it doesn't work, submit a bug report, because most of the time, things should work the way you'd expect them to.
Also, there's no reason whatsoever why unit type, flag, class, and class flag requirements should not work with Veteran_Build.

Re: "UnitClass" requirement working with "Veteran-Build" effect?

Posted: Mon Sep 10, 2018 9:16 am
by Corbeau
Understood, thanks.

(Anyway, the only confusing point was that page explicitly saying that this works ONLY for stuff and stuff. If something is outdated, I expect it to lack information, not have wrong information.)

Re: "UnitClass" requirement working with "Veteran-Build" effect?

Posted: Mon Sep 10, 2018 12:46 pm
by Akechi
These effects use get_unittype_bonus:
Defend_Bonus, (3.0+)Attack_Bonus, Veteran_Build, Move_Bonus, Unit_Recover, (3.0+)Unit_Buy_Cost_Pct, Hp_Regen, Unit_Vision_Radius_Sq

These effects use get_unit_bonus:
(3.0+)Stealings_Ignore, Thiefs_Share_Pm, Veteran_Combat, (3.0+)Combat_Rounds, Unit_Recover, Hp_Regen, (3.0+)Conquest_Tech_Pct, Retire_Pct

(up to 2.6) These effects use get_tile_bonus (don't confuse with get_tile_output_bonus):
Irrig_Possible, Irrig_Tf_Possible, Mining_Possible, Mining_Tf_Possible, Transform_Possible

I think these effects can use UnitClass requirement.