Open IohannesIohannium opened 2 years ago
The following equivalences should be first done:
light_grey
, samnite_beige
, offwhite
, ck2_white
--> white
(which means the algorithm will treat light_grey
as if it were written white throughout the entire process)samnite_green
, dark_green
, ck2_green
--> green
roman_gold
, ck2_yellow
--> yellow
pitch_black
, ck2_black
--> black
achaemenid_mauve
, ck2_purple
--> purple
roman_red
--> red
frost_blue
--> blue
spartan_ocra
--> orange
spartan_brown
--> brown
How to treat unknown colors (other strings or a RGB/HSV value): treat them as black
Except in cases where such would be inherited from EU4 definitions (e.g. France), we could generate revolutionary flags for all countries coming from CK3. This would ensure that less eyesore colour combinations appear with revolutionary targets and sister republics.
The following line must be added to the country's
countries/XXX.txt
definition file:revolutionary_colors = { A B C }
A, B and C are determined thus, from the country's coat of arms definition:
Case 0: The title is mapped to a EU4 country with a defined
revolutionary_colors
line: copy it from the EU4 file as it is Case 1: The only named colours areyellow
and/orwhite
: do NOT output therevolutionary_colors
line at all Case 2: There is no named colour (borked file): do NOT output therevolutionary_colors
line at all Case 3: There is a named colour that is notyellow
orwhite
:yellow
orwhite
(black
= 1,purple
= 3,red
= 16,blue
= 15,green
= 9,brown
= 7,orange
= 6,blue_light
= 14)yellow
,white
andblack
. Set B to 1 ifblack
, to 8 ifyellow
, to 0 ifwhite
yellow
andwhite
. Set B to 8 ifyellow
, to 0 ifwhite
yellow
orwhite
: set B to 0yellow
andwhite
, output the second one listed.yellow
,white
andblack
, output the second one listed.Example.
Coat of arms definition:
Process:
revolutionary_colors
line defined in the EU4 vanilla country file? NOyellow
andwhite
? YESyellow
andwhite
:blue
. Set A to 15yellow
,white
orblack
:yellow
. Set B to 8yellow
orwhite
by appearance:blue
,black
,red
black
. Set C to 1revolutionary_colors = { 15 8 1 }
(revolutionary flag is blue-yellow-black)Hardcoded exceptions by title: