What I did not chose the color, it is still set black

Bugs that are actually features.
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

What I did not chose the color, it is still set black

Post by WIZ4 »

I tried to find by trial and error, the console command with the help of which could change the color of the players. And I found it:

Code: Select all

/c game.players['WIZ4'].color={pink}
but no matter what color I did not choose, it still turns black. I'm sure that you do not understand, as I was writing this text with the help of an google translate. So attached gif
Avatar.gif
Avatar.gif (8.77 MiB) Viewed 819 times
Version 0.13.11
My native language is russian. Sorry if my messages are difficult to read.
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: What I did not chose the color, it is still set black

Post by posila »

Hi, this is not a bug.

If you want to use predefined colors, use command /color:

Code: Select all

/color pink
If you want to specify exact color, you can use command that you used, but provide RGB values ...

Code: Select all

/c game.players['WIZ4'].color={r=1, g=0, b=0.73}
Now to explain "not a bug" part - command you wrote is valid LUA command, so you didn't get an error. The way we handle colors in scripts is that if any of the RGB channels is missing, default value of 0 is used for that channel. So for red you can write {r=1}, which is equivalent to {r=1, g=0, b=0}. That means {} is equivalent to {r=0, g=0, b=0}, which is black, and the same is true for {whatever}.
Post Reply

Return to “Not a bug”