Donations
Help us to pay our Server!
(: Consider a donation :)
Donation pic
Donators
Main Menu
Language
Recent changes

[Main Page]

About Colors

From Widelands.org

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy

Contents

Colors

Introduction

This document describes the principle of player colors.



What are player colors (plrclr)?

Imagine a game with 3 players. Each player has it's unique color (like blue, red and green). It would be terrible difficult if the units would look all the same. Imagine a fight between two soldiers; one soldier is owned by the green player, one by the red, but both soldiers look the same. So each unit (and building) must have a player color. Now, it would be very hard to draw each unit with each player color; therefore widelands takes a different approach: each unit is drawn using 4 player colors (whereas plrclr0 is the darkest and plrclr3 is the lightest); in the configuration file of the unit the RGB values of the used colors are noted (Or in the parent conf file, which is usually the conf file of the tribe). When widelands draws now a unit for another playercolor as was used in the graphic, it will replace the colors with the correct colors for the player.



So how does it works?

This depends on what you want to do: an animation/pic with its own config file or one without. Examples for animations with config-file are workers, bobs, critters.... Examples for animations without config-file are flags... For animation without config file the defaults (as defined in the world/conf or tribe/conf file in the section [defaults]) apply. Otherwise you have to look at the conf file for the animation/pic (or create on based on a similar from another animation/pic). Find the valid section (like ~np~[idle],[walk]~/np~ and so on). There you'll find (or have to add) the following commands:

plrclr0_r=123 # Darkest Plrclr RGB -- Red value
plrclr0_g=233
plrclr0_b=99
plrclr1_r=123 # Second Darkest Plrclr RGB -- Red value
plrclr1_g=233
plrclr1_b=99
plrclr2_r=123 # Light Plrclr RGB -- Red value
plrclr2_g=233
plrclr2_b=99
plrclr3_r=123 # Lightest Plrclr RGB -- Red value
plrclr3_g=233
plrclr3_b=99

Just replace the integers with your own values (from the colors you've used) and you're done.
If you do not overwrite one color (for example you only specify shadow colors), the other colors will be taken from the default conf file (world/conf or tribe/conf).

Retrieved from "http://xoops.widelands.org/modules/mediawiki/index.php/About_Colors"

This page has been accessed 2,949 times. This page was last modified 20:23, 8 November 2006. Content is available under GNU General Public License 2.





Search


Login
Username:

Password:


Lost Password?

Register now!
Polls
Which requires the fewest improvements
Animations in game (buildings, workers, nature, animals)
Graphics in main menu
Campaigns (as well as number of campaigns)
Network support
Sounds
Music
Structure of the economies of the tribes
Maps
The transportation system
In game user interface
The editor
Hosted by