Results 1 to 4 of 4

Thread: Region number of player during other factions turn

  1. #1

    Default Region number of player during other factions turn

    Hi,

    How would I go about finding the region_list():num_items() of the players faction while it is not that factions turn?

  2. #2
    Jake Armitage's Avatar Artifex
    Patrician

    Join Date
    Apr 2011
    Location
    apartment 6
    Posts
    4,694

    Default Re: Region number of player during other factions turn

    why do you need it?
    won't change pretty much anything

    try with something like

    faction(faction_name):region_list():num_items()

  3. #3

    Default Re: Region number of player during other factions turn

    Quote Originally Posted by Jake Armitage View Post
    why do you need it?
    My expansion limiter ties how much all factions are allowed to expand to the expansion of the player, so I need to return the region number of the player in every factions turn.
    Yes, going through the factions to find the key of the human faction and then using that in faction(faction_name):region_list():num_items() would work. Although it would be a hell of a lot of cycling through the faction list. This is supposed to happen for every faction during end turn.

    But it doesn't matter, I think I'll just use turn number and hope users of my mod don't get annoyed if they play too slowly.

  4. #4

    Default Re: Region number of player during other factions turn

    Alternatively you could set a variable on your sript.

    Make a small function that simply gets the human faction, applies the faction_key to the variable you created and runs on WorldCreated.

    Then you can just use that variable on your functions at leisure. Voilá you only fetch the human faction once in a play session.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •