LPlate2
Warlord
- Joined
- Dec 27, 2018
- Messages
- 299
Hi,
I want to avoid cycling thru all of a player’s units in python when checking for some of my triggers, where I know there’s only a very limited number of units that will ever trigger the effect, e.g. Great People.
It seems to me that this would involve creating an array in the dll, which is a trimmed version of the full unit list based on a certain criteria. This trimmed list would then be used in the python calls.
Is anyone aware of a mod which has created such trimmed unit lists (or alternatively a trimmed plot list to avoid cycling thru all of the plots on a map)?
Are there examples of what I’m talking about already in the basic vanilla/FFH dll?
Anyone have any suggestions about how I’d go about coding this?
I want to avoid cycling thru all of a player’s units in python when checking for some of my triggers, where I know there’s only a very limited number of units that will ever trigger the effect, e.g. Great People.
It seems to me that this would involve creating an array in the dll, which is a trimmed version of the full unit list based on a certain criteria. This trimmed list would then be used in the python calls.
Is anyone aware of a mod which has created such trimmed unit lists (or alternatively a trimmed plot list to avoid cycling thru all of the plots on a map)?
Are there examples of what I’m talking about already in the basic vanilla/FFH dll?
Anyone have any suggestions about how I’d go about coding this?