• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Sylent

Recruit
2 Badges
Apr 30, 2019
6
0
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
So I know that there are some data types that can be interated over in something such as a dynamicgridbox, but is it possible to get access those data types like an array, just getting the first element?

For example, the GetPreferredUnits function of the Unit data type will return a list of SubUnitTypes, is it possible to get just the first SubUnitType in that list?
 
I cannot give you a 100% certain answer, but I don't think so, because the type MultiUnitWindow has both GetUnits and GetFirstUnit. I doubt GetFirstUnit would exist if there was a way to get it from GetUnits.
 
I cannot give you a 100% certain answer, but I don't think so, because the type MultiUnitWindow has both GetUnits and GetFirstUnit. I doubt GetFirstUnit would exist if there was a way to get it from GetUnits.
Fair enough, I'll just hope for them to add something like this in the future. Thanks!
 
There isn't and likely won't be, the data system is very strongly typed.

So a GetFromDataModel( SomeModel, 1st ) would need to return some arbitrary type to work how you need, but every registered data function must specifically match both in its name, what arguments it takes in what order and what it returns.

So there would need to be a GetCharacterFromDataModel, GetCountryFromDataModel, GetProvinceFromDataModel etc.
 
There isn't and likely won't be, the data system is very strongly typed.

So a GetFromDataModel( SomeModel, 1st ) would need to return some arbitrary type to work how you need, but every registered data function must specifically match both in its name, what arguments it takes in what order and what it returns.

So there would need to be a GetCharacterFromDataModel, GetCountryFromDataModel, GetProvinceFromDataModel etc.
In that case, would it be possible to limit how much the iterators go through? For example, in a Java for loop you can simply indicate you only want it to go from i = 3 to 5, regardless of how big the array is
 
In that case, would it be possible to limit how much the iterators go through? For example, in a Java for loop you can simply indicate you only want it to go from i = 3 to 5, regardless of how big the array is
That isn't the issue, the issue is you need to specify that you are taking an array and finding something in it which will be a Character type or a Country type, each of those would need to specifically be a separate function.
 
That isn't the issue, the issue is you need to specify that you are taking an array and finding something in it which will be a Character type or a Country type, each of those would need to specifically be a separate function.
Yea I understand what the issue is with my original question :D I'm just suggesting a possible alternative.

What I mean is if you have a dynamicgridbox you could use a limit property or something to tell it to stop after 3 items or to start at the 2nd item. All that would change with the dynamicgridbox is that it knows to stop and/or start at a certain point.
 
Last edited: