Team Color Shift Not Working

Make art for user-made content.

Moderators: Forum Moderators, Developers

Forum rules
Before posting critique in this forum, you must read the following thread:

Team Color Shift Not Working

Postby ahvth » July 17th, 2017, 4:34 pm

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 521 times


Thank you!
ahvth
 
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Re: Team Color Shift Not Working

Postby Vulpine » July 17th, 2017, 4:58 pm

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.
Also the author of Elvish Incursion, a short little prologue.
User avatar
Vulpine
 
Posts: 111
Joined: February 17th, 2017, 4:13 pm
Location: Capacitated

Re: Team Color Shift Not Working

Postby ahvth » July 17th, 2017, 6:36 pm

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 496 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 :)
ahvth
 
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Re: Team Color Shift Not Working

Postby zookeeper » July 17th, 2017, 8:13 pm

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.
User avatar
zookeeper
WML Wizard
 
Posts: 9603
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Team Color Shift Not Working

Postby ahvth » July 17th, 2017, 9:36 pm

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
ahvth
 
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Re: Team Color Shift Not Working

Postby Vulpine » July 17th, 2017, 10:43 pm

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.
Also the author of Elvish Incursion, a short little prologue.
User avatar
Vulpine
 
Posts: 111
Joined: February 17th, 2017, 4:13 pm
Location: Capacitated

Re: Team Color Shift Not Working

Postby ahvth » July 18th, 2017, 5:28 am

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.
ahvth
 
Posts: 4
Joined: July 14th, 2017, 9:22 pm

Re: Team Color Shift Not Working

Postby Vulpine » July 18th, 2017, 9:52 pm

:)
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.
Also the author of Elvish Incursion, a short little prologue.
User avatar
Vulpine
 
Posts: 111
Joined: February 17th, 2017, 4:13 pm
Location: Capacitated

Re: Team Color Shift Not Working

Postby Celtic_Minstrel » July 31st, 2017, 12:45 pm

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.
Maintainer of Steelhive.
User avatar
Celtic_Minstrel
Developer
 
Posts: 754
Joined: August 3rd, 2012, 11:26 pm

Re: Team Color Shift Not Working

Postby shadowm » July 31st, 2017, 7:03 pm

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.
I also made Wesnoth RCX, a team-color preview tool for artists and content creators.
Elsewhere: shadowmBlogFollow me on Twitter
User avatar
shadowm
Wesnoth.org Administrator
 
Posts: 6177
Joined: November 14th, 2006, 5:54 pm
Location: Chile

Re: Team Color Shift Not Working

Postby Celtic_Minstrel » August 1st, 2017, 2:32 am

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.
Maintainer of Steelhive.
User avatar
Celtic_Minstrel
Developer
 
Posts: 754
Joined: August 3rd, 2012, 11:26 pm


Return to Art Workshop

Who is online

Users browsing this forum: Google [Bot] and 5 guests