Page 1 of 1

New 3.1 unit type field tp_defense

Posted: Mon Mar 03, 2025 4:49 am
by Dino the Dinosore
New unit type field tp_defense tells if unit can defend while transported. Has 2 values -
"Blocked" - Can't defend when transported
"Alight" - Can defend if can alight or unload (current default)

But I'd like to have Marines defend a ship transporting them, even when not in a port (so they can't alight or unload). I tried experimenting with Attack action enabler with target reqs

Code: Select all

target_reqs={"type","name","range","present"
"UnitType","Marines","Local",TRUE
"UnitState","Transported","Local",TRUE
}
but that doesn't help. Maybe the field tp_defense takes precedence over action enablers?
If I could use action enablers, I'd allow Marines to defend, while transported, against all naval units except submarines, and against Helicopters. Or would be good to have 3rd value for the field - "Always".

Re: New 3.1 unit type field tp_defense

Posted: Tue Mar 04, 2025 9:13 am
by cazfi
Dino the Dinosore wrote: Mon Mar 03, 2025 4:49 amOr would be good to have 3rd value for the field - "Always".
That's in freeciv-3.2.