I_NumberUnitsInSettlement
The documentation for the I_NumberUnitsInSettlement condition is:
Code:
---------------------------------------------------
Identifier: I_NumberUnitsInSettlement
Trigger requirements:
Parameters: settlement, unit type (UNIT_DESCRIPTION.id), logic token, quantity
Sample use: I_NumberUnitsInSettlement Tarquinii roman_city_militia < 5
Description: How many units are in the settlement?
Battle or Strat: Strat
Class: NUMBER_UNITS_IN_SETTLEMENT
Implemented: Yes
Author: Guy
---------------------------------------------------
The second parameter is a unit type identifier. Does anyone know if there is an identifier (like "any" or "all") valid for any unit? I want to test against the total number of units in a settlement; I don't care how many of any particular type there are.
Re: I_NumberUnitsInSettlement
Not that I know of. If you have an idea of the total population of the city and a good guess on the unit sizes, you could use GarrisonToSettlementRatio to get an approximate result. It's not pretty, but it's the best I can think of right now.
Re: I_NumberUnitsInSettlement
You hit upon a sore point The_Mark: in general, you can't get any idea of a settlement's population in a script. You can tell if it's approaching maximum or if it's too low for recruiting, but that's it. In fact, I have trouble getting SettlementPopulationTooLow to work in some contexts.
Thanks for the response, I'll keep working on it.