Results 1 to 3 of 3

Thread: I_NumberUnitsInSettlement

  1. #1
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Post 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.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  2. #2
    Simulation Monkey Member The_Mark's Avatar
    Join Date
    Dec 2004
    Location
    Helsinki, Finland
    Posts
    2,613

    Default 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.

  3. #3
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Post 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.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO