Custom Color

by DiRten

More Colors for Vehicles, Players, Trains, Train Stops, Tanks, Cargo-wagons, Fluid-Wagons, Spidertrons -RGB value (Including color saturation) -Copy/Paste color (Shift-RMB -> Shift-LMB) *Vehicle don't change color with player*

Utilities
10 months ago
1.1
1.60K
Transportation Trains

g Compatibility with miniMAXIme

10 months ago

Hi! My mod allows players to change their character on the fly. I want to update the color of players' preview characters in my GUI and in my stored data if they change the color of their character. Since Factorio 1.1.83 (really working since 1.1.85), we've got the event on_entity_color_changed. However, it will only be raised if the color of an entity is changed -- not for players. While you could raise that event by changing player.character.color in addition to player.color, this would only work iff the player actually had a character, which isn't the case if the player is in editor or god mode etc.

Would you mind adding another custom event that you'd raise whenever you change player.color?

10 months ago

Hi! My mod allows players to change their character on the fly. I want to update the color of players' preview characters in my GUI and in my stored data if they change the color of their character. Since Factorio 1.1.83 (really working since 1.1.85), we've got the event on_entity_color_changed. However, it will only be raised if the color of an entity is changed -- not for players. While you could raise that event by changing player.character.color in addition to player.color, this would only work iff the player actually had a character, which isn't the case if the player is in editor or god mode etc.

Would you mind adding another custom event that you'd raise whenever you change player.color?

Hello! I have been absent for some time. I'll make corrections in the near future.

New response