#2 by osman » Wed Sep 12, 2007 4:39 pm
This usually involves making a new 'unit stat', and a new 'exclusion group'. There are a few examples in the existing data files, but you have to start by editing your race's AUG file (not the DAT file). Add a new unit stat (myStat).
Then go to excl groups, and add a new group (myExclGrp), with a min of 0 (or whatever), and a max of @myStat.
Now, use myExclGrp as the exclusion group for your option link in the unit. In the pre-link script for the unit, set unit.basestat[myStat] to whatever the maximum should be, based on any logic at all.
Like (if you want to allow a second choice once there are at least 10 models in a unit):
if ( unit.count[effective] >= 10 ) then
unit.basestat[myStat] = 2
else
unit.basestat[myStat] = 1
endif