Team-Color Function [~TC( )]

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Gilgamesh
Posts: 15
Joined: February 13th, 2011, 1:21 pm

Team-Color Function [~TC( )]

Post by Gilgamesh »

Umm... I don''t know if I post it in the right place, but after seeing some of questions about team color, i guess I'll post it here.

Like the title say, I like to know how to use this function, is it on event when you made scenarios? Or you can add it in the The [unit_type] tag ?

And I like to know can I change the unit's team color, just for that unit type only. Example:
1. I create a new unit that based from sergeant to grand marshal from the loyalists
2. I know about the (MAGENTA_IS_THE_TEAM COLOR), but can I change into other color aside the team color?
3. I tried to change the MAGENTA_IS_TEAM_COLOR to everything I think is possible for the changing in the [unit_type] tag, but no result in the game.

Hope I didn't post it in the wrong place, I'm new to WML and I'm sucks at these kinds of things. I'm better at graphics, since my friend Deepthroat is dead and no one can help in these kind of problems, I decide to join the Wesnoth Forum.
User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: Team-Color Function [~TC( )]

Post by bigkahuna »

To do team_color, color the parts of the unit you want TCed Magenta, and place {MAGENTA_IS_THE_TEAM_COLOR} inside the [unit_type] tag. You can't have the unit a different color (AFAIK) except by placing it on a different side. You can change the side's color by having a "color=X" tag within the [side] tag.
Check out my campaign Sweet Revenge!
Join the new R2D forum!
User avatar
Gilgamesh
Posts: 15
Joined: February 13th, 2011, 1:21 pm

Re: Team-Color Function [~TC( )]

Post by Gilgamesh »

bigkahuna wrote:To do team_color, color the parts of the unit you want TCed Magenta, and place {MAGENTA_IS_THE_TEAM_COLOR} inside the [unit_type] tag. You can't have the unit a different color (AFAIK) except by placing it on a different side. You can change the side's color by having a "color=X" tag within the [side] tag.
Err... I don't understand it, sorry.
So I can't change the color of my unit by editing the {MAGENTA_IS_THE_TEAM_COLOR} in the [unit_type] tag?
Is this in the scenario making part? If so, I can use 'Northern Rebirth' to change the leader's team color.
Thanks for the help.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Team-Color Function [~TC( )]

Post by Anonymissimus »

Gilgamesh wrote: So I can't change the color of my unit by editing the {MAGENTA_IS_THE_TEAM_COLOR} in the [unit_type] tag?
No.
That color (parts) of the unit which get recolored to its team color are the magenta ones. (If I understand that macro correctly.)
Is this in the scenario making part?
Yes, in [side] definitions.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
User avatar
Gilgamesh
Posts: 15
Joined: February 13th, 2011, 1:21 pm

Re: Team-Color Function [~TC( )]

Post by Gilgamesh »

Thanks, Anonymissimus, bigkahuna.
I'll try to figure how to use ~TC( ) in [side] definitions.
Tet
Posts: 391
Joined: February 18th, 2009, 5:11 am

Re: Team-Color Function [~TC( )]

Post by Tet »

Do you want to make your own colors?
It is pretty simple. They are all defined in one team-colors.cfg in the core. You can change them easily. Making black more black and green more green or so. The rgb values are medium(ingame color), darkest(usually black), lightest (usually white), marker color

Just add:

Code: Select all

[color_range]
    id=yellow
    rgb=FFCC00,FFF5CC,221B00,FFCC00
    name= _ "Yellow"
[/color_range]

[color_range]
    id=pink
    rgb=FF465A,FFFFFF,000000,FF465A
    name= _ "Pink"
[/color_range]
My Temple Project: http://forums.wesnoth.org/viewtopic.php?f=23&t=29800
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895
Post Reply