from header_factions import *
####################################################################################################################
# Each faction record contains the following fields:
# 1) Faction id: used for referencing factions in other files.
# The prefix fac_ is automatically added before each faction id.
# 2) Faction name.
# 3) Faction flags. See header_factions.py for a list of available flags
# 4) Faction coherence. Relation between members of this faction.
# 5) Relations. This is a list of relation records.
# Each relation record is a tuple that contains the following fields:
# 5.1) Faction. Which other faction this relation is referring to
# 5.2) Value: Relation value between the two factions.
# Values range between -1 and 1.
# 6) Ranks
# 7) Faction color (default is gray)
####################################################################################################################
default_kingdom_relations = [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.05),("mountain_bandits", -0.02),("forest_bandits", -0.02),("undeads",-0.1)]
factions = [
("no_faction","No Faction",0, 0.9, [], []),
("commoners","Commoners",0, 0.1,[("player_faction",0.1)], []),
("outlaws","Outlaws", max_player_rating(-30), 0.5,[("commoners",-0.6),("player_faction",-0.25)], [], 0xd00000),
# Factions before this point are hardwired into the game end their order should not be changed.
("neutral","Neutral",0, 0.1,[("player_faction",0.0)], [],0xFFFFFF),
("innocents","Innocents", ff_always_hide_label, 0.5,[("outlaws",-0.05)], []),
("merchants","Merchants", ff_always_hide_label, 0.5,[("outlaws",-0.5),], []),
("dark_knights","{!}Dark Knights", 0, 0.5,[("innocents",-0.9),("player_faction",-0.4)], []),
("culture_1", "{!}culture_1", 0, 0.9, [], []),
("culture_2", "{!}culture_2", 0, 0.9, [], []),
("culture_3", "{!}culture_3", 0, 0.9, [], []),
("culture_4", "{!}culture_4", 0, 0.9, [], []),
("culture_5", "{!}culture_5", 0, 0.9, [], []),
("culture_6", "{!}culture_6", 0, 0.9, [], []),
# ("swadian_caravans","Swadian Caravans", 0, 0.5,[("outlaws",-0.8), ("dark_knights",-0.2)], []),
# ("vaegir_caravans","Vaegir Caravans", 0, 0.5,[("outlaws",-0.8), ("dark_knights",-0.2)], []),
("player_faction","Player Faction",0, 0.9, [], [],0x2ccb4a),
("player_supporters_faction","Player's Supporters",0, 0.9, [("player_faction",1.00),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.5),("mountain_bandits", -0.05),("forest_bandits", -0.05),("doomsday_cultists",-1.0),("a_pirates",-0.3)], [], 0x6fcb2c), #changed name so that can tell difference if shows up on map
("kingdom_1", "People's Democratic Republic of Morlok", 0, 0.9, [("undeads",-0.05),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.25),("forest_bandits", 0.2)], [], 0x4c473d),
("kingdom_2", "Weimear Reich", 0, 0.9, [("deithwen_brigade",1.00),("undeads",-0.05),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x35c191),
("kingdom_3", "Alien Shogunate", 0, 0.9, [("deithwen_brigade",-0.2),("manhunters",-0.3),("undeads",-0.05),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x339bdd),
("kingdom_4", "Fantasy Magioucracy", 0, 0.9, [("deithwen_brigade",-0.2),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", 0.25),("forest_bandits", -0.05)], [], 0xCC99FF),
("kingdom_5", "United States of Renaissance", 0, 0.9, [("undeads",-0.05),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05)], [], 0xff4e00),
("kingdom_6", "Sanitarium Conspiracy", 0, 0.9, [("undeads",-0.05),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02)], [], 0xDDDD33),
## ("kingdom_1_rebels", "Swadian rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211),
## ("kingdom_2_rebels", "Vaegir rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211),
## ("kingdom_3_rebels", "Khergit rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211),
## ("kingdom_4_rebels", "Nord rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211),
## ("kingdom_5_rebels", "Rhodok rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211),
("kingdoms_end","{!}kingdoms_end", 0, 0,[], []),
("robber_knights", "{!}robber_knights", 0, 0.1, [], []),
("khergits","{!}Khergits", 0, 0.5,[("player_faction",0.0)], []),
("black_khergits","{!}Black Khergits", 0, 0.5,[("player_faction",-0.3),("kingdom_1",-0.02),("kingdom_2",-0.02)], []),
## ("rebel_peasants","Rebel Peasants", 0, 0.5,[("vaegirs",-0.5),("player_faction",0.0)], []),
("manhunters","Pirate Hunters", 0, 0.5,[("kingdom_3", -0.2),("a_pirates", -1),("deserters", -0.5),("outlaws",-0.6),("player_faction",0.1)], [], 0x608cfc),
("rogue_manhunters","Rogue Pirate Hunters", 0, 0.5,[("doomsday_cultists",-0.1),("kingdom_6",0.2),("kingdom_1",-0.2),("kingdom_2",-0.2),("manhunters",-0.3),("undeads",-0.05),("kingdom_3",-0.55),("outlaws",-0.6),("player_faction",0.1)], [], 0x0036ff),
("deserters","Deserters", 0, 0.5,[("commoners",-0.7),("manhunters",-0.6),("merchants",-0.5),("player_faction",-0.1)], [], 0x1c7011),
("mountain_bandits","Scoiatael Commando", 0, 0.5,[("deserters", -0.05),("kingdom_2", -0.2),("kingdom_5", -0.2),("kingdom_4", 0.2),("deithwen_brigade", -0.2)], [], 0x237733),
("deithwen_brigade","Deithwen Death Squad", 0, 0.5,[("deserters", -0.05),("kingdom_2", 0.2),("kingdom_5", 0.2),("kingdom_4", 0.2)], [], 0x116ab6),
("forest_bandits","Scav Mutated Morloks", 0, 0.5,[("deserters", -0.05),("kingdom_1", 0.2),("kingdom_3", 0.2),("doomsday_cultists", -0.2),("commoners", -0.2)], [], 0xffb464),
#like fantasy
("undeads","Undeads", 0, 0.5, [("player_faction",-0.2),("deserters", -0.05),("kingdom_1", -0.2),("kingdom_2", -0.2),("kingdom_3", -0.2),("kingdom_4", 0.2),("kingdom_5", -0.2),("kingdom_6", -0.2)],[], 0x52245d),
#like morlok
("doomsday_cultists","Doomsday Cultists", 0, 0.5,[("outlaws",0.2),("commoners",-0.2),("kingdom_1", 0.2),("kingdom_2", -0.2),("kingdom_3", -0.2),("kingdom_4", -0.4),("kingdom_5", -0.2),("kingdom_6", -0.2)], [], 0xe97257),
#like alien
("a_pirates","Alien Pirates", 0, 0.5,[("techno_mages", 0.05),("player_faction", -0.05),("commoners",-0.7),("kingdom_1", -0.2),("kingdom_2", -0.2),("kingdom_3", 0.2),("kingdom_4", -0.4),("kingdom_5", -0.2),("kingdom_6", -0.2)], [], 0xffa200),
#like sanitarium
("stargate","Star Gate Expedition", 0, 0.5,[("crazy_pikt", -0.1),("player_faction", -0.15),("commoners",-0.7),("kingdom_1", -0.2),("kingdom_2", -0.2),("kingdom_3", 0.2),("kingdom_4", -0.4),("kingdom_5", -0.2),("kingdom_6", 0.2)], [], 0x924c19),
#neutral good don't like medievals
("techno_mages","Techno Mages", 0, 0.5,[("a_pirates", 0.05),("deserters", -0.2),("old_gods", -0.2),("crazy_pikt", -0.2)], [], 0x00fff6),
#neutral good like weimear
("old_gods","Old Gods Crusaders", 0, 0.5,[("undeads",-0.3),("outlaws",-0.2),("crazy_pikt", -0.2),("deserters", -0.5),("kingdom_2", 0.2),("kingdom_3", -0.2),("a_pirates", -0.2),("techno_mages", -0.2)], [], 0xffffff),
#neutral good like Renaissance
("lost_legion","Lost Legion", 0, 0.5, [("crazy_pikt", -0.2),("deserters", -0.05),("kingdom_1", -0.2),("kingdom_2", -0.2),("kingdom_3", 0.2),("kingdom_4", -0.2),("kingdom_5", 0.2),("kingdom_6", -0.2)],[], 0xff0048),
#neutral evil, like bandits, outlaws
("crazy_pikt","Crazy Pikts", 0, 0.5,[("player_faction",-0.2),("outlaws",0.2),("kingdom_1", -0.2),("kingdom_2", -0.2),("kingdom_3", -0.2),("kingdom_4", -0.2),("kingdom_5", 0.2),("kingdom_6", -0.2)], [], 0xff4800),
#minor_factions_end
#("undeads","{!}Undeads", max_player_rating(-30), 0.5,[("commoners",-0.7),("player_faction",-0.5)], []),
("slavers","{!}Slavers", 0, 0.1, [], []),
("peasant_rebels","{!}Peasant Rebels", 0, 1.0,[("noble_refugees",-1.0),("player_faction",-0.4)], []),
("noble_refugees","{!}Noble Refugees", 0, 0.5,[], []),
#
#minor cultures start
# ("culture_7", "{!}culture_7", 0, 0.9, [], []),
# ("culture_8", "{!}culture_8", 0, 0.9, [], []),
]
# modmerger_start version=201 type=4
try:
component_name = "factions"
var_set = { "factions":factions,"default_kingdom_relations":default_kingdom_relations, }
from modmerger import modmerge
modmerge(var_set, component_name)
except:
raise
# modmerger_end