Team Color Shift Not Working

Make art for user-made content.

Moderator: Forum Moderators

Forum rules
Before posting critique in this forum, you must read the following thread:
Post Reply
ahvth
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Team Color Shift Not Working

Post by ahvth »

Hi,

I am doing a bit of an update to a classic Era of Magic sprite, and I was wondering if anyone could help me.

My issue: for whatever reason, when i plug this unit into the game, it doesnt shift the color on the magenta areas, but instead uses the original red color from the orginal sprite.

Can anyone test this sprite in their own game, or perhaps give me an idea on how to fix this issue?

This is the sprite:

goldenmage.png
goldenmage.png (3.29 KiB) Viewed 5588 times
[/super]

Thank you!
User avatar
Vulpine
Posts: 152
Joined: February 17th, 2017, 4:13 pm
Location: Capacitated

Re: Team Color Shift Not Working

Post by Vulpine »

Some of your colors (I don't know which ones) aren't the right shade of magenta That's the only problem I found with it. Perhaps you didn't include

Code: Select all

{MAGENTA_IS_THE_TEAM_COLOR}
to the unit file?

Also, what did you mean by, the original red color from the original sprite? I thought the original sprite has proper magenta tc? I'm a bit confused by this, but I hope this solves your problem regardless.
One foot in my mouth, and one in the grave; that's the way I like it, and that's the way it'll stay.
[shameless_advertising]
Also the author of Elvish Incursion, a short little prologue.
[/shameless_advertising]
ahvth
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Re: Team Color Shift Not Working

Post by ahvth »

Thanks for your answer.

The color shift macro is called in the appropriate place in the unit file.

What I mean by the red coloring from the original file is that I see this:
goldenmage.png
goldenmage.png (1.55 KiB) Viewed 5563 times
in its entirety, instead of an even partially color shifted sprite.

I don't have this original png anywhere in the game data files thought, so I have no idea why or how Wesnoth is using it.

Could you perhaps test the color-shifted sprite in your own verison of the game to let me know if it's working for you or not? Perhaps its a Wesnoth cache issue.

Thanks for the help :)
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Team Color Shift Not Working

Post by zookeeper »

ahvth wrote:I am doing a bit of an update to a classic Era of Magic sprite
Well it's probably finding that sprite then, and not yours.

Images aren't cached anywhere, so if you see a different image in place of your own, then that has to be another add-on image with the same image path.
ahvth
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Re: Team Color Shift Not Working

Post by ahvth »

zookeeper wrote:
ahvth wrote:I am doing a bit of an update to a classic Era of Magic sprite
if you see a different image in place of your own, then that has to be another add-on image with the same image path.
That's what I originally figured as well, but after thoroughly searching for any other copy of the original sprite anywhere in the proximity of wesnoth, I've found nothing...

If someone could test this sprite in game and report to me whether or not it is accepting team colors at all, I would be much obliged :D
User avatar
Vulpine
Posts: 152
Joined: February 17th, 2017, 4:13 pm
Location: Capacitated

Re: Team Color Shift Not Working

Post by Vulpine »

Before I replied earlier, I downloaded the image from this page and loaded it into my campaign, and it worked fine except for a few magenta pixels that weren't the right color. I went into debug mode and changed the team and it worked the same for blue. That was how I knew that a few pixels were the wrong color.

Try going to your add-ons folder and moving all of the addons to a folder on your desktop. Put one campaign back in that has a custom hero sprite. Rename the hero baseframe (maybe put an underscore at the beginning of the name) and place the goldenmage.png image in the same folder and rename it to what the hero's baseframe was. Load the campaign and test.

That's pretty much what I did, only I didn't empty my add-ons folder. If you still have the same problem, then it's beyond my comprehensive capabilities :(

I could do the same thing I did earlier and take screenshots if you would like. I'm using BfW v1.12.5
One foot in my mouth, and one in the grave; that's the way I like it, and that's the way it'll stay.
[shameless_advertising]
Also the author of Elvish Incursion, a short little prologue.
[/shameless_advertising]
ahvth
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Re: Team Color Shift Not Working

Post by ahvth »

Thanks everyone for your suggestions.

I got it working following Vulpine's suggestions.

Weird that it didnt work until I moved it into another campaign... one of the many mysteries of life.
User avatar
Vulpine
Posts: 152
Joined: February 17th, 2017, 4:13 pm
Location: Capacitated

Re: Team Color Shift Not Working

Post by Vulpine »

:)
Glad to hear!
ahvth wrote:Weird that it didnt work until I moved it into another campaign... one of the many mysteries of life.
Naw, it's one of the countless mysteries of coding. There are more mysteries in coding than in life.
One foot in my mouth, and one in the grave; that's the way I like it, and that's the way it'll stay.
[shameless_advertising]
Also the author of Elvish Incursion, a short little prologue.
[/shameless_advertising]
User avatar
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Team Color Shift Not Working

Post by Celtic_Minstrel »

Just for the record, {MAGENTA_IS_THE_TEAM_COLOR} isn't required to TC a unit image, at least in 1.13; I'm fairly sure it's not required even in 1.12, though. All it does is set flag_rgb=magenta, but if I recall correctly, magenta is already the default value of the flag_rgb key.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Iris
Site Administrator
Posts: 6797
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Team Color Shift Not Working

Post by Iris »

Celtic_Minstrel wrote:I'm fairly sure it's not required even in 1.12, though.
It is required in 1.12. Your memory is a bit rusty, I guess.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Team Color Shift Not Working

Post by Celtic_Minstrel »

Ah, so it is. Sorry about that, then. I thought it had already been the default before that commit, but I guess not.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply