-
-
Notifications
You must be signed in to change notification settings - Fork 8
Colors
This page was written based on data collected from the Ark DevKit, numerous experiments done in game in collaboration with mods available on the Steam Workshop and directly with Lethal from Dino Storage, as well as data gathered from various resources including the Wiki, Reddit, and various Discord users.
This page aims at being a single source of reference for all the data associated with the color definitions found within Ark. It will discuss current data and findings and highlight theories until they can be verified. While we will do everything we can to ensure the accuracy of this data, it should be noted some of it may not be completely accurate. Some information will only be available within the source code and is currently unavailable.
Colors are defined as having a ColorName
and a ColorValue
. The ColorName
is just a string with a common name, like "Red", or "Blue". The ColorValue
is stored in the UE4 LinearColor format, containing 4 floats. These values are treated as being stored in the RGBa format where each float is represented as Red, Green, Blue, and alpha respectively. In reality, the colors are stored in an sRGB format and the "alpha channel" is currently unknown in it's use. [needs verification]
Hard coded color definitions include the Nude
color (reserved for index 0) with a value of RGBa(0, 0, 0, 1)
and the Undefined
color (reserved for any index that has no associated definition) with a value of RGBa(1, 1, 1, 1)
.
While unverified, it is currently assumed there is one array to store all color definitions for the game (for creatures and dyes). This array contains 256 Color Definitions. This array is populated at the startup of the server/map. It appears that the array is initialized with all 256 colors being undefined RGBa(1, 1, 1, 1)
. The below list defines "Official" color indices and their corresponding colors:
- [0]: Nude
RGBa(0, 0, 0, 1)
- [1 - 100]: Official Dino Colors
/Game/PrimalEarth/CoreBlueprints/PrimalGameData_BP
- [201 - 226]: Official Dyes
See Above
Each species is defined as having two color sets (one male, one female). These color sets are separate assets from the species themselves and define the default colors each creature can spawn with in the wild only. A color set contains the ColorSetDefinitions
, an array of 6 color set definition entries. Each entry contains a RegionName
, an array of ColorEntryNames
, and more recently RandomWeights
, MinLevel
, and MaxLevel
arrays.
The RegionName
is supposed to represent the region of a species the region would map to, however, it appears that the developers have used a cheat sheet of shorts that they just copy/paste from that sets the region name as something along the lines of Dark All -Nn
to correspond to the list of color entry names. The entry names contains a list of strings that correspond to the ColorName
a creature can spawn with. The strings are then referenced against the Color Definitions Array when a creature is spawned. However, this list is prone to typos.
Some color sets have been designed with duplicate color name entries. This appears to provide a "weighting" more towards that color. This can be seen with the Bigfoot color set /Game/PrimalEarth/CoreBlueprints/DinoColorSet_Bigfoot
where
BigFoot4
is listed up to 5 times, providing a 5/16 chance of being the default color. This is likely why the RandomWeights
property was added more recently.
Event color sets, like the one used for Valentine's Day, work exactly the same way. The only exception is a creature will not naturally spawn with one of these specialty color sets. Part of the event code contains an override that any creature spawned will have a 10% chance of using the event color set as opposed to it's natural colors. As long as the event is active, newly spawned creatures will have a chance to use the event color set. Disabling the event does not remove the event colors. [needs verification]
As a reminder, color sets only apply to creatures that are not bred but instead either wild spawned or spawned with admin commands. They do not restrict mutation colors or the ability to manipulate the color region colors with commands or mods
During the creation of mods, the creators are required to use a PrimalGameData (PGD) asset for their mod. This contains many core components that Ark requires. One of the properties in a PGD is the ColorDefinitions
array. When the DevKit generates the PGD for a mod, it appears to duplicate the /Game/Mods/GenericMod/PrimalGameData_BP_GenericMod
asset, which is effectively a duplicate of the core PGD asset. This duplication forces a mod to include all of the vanilla ColorDefintions
by default.
If a modder does not change this, the mod will be "cooked" with 56 color definitions. If a modder does change this, the mod's color definitions array will be different than official (we will address that later). Many modders do not modify this array, or if they do, they add their custom colors on the end, for example Primal Fear.
As a side note, a mod can change not only the color name, but also the color value. This would allow a mod to make an official color more or less vibrant than normal or change Yellow
from RGB(1, 1, 0)
to RGB(0, 0, 1)
, effectively making yellow be blue. They could also remove all colors other than their favorite colors.
Currently speculated, when a creature spawns, it's species asset is loaded and multiple properties are considered. If a species' bUseColorization
is set to false, the code skips loading color sets and sets all colors to Nude
. Otherwise, the code loads the color gender's corresponding color set (presumably male for gender-less species), and compares the regions that coincide with the color set against the PreventColorizationRegions
array. If any of the values in the latter array are 1, that color region is skipped for the next step.
The color set is evaluated one region at a time, skipping any prevented regions. The code "resolves" the ColorName
's against the color definition array, translating the color set from strings to indices to be stored in memory. During this resolution stage, if a color name isn't found in the color definitions array (either due to typos or a currently non-existent color), the name is skipped and not assigned an index. After the region has been translated properly, the code then chooses a contained index at random. If there are no entries available (due to failure to resolve or an empty entry array) or the region coloring was prevented, that region is assigned the Nude
color.
Once all 6 region colors have been randomly selected, those color indices are permanently assigned to that creature. The only way to modify the indices is through admin commands or mods that all altering color regions of a species. Again, these indices do not change under any known naturally occurring conditions within Ark.
When a mutation occurs, two things always happen; a stat is selected at random and 2 wild levels are added to the "chosen" parent's current stat level and the mutation counter is increased by 1 (over the originally calculated sum), and a color region is randomly selected to apply a random color to. This article will only cover the latter, see Mutations and You for further mutation information.
This region could have been any of the 6 used in Ark, even if that species doesn't make use of that region (it's not visible). Once a region has been chosen, a color within the current size of the color definitions array is chosen, completely at random. This color is chosen by doing rand(num_of_color_defs) + 1
, randomly selecting a value between 1 and the current number of color definitions in the array. This means that you cannot get the Nude
color and that you cannot get the dye colors on unmodded servers.
The random color has an equal chance of being a "vibrant" color as it does any other color. The code selects an index that corresponds to the colors listed in the definitions array. You can very easily end up with a color that your creature could have spawned with naturally or even the same color it had originally, it's all up to RNG. Additional information, including some simplified source code can be found here as well.
The process for the color definitions array begins with assigning the Nude
color to index 0. The next step is that Ark takes all of the ColorDefintions
arrays from the loaded mods and adds them in order from highest priority to lowest priority. If no mods exist, Ark loads the /Game/PrimalEarth/CoreBlueprints/COREMEDIA_PrimalGameData_BP
ColorDefintions
instead. This results in unmodded servers having 0-56 available color indices or modded servers having a wide variety. During this process, each color added will increment the num_of_color_defs
value by 1.
Through testing, we discovered that if a mod only has 4 color definitions, the resulting definitions array has valid colors 0-4.
Once all of the ColorDefinitions
have been added to the color array, the MasterDyeList
's color definitions are applied from an unknown source. Currently, it appears to only use either the highest priority mod or the /Game/PrimalEarth/CoreBlueprints/COREMEDIA_PrimalGameData_BP
dye list. The MasterDyeList
array of colors is always added at index 201 and appears to reserve the rest of the color array. For the Official dye list, this will add 26 dye color definitions and the rest of the indices will be set to the Undefined
color. The colors added by the dye list do not increment the num_of_color_defs
. num_of_color_defs
does not appear to be capped in any way.
There are numerous possibilities for mods and the order of mods that can significantly alter the color array, but this is an attempt to address the three most likely scenarios.
Example 1) As of the time of writing, the mod Primal Fear has a ColorDefinitions
array of 150 colors. We will be using this as our highest priority along with 3 other generic mods, which is any mod that uses an unmodified color array. The list below represents the actual color IDs as they would be on your server:
- [0] -
Nude
- [1 - 150] - Official 56 colors + 94 Primal Fear's Custom colors (150 total)
- [151 - 200] - Official 50 colors (from generic mod)
- [201 - 226] - Official 26 dye colors (reserved, as mentioned above)
- [227 - 255] -
Undefined
(reserved, as mentioned above) -
num_of_color_defs
= 318
A mutation could select any one of the color IDs (1-255) as well as (0-62) for the mutation color and thus makes the Undefined
color most common in heavily modded servers
Example 2) For arguments sake, we will take just one mod with a ColorDefinitions
array of just 4 colors, Purple, Teal, Orange, Yellow. The following represents the actual available color IDs:
- [0] -
Nude
- [1] - Purple
- [2] - Teal
- [3] - Orange
- [4] - Yellow
- [5 - 200] -
Undefined
(as mentioned above) - [201 - 226] - Official 26 dye colors (reserved, as mentioned above)
- [227 - 255] -
Undefined
(reserved, as mentioned above) -
num_of_color_defs
= 4
While this is a very unlikely scenario for a modded server, it is used to show how a limited color array can significantly limit available colors for a mutation possibility. This would also break almost all color sets, effectively spawning an all Nude
creature.
Example 1-2) Assuming a server has been running using a similar configuration to Example 1 for any amount of time, creatures (wild, tamed, and bred) will have already have color IDs assigned to them. As mentioned before, these color IDs map directly to the color array and are mostly permanent. When the server switches to a mod loadout similar to Example 2, almost all creatures will have their colors replaced with the Undefined
color as there would be almost no color entries in the color array.
This is solely due to Ark saving color IDs as the index for this same array. There is no remapping of colors, no re-rolling of color indices, no changes to these indices under natural circumstances. The only known exception to this rule is if a species has the Nude
color in all 6 regions (color ID 0). The game suspects something has broken and forces a random color ID for each region based upon that species' color set. This reroll will not have a chance of rolling using the event colorset.
Example 3) This is the most common setup for modded servers. If we assume 4 generic mods, you end up with the following color IDs:
- [0] -
Nude
- [1 - 200] - Official 56 colors (x3) + Official 32 colors
- [201 - 226] - Official 26 dye colors (reserved, as mentioned above)
- [227 - 255] -
Undefined
(reserved, as mentioned above) -
num_of_color_defs
= 224
Note that the number of color definitions would allow only most of the dye colors to be used for mutations. This set up could also result in a color ID for "Red" to be 1, 57, 113, or 169. The only way to know the actual ID is through the save game or mods that expose the ID.
Example 1-3) One of the most common scenarios for a server owner that removes a mod is outlined here. Assuming the server started with Example 1 and decided to remove the Primal Fear mod and add another generic mod instead, the color array indices will have all changed. This means that color IDs that may have previously represented a pleasant appearance of a creature could completely alter the colors after this change.
As mentioned numerous times, the saved color index or IDs don't change, but the color definitions aren't guaranteed to be at the same index. This can result in a creature that had a color ID of 57 which is Primal Fear's custom color "AbsoluteBlack" to be converted to Official's color "Red". Again, this can significantly alter the colors of creatures.