players.toml
The players.toml
file can be used to specify the configuration related to the players.
Simply create a file named players.toml
, make sure it is in the root directory of your game's project,
and Easel will automatically load it.
Below is an example of a valid players.toml
file:
[players]
selfColor = "#00ccff"
allyColor = "#33bbdd"
colors = ["#f58c81", "#b69cf6", "#54c794", "#e09f47", "#e08747", "#e58cc5", "#a9b852", "#6eb2fd"]
teamHueJitter = 5
defaultPrefix = "Acolyte"
Player colors
The selfColor
property is the color that the player will see themselves as.
The allyColor
property is the color that the player will see their allies as.
If not specified, defaults to the selfColor
.
The colors
array is the list of colors that the engine can choose from when assigning colors to players.
The engine will attempt to assign the same color to the same opponent across multiple games,
to make it easier for a player to recognize their enemies.
The teamHueJitter
property can be used to slightly modify the hue of each player's color
when they are on the same team so they are distinguishable from each other.
The player's hue will be adjusted by a random amount between -teamHueJitter
and teamHueJitter
.
Hue is represented in degrees, and so a value of 180
will spread the colors across the entire color wheel.
Normally if you are going to use this property, you would want to set it to a small value like 5
so that the team members are still easily recognizable as being on the same team.
Player names
When a new player joins, they are assigned an auto-generated name using the given defaultPrefix
.
For example, if a player is given the defaultPrefix
of Acolyte
,
they will be named something like Acolyte1234
where 1234
is a randomly-generated sequence of numbers.
If not specified, this defaults to Player
.