Dyeing/Colorizing Unit Images
-
Flip & coloring should be completely independent IMO. We can add a 'flip' ignore later I suppose, so not critical. If it comes to that, I just hope that map makers will request the feature before they add more unit images to work around it.
I've pondered a bit if
unit.transform.mirror.image=true
would be any better, but does not necessarily seem so. I think the only thing missing or unclear about 'flip' is that it's a horizontal flip. There can be multiple types of flip, color, orientation, and for orientation multiple kinds.Using the value 'horizontal' could potentially add clarity, eg:
units.transform.flip.Germans=horizontal
The fact that there is no vertical is fine, it's an unsupported configuration that we could add in if needed. That would be a good route to leave open, if we did start allowing a vertical flip, for whatever reason, we wouldn't need an additional property (which would make the property naming even trickier).
-
@LaFayette I thought about including something about horizontal so that later on vertical flipping could be added more easily. I just couldn't come up with any case where I would want to flip unit images vertically. If someone can think of something then I'm fine adjusting the property.
-
@redrum I don't think there will be a case for it TBH, so it'd mostly just be for clarity IMO
-
PR is now merged. Feel free to give it a try in the pre-release and provide feedback!
-
@redrum
Trying this out on 'Invasion_USA'. If I understand how the search of the image works it should be 'nation folder to units folder to images included with TripleA'Under the units folder I have only the 'Americans' folder the other nations share the other units. The 'Americans' also share the 'infantry' unit so no 'infantry.prg' in the 'Americans' folder.
When I run the game the 'Invaders' do share the same units, but the 'Americans' infantry seems to be coming from the TripleA resources.
If you have time could you check the search order, everything else works great.
Cheers...
-
@wc_sumpton That's correct. It should be first the folders in the map zip (nation, then shared) then the folders in TripleA engine assets (nation, then shared). If you share the map zip then I can take a look.
-
not sure why but for some reason i thought triplea was already doing this.
-
@redrum I suggest the feature as default applying only to the units in main folder, not to any of the ones in the player's folder.
For example, if a player would have some called units in its own folder and some in main folder and you set
units.transform.flip
orunits.transform.color
, only the units in main folder would be flipped or colourized, while no changes would be made on the ones in the player's folder. I think it would make the most sense, this way.