-
December 28, 2021, 02:02 AM
#1
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?
-
December 30, 2021, 04:47 AM
#2
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()
-
December 30, 2021, 05:48 AM
#3
Re: Region number of player during other factions turn
Originally Posted by
Jake Armitage
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.
-
November 14, 2022, 03:52 AM
#4
Libertus
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
-
Forum Rules