Description
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 are yellow
and/or white
: do NOT output the revolutionary_colors
line at all
Case 2: There is no named colour (borked file): do NOT output the revolutionary_colors
line at all
Case 3: There is a named colour that is not yellow
or white
:
- Set A to the numerical value of the first named colour, not counting
yellow
orwhite
(black
= 1,purple
= 3,red
= 16,blue
= 15,green
= 9,brown
= 7,orange
= 6,blue_light
= 14) - To set B, IF A is NOT 1 (so not black): see what comes first in definition between
yellow
,white
andblack
. Set B to 1 ifblack
, to 8 ifyellow
, to 0 ifwhite
- To set B, IF A is 1 (thus black): see what comes first in definition between
yellow
andwhite
. Set B to 8 ifyellow
, to 0 ifwhite
- To set B, in case there is no
yellow
orwhite
: set B to 0 - To set C, IF B is NOT 1: list all colours appearing excluding
yellow
andwhite
, output the second one listed. - To set C, IF B is 1: list all colours appearing excluding
yellow
,white
andblack
, output the second one listed. - To set C, if there is no colour when excluding: set C equal to A
Example.
Coat of arms definition:
e_france = {
pattern = "pattern_vertical_split_01.dds"
color1 = "yellow"
color2 = "blue"
colored_emblem = {
texture = "ce_eagle_double.dds"
color1 = "black"
color2 = "red"
mask = {1}
}
colored_emblem = {
texture = "ce_fleur.dds"
color1 = "yellow"
color2 = "yellow"
mask = {2}
instance = { position = { 0.5 0.29 } scale = { 0.3 0.3 } }
instance = { position = { 0.8 0.29 } scale = { 0.3 0.3 } }
instance = { position = { 0.6 0.6 } scale = { 0.3 0.3 } }
}
}
Process:
- Is there a
revolutionary_colors
line defined in the EU4 vanilla country file? NO - Is there any named colour different than
yellow
andwhite
? YES - First named colour different than
yellow
andwhite
:blue
. Set A to 15 - Is A different than 1? YES
- First defined colour that is either
yellow
,white
orblack
:yellow
. Set B to 8 - Is B different than 1? YES
- List of colours that are not
yellow
orwhite
by appearance:blue
,black
,red
- Second of the list is
black
. Set C to 1 - Output result
revolutionary_colors = { 15 8 1 }
(revolutionary flag is blue-yellow-black)
Hardcoded exceptions by title:
- e_guinea = { 5 8 10 } # Modern flag
- e_siberia = { 10 0 10 } # Modern flag
- k_jerusalem = { 0 8 0 } # Impossible with this algorithm, as historically fit
- d_piedmonte = { 5 13 6 } # Historical
- d_ancona = { 13 8 5 } # Historical
- d_latium = { 1 0 5 } # Historical