Dyeing/Colorizing Unit Images
-
@redrum said in Dyeing/Colorizing Unit Images:
I've renamed the properties to use "units.transform" instead of "units.color" prefix:
units.transform.color.Germans=FF0000 units.transform.flip.Germans=true units.transform.color.Russians=00BBBB units.transform.brightness.Russians=25 units.transform.color.British=00FF00 units.transform.ignore=factory,fighter@Cernel The ignore needs to apply to flip as well as generally the units you ignore will either be things like factory which appear exactly the same for all nations (not flipped like the rest) or will be damaged BB or AA radar which you'll already manually colorize/flip if you want them to be ignored (wouldn't want to flip them back). I don't think there is really a use in TripleA to be flipping images and not coloring them which is why they share a single ignore unit list. Remember this isn't meant to be an image editing program just give users and map makers the common functions that they would need if creating a shared unit set.
In GIMP "transform" means those things like rotating etc., not changing colours, but of course this is just a nomenclature. For coherency with "flip", I suppose the other one should be called "colorize" instead of "color", but, then, it would be not coherent with "brightness", instead (tho this is the same in GIMP too). Maybe it should be rather called "hs", or something hinting that it is changing only the hue and saturation, not sure.
-
@Cernel Yes, currently it checks the actual unit name against the ignore list not the specific image. So will ignore transforming for all the unit's various images (_hit, _lr, _it, etc). I figured that probably makes more sense but I'm open if folks feel they would want ignore to list each specific image for a unit.
Well, "color" fits better with "brightness" and "color" is used in other areas of the map.properties. "flip" is probably the one that's a bit questionable but I think that was the most straightforward name I could think of.
-
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=truewould 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=horizontalThe 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.
:thumbs_up_medium-light_skin_tone: :thumbs_up_medium-light_skin_tone: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.fliporunits.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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login