1.14 colors...

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.
User avatar
Ravana
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: 1.14 colors...

Post by Ravana »

You say (unlike in wesnoth 1.12, where it could understand both red and 1) , but code you posted only proves it could understand 1.
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

ah i dont know if it was working with "red", never tried.. sorry for wrong wording. Just was saying that it became incompatible now and needs modifying.
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

New topic about colors...

there is color name "frozen"

Looks like it is also displayed as #95B5E6 (team-colors.cfg) which is actually more like gray? (I see gray on minimap)
I found that 180,200,250 or #8A9BFF will suit frozen better... anyone agree?


We could also add some colors... there is not a big selection ;(
FFDDFF - kind of pinky frozen.. can name it barbie lol.. or pink gold

FA98FA - could be just pink

Is there a way to add id's to eras or modification which would display custom colors when you host game?
User avatar
Ravana
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: 1.14 colors...

Post by Ravana »

It might be possible to overwrite core color ids, but I only change them in game https://github.com/ProditorMagnus/Color ... or_mod.cfg.
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

y.. in game is not bad... but it wont show when you select side with colors...
or maybe [side] color could have some custom color (#ffaabb)? in future wesnoth releases... or color range could be possible to setup within multiplayer tag?
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: 1.14 colors...

Post by Celtic_Minstrel »

The colour name "frozen" is named after the "frozen" terrain and is used to colour the small terrain icons on the sidebar; I don't recall having any issues with these colours, and they're not technically intended for use as team colours, so I wouldn't support changing them unless you actually want to change the colour of the frozen terrain icon.

I guess new colours could be added, but I don't see a pressing need for it. You can add new colours in your add-on using the [color_range] tag; if you put it at the global level (in _main.cfg), it will just be available to anyone. The tag can also be used in a scenario to add a colour just for that scenario, or in an [effect]apply_to=image_mod for more of a one-use palette (though that'll also make the colour known from then until the end of the scenario, so could be used to add new colours on-the-fly).

I'm not sure if core colours can be overwritten; I guess the way to do so (if it works at all) would be to just use the same ID as the core colour.

EDIT: Wait, I think I may be wrong about [color_range] working at toplevel; looks like it needs to go inside [game_config]. (Or the scenario or effect tag.) I'm not sure if [game_config] can be extended by add-ons though.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Ravana
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: 1.14 colors...

Post by Ravana »

It works from toplevel. Knowing about [effect] workaround would have been nice for 1.12.
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

Celtic_Minstrel wrote: May 8th, 2018, 12:18 am EDIT: Wait, I think I may be wrong about [color_range] working at toplevel; looks like it needs to go inside [game_config]. (Or the scenario or effect tag.) I'm not sure if [game_config] can be extended by add-ons though.
Oh.. I nearly started to jump happily when you said it would work at main.cfg ;(
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

Ravana wrote: May 8th, 2018, 12:30 am It works from toplevel. Knowing about [effect] workaround would have been nice for 1.12.
You mean it actually tested and works at main.cfg?
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: 1.14 colors...

Post by Celtic_Minstrel »

I'm pretty sure the [effect] workaround has been an undocumented feature for quite some time, so it's very likely that it worked in 1.12.

I actually just added documentation for these features to the wiki, particularly on GameConfigWML. I didn't mention that they work at toplevel since I wasn't certain about that.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Ravana
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: 1.14 colors...

Post by Ravana »

I have linked color mod few posts ago.
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

Celtic_Minstrel wrote: May 8th, 2018, 12:58 am I actually just added documentation for these features to the wiki, particularly on GameConfigWML. I didn't mention that they work at toplevel since I wasn't certain about that.
Ohh thank you very much! And I hope it will work :)
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

Ok... I tried to add this inside _main.cfg between #ifdef MULTIPLAYER #endif
Then I tried to put it above [era][/era] and then inside [era][/era]

Code: Select all

	 [game_config]
 [color_range]
    id=pinkgold
    rgb=FFDDFF,FFF6BD,180E5F,FFDDFF #FFDDFF
    name= _ "Pink Gold"
[/color_range]
[color_range]
    id=pink
    rgb=FA98FA,FFFCC0,4A3212,FA98FA #FA98FA
    name= _ "Pink"
[/color_range]
[color_range]
	id=frozenn
	rgb=8A9BFF,FFF6BD,180E5F,8A9BFF #8A9BFF
    name= _ "Frozenn"
[/color_range]
 [/game_config]
The result is the same when I try to use [side] color=frozenn [/side]
It says "Invalid color" and shows magenta.

1) What do I do wrong? I want new colors for my specific era scenarios.
2) If I change the core [game_config] will joining players see different colors?
3) What file could I modify to add more colors to select from for any scenario (including random maps)? (for example now i can choose from red, blue, etc, I want to ADD frozen color to the choice)
3.1) if I do it, will joining players see modified colors too?

Thanks.
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: 1.14 colors...

Post by Celtic_Minstrel »

Try leaving out the [game_config] tag. While color ranges do work in [game_config], I suspect [game_config] tags in addons are actually ignored, so the only people who need to put color ranges in [game_config] would be core authors.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: 1.14 colors...

Post by enclave »

Celtic_Minstrel wrote: May 10th, 2018, 12:42 am Try leaving out the [game_config] tag. While color ranges do work in [game_config], I suspect [game_config] tags in addons are actually ignored, so the only people who need to put color ranges in [game_config] would be core authors.
This has worked!!! Thank you very much!!!
I put it like so in my qciv.cfg

Code: Select all

[color_range]
	id=frozenn
	rgb=8A9BFF,FFF6BD,180E5F,8A9BFF #8A9BFF
    name= _ "Frozenn"
[/color_range]
[era]
[/era]
Now what about 2 other questions? How could I be able to use frozen color in any scenario? Is there a way?
Post Reply