diff --git a/Vic2ToHoI4/Copy_Files.bat b/Vic2ToHoI4/Copy_Files.bat index e154b49ba..bc89392ac 100644 --- a/Vic2ToHoI4/Copy_Files.bat +++ b/Vic2ToHoI4/Copy_Files.bat @@ -20,8 +20,13 @@ copy "Data_Files\FAQ.txt" "release\FAQ.txt" copy "Data_Files\resources.txt" "release\resources.txt" copy "Data_Files\navalprovinces.txt" "release\navalprovinces.txt" copy "Data_Files\positions.txt" "release\positions.txt" +copy "Data_Files\femaleNames.txt" "release\femaleNames.txt" +copy "Data_Files\callsigns.txt" "release\callsigns.txt" +copy "Data_Files\cultureGroupToGraphics.txt" "release\cultureGroupToGraphics.txt" rem **Copy flags** +del "Release\flags" /Q /S /F +rmdir "Release\flags" /Q /S xcopy "Data_Files\flags" "release\flags" /Y /E /I rem **Create changelog** diff --git a/Vic2ToHoI4/Data_Files/ReadMe.txt b/Vic2ToHoI4/Data_Files/ReadMe.txt index 4c7d965b6..799c571c0 100644 --- a/Vic2ToHoI4/Data_Files/ReadMe.txt +++ b/Vic2ToHoI4/Data_Files/ReadMe.txt @@ -45,6 +45,7 @@ An (incomplete) list of those who contributed effort to this mammoth undertaking Idhrendur - Project Lead, Programming, Analysis thatsgerman - Programming, Analysis jepaan - Programming +Hamiller78 - Programming Italianajt - Analysis, Data Files, QA Ordinary_Kraut - Analysis, Data Files DasGuntLord01 - Analysis diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/common/ideologies/00_ideologies.txt b/Vic2ToHoI4/Data_Files/blankMod/output/common/ideologies/00_ideologies.txt deleted file mode 100644 index dce4e23f4..000000000 --- a/Vic2ToHoI4/Data_Files/blankMod/output/common/ideologies/00_ideologies.txt +++ /dev/null @@ -1,427 +0,0 @@ -ideologies = { - - syndicalism = { - - types = { - - anarcho_syndicalist = { - } - national_syndicalist = { - } - } - - dynamic_faction_names = { - "FACTION_NAME_COMMUNIST_1" - "FACTION_NAME_COMMUNIST_2" - "FACTION_NAME_COMMUNIST_3" - "FACTION_NAME_COMMUNIST_4" - "FACTION_NAME_COMMUNIST_5" - } - - color = { 115 92 0 } - - war_impact_on_world_tension = 0.75 #Commie less threatening - faction_impact_on_world_tension = 0.5 - - ai_neutral = yes # - - rules = { - can_force_government = yes - can_send_volunteers = yes - can_puppet = yes - } - - modifiers = { - join_faction_tension = 0.20 - puppet_cost_factor = -0.3 - } - - faction_modifiers = { - - } - - } - - liberal = { - - types = { - - democratic_liberal = { - } - - } - - dynamic_faction_names = { - "FACTION_NAME_DEMOCRATIC_1" - "FACTION_NAME_DEMOCRATIC_2" - "FACTION_NAME_DEMOCRATIC_3" - "FACTION_NAME_DEMOCRATIC_4" - "FACTION_NAME_DEMOCRATIC_5" - "FACTION_NAME_DEMOCRATIC_6" - } - - color = { 255 255 51 } - - rules = { - can_force_government = no - can_send_volunteers = yes - can_puppet = no - can_only_justify_war_on_threat_country = yes - can_guarantee_other_ideologies = yes - } - - - modifiers = { - generate_wargoal_tension = 1.00 - join_faction_tension = 0.50 - lend_lease_tension = 0.50 - send_volunteers_tension = 0.50 - guarantee_tension = 0.25 - take_states_cost_factor = 0.25 - annex_cost_factor = 0.5 - } - - faction_modifiers = { - faction_trade_opinion_factor = 0.50 #plus 50% trade opinion - } - ai_neutral = yes # - } - ancap = { - - types = { - - anarcho_cap = { - } - - } - - dynamic_faction_names = { - "FACTION_NAME_DEMOCRATIC_1" - "FACTION_NAME_DEMOCRATIC_2" - "FACTION_NAME_DEMOCRATIC_3" - "FACTION_NAME_DEMOCRATIC_4" - "FACTION_NAME_DEMOCRATIC_5" - "FACTION_NAME_DEMOCRATIC_6" - } - - color = { 155 155 0 } - - rules = { - can_force_government = no - can_send_volunteers = yes - can_puppet = no - can_only_justify_war_on_threat_country = yes - can_guarantee_other_ideologies = no - } - - - modifiers = { - generate_wargoal_tension = 1.00 - join_faction_tension = 0.50 - lend_lease_tension = 0.50 - send_volunteers_tension = 0.50 - guarantee_tension = 0.25 - take_states_cost_factor = 0.25 - annex_cost_factor = 0.5 - } - - faction_modifiers = { - faction_trade_opinion_factor = 0.50 #plus 50% trade opinion - } - ai_neutral = yes # - } - democratic = { - - types = { - - democratic_conservative = { - } - - militant_conservative = { - } - conservatism = { - } - - liberalism = { - } - - socialism = { - } - } - - dynamic_faction_names = { - "FACTION_NAME_DEMOCRATIC_1" - "FACTION_NAME_DEMOCRATIC_2" - "FACTION_NAME_DEMOCRATIC_3" - "FACTION_NAME_DEMOCRATIC_4" - "FACTION_NAME_DEMOCRATIC_5" - "FACTION_NAME_DEMOCRATIC_6" - } - - color = { 0 0 255 } - - rules = { - can_force_government = yes - can_send_volunteers = yes - can_puppet = no - can_guarantee_other_ideologies = yes - } - - - modifiers = { - generate_wargoal_tension = 1.00 - join_faction_tension = 0.50 - lend_lease_tension = 0.50 - send_volunteers_tension = 0.50 - guarantee_tension = 0.25 - take_states_cost_factor = 0.25 - annex_cost_factor = 0.5 - } - - faction_modifiers = { - faction_trade_opinion_factor = 0.50 #plus 50% trade opinion - } - ai_neutral = yes # - } - autocratic = { - - types = { - - absolute_monarchy = { - } - - prussian_const = { - } - - HM_Gov = { - } - - } - - dynamic_faction_names = { - "FACTION_NAME_FASCIST_1" - "FACTION_NAME_FASCIST_2" - "FACTION_NAME_FASCIST_3" - "FACTION_NAME_FASCIST_4" - "FACTION_NAME_FASCIST_5" - } - - color = { 0 0 120 } - - war_impact_on_world_tension = 1.0 #evil! - faction_impact_on_world_tension = 1.0 - - rules = { - can_force_government = no - can_send_volunteers = yes - can_puppet = yes - } - - modifiers = { - join_faction_tension = 0.20 - justify_war_goal_when_in_major_war_time = -0.80 - } - - ai_neutral = yes # - } - - fascism = { - - types = { - - nazism = { - } - - fascism_ideology = { - } - - falangism = { - } - - rexism = { - } - } - - dynamic_faction_names = { - "FACTION_NAME_FASCIST_1" - "FACTION_NAME_FASCIST_2" - "FACTION_NAME_FASCIST_3" - "FACTION_NAME_FASCIST_4" - "FACTION_NAME_FASCIST_5" - } - - color = { 32 32 32 } - - war_impact_on_world_tension = 1.0 #evil! - faction_impact_on_world_tension = 1.0 - - rules = { - can_force_government = no - can_send_volunteers = yes - can_puppet = yes - } - - modifiers = { - join_faction_tension = 0.20 - justify_war_goal_when_in_major_war_time = -0.80 - } - - ai_neutral = yes # - } - socialist = { - - types = { - - democratic_socialist = { - } - - militant_socialist = { - } - } - - dynamic_faction_names = { - "FACTION_NAME_DEMOCRATIC_1" - "FACTION_NAME_DEMOCRATIC_2" - "FACTION_NAME_DEMOCRATIC_3" - "FACTION_NAME_DEMOCRATIC_4" - "FACTION_NAME_DEMOCRATIC_5" - "FACTION_NAME_DEMOCRATIC_6" - } - - color = { 255 0 0 } - - rules = { - can_declare_war_on_same_ideology = no - can_force_government = yes - can_send_volunteers = yes - can_puppet = no - can_only_justify_war_on_threat_country = yes - can_guarantee_other_ideologies = yes - } - - - modifiers = { - generate_wargoal_tension = 1.00 - join_faction_tension = 0.50 - lend_lease_tension = 0.50 - send_volunteers_tension = 0.50 - guarantee_tension = 0.25 - take_states_cost_factor = 0.25 - annex_cost_factor = 0.5 - } - - faction_modifiers = { - faction_trade_opinion_factor = 0.50 #plus 50% trade opinion - } - ai_neutral = yes # - } - - - communism = { - - types = { - - marxism = { - } - - leninism = { - } - - stalinism = { - } - - anti_revisionism = { - } - - anarchist_communism = { - } - } - - dynamic_faction_names = { - "FACTION_NAME_COMMUNIST_1" - "FACTION_NAME_COMMUNIST_2" - "FACTION_NAME_COMMUNIST_3" - "FACTION_NAME_COMMUNIST_4" - "FACTION_NAME_COMMUNIST_5" - } - - color = { 153 0 0 } - - war_impact_on_world_tension = 0.75 #Commie less threatening - faction_impact_on_world_tension = 0.5 - - ai_neutral = yes # - - rules = { - can_force_government = no - can_send_volunteers = yes - can_puppet = yes - } - - modifiers = { - join_faction_tension = 0.20 - puppet_cost_factor = -0.3 - } - - faction_modifiers = { - - } - - } - - - neutrality = { - - types = { - - despotism = { - } - - oligarchism = { - } - - moderatism = { - } - - centrism = { - } - } - - dynamic_faction_names = { - "FACTION_NAME_NONALIGNED_1" - "FACTION_NAME_NONALIGNED_2" - "FACTION_NAME_NONALIGNED_3" - "FACTION_NAME_NONALIGNED_4" - "FACTION_NAME_NONALIGNED_5" - } - - color = { 124 124 124 } - - - war_impact_on_world_tension = 0.25 #no major danger - faction_impact_on_world_tension = 0.1 - - rules = { - can_force_government = no - can_puppet = no - can_send_volunteers = no - } - - modifiers = { - #increased_influence_factor = 0.3 #30% easier to influence - generate_wargoal_tension = 0.5 - join_faction_tension = 0.4 - lend_lease_tension = 0.4 - send_volunteers_tension = 0.4 - guarantee_tension = 0.4 - drift_defence_factor = -0.3 - } - - faction_modifiers = { - } - - can_be_boosted = no - - ai_neutral = yes # - } -} diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/common/ideologies/01_ideologies.txt b/Vic2ToHoI4/Data_Files/blankMod/output/common/ideologies/01_ideologies.txt new file mode 100644 index 000000000..d42b96f34 --- /dev/null +++ b/Vic2ToHoI4/Data_Files/blankMod/output/common/ideologies/01_ideologies.txt @@ -0,0 +1,146 @@ +ideologies = { + radical = { + + types = { + minarchism = { + } + } + + dynamic_faction_names = { + "FACTION_NAME_DEMOCRATIC_1" + "FACTION_NAME_DEMOCRATIC_2" + "FACTION_NAME_DEMOCRATIC_3" + "FACTION_NAME_DEMOCRATIC_4" + "FACTION_NAME_DEMOCRATIC_5" + "FACTION_NAME_DEMOCRATIC_6" + } + + color = { 155 155 0 } + + rules = { + can_force_government = no + can_send_volunteers = yes + can_puppet = no + can_only_justify_war_on_threat_country = yes + can_guarantee_other_ideologies = no + } + + + modifiers = { + generate_wargoal_tension = 1.00 + join_faction_tension = 0.50 + lend_lease_tension = 0.50 + send_volunteers_tension = 0.50 + guarantee_tension = 0.25 + take_states_cost_factor = 0.25 + annex_cost_factor = 0.5 + } + + faction_modifiers = { + faction_trade_opinion_factor = 0.50 #plus 50% trade opinion + } + ai_neutral = yes # + } + + absolutist = { + types = { + absolute_monarchy = { + } + prussian_const = { + } + dictatorship = { + } + } + + dynamic_faction_names = { + "FACTION_NAME_FASCIST_1" + "FACTION_NAME_FASCIST_2" + "FACTION_NAME_FASCIST_3" + "FACTION_NAME_FASCIST_4" + "FACTION_NAME_FASCIST_5" + } + + color = { 0 0 120 } + + war_impact_on_world_tension = 1.0 #evil! + faction_impact_on_world_tension = 1.0 + + rules = { + can_force_government = no + can_send_volunteers = yes + can_puppet = yes + } + + modifiers = { + join_faction_tension = 0.20 + justify_war_goal_when_in_major_war_time = -0.80 + } + + ai_neutral = yes # + } + + neutrality = { + + types = { + minarchism_neutral = { + } + absolute_monarchy_neutral = { + } + prussian_const_neutral = { + } + dictatorship_neutral = { + } + conservatism_neutral = { + } + liberalism_neutral = { + } + socialism_neutral = { + } + marxism_neutral = { + } + leninism_neutral = { + } + fascism_ideology_neutral = { + } + } + + dynamic_faction_names = { + "FACTION_NAME_NONALIGNED_1" + "FACTION_NAME_NONALIGNED_2" + "FACTION_NAME_NONALIGNED_3" + "FACTION_NAME_NONALIGNED_4" + "FACTION_NAME_NONALIGNED_5" + } + + color = { 124 124 124 } + + war_impact_on_world_tension = 0.25 #no major danger + faction_impact_on_world_tension = 0.1 + + rules = { + can_force_government = no + can_puppet = no + can_send_volunteers = no + } + + modifiers = { + #increased_influence_factor = 0.3 #30% easier to influence + generate_wargoal_tension = 0.5 + join_faction_tension = 0.4 + lend_lease_tension = 0.4 + send_volunteers_tension = 0.4 + guarantee_tension = 0.4 + drift_defence_factor = -0.3 + } + + faction_modifiers = { + } + + can_be_boosted = no + + ai_neutral = yes # + } +} + + + diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/autocratic_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/absolutist_group.dds similarity index 100% rename from Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/autocratic_group.dds rename to Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/absolutist_group.dds diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/communism_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/communism_group.dds deleted file mode 100644 index 517e48df4..000000000 Binary files a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/communism_group.dds and /dev/null differ diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/democratic_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/democratic_group.dds deleted file mode 100644 index c4b8a53a0..000000000 Binary files a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/democratic_group.dds and /dev/null differ diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/fascism_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/fascism_group.dds deleted file mode 100644 index 76c5d9b72..000000000 Binary files a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/fascism_group.dds and /dev/null differ diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/liberal_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/liberal_group.dds deleted file mode 100644 index 812c5e240..000000000 Binary files a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/liberal_group.dds and /dev/null differ diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/ancap_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/radical_group.dds similarity index 100% rename from Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/ancap_group.dds rename to Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/radical_group.dds diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/socialist_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/socialist_group.dds deleted file mode 100644 index c1b702dcd..000000000 Binary files a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/socialist_group.dds and /dev/null differ diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/syndicalism_group.dds b/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/syndicalism_group.dds deleted file mode 100644 index bd742de37..000000000 Binary files a/Vic2ToHoI4/Data_Files/blankMod/output/gfx/interface/ideologies/syndicalism_group.dds and /dev/null differ diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/interface/countrypoliticsview.gfx b/Vic2ToHoI4/Data_Files/blankMod/output/interface/countrypoliticsview.gfx index a16446473..feda900b0 100644 --- a/Vic2ToHoI4/Data_Files/blankMod/output/interface/countrypoliticsview.gfx +++ b/Vic2ToHoI4/Data_Files/blankMod/output/interface/countrypoliticsview.gfx @@ -508,28 +508,13 @@ spriteTypes = { } spriteType = { - name = "GFX_ideology_liberal_group" - texturefile = "gfx/interface/ideologies/liberal_group.dds" + name = "GFX_ideology_radical_group" + texturefile = "gfx/interface/ideologies/radical_group.dds" } spriteType = { - name = "GFX_ideology_socialist_group" - texturefile = "gfx/interface/ideologies/socialist_group.dds" - } - - spriteType = { - name = "GFX_ideology_syndicalism_group" - texturefile = "gfx/interface/ideologies/syndicalism_group.dds" - } - - spriteType = { - name = "GFX_ideology_ancap_group" - texturefile = "gfx/interface/ideologies/ancap_group.dds" - } - - spriteType = { - name = "GFX_ideology_autocratic_group" - texturefile = "gfx/interface/ideologies/autocratic_group.dds" + name = "GFX_ideology_absolutist_group" + texturefile = "gfx/interface/ideologies/absolutist_group.dds" } } \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/localisation/ideas2_l_english.yml b/Vic2ToHoI4/Data_Files/blankMod/output/localisation/ideas2_l_english.yml new file mode 100644 index 000000000..99968f597 --- /dev/null +++ b/Vic2ToHoI4/Data_Files/blankMod/output/localisation/ideas2_l_english.yml @@ -0,0 +1,3 @@ +l_english: + great_power:0 "Great Power" + uncivilized:0 "Uncivilized" \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/blankMod/output/localisation/parties2_l_english.yml b/Vic2ToHoI4/Data_Files/blankMod/output/localisation/parties2_l_english.yml index 78468b931..dc9b515a4 100644 --- a/Vic2ToHoI4/Data_Files/blankMod/output/localisation/parties2_l_english.yml +++ b/Vic2ToHoI4/Data_Files/blankMod/output/localisation/parties2_l_english.yml @@ -1,38 +1,35 @@ l_english: - socialist:0 "Socialist" - socialist_noun:0 "Socialism" - socialist_desc:0 "Democratic Regime" - syndicalism:0 "Syndicalist" - syndicalism_noun:0 "Syndicalism" - syndicalism_desc:0 "Democratic Regime" - anarcho_syndicalist:0 "Syndicalism" - national_syndicalist:0 "Syndicalism" - anarcho_syndicalist_desc:0 "A form of socialism, syndicalism is an economy system where workers, industries and organisations form confederations, or syndicates. These organisations are owned and managed by the workers." - national_syndicalist_desc:0 "A form of socialism, syndicalism is an economy system where workers, industries and organisations form confederations, or syndicates. These organisations are owned and managed by the workers." - democratic_socialist:0 "Socialism" - democratic_socialist_desc:0 "Striving for equality and a socialist state by reformist means, democratic socialism aims to abolish or mitigate the effects of capitalism with public mandate." - militant_socialist:0 "Socialism" - militant_socialist_desc:0 "Encompassing a broad spectrum of economic and historical views, Marxist politics seek to apply the theories of Karl Marx to political practice. Class struggle and the need for transition to a society based on common ownership of the means of production characterize these ideologies." - liberal:0 "Liberal" - liberal_noun:0 "Liberalism" - liberal_desc:0 "Democratic Regime" - democratic_liberal:0 "Liberalism" - democratic_liberal_desc:0 "With a long philosophical tradition of valuing personal liberty, liberalism views safeguarding these rights as the primary function of the state." - ancap:0 "Anarcho-Capitalist" - ancap_noun:0 "Anarcho-Capitalism" - ancap_desc:0 "Libertarian Regime" - anarcho_cap:0 "Anarcho-Capitalism" - anarcho_cap_desc:0 "Anarcho-capitalism is a political philosophy that advocates the elimination of the state in favor of individual sovereignty, private property, and free markets." - democratic_conservative:0 "Conservatism" - democratic_conservative_desc:0 "Considering rapid changes to society to be potentially harmful, conservatism espouses tradition and moderate reforms, sometimes advocating a return to old moral values." - militant_conservatism:0 "Conservatism" - militant_conservatism_desc:0 "Considering rapid changes to society to be potentially harmful, conservatism espouses tradition and moderate reforms, sometimes advocating a return to old moral values." - autocratic:0 "Autocratic" - autocratic_noun:0 "Autocracy" - autocratic_desc:0 "Autocratic Regime" + radical:0 "Radical" + radical_noun:0 "Radical" + radical_desc:0 "Radical" + absolutist:0 "Absolutist" + absolutist_noun:0 "Absolutist" + absolutist_desc:0 "Absolutist" + minarchism:0 "Minarchism" + minarchism_desc:0 "A libertarian political philosophy which advocates for the State to exist solely to protect citizens from aggression, theft, breach of contract, and fraud." absolute_monarchy:0 "Absolute Monarchy" - absolute_monarchy_desc:0 "Absolute monarchy, or despotic monarchy, is a form of monarchy in which one ruler has supreme authority that is not restricted by any written laws, legislature, or customs." + absolute_monarchy_desc:0 "A form of monarchy in which one ruler has supreme authority that is not restricted by any written laws, legislature, or customs." prussian_const:0 "Constitutional Monarchy" - prussian_const_desc:0 ""A constitutional monarchy is a form of monarchy in which the sovereign exercises their authorities in accordance with a written or unwritten constitution." - HM_Gov:0 "Constitutional Monarchy" - HM_Gov_desc:0 "A constitutional monarchy is a form of monarchy in which the sovereign exercises their authorities in accordance with a written or unwritten constitution." \ No newline at end of file + prussian_const_desc:0 "A form of monarchy in which the sovereign exercises their authorities in accordance with a written or unwritten constitution." + dictatorship:0 "Dictatorship" + dictatorship_desc:0 "A form of government where a country or a group of countries is ruled by one person or political entity, and exercised through various mechanisms to ensure that the entity's power remains strong." + minarchism_neutral:0 "Minarchism" + minarchism_neutral_desc:0 "A libertarian political philosophy which advocates for the State to exist solely to protect citizens from aggression, theft, breach of contract, and fraud." + absolute_neutral_monarchy:0 "Absolute Monarchy" + absolute_neutral_monarchy_desc:0 "A form of monarchy in which one ruler has supreme authority that is not restricted by any written laws, legislature, or customs." + prussian_const_neutral:0 "Constitutional Monarchy" + prussian_const_neutral_desc:0 "A form of monarchy in which the sovereign exercises their authorities in accordance with a written or unwritten constitution." + dictatorship_neutral:0 "Dictatorship" + dictatorship_neutral_desc:0 "A form of government where a country or a group of countries is ruled by one person or political entity, and exercised through various mechanisms to ensure that the entity's power remains strong." + conservatism_neutral:0 "Conservatism" + conservatism_neutral_desc:0 "Considering rapid changes to society to be potentially harmful, conservatism espouses tradition and moderate reforms, sometimes advocating a return to old moral values." + liberalism_neutral:0 "Liberalism" + liberalism_neutral_desc:0 "With a long philosophical tradition of valuing personal liberty, liberalism views safeguarding these rights as the primary function of the state." + socialism_neutral:0 "Socialism" + socialism_neutral_desc:0 "Striving for equality and a socialist state by reformist means, democratic socialism aims to abolish or mitigate the effects of capitalism with public mandate." + marxism_neutral:0 "Marxism" + marxism_neutral_desc:0 "Encompassing a broad spectrum of economic and historical views, Marxist politics seek to apply the theories of Karl Marx to political practice. Class struggle and the need for transition to a society based on common ownership of the means of production characterize these ideologies." + leninism_neutral:0 "Leninism" + leninism_neutral_desc:0 "A political ideology based in Marxist thought, Leninism seeks to establish a socialist state by a vanguard party leading a revolution overthrowing capitalist society. Once in power, the party rules through a system whereby policies are open for internal debate until a decision has been made." + fascism_ideology_neutral:0 "Fascism" + fascism_ideology_neutral_desc:0 "Encompassing a variety of ultra-nationalist movements, fascism typically venerates devotion to the state and uniting the people under a strong leader." \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/callsigns.txt b/Vic2ToHoI4/Data_Files/callsigns.txt new file mode 100644 index 000000000..be2362267 --- /dev/null +++ b/Vic2ToHoI4/Data_Files/callsigns.txt @@ -0,0 +1,32 @@ +# Copyright (c) 2017 The Paradox Game Converters Project +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + + +north_german = { + names = { "Bubi" "Assi" "The Black Devil" "The Blond Knight Of Germany" "Dolfo" "Fighter of Libau" "Petit Rouge" "Pritzl" "The Red Baron" "The Red Battle-flyer" "The Red knight" "Reeste" } +} + +south_german = { + names = { "Bubi" "Assi" "The Black Devil" "The Blond Knight Of Germany" "Dolfo" "Fighter of Libau" "Petit Rouge" "Pritzl" "The Red Baron" "The Red Battle-flyer" "The Red knight" "Reeste" } +} + +german = { + names = { "Bubi" "Assi" "The Black Devil" "The Blond Knight Of Germany" "Dolfo" "Fighter of Libau" "Petit Rouge" "Pritzl" "The Red Baron" "The Red Battle-flyer" "The Red knight" "Reeste" } +} \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/cultureGroupToGraphics.txt b/Vic2ToHoI4/Data_Files/cultureGroupToGraphics.txt new file mode 100644 index 000000000..25310b098 --- /dev/null +++ b/Vic2ToHoI4/Data_Files/cultureGroupToGraphics.txt @@ -0,0 +1,781 @@ +# Copyright (c) 2017 The Paradox Game Converters Project +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + + +germanic = { + leader_portraits = { + communism = { "gfx/leaders/GER/Portrait_Germany_Generic_1.dds" } + democratic = { "gfx/leaders/GER/Portrait_Germany_Generic_2.dds" } + fascism = { "gfx/leaders/GER/Portrait_Germany_Generic_3.dds" } + absolutist = { "gfx/leaders/GER/Portrait_Germany_Generic_1.dds" } + neutrality = { "gfx/leaders/GER/Portrait_Germany_Generic_2.dds" } + radical = { "gfx/leaders/GER/Portrait_Germany_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +beneluxian = { + leader_portraits = { + communism = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + democratic = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + fascism = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + absolutist = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + neutrality = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + radical = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +pan_swiss = { + leader_portraits = { + communism = { "gfx/leaders/GER/Portrait_Germany_Generic_1.dds" } + democratic = { "gfx/leaders/SWI/Portrait_Switzerland_Federal_council.dds" } + fascism = { "gfx/leaders/GER/Portrait_Germany_Generic_3.dds" } + absolutist = { "gfx/leaders/GER/Portrait_Germany_Generic_1.dds" } + neutrality = { "gfx/leaders/SWI/Portrait_Switzerland_Federal_council.dds" } + radical = { "gfx/leaders/GER/Portrait_Germany_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +scandinavian = { + leader_portraits = { + communism = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + democratic = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + fascism = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + absolutist = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + neutrality = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + radical = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +british = { + leader_portraits = { + communism = { "gfx/leaders/ENG/Portrait_Britain_Generic_1.dds" } + democratic = { "gfx/leaders/ENG/Portrait_Britain_Generic_2.dds" } + fascism = { "gfx/leaders/ENG/Portrait_Britain_Generic_3.dds" } + absolutist = { "gfx/leaders/ENG/Portrait_Britain_Generic_1.dds" } + neutrality = { "gfx/leaders/ENG/Portrait_Britain_Generic_2.dds" } + radical = { "gfx/leaders/ENG/Portrait_Britain_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +celtic = { + leader_portraits = { + communism = { "gfx/leaders/ENG/Portrait_Britain_Generic_1.dds" } + democratic = { "gfx/leaders/ENG/Portrait_Britain_Generic_2.dds" } + fascism = { "gfx/leaders/ENG/Portrait_Britain_Generic_3.dds" } + absolutist = { "gfx/leaders/ENG/Portrait_Britain_Generic_1.dds" } + neutrality = { "gfx/leaders/ENG/Portrait_Britain_Generic_2.dds" } + radical = { "gfx/leaders/ENG/Portrait_Britain_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +italian = { + leader_portraits = { + communism = { "gfx/leaders/ITA/Portrait_Italy_Generic_1.dds" } + democratic = { "gfx/leaders/ITA/Portrait_Italy_Generic_2.dds" } + fascism = { "gfx/leaders/ITA/Portrait_Italy_Generic_3.dds" } + absolutist = { "gfx/leaders/ITA/Portrait_Italy_Generic_1.dds" } + neutrality = { "gfx/leaders/ITA/Portrait_Italy_Generic_2.dds" } + radical = { "gfx/leaders/ITA/Portrait_Italy_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +iberian = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +french = { + leader_portraits = { + communism = { "gfx/leaders/FRA/Portrait_France_Generic_1.dds" } + democratic = { "gfx/leaders/FRA/Portrait_France_Generic_2.dds" } + fascism = { "gfx/leaders/FRA/Portrait_France_Generic_3.dds" } + absolutist = { "gfx/leaders/FRA/Portrait_France_Generic_1.dds" } + neutrality = { "gfx/leaders/FRA/Portrait_France_Generic_2.dds" } + radical = { "gfx/leaders/FRA/Portrait_France_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +south_slavic = { + leader_portraits = { + communism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + democratic = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + fascism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + absolutist = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + neutrality = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + radical = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +pan_romanian = { + leader_portraits = { + communism = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + democratic = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + fascism = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + absolutist = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + neutrality = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + radical = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +hungarian_culture_group = { + leader_portraits = { + communism = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + democratic = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + fascism = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + absolutist = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + neutrality = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + radical = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +polish_culture_group = { + leader_portraits = { + communism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + democratic = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + fascism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + absolutist = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + neutrality = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + radical = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +czecho_slovak_culture_group = { + leader_portraits = { + communism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + democratic = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + fascism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + absolutist = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + neutrality = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + radical = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +east_slavic = { + leader_portraits = { + communism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + democratic = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + fascism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + absolutist = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + neutrality = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + radical = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +baltic = { + leader_portraits = { + communism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + democratic = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + fascism = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + absolutist = { "gfx/leaders/SOV/Portrait_Soviet_Generic_1.dds" } + neutrality = { "gfx/leaders/SOV/Portrait_Soviet_Generic_2.dds" } + radical = { "gfx/leaders/SOV/Portrait_Soviet_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +levantine = { + leader_portraits = { + communism = { "gfx/leaders/ITA/Portrait_Italy_Generic_1.dds" } + democratic = { "gfx/leaders/ITA/Portrait_Italy_Generic_2.dds" } + fascism = { "gfx/leaders/ITA/Portrait_Italy_Generic_3.dds" } + absolutist = { "gfx/leaders/ITA/Portrait_Italy_Generic_1.dds" } + neutrality = { "gfx/leaders/ITA/Portrait_Italy_Generic_2.dds" } + radical = { "gfx/leaders/ITA/Portrait_Italy_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +turko_semitic = { + leader_portraits = { + communism = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + democratic = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + fascism = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + absolutist = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + neutrality = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + radical = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +arab = { + leader_portraits = { + communism = { "gfx/leaders/SAU/Portrait_Arabia_Generic_1.dds" } + democratic = { "gfx/leaders/SAU/Portrait_Arabia_Generic_2.dds" } + fascism = { "gfx/leaders/SAU/Portrait_Arabia_Generic_3.dds" } + absolutist = { "gfx/leaders/SAU/Portrait_Arabia_Generic_1.dds" } + neutrality = { "gfx/leaders/SAU/Portrait_Arabia_Generic_2.dds" } + radical = { "gfx/leaders/SAU/Portrait_Arabia_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +iranian_turanian = { + leader_portraits = { + communism = { "gfx/leaders/SAU/Portrait_Arabia_Generic_1.dds" } + democratic = { "gfx/leaders/SAU/Portrait_Arabia_Generic_2.dds" } + fascism = { "gfx/leaders/SAU/Portrait_Arabia_Generic_3.dds" } + absolutist = { "gfx/leaders/SAU/Portrait_Arabia_Generic_1.dds" } + neutrality = { "gfx/leaders/SAU/Portrait_Arabia_Generic_2.dds" } + radical = { "gfx/leaders/SAU/Portrait_Arabia_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +central_asian = { + leader_portraits = { + communism = { "gfx/leaders/Asia/Portrait_Asia_Generic_1.dds" } + democratic = { "gfx/leaders/Asia/Portrait_Asia_Generic_2.dds" } + fascism = { "gfx/leaders/Asia/Portrait_Asia_Generic_3.dds" } + absolutist = { "gfx/leaders/Asia/Portrait_Asia_Generic_1.dds" } + neutrality = { "gfx/leaders/Asia/Portrait_Asia_Generic_2.dds" } + radical = { "gfx/leaders/Asia/Portrait_Asia_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +south_asian = { + leader_portraits = { + communism = { "gfx/leaders/RAJ/Portrait_The_Raj_Political_Leader_Generic.dds" } + democratic = { "gfx/leaders/RAJ/Portrait_The_Raj_Political_Leader_Generic_2.dds" } + fascism = { "gfx/leaders/RAJ/Portrait_The_Raj_Political_Leader_Generic.dds" } + absolutist = { "gfx/leaders/RAJ/Portrait_The_Raj_Political_Leader_Generic_2.dds" } + neutrality = { "gfx/leaders/RAJ/Portrait_The_Raj_Political_Leader_Generic.dds" } + radical = { "gfx/leaders/RAJ/Portrait_The_Raj_Political_Leader_Generic_2.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +southeast_asian = { + leader_portraits = { + communism = { "gfx/leaders/Asia/Portrait_Asia_Generic_1.dds" } + democratic = { "gfx/leaders/Asia/Portrait_Asia_Generic_2.dds" } + fascism = { "gfx/leaders/Asia/Portrait_Asia_Generic_3.dds" } + absolutist = { "gfx/leaders/Asia/Portrait_Asia_Generic_1.dds" } + neutrality = { "gfx/leaders/Asia/Portrait_Asia_Generic_2.dds" } + radical = { "gfx/leaders/Asia/Portrait_Asia_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +east_asian = { + leader_portraits = { + communism = { "gfx/leaders/Asia/Portrait_Asia_Generic_1.dds" } + democratic = { "gfx/leaders/Asia/Portrait_Asia_Generic_2.dds" } + fascism = { "gfx/leaders/Asia/Portrait_Asia_Generic_3.dds" } + absolutist = { "gfx/leaders/Asia/Portrait_Asia_Generic_1.dds" } + neutrality = { "gfx/leaders/Asia/Portrait_Asia_Generic_2.dds" } + radical = { "gfx/leaders/Asia/Portrait_Asia_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +oceanic = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +native_american = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +native_central_american = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +native_south_american = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +native_north_american = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +native_carribean = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +american_cultures = { + leader_portraits = { + communism = { "gfx/leaders/USA/Portrait_USA_Generic_1.dds" } + democratic = { "gfx/leaders/USA/Portrait_USA_Generic_2.dds" } + fascism = { "gfx/leaders/USA/Portrait_USA_Generic_3.dds" } + absolutist = { "gfx/leaders/USA/Portrait_USA_Generic_1.dds" } + neutrality = { "gfx/leaders/USA/Portrait_USA_Generic_2.dds" } + radical = { "gfx/leaders/USA/Portrait_USA_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +neo_european_cultures = { + leader_portraits = { + communism = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + democratic = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + fascism = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + absolutist = { "gfx/leaders/Europe/Portrait_Europe_Generic_1.dds" } + neutrality = { "gfx/leaders/Europe/Portrait_Europe_Generic_2.dds" } + radical = { "gfx/leaders/Europe/Portrait_Europe_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +latin_american_cultures = { + leader_portraits = { + communism = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + democratic = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + fascism = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + absolutist = { "gfx/leaders/South America/Portrait_South_America_Generic_1.dds" } + neutrality = { "gfx/leaders/South America/Portrait_South_America_Generic_2.dds" } + radical = { "gfx/leaders/South America/Portrait_South_America_Generic_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +african_diaspora_cultures = { + leader_portraits = { + communism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + democratic = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + fascism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + absolutist = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + neutrality = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + radical = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +west_african = { + leader_portraits = { + communism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + democratic = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + fascism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + absolutist = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + neutrality = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + radical = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +central_african = { + leader_portraits = { + communism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + democratic = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + fascism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + absolutist = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + neutrality = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + radical = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +east_african = { + leader_portraits = { + communism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + democratic = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + fascism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + absolutist = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + neutrality = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + radical = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +southern_african = { + leader_portraits = { + communism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + democratic = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + fascism = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + absolutist = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_1.dds" } + neutrality = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_2.dds" } + radical = { "gfx/leaders/Africa/Portrait_Africa_Generic_land_3.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +bears = { + leader_portraits = { + communism = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + democratic = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + fascism = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + absolutist = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + neutrality = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + radical = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} +equine = { + leader_portraits = { + communism = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + democratic = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + fascism = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + absolutist = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + neutrality = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + radical = { "gfx/leaders/POL/Portrait_POL_Voytek.dds" } + } + ideology_minister_portraits = + { + communism = { "gfx/interface/ideas/idea_unknown.dds" } + democratic = { "gfx/interface/ideas/idea_unknown.dds" } + fascism = { "gfx/interface/ideas/idea_unknown.dds" } + absolutist = { "gfx/interface/ideas/idea_unknown.dds" } + neutrality = { "gfx/interface/ideas/idea_unknown.dds" } + radical = { "gfx/interface/ideas/idea_unknown.dds" } + } +} \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/cultureToPortraits.txt b/Vic2ToHoI4/Data_Files/cultureToPortraits.txt deleted file mode 100644 index c997a7323..000000000 --- a/Vic2ToHoI4/Data_Files/cultureToPortraits.txt +++ /dev/null @@ -1,35 +0,0 @@ -#Vic2culturegroup;portraitlocation in gfx/leaders/ communist;democracy;fascist -germanic;GER/Portrait_Germany_Generic_1.dds;GER/Portrait_Germany_Generic_2.dds;GER/Portrait_Germany_Generic_3.dds -beneluxian;Europe/Portrait_Europe_Generic_1.dds;Europe/Portrait_Europe_Generic_2.dds;Europe/Portrait_Europe_Generic_3.dds -pan_swiss;GER/Portrait_Germany_Generic_1.dds/SWI/Portrait_Switzerland_Federal_council.dds;GER/Portrait_Germany_Generic_3.dds -scandinavian;Europe/Portrait_Europe_Generic_1.dds;Europe/Portrait_Europe_Generic_2.dds;Europe/Portrait_Europe_Generic_3.dds -british;ENG/Portrait_Britain_Generic_1.dds;ENG/Portrait_Britain_Generic_2.dds;ENG/Portrait_Britain_Generic_3.dds -italian;ITA/Portrait_Italy_Generic_1.dds;ITA/Portrait_Italy_Generic_2.dds;ITA/Portrait_Italy_Generic_3.dds -iberian;South America/Portrait_South_America_Generic_1.dds;South America/Portrait_South_America_Generic_2.dds;South America/Portrait_South_America_Generic_3.dds -french;FRA/Portrait_France_Generic_1.dds;FRA/Portrait_France_Generic_2.dds;FRA/Portrait_France_Generic_3.dds -south_slavic;SOV/Portrait_Soviet_Generic_1.dds;SOV/Portrait_Soviet_Generic_2.dds;SOV/Portrait_Soviet_Generic_3.dds -pan_romanian;Europe/Portrait_Europe_Generic_1.dds;Europe/Portrait_Europe_Generic_2.dds;Europe/Portrait_Europe_Generic_3.dds -hungarian_culture_group;Europe/Portrait_Europe_Generic_1.dds;Europe/Portrait_Europe_Generic_2.dds;Europe/Portrait_Europe_Generic_3.dds -polish_culture_group;SOV/Portrait_Soviet_Generic_1.dds;SOV/Portrait_Soviet_Generic_2.dds;SOV/Portrait_Soviet_Generic_3.dds -czecho_slovak_culture_group;SOV/Portrait_Soviet_Generic_1.dds;SOV/Portrait_Soviet_Generic_2.dds;SOV/Portrait_Soviet_Generic_3.dds -east_slavic;SOV/Portrait_Soviet_Generic_1.dds;SOV/Portrait_Soviet_Generic_2.dds;SOV/Portrait_Soviet_Generic_3.dds -baltic;SOV/Portrait_Soviet_Generic_1.dds;SOV/Portrait_Soviet_Generic_2.dds;SOV/Portrait_Soviet_Generic_3.dds -levantine;ITA/Portrait_Italy_Generic_1.dds;ITA/Portrait_Italy_Generic_2.dds;ITA/Portrait_Italy_Generic_3.dds -turko_semitic;Europe/Portrait_Europe_Generic_1.dds;Europe/Portrait_Europe_Generic_2.dds;Europe/Portrait_Europe_Generic_3.dds -arab;SAU/Portrait_Arabia_Generic_1.dds;SAU/Portrait_Arabia_Generic_2.dds;SAU/Portrait_Arabia_Generic_3.dds -iranian_turanian;SAU/Portrait_Arabia_Generic_1.dds;SAU/Portrait_Arabia_Generic_2.dds;SAU/Portrait_Arabia_Generic_3.dds -central_asian;Asia/Portrait_Asia_Generic_1.dds;Asia/Portrait_Asia_Generic_2.dds;Asia/Portrait_Asia_Generic_3.dds -south_asian;Europe/Portrait_Europe_Generic_1.dds;Europe/Portrait_Europe_Generic_2.dds;Europe/Portrait_Europe_Generic_3.dds -southeast_asian;Asia/Portrait_Asia_Generic_1.dds;Asia/Portrait_Asia_Generic_2.dds;Asia/Portrait_Asia_Generic_3.dds -east_asian;Asia/Portrait_Asia_Generic_1.dds;Asia/Portrait_Asia_Generic_2.dds;Asia/Portrait_Asia_Generic_3.dds -oceanic;South America/Portrait_South_America_Generic_1.dds;South America/Portrait_South_America_Generic_2.dds;South America/Portrait_South_America_Generic_3.dds -native_american;South America/Portrait_South_America_Generic_1.dds;South America/Portrait_South_America_Generic_2.dds;South America/Portrait_South_America_Generic_3.dds -american_cultures;USA/Portrait_USA_Generic_1.dds;USA/Portrait_USA_Generic_2.dds;USA/Portrait_USA_Generic_3.dds -neo_european_cultures;Europe/Portrait_Europe_Generic_1.dds;Europe/Portrait_Europe_Generic_2.dds;Europe/Portrait_Europe_Generic_3.dds -latin_american_cultures;South America/Portrait_South_America_Generic_1.dds;South America/Portrait_South_America_Generic_2.dds;South America/Portrait_South_America_Generic_3.dds -african_diaspora_cultures;Africa/Portrait_Africa_Generic_land_1.dds;Africa/Portrait_Africa_Generic_land_2.dds;Africa/Portrait_Africa_Generic_land_3.dds -west_african;Africa/Portrait_Africa_Generic_land_1.dds;Africa/Portrait_Africa_Generic_land_2.dds;Africa/Portrait_Africa_Generic_land_3.dds -central_african;Africa/Portrait_Africa_Generic_land_1.dds;Africa/Portrait_Africa_Generic_land_2.dds;Africa/Portrait_Africa_Generic_land_3.dds -east_african;Africa/Portrait_Africa_Generic_land_1.dds;Africa/Portrait_Africa_Generic_land_2.dds;Africa/Portrait_Africa_Generic_land_3.dds -southern_african;Africa/Portrait_Africa_Generic_land_1.dds;Africa/Portrait_Africa_Generic_land_2.dds;Africa/Portrait_Africa_Generic_land_3.dds -bears;POL/Portrait_POL_Voytek.dds;POL/Portrait_POL_Voytek.dds;POL/Portrait_POL_Voytek.dds \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/femaleNames.txt b/Vic2ToHoI4/Data_Files/femaleNames.txt new file mode 100644 index 000000000..691b5103d --- /dev/null +++ b/Vic2ToHoI4/Data_Files/femaleNames.txt @@ -0,0 +1,32 @@ +# Copyright (c) 2017 The Paradox Game Converters Project +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + + +north_german = { + names = { Jessica Emma Hanna Sofia Marie } +} + +south_german = { + names = { Jessica Emma Hanna Sofia Marie } +} + +german = { + names = { Jessica Emma Hanna Sofia Marie } +} \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/governmentMapping.txt b/Vic2ToHoI4/Data_Files/governmentMapping.txt index 8ec193e08..d1b53bc14 100644 --- a/Vic2ToHoI4/Data_Files/governmentMapping.txt +++ b/Vic2ToHoI4/Data_Files/governmentMapping.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 The Paradox Game Converters Project +# Copyright (c) 2017 The Paradox Game Converters Project # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -20,29 +20,66 @@ -mappings = { -link = { vic = absolute_monarchy hoi = absolute_monarchy} -link = { vic = prussian_constitutionalism ruling_party = fascist hoi = absolute_monarchy } -link = { vic = prussian_constitutionalism ruling_party = reactionary hoi = prussian_constitutionalism } -link = { vic = prussian_constitutionalism political_reforms = 0.75 hoi = prussian_constitutionalism } -link = { vic = prussian_constitutionalism hoi = prussian_constitutionalism } -link = { vic = hms_government ruling_party = fascist hoi = hms_government } -link = { vic = hms_government hoi = hms_government } -link = { vic = democracy ruling_party = fascist hoi = democratic} -link = { vic = democracy ruling_party = reactionary hoi = democratic} -link = { vic = democracy ruling_party = conservative political_reforms = 0.9 social_reforms_above = 0.90 hoi = democratic} -link = { vic = democracy ruling_party = conservative political_reforms = 0.9 social_reforms_below = 0.33 hoi = democratic} -link = { vic = democracy ruling_party = conservative hoi = democratic} -link = { vic = democracy ruling_party = anarcho_liberal hoi = democratic} -link = { vic = democracy ruling_party = liberal social_reforms_above = 0.66 hoi = democratic} -link = { vic = democracy ruling_party = liberal hoi = democratic} -link = { vic = democracy ruling_party = socialist social_reforms_above = 0.90 hoi = democratic} -link = { vic = democracy ruling_party = socialist hoi = democratic} -link = { vic = democracy ruling_party = communist hoi = democratic} -link = { vic = proletarian_dictatorship hoi = communism} -link = { vic = presidential_dictatorship ruling_party = liberal hoi = absolute_monarchy } -link = { vic = presidential_dictatorship ruling_party = anarcho_liberal hoi = syndicalism} -link = { vic = presidential_dictatorship hoi = fascism} -link = { vic = bourgeois_dictatorship hoi = syndicalism} -link = { vic = fascist_dictatorship hoi = fascism} +government_mappings = { + mapping = { vic = proletarian_dictatorship hoi_gov = communism hoi_leader = leninism } + mapping = { vic = presidential_dictatorship hoi_gov = absolutist hoi_leader = dictatorship } + mapping = { vic = bourgeois_dictatorship hoi_gov = radical hoi_leader = minarchism } + mapping = { vic = fascist_dictatorship hoi_gov = fascism hoi_leader = fascism_ideology } + mapping = { vic = absolute_monarchy hoi_gov = absolutist hoi_leader = absolute_monarchy } + mapping = { vic = hms_government ruling_party = liberal hoi_gov = democratic hoi_leader = liberalism } + mapping = { vic = hms_government ruling_party = socialist hoi_gov = democratic hoi_leader = socialism } + mapping = { vic = hms_government ruling_party = conservative hoi_gov = democratic hoi_leader = conservatism } + mapping = { vic = hms_government ruling_party = reactionary hoi_gov = democratic hoi_leader = conservatism } + mapping = { vic = hms_government ruling_party = communist hoi_gov = democratic hoi_leader = socialism } + mapping = { vic = hms_government ruling_party = anarcho_liberal hoi_gov = democratic hoi_leader = liberalism } + mapping = { vic = hms_government ruling_party = fascist hoi_gov = democratic hoi_leader = conservatism } + mapping = { vic = democracy ruling_party = liberal hoi_gov = democratic hoi_leader = liberalism } + mapping = { vic = democracy ruling_party = socialist hoi_gov = democratic hoi_leader = socialism } + mapping = { vic = democracy ruling_party = conservative hoi_gov = democratic hoi_leader = conservatism } + mapping = { vic = democracy ruling_party = reactionary hoi_gov = democratic hoi_leader = conservatism } + mapping = { vic = democracy ruling_party = communist hoi_gov = democratic hoi_leader = socialism } + mapping = { vic = democracy ruling_party = anarcho_liberal hoi_gov = democratic hoi_leader = liberalism } + mapping = { vic = democracy ruling_party = fascist hoi_gov = democratic hoi_leader = conservatism } + mapping = { vic = prussian_constitutionalism ruling_party = liberal hoi_gov = democratic hoi_leader = liberalism } + mapping = { vic = prussian_constitutionalism ruling_party = socialist hoi_gov = democratic hoi_leader = socialism } + mapping = { vic = prussian_constitutionalism ruling_party = conservative hoi_gov = absolutist hoi_leader = prussian_const } + mapping = { vic = prussian_constitutionalism ruling_party = reactionary hoi_gov = absolutist hoi_leader = absolute_monarchy } } + +party_mappings = { + mapping = { ruling_ideology = absolutist vic2_ideology = reactionary supported_ideology = absolutist } + mapping = { ruling_ideology = absolutist vic2_ideology = conservative supported_ideology = absolutist } + mapping = { ruling_ideology = absolutist vic2_ideology = anarcho_liberal supported_ideology = radical } + mapping = { ruling_ideology = absolutist vic2_ideology = liberal supported_ideology = democratic } + mapping = { ruling_ideology = absolutist vic2_ideology = communist supported_ideology = communism } + mapping = { ruling_ideology = absolutist vic2_ideology = socialist supported_ideology = democratic } + mapping = { ruling_ideology = absolutist vic2_ideology = fascist supported_ideology = fascism } + mapping = { ruling_ideology = radical vic2_ideology = reactionary supported_ideology = absolutist } + mapping = { ruling_ideology = radical vic2_ideology = conservative supported_ideology = democratic } + mapping = { ruling_ideology = radical vic2_ideology = anarcho_liberal supported_ideology = radical } + mapping = { ruling_ideology = radical vic2_ideology = liberal supported_ideology = radical } + mapping = { ruling_ideology = radical vic2_ideology = communist supported_ideology = communism } + mapping = { ruling_ideology = radical vic2_ideology = socialist supported_ideology = democratic } + mapping = { ruling_ideology = radical vic2_ideology = fascist supported_ideology = fascism } + mapping = { ruling_ideology = communism vic2_ideology = reactionary supported_ideology = absolutist } + mapping = { ruling_ideology = communism vic2_ideology = conservative supported_ideology = democratic } + mapping = { ruling_ideology = communism vic2_ideology = anarcho_liberal supported_ideology = radical } + mapping = { ruling_ideology = communism vic2_ideology = liberal supported_ideology = democratic } + mapping = { ruling_ideology = communism vic2_ideology = communist supported_ideology = communism } + mapping = { ruling_ideology = communism vic2_ideology = socialist supported_ideology = communism } + mapping = { ruling_ideology = communism vic2_ideology = fascist supported_ideology = fascism } + mapping = { ruling_ideology = fascism vic2_ideology = reactionary supported_ideology = absolutist } + mapping = { ruling_ideology = fascism vic2_ideology = conservative supported_ideology = democratic } + mapping = { ruling_ideology = fascism vic2_ideology = anarcho_liberal supported_ideology = radical } + mapping = { ruling_ideology = fascism vic2_ideology = liberal supported_ideology = democratic } + mapping = { ruling_ideology = fascism vic2_ideology = communist supported_ideology = communism } + mapping = { ruling_ideology = fascism vic2_ideology = socialist supported_ideology = democratic } + mapping = { ruling_ideology = fascism vic2_ideology = fascist supported_ideology = fascism } + mapping = { ruling_ideology = democratic vic2_ideology = reactionary supported_ideology = absolutist } + mapping = { ruling_ideology = democratic vic2_ideology = conservative supported_ideology = democratic } + mapping = { ruling_ideology = democratic vic2_ideology = anarcho_liberal supported_ideology = radical } + mapping = { ruling_ideology = democratic vic2_ideology = liberal supported_ideology = democratic } + mapping = { ruling_ideology = democratic vic2_ideology = communist supported_ideology = communism } + mapping = { ruling_ideology = democratic vic2_ideology = socialist supported_ideology = democratic } + mapping = { ruling_ideology = democratic vic2_ideology = fascist supported_ideology = fascism } +} \ No newline at end of file diff --git a/Vic2ToHoI4/Data_Files/province_mappings.txt b/Vic2ToHoI4/Data_Files/province_mappings.txt index cd0219fa9..45c025b4f 100644 --- a/Vic2ToHoI4/Data_Files/province_mappings.txt +++ b/Vic2ToHoI4/Data_Files/province_mappings.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016 The Paradox Game Converters Project +# Copyright (c) 2017 The Paradox Game Converters Project # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -409,8 +409,7 @@ link = { vic2 = 2235 vic2 = 2234 hoi4 = 153 } # Aruba, Curacao -> land # # ## Greenland - link = { vic2 = 2636 hoi4 = 13058 } # Egedesminde -> land - link = { vic2 = 2591 hoi4 = 10245 } # Holsteinsborg -> land + link = { vic2 = 2591 vic2 = 2636 hoi4 = 10245 hoi4 = 13058 } # MANY-TO-MANY: Holsteinsborg, Egedesminde -> land, land link = { vic2 = 2632 hoi4 = 10636 hoi4 = 13066 } # Ammassalik -> land, land link = { vic2 = 251 hoi4 = 12512 } # Godthab -> land # @@ -782,27 +781,27 @@ link = { vic2 = 1958 hoi4 = 5036 } # Kribi -> land # # ## French Africa - link = { vic2 = 1956 hoi4 = 6039 } # Douala -> land + link = { vic2 = 1956 vic2 = 1957 hoi4 = 6039 } # Douala, Buea -> land link = { vic2 = 1963 hoi4 = 11194 } # Ngaoundere -> land link = { vic2 = 1960 hoi4 = 9137 } # Bafoussam -> land link = { vic2 = 1961 hoi4 = 7978 } # Bamenda -> land - link = { vic2 = 1937 hoi4 = 10820 hoi4 = 4889 } # Tukari -> land, land + link = { vic2 = 1937 hoi4 = 4889 } # Tukari -> land link = { vic2 = 1950 vic2 = 1944 hoi4 = 8109 } # Yola, Gombe -> land - link = { vic2 = 1943 vic2 = 1942 hoi4 = 4938 } # Jos, Bauchi -> land + link = { vic2 = 1943 hoi4 = 10820 } # Jos -> land link = { vic2 = 1951 vic2 = 1953 hoi4 = 4997 } # Kuka, Dikoa -> land link = { vic2 = 1952 hoi4 = 5028 } # Nguru -> land - link = { vic2 = 1945 vic2 = 1949 hoi4 = 4972 } # Kano, Hadejia -> land + link = { vic2 = 1945 vic2 = 1947 vic2 = 1942 vic2 = 1949 hoi4 = 4972 } # Kano, Katsina, Bauchi, Hadejia -> land link = { vic2 = 1819 hoi4 = 1993 } # Moundou -> land link = { vic2 = 1818 vic2 = 1820 hoi4 = 9152 hoi4 = 2081 } # MANY-TO-MANY: Massenya, Bongor -> land, land link = { vic2 = 1964 hoi4 = 7963 } # Maroua -> land link = { vic2 = 1941 hoi4 = 8021 } # Abuja -> land link = { vic2 = 1936 hoi4 = 1992 } # Makurdi -> land link = { vic2 = 1930 vic2 = 1929 hoi4 = 12900 } # Lokoja, Akure -> land - link = { vic2 = 1939 hoi4 = 2025 } # Zaria -> land - link = { vic2 = 1947 hoi4 = 1969 } # Katsina -> land - link = { vic2 = 1940 hoi4 = 1932 } # Bida -> land + link = { vic2 = 1939 hoi4 = 4938 } # Zaria -> land + link = { vic2 = 1940 hoi4 = 1932 hoi4 = 2025 } # Bida -> land, land link = { vic2 = 1901 vic2 = 1903 hoi4 = 10836 hoi4 = 7950 } # MANY-TO-MANY: Wagadugu, Dori -> land, land - link = { vic2 = 1948 vic2 = 1946 hoi4 = 1891 } # Sokoto, Kebbi -> land + link = { vic2 = 1948 hoi4 = 1969 } # Sokoto -> land + link = { vic2 = 1946 hoi4 = 1891 } # Kebbi -> land link = { vic2 = 1902 hoi4 = 12851 hoi4 = 8116 hoi4 = 8071 } # Wahiguya -> land, land, land link = { vic2 = 1906 hoi4 = 12794 } # Orodaro -> land link = { vic2 = 1799 hoi4 = 4927 } # Sikasso -> land @@ -826,8 +825,8 @@ link = { vic2 = 1913 vic2 = 1916 hoi4 = 8039 } # Tamale, Yendi -> land link = { vic2 = 1911 hoi4 = 12787 hoi4 = 13136 } # Kintampo -> land, lake link = { vic2 = 1921 hoi4 = 12762 } # Nikki -> land - link = { vic2 = 1938 vic2 = 1927 hoi4 = 12817 } # Bussa, Ilorin -> land - link = { vic2 = 1925 hoi4 = 12731 } # Ibadan -> land + link = { vic2 = 1938 hoi4 = 12817 } # Bussa -> land + link = { vic2 = 1925 vic2 = 1927 hoi4 = 12731 } # Ibadan, Ilorin -> land link = { vic2 = 1922 vic2 = 1904 hoi4 = 2001 hoi4 = 12874 } # MANY-TO-MANY: Jugu, Fada Ngourma -> land, land link = { vic2 = 1918 hoi4 = 12843 } # Sokode -> land link = { vic2 = 1797 hoi4 = 10829 } # Kita -> land @@ -844,8 +843,8 @@ link = { vic2 = 1892 vic2 = 1894 hoi4 = 10803 } # Grand Lahou, Grand Bassam -> land link = { vic2 = 1888 vic2 = 1891 hoi4 = 8006 } # Harper, Zwedru -> land link = { vic2 = 1973 hoi4 = 8244 } # Bata -> land - link = { vic2 = 1934 vic2 = 1935 vic2 = 1957 hoi4 = 10831 } # Calabar, Aruchukwu, Buea -> land - link = { vic2 = 1932 vic2 = 1933 hoi4 = 8034 } # Bonny, Awka -> land + link = { vic2 = 1934 vic2 = 1935 vic2 = 1933 hoi4 = 10831 } # Calabar, Aruchukwu, Awka -> land + link = { vic2 = 1932 hoi4 = 8034 } # Bonny -> land link = { vic2 = 1931 vic2 = 1928 hoi4 = 4952 } # Warri, Benin -> land link = { vic2 = 1923 vic2 = 1924 vic2 = 1926 hoi4 = 2050 } # Lagos, Abeokuta, Ife -> land link = { vic2 = 1919 vic2 = 1920 hoi4 = 10919 } # Cotonou, Abomey -> land @@ -1404,14 +1403,14 @@ # # ## Denmark link = { vic2 = 374 hoi4 = 6361 } # Bornholm -> land - link = { vic2 = 372 hoi4 = 3260 hoi4 = 6393 hoi4 = 6287 hoi4 = 3305 } # Copenhagen -> land, land, land, land + link = { vic2 = 372 hoi4 = 6287 hoi4 = 6393 hoi4 = 3260 hoi4 = 3305 } # Copenhagen -> land, land, land, land link = { vic2 = 373 hoi4 = 3325 hoi4 = 3374 } # Odense -> land, land - link = { vic2 = 367 hoi4 = 3206 hoi4 = 6235 hoi4 = 394 hoi4 = 316 } # Aalborg -> land, land, land, land + link = { vic2 = 367 hoi4 = 6235 hoi4 = 3206 hoi4 = 316 hoi4 = 394 } # Aalborg -> land, land, land, land link = { vic2 = 366 hoi4 = 6364 } # Aarhus -> land link = { vic2 = 2557 hoi4 = 3277 hoi4 = 3341 } # Esbjerg -> land, land link = { vic2 = 368 hoi4 = 399 } # Ribe -> land - link = { vic2 = 371 hoi4 = 332 } # Aabenraa -> land - link = { vic2 = 370 hoi4 = 11251 } # Flensburg -> land + link = { vic2 = 371 hoi4 = 11251 hoi4 = 332 } # Aabenraa -> land, land + link = { vic2 = 370 hoi4 = 317 hoi4 = 11366 } # Flensburg -> land, land # # ## Germany link = { vic2 = 537 hoi4 = 11468 hoi4 = 11402 hoi4 = 6513 } # Göttingen -> land, land, land @@ -1477,7 +1476,7 @@ link = { vic2 = 532 hoi4 = 6325 hoi4 = 6263 hoi4 = 6298 hoi4 = 9264 hoi4 = 6218 hoi4 = 9238 } # Lüneburg -> land, land, land, land, land, land link = { vic2 = 581 hoi4 = 11346 hoi4 = 6622 hoi4 = 6535 hoi4 = 3512 } # Münster -> land, land, land, land link = { vic2 = 580 hoi4 = 495 } # Dortmund -> land - link = { vic2 = 369 hoi4 = 6389 hoi4 = 3231 hoi4 = 317 hoi4 = 11366 } # Kiel -> land, land, land, land + link = { vic2 = 369 hoi4 = 6389 hoi4 = 3231 } # Kiel -> land, land link = { vic2 = 542 hoi4 = 9281 hoi4 = 11233 hoi4 = 11264 } # Lingen -> land, land, land link = { vic2 = 574 hoi4 = 3423 hoi4 = 11494 } # Kreuznach -> land, land link = { vic2 = 571 hoi4 = 3558 hoi4 = 563 hoi4 = 11547 } # Kaiserslautern -> land, land, land @@ -1488,16 +1487,16 @@ link = { vic2 = 381 hoi4 = 11562 } # Maastricht -> land link = { vic2 = 543 hoi4 = 11360 } # Emden -> land link = { vic2 = 540 vic2 = 533 hoi4 = 241 hoi4 = 336 } # MANY-TO-MANY: Oldenburg, Heligoland -> land, land - link = { vic2 = 531 hoi4 = 374 hoi4 = 6349 } # Stade -> land, land + link = { vic2 = 531 hoi4 = 374 hoi4 = 6349 hoi4 = 3271 } # Stade -> land, land, land link = { vic2 = 538 hoi4 = 11388 hoi4 = 247 } # Osnabrück -> land, land - link = { vic2 = 541 hoi4 = 309 hoi4 = 3234 } # Cloppenburg -> land, land - link = { vic2 = 535 hoi4 = 3271 } # Nienburg -> land + link = { vic2 = 541 hoi4 = 309 } # Cloppenburg -> land + link = { vic2 = 535 hoi4 = 3234 } # Nienburg -> land link = { vic2 = 539 hoi4 = 3326 } # Bremen -> land link = { vic2 = 547 hoi4 = 3340 hoi4 = 349 } # Swinemünde -> land, land link = { vic2 = 548 hoi4 = 9388 } # Stralsund -> land link = { vic2 = 550 hoi4 = 3312 hoi4 = 3207 } # Prenzlau -> land, land link = { vic2 = 545 hoi4 = 268 hoi4 = 3258 } # Neustrelitz -> land, land - link = { vic2 = 544 hoi4 = 11305 hoi4 = 9294 hoi4 = 11276 hoi4 = 293 hoi4 = 321 } # Schwerin -> land, land, land, land, land + link = { vic2 = 544 hoi4 = 321 hoi4 = 11305 hoi4 = 11276 hoi4 = 9294 hoi4 = 293 } # Schwerin -> land, land, land, land, land link = { vic2 = 530 hoi4 = 11331 } # Lübeck -> land link = { vic2 = 529 hoi4 = 9320 hoi4 = 6257 } # Lauenburg -> land, land link = { vic2 = 528 hoi4 = 9347 hoi4 = 3368 } # Hamburg -> land, land @@ -1514,7 +1513,7 @@ link = { vic2 = 382 hoi4 = 9363 } # Arnhem -> land link = { vic2 = 391 hoi4 = 9574 } # Hasselt -> land link = { vic2 = 379 hoi4 = 6496 hoi4 = 6500 hoi4 = 11456 } # Eindhoven -> land, land, land - link = { vic2 = 375 hoi4 = 68 hoi4 = 3314 hoi4 = 391 hoi4 = 8622 } # Amsterdam -> land, land, land, lake + link = { vic2 = 375 hoi4 = 391 hoi4 = 68 hoi4 = 8622 hoi4 = 3314 } # Amsterdam -> land, land, lake, land link = { vic2 = 380 hoi4 = 3262 hoi4 = 9498 } # Breda -> land, land link = { vic2 = 376 hoi4 = 3211 } # Rotterdam -> land link = { vic2 = 397 hoi4 = 6583 } # Luxembourg -> land @@ -1727,22 +1726,22 @@ link = { vic2 = 304 hoi4 = 3311 } # Isle of Man -> land link = { vic2 = 264 hoi4 = 11303 hoi4 = 369 hoi4 = 303 hoi4 = 3342 } # Kildare -> land, land, land, land link = { vic2 = 259 hoi4 = 9321 hoi4 = 9255 hoi4 = 11371 hoi4 = 11238 } # Sligo -> land, land, land, land - link = { vic2 = 258 hoi4 = 3396 hoi4 = 9303 hoi4 = 9369 hoi4 = 11287 } # Galway -> land, land, land, land + link = { vic2 = 258 hoi4 = 9303 hoi4 = 9369 hoi4 = 3396 hoi4 = 11287 } # Galway -> land, land, land, land link = { vic2 = 261 hoi4 = 6405 hoi4 = 6289 hoi4 = 6313 hoi4 = 11334 } # Limerick -> land, land, land, land link = { vic2 = 260 hoi4 = 7394 hoi4 = 9405 hoi4 = 9284 } # Cork -> land, land, land link = { vic2 = 262 hoi4 = 11237 hoi4 = 11267 hoi4 = 9310 } # Waterford -> land, land, land link = { vic2 = 265 hoi4 = 7377 hoi4 = 285 } # Wexford -> land, land - link = { vic2 = 263 hoi4 = 3359 hoi4 = 11293 } # Dublin -> land, land + link = { vic2 = 263 hoi4 = 11293 hoi4 = 3359 } # Dublin -> land, land link = { vic2 = 256 hoi4 = 3242 } # Armagh -> land link = { vic2 = 255 hoi4 = 276 hoi4 = 385 hoi4 = 11257 } # Londonderry -> land, land, land link = { vic2 = 257 hoi4 = 337 } # Donegal -> land link = { vic2 = 254 hoi4 = 3379 hoi4 = 3329 } # Belfast -> land, land link = { vic2 = 253 vic2 = 3246 hoi4 = 13003 } # Faroe Islands, Jan Mayen -> land - link = { vic2 = 266 hoi4 = 9161 hoi4 = 11306 hoi4 = 11055 hoi4 = 11207 hoi4 = 200 hoi4 = 11136 } # Aberdeen -> land, land, land, land, land, land + link = { vic2 = 266 hoi4 = 9161 hoi4 = 11055 hoi4 = 11207 hoi4 = 200 hoi4 = 11136 } # Aberdeen -> land, land, land, land, land link = { vic2 = 267 hoi4 = 11161 hoi4 = 9075 hoi4 = 6046 hoi4 = 6104 hoi4 = 3159 hoi4 = 11064 hoi4 = 131 hoi4 = 9090 hoi4 = 6205 hoi4 = 3178 hoi4 = 11266 hoi4 = 6062 hoi4 = 6196 } # Inverness -> land, land, land, land, land, land, land, land, land, land, land, land, land - link = { vic2 = 268 hoi4 = 6300 hoi4 = 3150 hoi4 = 159 } # Dundee -> land, land, land - link = { vic2 = 270 hoi4 = 9383 hoi4 = 6385 hoi4 = 3273 hoi4 = 284 hoi4 = 3373 hoi4 = 6395 } # Stirling -> land, land, land, land, land, land - link = { vic2 = 271 hoi4 = 6350 hoi4 = 9237 hoi4 = 6320 } # Glasgow -> land, land, land + link = { vic2 = 268 hoi4 = 3150 hoi4 = 6300 hoi4 = 11306 } # Dundee -> land, land, land + link = { vic2 = 270 hoi4 = 6385 hoi4 = 284 hoi4 = 3373 hoi4 = 159 hoi4 = 9383 } # Stirling -> land, land, land, land, land + link = { vic2 = 271 hoi4 = 3273 hoi4 = 6320 hoi4 = 9237 hoi4 = 6350 hoi4 = 6395 } # Glasgow -> land, land, land, land, land link = { vic2 = 269 hoi4 = 9392 hoi4 = 11378 } # Edinburgh -> land, land link = { vic2 = 272 hoi4 = 9314 hoi4 = 11218 hoi4 = 9350 } # Dumfries -> land, land, land link = { vic2 = 295 } # St Albans -> DROPPED @@ -2762,14 +2761,14 @@ # Australia link = { vic2 = 2473 hoi4 = 2146 hoi4 = 5161 hoi4 = 1667 hoi4 = 4836 hoi4 = 5134 hoi4 = 10455 hoi4 = 11019 } # Wagga Wagga -> land, land, land, land, land, land, land link = { vic2 = 2474 hoi4 = 4673 hoi4 = 4500 hoi4 = 4453 hoi4 = 4478 hoi4 = 7649 hoi4 = 4658 hoi4 = 7471 hoi4 = 7533 hoi4 = 12377 } # Moree -> land, land, land, land, land, land, land, land, land - link = { vic2 = 2470 hoi4 = 1611 hoi4 = 7664 hoi4 = 10500 } # Port Macquarie -> land, land, land + link = { vic2 = 2470 vic2 = 2508 hoi4 = 1611 hoi4 = 7664 hoi4 = 10500 } # MANY-TO-MANY: Port Macquarie, Norfolk Island -> land, land, land link = { vic2 = 2469 hoi4 = 7450 hoi4 = 7496 hoi4 = 7520 } # Newcastle -> land, land, land link = { vic2 = 2471 hoi4 = 12435 hoi4 = 10682 hoi4 = 10427 hoi4 = 10388 hoi4 = 1537 } # Ophir -> land, land, land, land, land link = { vic2 = 2472 hoi4 = 12560 hoi4 = 4763 hoi4 = 12532 hoi4 = 7859 hoi4 = 1861 } # Eden -> land, land, land, land, land link = { vic2 = 2468 hoi4 = 12406 hoi4 = 4864 } # Sydney -> land, land link = { vic2 = 2475 hoi4 = 8249 hoi4 = 2114 hoi4 = 12934 hoi4 = 10977 hoi4 = 2163 hoi4 = 8234 hoi4 = 12968 } # Broken Hill -> land, land, land, land, land, land, land link = { vic2 = 2486 hoi4 = 12451 hoi4 = 1570 hoi4 = 7592 hoi4 = 4546 hoi4 = 4530 hoi4 = 4517 hoi4 = 1472 hoi4 = 4502 } # Toowoomba -> land, land, land, land, land, land, land, land - link = { vic2 = 2483 vic2 = 2508 hoi4 = 7564 hoi4 = 10445 hoi4 = 10458 hoi4 = 7535 hoi4 = 10430 } # MANY-TO-MANY: Brisbane, Norfolk Island -> land, land, land, land, land + link = { vic2 = 2483 hoi4 = 7564 hoi4 = 10445 hoi4 = 10458 hoi4 = 7535 hoi4 = 10430 } # Brisbane -> land, land, land, land, land link = { vic2 = 2485 hoi4 = 7666 hoi4 = 4632 hoi4 = 7610 hoi4 = 12424 hoi4 = 12411 hoi4 = 1557 } # Clermont -> land, land, land, land, land, land link = { vic2 = 2484 hoi4 = 10460 hoi4 = 10487 hoi4 = 7522 hoi4 = 12308 hoi4 = 7651 hoi4 = 10475 hoi4 = 4481 } # Gladstone -> land, land, land, land, land, land, land link = { vic2 = 2490 hoi4 = 10941 hoi4 = 2116 hoi4 = 5227 hoi4 = 11006 hoi4 = 5198 hoi4 = 12949 } # Charleville -> land, land, land, land, land, land @@ -2820,9 +2819,9 @@ link = { vic2 = 2285 hoi4 = 5023 } # Galápagos -> land link = { vic2 = 2623 hoi4 = 13052 } # Midway Island -> land link = { vic2 = 2336 hoi4 = 1280 } # Easter Island -> land - link = { vic2 = 801 vic2 = 2545 vic2 = 2551 vic2 = 2552 vic2 = 2553 hoi4 = 12148 hoi4 = 10188 } # MANY-TO-MANY: Tahiti, Rarotonga, Marquesas, Pitcairn, Tuamotus -> land, land - link = { vic2 = 2544 vic2 = 2548 hoi4 = 13080 } # Pago Pago, Niue -> land - link = { vic2 = 2547 vic2 = 2543 vic2 = 2546 hoi4 = 7290 } # Tokelau, Apia, Tongareva -> land + link = { vic2 = 801 vic2 = 2551 vic2 = 2552 vic2 = 2553 hoi4 = 12148 hoi4 = 10188 } # MANY-TO-MANY: Tahiti, Marquesas, Pitcairn, Tuamotus -> land, land + link = { vic2 = 2544 hoi4 = 13080 } # Pago Pago -> land + link = { vic2 = 2547 vic2 = 2543 hoi4 = 7290 } # Tokelau, Apia -> land link = { vic2 = 686 hoi4 = 13053 hoi4 = 13049 hoi4 = 13050 } # Line Islands -> land, land, land link = { vic2 = 2526 hoi4 = 13048 } # Palmyra -> land link = { vic2 = 658 hoi4 = 12021 hoi4 = 10048 hoi4 = 7195 hoi4 = 4180 hoi4 = 7112 hoi4 = 13051 } # Hawaii -> land, land, land, land, land, land @@ -2839,7 +2838,7 @@ link = { vic2 = 2523 hoi4 = 13038 } # Nauru -> land link = { vic2 = 2527 hoi4 = 7393 hoi4 = 13022 hoi4 = 13021 hoi4 = 4387 hoi4 = 13020 } # Gilbert Islands -> land, land, land, land, land link = { vic2 = 2541 hoi4 = 13056 hoi4 = 13057 hoi4 = 13055 hoi4 = 13054 } # Ellice Islands -> land, land, land, land - link = { vic2 = 2454 vic2 = 2520 vic2 = 2540 vic2 = 2542 hoi4 = 4286 hoi4 = 12159 hoi4 = 7302 } # MANY-TO-MANY: Fiji, Taveuni, Tonga, Wallis and Futuna -> land, land, land + link = { vic2 = 2454 vic2 = 2520 vic2 = 2542 hoi4 = 4286 hoi4 = 12159 hoi4 = 7302 } # MANY-TO-MANY: Fiji, Taveuni, Wallis and Futuna -> land, land, land # # Atlantic Islands link = { vic2 = 2134 hoi4 = 1751 } # Azores -> land @@ -2848,8 +2847,7 @@ link = { vic2 = 1955 hoi4 = 1903 } # Fernando Pó -> land link = { vic2 = 2133 hoi4 = 10995 } # South Georgia -> land link = { vic2 = 2130 hoi4 = 13013 } # Ascension -> land - link = { vic2 = 2129 hoi4 = 13016 } # Saint Helena -> land - link = { vic2 = 2132 } # Tristan da Cunha -> DROPPED + link = { vic2 = 2129 vic2 = 2132 hoi4 = 13016 } # Saint Helena, Tristan da Cunha -> land # # # ########## @@ -3431,6 +3429,7 @@ # # # ## Dropped Vic2 provinces + link = { vic2 = 2546 vic2 = 2540 vic2 = 2545 vic2 = 2548 } # Tongareva, Tonga, Rarotonga, Niue -> DROPPED link = { vic2 = 3241 } # Arctic Ocean -> DROPPED # # @@ -3829,8 +3828,7 @@ link = { vic2 = 2235 vic2 = 2234 hoi4 = 153 } # Aruba, Curacao -> land # # ## Greenland - link = { vic2 = 2636 hoi4 = 13058 } # Egedesminde -> land - link = { vic2 = 2591 hoi4 = 10245 } # Holsteinsborg -> land + link = { vic2 = 2591 vic2 = 2636 hoi4 = 10245 hoi4 = 13058 } # MANY-TO-MANY: Holsteinsborg, Egedesminde -> land, land link = { vic2 = 2632 hoi4 = 10636 hoi4 = 13066 } # Ammassalik -> land, land link = { vic2 = 251 hoi4 = 12512 } # Godthab -> land # @@ -4202,27 +4200,27 @@ link = { vic2 = 1958 hoi4 = 5036 } # Kribi -> land # # ## French Africa - link = { vic2 = 1956 hoi4 = 6039 } # Douala -> land + link = { vic2 = 1956 vic2 = 1957 hoi4 = 6039 } # Douala, Buea -> land link = { vic2 = 1963 hoi4 = 11194 } # Ngaoundere -> land link = { vic2 = 1960 hoi4 = 9137 } # Bafoussam -> land link = { vic2 = 1961 hoi4 = 7978 } # Bamenda -> land - link = { vic2 = 1937 hoi4 = 10820 hoi4 = 4889 } # Tukari -> land, land + link = { vic2 = 1937 hoi4 = 4889 } # Tukari -> land link = { vic2 = 1950 vic2 = 1944 hoi4 = 8109 } # Yola, Gombe -> land - link = { vic2 = 1943 vic2 = 1942 hoi4 = 4938 } # Jos, Bauchi -> land + link = { vic2 = 1943 hoi4 = 10820 } # Jos -> land link = { vic2 = 1951 vic2 = 1953 hoi4 = 4997 } # Kuka, Dikoa -> land link = { vic2 = 1952 hoi4 = 5028 } # Nguru -> land - link = { vic2 = 1945 vic2 = 1949 hoi4 = 4972 } # Kano, Hadejia -> land + link = { vic2 = 1945 vic2 = 1947 vic2 = 1942 vic2 = 1949 hoi4 = 4972 } # Kano, Katsina, Bauchi, Hadejia -> land link = { vic2 = 1819 hoi4 = 1993 } # Moundou -> land link = { vic2 = 1818 vic2 = 1820 hoi4 = 9152 hoi4 = 2081 } # MANY-TO-MANY: Massenya, Bongor -> land, land link = { vic2 = 1964 hoi4 = 7963 } # Maroua -> land link = { vic2 = 1941 hoi4 = 8021 } # Abuja -> land link = { vic2 = 1936 hoi4 = 1992 } # Makurdi -> land link = { vic2 = 1930 vic2 = 1929 hoi4 = 12900 } # Lokoja, Akure -> land - link = { vic2 = 1939 hoi4 = 2025 } # Zaria -> land - link = { vic2 = 1947 hoi4 = 1969 } # Katsina -> land - link = { vic2 = 1940 hoi4 = 1932 } # Bida -> land + link = { vic2 = 1939 hoi4 = 4938 } # Zaria -> land + link = { vic2 = 1940 hoi4 = 1932 hoi4 = 2025 } # Bida -> land, land link = { vic2 = 1901 vic2 = 1903 hoi4 = 10836 hoi4 = 7950 } # MANY-TO-MANY: Wagadugu, Dori -> land, land - link = { vic2 = 1948 vic2 = 1946 hoi4 = 1891 } # Sokoto, Kebbi -> land + link = { vic2 = 1948 hoi4 = 1969 } # Sokoto -> land + link = { vic2 = 1946 hoi4 = 1891 } # Kebbi -> land link = { vic2 = 1902 hoi4 = 12851 hoi4 = 8116 hoi4 = 8071 } # Wahiguya -> land, land, land link = { vic2 = 1906 hoi4 = 12794 } # Orodaro -> land link = { vic2 = 1799 hoi4 = 4927 } # Sikasso -> land @@ -4246,8 +4244,8 @@ link = { vic2 = 1913 vic2 = 1916 hoi4 = 8039 } # Tamale, Yendi -> land link = { vic2 = 1911 hoi4 = 12787 hoi4 = 13136 } # Kintampo -> land, lake link = { vic2 = 1921 hoi4 = 12762 } # Nikki -> land - link = { vic2 = 1938 vic2 = 1927 hoi4 = 12817 } # Bussa, Ilorin -> land - link = { vic2 = 1925 hoi4 = 12731 } # Ibadan -> land + link = { vic2 = 1938 hoi4 = 12817 } # Bussa -> land + link = { vic2 = 1925 vic2 = 1927 hoi4 = 12731 } # Ibadan, Ilorin -> land link = { vic2 = 1922 vic2 = 1904 hoi4 = 2001 hoi4 = 12874 } # MANY-TO-MANY: Jugu, Fada Ngourma -> land, land link = { vic2 = 1918 hoi4 = 12843 } # Sokode -> land link = { vic2 = 1797 hoi4 = 10829 } # Kita -> land @@ -4264,8 +4262,8 @@ link = { vic2 = 1892 vic2 = 1894 hoi4 = 10803 } # Grand Lahou, Grand Bassam -> land link = { vic2 = 1888 vic2 = 1891 hoi4 = 8006 } # Harper, Zwedru -> land link = { vic2 = 1973 hoi4 = 8244 } # Bata -> land - link = { vic2 = 1934 vic2 = 1935 vic2 = 1957 hoi4 = 10831 } # Calabar, Aruchukwu, Buea -> land - link = { vic2 = 1932 vic2 = 1933 hoi4 = 8034 } # Bonny, Awka -> land + link = { vic2 = 1934 vic2 = 1935 vic2 = 1933 hoi4 = 10831 } # Calabar, Aruchukwu, Awka -> land + link = { vic2 = 1932 hoi4 = 8034 } # Bonny -> land link = { vic2 = 1931 vic2 = 1928 hoi4 = 4952 } # Warri, Benin -> land link = { vic2 = 1923 vic2 = 1924 vic2 = 1926 hoi4 = 2050 } # Lagos, Abeokuta, Ife -> land link = { vic2 = 1919 vic2 = 1920 hoi4 = 10919 } # Cotonou, Abomey -> land @@ -4531,7 +4529,7 @@ # ########## # # Austria - link = { vic2 = 616 hoi4 = 9679 hoi4 = 9648 hoi4 = 9646 hoi4 = 653 } # Graz -> land, land, land, land + link = { vic2 = 616 hoi4 = 9679 hoi4 = 9646 hoi4 = 9648 hoi4 = 653 } # Graz -> land, land, land, land link = { vic2 = 624 hoi4 = 9661 hoi4 = 11630 hoi4 = 6690 } # Eisenstadt -> land, land, land link = { vic2 = 620 hoi4 = 704 } # Sankt Pölten -> land link = { vic2 = 617 hoi4 = 9650 hoi4 = 11651 } # Judenburg -> land, land @@ -4541,8 +4539,8 @@ link = { vic2 = 622 hoi4 = 9665 hoi4 = 3703 hoi4 = 732 } # Linz -> land, land, land link = { vic2 = 613 hoi4 = 688 hoi4 = 6708 hoi4 = 6691 hoi4 = 3684 } # Salzburg -> land, land, land, land link = { vic2 = 615 hoi4 = 668 } # Lienz -> land - link = { vic2 = 735 hoi4 = 9633 hoi4 = 11618 hoi4 = 671 } # Bozen -> land, land, land - link = { vic2 = 612 hoi4 = 9636 hoi4 = 673 hoi4 = 11634 hoi4 = 3675 } # Innsbruck -> land, land, land, land + link = { vic2 = 735 hoi4 = 9633 hoi4 = 11618 hoi4 = 671 hoi4 = 11615 hoi4 = 9630 } # Bozen -> land, land, land, land, land + link = { vic2 = 612 hoi4 = 673 hoi4 = 11634 hoi4 = 3675 hoi4 = 9636 } # Innsbruck -> land, land, land, land link = { vic2 = 614 hoi4 = 6680 hoi4 = 6678 } # Bregenz -> land, land # # ## Poland @@ -4594,7 +4592,7 @@ link = { vic2 = 673 hoi4 = 6706 hoi4 = 6729 } # Galati -> land, land link = { vic2 = 672 hoi4 = 11652 hoi4 = 3728 hoi4 = 9701 hoi4 = 3741 hoi4 = 11672 hoi4 = 11655 } # Bacau -> land, land, land, land, land, land link = { vic2 = 660 hoi4 = 9672 hoi4 = 6731 hoi4 = 9685 } # Udvarhely -> land, land, land - link = { vic2 = 676 hoi4 = 3704 hoi4 = 9683 hoi4 = 3724 hoi4 = 6743 hoi4 = 11686 hoi4 = 3707 } # Chisinau -> land, land, land, land, land, land + link = { vic2 = 676 hoi4 = 11686 hoi4 = 9683 hoi4 = 3724 hoi4 = 3704 hoi4 = 6743 hoi4 = 3707 } # Chisinau -> land, land, land, land, land, land link = { vic2 = 671 hoi4 = 11534 hoi4 = 6584 hoi4 = 744 hoi4 = 9716 } # Botosani -> land, land, land, land link = { vic2 = 670 hoi4 = 6747 hoi4 = 723 } # Iasi -> land, land link = { vic2 = 678 hoi4 = 3701 hoi4 = 6727 } # Izmail -> land, land @@ -4620,7 +4618,7 @@ link = { vic2 = 811 hoi4 = 649 hoi4 = 9612 } # Ruse -> land, land link = { vic2 = 814 hoi4 = 9783 } # Varna -> land link = { vic2 = 813 hoi4 = 9769 hoi4 = 6842 } # Shumen -> land, land - link = { vic2 = 817 hoi4 = 9888 hoi4 = 9902 hoi4 = 9919 } # Burgas -> land, land, land + link = { vic2 = 817 hoi4 = 9902 hoi4 = 9888 hoi4 = 9919 } # Burgas -> land, land, land link = { vic2 = 816 hoi4 = 6982 hoi4 = 6952 hoi4 = 6814 hoi4 = 6967 } # Stara Zagora -> land, land, land, land link = { vic2 = 812 hoi4 = 3952 hoi4 = 3796 hoi4 = 9610 hoi4 = 3819 } # Pleven -> land, land, land, land link = { vic2 = 810 hoi4 = 9771 hoi4 = 965 hoi4 = 11754 hoi4 = 3971 hoi4 = 793 } # Vidin -> land, land, land, land, land @@ -4673,13 +4671,13 @@ link = { vic2 = 787 hoi4 = 953 hoi4 = 11899 hoi4 = 11741 } # Foca -> land, land, land link = { vic2 = 786 hoi4 = 6799 hoi4 = 11574 hoi4 = 606 } # Tuzla -> land, land, land link = { vic2 = 788 hoi4 = 9894 } # Mostar -> land - link = { vic2 = 783 hoi4 = 9922 hoi4 = 11872 } # Sarajevo -> land, land + link = { vic2 = 783 hoi4 = 11872 hoi4 = 9922 } # Sarajevo -> land, land link = { vic2 = 789 hoi4 = 6957 hoi4 = 6942 } # Livno -> land, land link = { vic2 = 785 hoi4 = 6983 hoi4 = 9588 hoi4 = 9591 hoi4 = 11572 } # Banja Luka -> land, land, land, land link = { vic2 = 784 hoi4 = 9586 hoi4 = 3985 } # Bihac -> land, land link = { vic2 = 772 hoi4 = 6614 hoi4 = 6619 } # Sisak -> land, land link = { vic2 = 773 hoi4 = 3601 hoi4 = 6611 } # Karlovac -> land, land - link = { vic2 = 767 hoi4 = 3654 hoi4 = 596 hoi4 = 665 hoi4 = 6672 } # Maribor -> land, land, land, land + link = { vic2 = 767 hoi4 = 665 hoi4 = 596 hoi4 = 3654 hoi4 = 6672 } # Maribor -> land, land, land, land link = { vic2 = 768 hoi4 = 3631 hoi4 = 9627 hoi4 = 6650 hoi4 = 9596 } # Ljubljana -> land, land, land, land link = { vic2 = 778 hoi4 = 11564 } # Fiume -> land link = { vic2 = 774 hoi4 = 11901 hoi4 = 591 hoi4 = 984 } # Senj -> land, land, land @@ -4692,7 +4690,7 @@ link = { vic2 = 776 hoi4 = 624 hoi4 = 11594 } # Bjelovar -> land, land link = { vic2 = 775 hoi4 = 9611 } # Varaždin -> land link = { vic2 = 771 hoi4 = 11581 hoi4 = 3592 hoi4 = 3596 } # Zagreb -> land, land, land - link = { vic2 = 780 hoi4 = 11816 hoi4 = 3924 hoi4 = 3974 } # Split -> land, land, land + link = { vic2 = 780 hoi4 = 3924 hoi4 = 11816 hoi4 = 3974 } # Split -> land, land, land link = { vic2 = 782 hoi4 = 6889 hoi4 = 3868 } # Dubrovnik -> land, land link = { vic2 = 2577 hoi4 = 937 hoi4 = 3922 hoi4 = 982 } # Pljevlja -> land, land, land link = { vic2 = 2569 hoi4 = 11845 } # Niksic -> land @@ -4700,8 +4698,8 @@ link = { vic2 = 2582 hoi4 = 9821 } # Kotor -> land link = { vic2 = 800 hoi4 = 9809 hoi4 = 6913 } # Ulcinj -> land, land link = { vic2 = 803 hoi4 = 9849 hoi4 = 6940 } # Prizren -> land, land - link = { vic2 = 799 hoi4 = 11857 hoi4 = 11832 hoi4 = 11868 hoi4 = 9906 hoi4 = 11887 } # Leskovac -> land, land, land, land, land - link = { vic2 = 806 hoi4 = 3833 hoi4 = 6886 hoi4 = 907 } # Skopje -> land, land, land + link = { vic2 = 799 hoi4 = 11857 hoi4 = 11868 hoi4 = 9906 hoi4 = 11887 } # Leskovac -> land, land, land, land + link = { vic2 = 806 hoi4 = 907 hoi4 = 11832 hoi4 = 3833 hoi4 = 6886 } # Skopje -> land, land, land, land link = { vic2 = 807 hoi4 = 11856 hoi4 = 974 hoi4 = 3865 hoi4 = 3882 hoi4 = 833 hoi4 = 867 } # Bitola -> land, land, land, land, land, land link = { vic2 = 850 hoi4 = 9780 hoi4 = 3896 } # Shkoder -> land, land link = { vic2 = 849 hoi4 = 9875 hoi4 = 11762 } # Tirana -> land, land @@ -4730,7 +4728,7 @@ link = { vic2 = 835 hoi4 = 976 hoi4 = 1109 } # Amfissa -> land, land link = { vic2 = 842 hoi4 = 4193 hoi4 = 7211 } # Patras -> land, land link = { vic2 = 841 hoi4 = 1173 } # Kalamata -> land - link = { vic2 = 839 hoi4 = 4078 hoi4 = 11965 hoi4 = 4178 } # Nafplion -> land, land, land + link = { vic2 = 839 hoi4 = 4178 hoi4 = 4078 hoi4 = 11965 } # Nafplion -> land, land, land link = { vic2 = 840 hoi4 = 7096 } # Corinth -> land link = { vic2 = 834 hoi4 = 4109 hoi4 = 3988 } # Athens -> land, land link = { vic2 = 838 hoi4 = 7127 } # Khalkis -> land @@ -4824,14 +4822,14 @@ # # ## Denmark link = { vic2 = 374 hoi4 = 6361 } # Bornholm -> land - link = { vic2 = 372 hoi4 = 3260 hoi4 = 6393 hoi4 = 6287 hoi4 = 3305 } # Copenhagen -> land, land, land, land + link = { vic2 = 372 hoi4 = 6287 hoi4 = 6393 hoi4 = 3260 hoi4 = 3305 } # Copenhagen -> land, land, land, land link = { vic2 = 373 hoi4 = 3325 hoi4 = 3374 } # Odense -> land, land - link = { vic2 = 367 hoi4 = 3206 hoi4 = 6235 hoi4 = 394 hoi4 = 316 } # Aalborg -> land, land, land, land + link = { vic2 = 367 hoi4 = 6235 hoi4 = 3206 hoi4 = 316 hoi4 = 394 } # Aalborg -> land, land, land, land link = { vic2 = 366 hoi4 = 6364 } # Aarhus -> land link = { vic2 = 2557 hoi4 = 3277 hoi4 = 3341 } # Esbjerg -> land, land link = { vic2 = 368 hoi4 = 399 } # Ribe -> land - link = { vic2 = 371 hoi4 = 332 } # Aabenraa -> land - link = { vic2 = 370 hoi4 = 11251 } # Flensburg -> land + link = { vic2 = 371 hoi4 = 11251 hoi4 = 332 } # Aabenraa -> land, land + link = { vic2 = 370 hoi4 = 317 hoi4 = 11366 } # Flensburg -> land, land # # ## Germany link = { vic2 = 537 hoi4 = 11468 hoi4 = 11402 hoi4 = 6513 } # Göttingen -> land, land, land @@ -4897,7 +4895,7 @@ link = { vic2 = 532 hoi4 = 6325 hoi4 = 6263 hoi4 = 6298 hoi4 = 9264 hoi4 = 6218 hoi4 = 9238 } # Lüneburg -> land, land, land, land, land, land link = { vic2 = 581 hoi4 = 11346 hoi4 = 6622 hoi4 = 6535 hoi4 = 3512 } # Münster -> land, land, land, land link = { vic2 = 580 hoi4 = 495 } # Dortmund -> land - link = { vic2 = 369 hoi4 = 6389 hoi4 = 3231 hoi4 = 317 hoi4 = 11366 } # Kiel -> land, land, land, land + link = { vic2 = 369 hoi4 = 6389 hoi4 = 3231 } # Kiel -> land, land link = { vic2 = 542 hoi4 = 9281 hoi4 = 11233 hoi4 = 11264 } # Lingen -> land, land, land link = { vic2 = 574 hoi4 = 3423 hoi4 = 11494 } # Kreuznach -> land, land link = { vic2 = 571 hoi4 = 3558 hoi4 = 563 hoi4 = 11547 } # Kaiserslautern -> land, land, land @@ -4908,16 +4906,16 @@ link = { vic2 = 381 hoi4 = 11562 } # Maastricht -> land link = { vic2 = 543 hoi4 = 11360 } # Emden -> land link = { vic2 = 540 vic2 = 533 hoi4 = 241 hoi4 = 336 } # MANY-TO-MANY: Oldenburg, Heligoland -> land, land - link = { vic2 = 531 hoi4 = 374 hoi4 = 6349 } # Stade -> land, land + link = { vic2 = 531 hoi4 = 374 hoi4 = 6349 hoi4 = 3271 } # Stade -> land, land, land link = { vic2 = 538 hoi4 = 11388 hoi4 = 247 } # Osnabrück -> land, land - link = { vic2 = 541 hoi4 = 309 hoi4 = 3234 } # Cloppenburg -> land, land - link = { vic2 = 535 hoi4 = 3271 } # Nienburg -> land + link = { vic2 = 541 hoi4 = 309 } # Cloppenburg -> land + link = { vic2 = 535 hoi4 = 3234 } # Nienburg -> land link = { vic2 = 539 hoi4 = 3326 } # Bremen -> land link = { vic2 = 547 hoi4 = 3340 hoi4 = 349 } # Swinemünde -> land, land link = { vic2 = 548 hoi4 = 9388 } # Stralsund -> land link = { vic2 = 550 hoi4 = 3312 hoi4 = 3207 } # Prenzlau -> land, land link = { vic2 = 545 hoi4 = 268 hoi4 = 3258 } # Neustrelitz -> land, land - link = { vic2 = 544 hoi4 = 11305 hoi4 = 9294 hoi4 = 11276 hoi4 = 293 hoi4 = 321 } # Schwerin -> land, land, land, land, land + link = { vic2 = 544 hoi4 = 321 hoi4 = 11305 hoi4 = 11276 hoi4 = 9294 hoi4 = 293 } # Schwerin -> land, land, land, land, land link = { vic2 = 530 hoi4 = 11331 } # Lübeck -> land link = { vic2 = 529 hoi4 = 9320 hoi4 = 6257 } # Lauenburg -> land, land link = { vic2 = 528 hoi4 = 9347 hoi4 = 3368 } # Hamburg -> land, land @@ -4934,7 +4932,7 @@ link = { vic2 = 382 hoi4 = 9363 } # Arnhem -> land link = { vic2 = 391 hoi4 = 9574 } # Hasselt -> land link = { vic2 = 379 hoi4 = 6496 hoi4 = 6500 hoi4 = 11456 } # Eindhoven -> land, land, land - link = { vic2 = 375 hoi4 = 68 hoi4 = 3314 hoi4 = 391 hoi4 = 8622 } # Amsterdam -> land, land, land, lake + link = { vic2 = 375 hoi4 = 391 hoi4 = 68 hoi4 = 8622 hoi4 = 3314 } # Amsterdam -> land, land, lake, land link = { vic2 = 380 hoi4 = 3262 hoi4 = 9498 } # Breda -> land, land link = { vic2 = 376 hoi4 = 3211 } # Rotterdam -> land link = { vic2 = 397 hoi4 = 6583 } # Luxembourg -> land @@ -4974,7 +4972,7 @@ link = { vic2 = 730 hoi4 = 603 hoi4 = 3604 } # Verona -> land, land link = { vic2 = 738 hoi4 = 3773 hoi4 = 6790 hoi4 = 11726 } # Parma -> land, land, land link = { vic2 = 732 hoi4 = 3657 hoi4 = 6656 } # Treviso -> land, land - link = { vic2 = 734 hoi4 = 11615 hoi4 = 9630 hoi4 = 6675 hoi4 = 6631 hoi4 = 9598 hoi4 = 11598 hoi4 = 656 } # Trent -> land, land, land, land, land, land, land + link = { vic2 = 734 hoi4 = 6631 hoi4 = 9598 hoi4 = 11598 hoi4 = 6675 hoi4 = 656 } # Trent -> land, land, land, land, land link = { vic2 = 733 hoi4 = 628 hoi4 = 9613 } # Udine -> land, land link = { vic2 = 737 hoi4 = 11595 } # Gorizia -> land link = { vic2 = 769 hoi4 = 599 } # Postojna -> land @@ -5007,7 +5005,7 @@ link = { vic2 = 763 hoi4 = 4159 hoi4 = 1156 hoi4 = 3857 } # Messina -> land, land, land link = { vic2 = 854 hoi4 = 12003 } # Malta -> land link = { vic2 = 762 hoi4 = 10074 hoi4 = 7059 hoi4 = 7147 } # Palermo -> land, land, land - link = { vic2 = 765 hoi4 = 11755 hoi4 = 11874 hoi4 = 11773 hoi4 = 902 } # Cagliari -> land, land, land, land + link = { vic2 = 765 hoi4 = 11773 hoi4 = 902 hoi4 = 11874 hoi4 = 11755 } # Cagliari -> land, land, land, land link = { vic2 = 766 hoi4 = 11824 hoi4 = 9772 hoi4 = 9863 hoi4 = 6891 } # Sassari -> land, land, land, land # # ## Iberia @@ -5068,9 +5066,9 @@ # # ## France link = { vic2 = 473 hoi4 = 11804 hoi4 = 9851 hoi4 = 3838 } # Corsica -> land, land, land - link = { vic2 = 465 hoi4 = 778 hoi4 = 9603 } # Annecy -> land, land + link = { vic2 = 465 hoi4 = 6609 hoi4 = 778 hoi4 = 9603 } # Annecy -> land, land, land link = { vic2 = 453 hoi4 = 762 hoi4 = 11716 hoi4 = 6786 hoi4 = 780 hoi4 = 9728 hoi4 = 11713 } # Valence -> land, land, land, land, land, land - link = { vic2 = 466 hoi4 = 6784 hoi4 = 6609 hoi4 = 11573 } # Chambéry -> land, land, land + link = { vic2 = 466 hoi4 = 6784 hoi4 = 11573 } # Chambéry -> land, land link = { vic2 = 454 hoi4 = 3768 hoi4 = 764 hoi4 = 3764 hoi4 = 9736 hoi4 = 3762 hoi4 = 3961 hoi4 = 6975 } # Grenoble -> land, land, land, land, land, land, land link = { vic2 = 452 hoi4 = 9732 hoi4 = 3770 } # St Étienne -> land, land link = { vic2 = 405 hoi4 = 9472 hoi4 = 3447 } # Charleville -> land, land @@ -5147,22 +5145,22 @@ link = { vic2 = 304 hoi4 = 3311 } # Isle of Man -> land link = { vic2 = 264 hoi4 = 11303 hoi4 = 369 hoi4 = 303 hoi4 = 3342 } # Kildare -> land, land, land, land link = { vic2 = 259 hoi4 = 9321 hoi4 = 9255 hoi4 = 11371 hoi4 = 11238 } # Sligo -> land, land, land, land - link = { vic2 = 258 hoi4 = 3396 hoi4 = 9303 hoi4 = 9369 hoi4 = 11287 } # Galway -> land, land, land, land + link = { vic2 = 258 hoi4 = 9303 hoi4 = 9369 hoi4 = 3396 hoi4 = 11287 } # Galway -> land, land, land, land link = { vic2 = 261 hoi4 = 6405 hoi4 = 6289 hoi4 = 6313 hoi4 = 11334 } # Limerick -> land, land, land, land link = { vic2 = 260 hoi4 = 7394 hoi4 = 9405 hoi4 = 9284 } # Cork -> land, land, land link = { vic2 = 262 hoi4 = 11237 hoi4 = 11267 hoi4 = 9310 } # Waterford -> land, land, land link = { vic2 = 265 hoi4 = 7377 hoi4 = 285 } # Wexford -> land, land - link = { vic2 = 263 hoi4 = 3359 hoi4 = 11293 } # Dublin -> land, land + link = { vic2 = 263 hoi4 = 11293 hoi4 = 3359 } # Dublin -> land, land link = { vic2 = 256 hoi4 = 3242 } # Armagh -> land link = { vic2 = 255 hoi4 = 276 hoi4 = 385 hoi4 = 11257 } # Londonderry -> land, land, land link = { vic2 = 257 hoi4 = 337 } # Donegal -> land link = { vic2 = 254 hoi4 = 3379 hoi4 = 3329 } # Belfast -> land, land link = { vic2 = 253 vic2 = 3246 hoi4 = 13003 } # Faroe Islands, Jan Mayen -> land - link = { vic2 = 266 hoi4 = 9161 hoi4 = 11306 hoi4 = 11055 hoi4 = 11207 hoi4 = 200 hoi4 = 11136 } # Aberdeen -> land, land, land, land, land, land + link = { vic2 = 266 hoi4 = 9161 hoi4 = 11055 hoi4 = 11207 hoi4 = 200 hoi4 = 11136 } # Aberdeen -> land, land, land, land, land link = { vic2 = 267 hoi4 = 11161 hoi4 = 9075 hoi4 = 6046 hoi4 = 6104 hoi4 = 3159 hoi4 = 11064 hoi4 = 131 hoi4 = 9090 hoi4 = 6205 hoi4 = 3178 hoi4 = 11266 hoi4 = 6062 hoi4 = 6196 } # Inverness -> land, land, land, land, land, land, land, land, land, land, land, land, land - link = { vic2 = 268 hoi4 = 6300 hoi4 = 3150 hoi4 = 159 } # Dundee -> land, land, land - link = { vic2 = 270 hoi4 = 9383 hoi4 = 6385 hoi4 = 3273 hoi4 = 284 hoi4 = 3373 hoi4 = 6395 } # Stirling -> land, land, land, land, land, land - link = { vic2 = 271 hoi4 = 6350 hoi4 = 9237 hoi4 = 6320 } # Glasgow -> land, land, land + link = { vic2 = 268 hoi4 = 3150 hoi4 = 6300 hoi4 = 11306 } # Dundee -> land, land, land + link = { vic2 = 270 hoi4 = 6385 hoi4 = 284 hoi4 = 3373 hoi4 = 159 hoi4 = 9383 } # Stirling -> land, land, land, land, land + link = { vic2 = 271 hoi4 = 3273 hoi4 = 6320 hoi4 = 9237 hoi4 = 6350 hoi4 = 6395 } # Glasgow -> land, land, land, land, land link = { vic2 = 269 hoi4 = 9392 hoi4 = 11378 } # Edinburgh -> land, land link = { vic2 = 272 hoi4 = 9314 hoi4 = 11218 hoi4 = 9350 } # Dumfries -> land, land, land link = { vic2 = 295 } # St Albans -> DROPPED @@ -6182,14 +6180,14 @@ # Australia link = { vic2 = 2473 hoi4 = 2146 hoi4 = 5161 hoi4 = 1667 hoi4 = 4836 hoi4 = 5134 hoi4 = 10455 hoi4 = 11019 } # Wagga Wagga -> land, land, land, land, land, land, land link = { vic2 = 2474 hoi4 = 4673 hoi4 = 4500 hoi4 = 4453 hoi4 = 4478 hoi4 = 7649 hoi4 = 4658 hoi4 = 7471 hoi4 = 7533 hoi4 = 12377 } # Moree -> land, land, land, land, land, land, land, land, land - link = { vic2 = 2470 hoi4 = 1611 hoi4 = 7664 hoi4 = 10500 } # Port Macquarie -> land, land, land + link = { vic2 = 2470 vic2 = 2508 hoi4 = 1611 hoi4 = 7664 hoi4 = 10500 } # MANY-TO-MANY: Port Macquarie, Norfolk Island -> land, land, land link = { vic2 = 2469 hoi4 = 7450 hoi4 = 7496 hoi4 = 7520 } # Newcastle -> land, land, land link = { vic2 = 2471 hoi4 = 12435 hoi4 = 10682 hoi4 = 10427 hoi4 = 10388 hoi4 = 1537 } # Ophir -> land, land, land, land, land link = { vic2 = 2472 hoi4 = 12560 hoi4 = 4763 hoi4 = 12532 hoi4 = 7859 hoi4 = 1861 } # Eden -> land, land, land, land, land link = { vic2 = 2468 hoi4 = 12406 hoi4 = 4864 } # Sydney -> land, land link = { vic2 = 2475 hoi4 = 8249 hoi4 = 2114 hoi4 = 12934 hoi4 = 10977 hoi4 = 2163 hoi4 = 8234 hoi4 = 12968 } # Broken Hill -> land, land, land, land, land, land, land link = { vic2 = 2486 hoi4 = 12451 hoi4 = 1570 hoi4 = 7592 hoi4 = 4546 hoi4 = 4530 hoi4 = 4517 hoi4 = 1472 hoi4 = 4502 } # Toowoomba -> land, land, land, land, land, land, land, land - link = { vic2 = 2483 vic2 = 2508 hoi4 = 7564 hoi4 = 10445 hoi4 = 10458 hoi4 = 7535 hoi4 = 10430 } # MANY-TO-MANY: Brisbane, Norfolk Island -> land, land, land, land, land + link = { vic2 = 2483 hoi4 = 7564 hoi4 = 10445 hoi4 = 10458 hoi4 = 7535 hoi4 = 10430 } # Brisbane -> land, land, land, land, land link = { vic2 = 2485 hoi4 = 7666 hoi4 = 4632 hoi4 = 7610 hoi4 = 12424 hoi4 = 12411 hoi4 = 1557 } # Clermont -> land, land, land, land, land, land link = { vic2 = 2484 hoi4 = 10460 hoi4 = 10487 hoi4 = 7522 hoi4 = 12308 hoi4 = 7651 hoi4 = 10475 hoi4 = 4481 } # Gladstone -> land, land, land, land, land, land, land link = { vic2 = 2490 hoi4 = 10941 hoi4 = 2116 hoi4 = 5227 hoi4 = 11006 hoi4 = 5198 hoi4 = 12949 } # Charleville -> land, land, land, land, land, land @@ -6240,9 +6238,9 @@ link = { vic2 = 2285 hoi4 = 5023 } # Galápagos -> land link = { vic2 = 2623 hoi4 = 13052 } # Midway Island -> land link = { vic2 = 2336 hoi4 = 1280 } # Easter Island -> land - link = { vic2 = 801 vic2 = 2545 vic2 = 2551 vic2 = 2552 vic2 = 2553 hoi4 = 12148 hoi4 = 10188 } # MANY-TO-MANY: Tahiti, Rarotonga, Marquesas, Pitcairn, Tuamotus -> land, land - link = { vic2 = 2544 vic2 = 2548 hoi4 = 13080 } # Pago Pago, Niue -> land - link = { vic2 = 2547 vic2 = 2543 vic2 = 2546 hoi4 = 7290 } # Tokelau, Apia, Tongareva -> land + link = { vic2 = 801 vic2 = 2551 vic2 = 2552 vic2 = 2553 hoi4 = 12148 hoi4 = 10188 } # MANY-TO-MANY: Tahiti, Marquesas, Pitcairn, Tuamotus -> land, land + link = { vic2 = 2544 hoi4 = 13080 } # Pago Pago -> land + link = { vic2 = 2547 vic2 = 2543 hoi4 = 7290 } # Tokelau, Apia -> land link = { vic2 = 686 hoi4 = 13053 hoi4 = 13049 hoi4 = 13050 } # Line Islands -> land, land, land link = { vic2 = 2526 hoi4 = 13048 } # Palmyra -> land link = { vic2 = 658 hoi4 = 12021 hoi4 = 10048 hoi4 = 7195 hoi4 = 4180 hoi4 = 7112 hoi4 = 13051 } # Hawaii -> land, land, land, land, land, land @@ -6259,7 +6257,7 @@ link = { vic2 = 2523 hoi4 = 13038 } # Nauru -> land link = { vic2 = 2527 hoi4 = 7393 hoi4 = 13022 hoi4 = 13021 hoi4 = 4387 hoi4 = 13020 } # Gilbert Islands -> land, land, land, land, land link = { vic2 = 2541 hoi4 = 13056 hoi4 = 13057 hoi4 = 13055 hoi4 = 13054 } # Ellice Islands -> land, land, land, land - link = { vic2 = 2454 vic2 = 2520 vic2 = 2540 vic2 = 2542 hoi4 = 4286 hoi4 = 12159 hoi4 = 7302 } # MANY-TO-MANY: Fiji, Taveuni, Tonga, Wallis and Futuna -> land, land, land + link = { vic2 = 2454 vic2 = 2520 vic2 = 2542 hoi4 = 4286 hoi4 = 12159 hoi4 = 7302 } # MANY-TO-MANY: Fiji, Taveuni, Wallis and Futuna -> land, land, land # # Atlantic Islands link = { vic2 = 2134 hoi4 = 1751 } # Azores -> land @@ -6268,8 +6266,7 @@ link = { vic2 = 1955 hoi4 = 1903 } # Fernando Pó -> land link = { vic2 = 2133 hoi4 = 10995 } # South Georgia -> land link = { vic2 = 2130 hoi4 = 13013 } # Ascension -> land - link = { vic2 = 2129 hoi4 = 13016 } # Saint Helena -> land - link = { vic2 = 2132 } # Tristan da Cunha -> DROPPED + link = { vic2 = 2129 vic2 = 2132 hoi4 = 13016 } # Saint Helena, Tristan da Cunha -> land # # # ########## diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4Country.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4Country.cpp index c4d80c646..6e8d5f8b6 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4Country.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4Country.cpp @@ -19,61 +19,43 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + #include "HoI4Country.h" #include "HoI4World.h" -#include #include "Log.h" #include "ParadoxParserUTF8.h" #include "HoI4Faction.h" #include "HoI4Leader.h" #include "HoI4Minister.h" #include "../Mappers/CountryMapping.h" +#include "../Mappers/GovernmentMapper.h" +#include "../Mappers/NamesMapper.h" +#include "../Mappers/GraphicsMapper.h" #include "../Mappers/V2Localisations.h" #include "../V2World/V2Relations.h" #include "../V2World/V2Party.h" #include "../Mappers/ProvinceMapper.h" #include "OSCompatibilityLayer.h" +#include +#include -enum ideaologyType { - national_socialist = 0, - fascistic = 1, - paternal_autocrat = 2, - social_conservative = 3, - market_liberal = 4, - social_liberal = 5, - social_democrat = 6, - left_wing_radical = 7, - leninist = 8, - stalinist = 9 -}; - -const char* const ideologyNames[stalinist + 1] = { - "national_socialist", - "fascistic", - "paternal_autocrat", - "social_conservative", - "market_libera", - "social_libera", - "social_democrat", - "left_wing_radica", - "leninist", - "stalinist" -}; - -HoI4Country::HoI4Country(string _tag, string _commonCountryFile, HoI4World* _theWorld, bool _newCountry /* = false */) + + +HoI4Country::HoI4Country(string _tag, string _commonCountryFile, HoI4World* _theWorld) { theWorld = _theWorld; - newCountry = _newCountry; tag = _tag; commonCountryFile = _commonCountryFile; - commonCountryFile.insert(1, tag + "-"); provinces.clear(); technologies.clear(); capital = 0; - ideology = "despotism"; - government = ""; + governmentIdeology = "neutrality"; + leaderIdeology = "neutrality"; + rulingParty = nullptr; + faction = nullptr; factionLeader = false; @@ -90,520 +72,22 @@ HoI4Country::HoI4Country(string _tag, string _commonCountryFile, HoI4World* _the relations.clear(); allies.clear(); practicals.clear(); - parties.clear(); ministers.clear(); rulingMinisters.clear(); graphicalCulture = "Generic"; majorNation = false; - communismPopularity = 0; - democraticPopularity = 80; - facismPopularity = 0; - neutralityPopularity = 20; - liberalPopularity = 0; - socialistPopularity = 0; - ancapPopularity = 0; - syndicalistPopularity = 0; - autocraticPopularity = 0; - greatPower = false; nationalFocus = nullptr; - srcCountry = NULL; -} - -void HoI4Country::output(const map& states, const vector& Factions) const -{ - // output history file - ofstream output; - - if (((capital > 0) && (capital <= static_cast(states.size()))) - && newCountry - ) - { - output.open("Output/" + Configuration::getOutputName() + "/history/countries/" + Utils::convertUTF8ToASCII(filename)); - if (!output.is_open()) - { - Log(LogLevel::Error) << "Could not open " << "Output/" << Configuration::getOutputName() << "/history/countries" << Utils::convertUTF8ToASCII(filename); - exit(-1); - } - output << "\xEF\xBB\xBF"; // add the BOM to make HoI4 happy - if (newCountry) - { - output << "capital = " << capital << endl; - } - else - { - output << "capital = 1" << endl; - } - if (majorNation) - { - output << "set_research_slots = 4" << endl; - } - - output << "" << endl; - output << "oob = \"" << tag << "_OOB\"" << endl; - output << "" << endl; - output << "# Starting tech" << endl; - output << "set_technology = {" << endl; - for (auto tech : technologies) - { - output << tech.first << " = 1" << endl; - } - output << "}" << endl; - output << "set_convoys = " + to_string(convoys) << endl; - output << "1939.1.1 = {" << endl; - output << "" << endl; - output << " " << endl; - output << "}" << endl; - output << "" << endl; - output << "set_politics = {" << endl; - output << "" << endl; - output << " parties = {" << endl; - output << " democratic = { " << endl; - output << " popularity = " << democraticPopularity << endl; - output << " }" << endl; - output << "" << endl; - output << " liberal = {" << endl; - output << " popularity = " << liberalPopularity << endl; - output << " }" << endl; - output << " " << endl; - output << " socialist = {" << endl; - output << " popularity = " << socialistPopularity << endl; - output << " }" << endl; - output << " " << endl; - output << " syndicalism = {" << endl; - output << " popularity = " << syndicalistPopularity << endl; - output << " }" << endl; - output << " " << endl; - output << " ancap = {" << endl; - output << " popularity = " << ancapPopularity << endl; - output << " }" << endl; - output << " " << endl; - output << " fascism = {" << endl; - output << " popularity = " << facismPopularity << endl; - output << " }" << endl; - output << " " << endl; - output << " communism = {" << endl; - output << " popularity = " << communismPopularity << endl; - output << " }" << endl; - output << " " << endl; - output << " autocratic = {" << endl; - output << " popularity = " << autocraticPopularity << endl; - output << " }" << endl; - output << " " << endl; - output << " neutrality = { " << endl; - output << " popularity = " << neutralityPopularity << endl; - output << " }" << endl; - output << " }" << endl; - output << " " << endl; - - if (rulingHoI4Ideology == "") - { - output << " ruling_party = neutrality" << endl; - } - else - { - output << " ruling_party = " << rulingHoI4Ideology << endl; - } - - output << " last_election = \"1936.1.1\"" << endl; - output << " election_frequency = 48" << endl; - output << " elections_allowed = no" << endl; - output << "}" << endl; - - outputRelations(output); - - output << "" << endl; - for (auto Faction : Factions) - { - if (Faction->getLeader()->getTag() == tag) - { - output << "create_faction = \"Alliance of " + getSourceCountry()->getName("english") + "\"\n"; - for (auto factionmem : Faction->getMembers()) - { - output << "add_to_faction = " + factionmem->getTag() + "\n"; - } - } - } - output << endl; - output << "add_ideas = {\n"; - if (majorNation) - output << "great_power\n"; - if (!civilized) - output << "uncivilized\n"; - if (RulingPartyModel.war_pol == "jingoism") - output << "partial_economic_mobilisation\n"; - if (RulingPartyModel.war_pol == "pro_military") - output << "low_economic_mobilisation\n"; - output << "}\n"; - output << "create_country_leader = {" << endl; - output << " name = \"Jigme Wangchuck\"" << endl; - output << " desc = \"POLITICS_JIGME_WANGCHUCK_DESC\"" << endl; - output << " picture = \"gfx / leaders / Asia / Portrait_Asia_Generic_2.dds\"" << endl; - output << " expire = \"1965.1.1\"" << endl; - output << " ideology = " << ideology << endl; - output << " traits = {" << endl; - output << " #" << endl; - output << " }" << endl; - output << "}" << endl; - output << "" << endl; - output << "1939.1.1 = {" << endl; - output << " " << endl; - output << "}" << endl; - output.close(); - - // output OOB file - outputOOB(); - - // output leaders file - //outputLeaders(); - outputCommonCountryFile(); - - /*fprintf(output, "graphical_culture = %s\n", graphicalCulture.c_str()); - fprintf(output, "\n"); - if (majorNation) - { - fprintf(output, "major = yes\n"); - fprintf(output, "\n"); - } - fprintf(output, "default_templates = {\n"); - fprintf(output, " generic_infantry = {\n"); - fprintf(output, " infantry_brigade\n"); - fprintf(output, " infantry_brigade\n"); - fprintf(output, " infantry_brigade\n"); - fprintf(output, " }\n"); - fprintf(output, " generic_milita = {\n"); - fprintf(output, " militia_brigade\n"); - fprintf(output, " militia_brigade\n"); - fprintf(output, " militia_brigade\n"); - fprintf(output, " }\n"); - fprintf(output, " generic_armoured = {\n"); - fprintf(output, " armor_brigade\n"); - fprintf(output, " motorized_brigade\n"); - fprintf(output, " motorized_brigade\n"); - fprintf(output, " }\n"); - fprintf(output, " generic_cavalry = {\n"); - fprintf(output, " cavalry_brigade\n"); - fprintf(output, " cavalry_brigade\n"); - fprintf(output, " }\n"); - fprintf(output, "}\n"); - fprintf(output, "\n"); - fprintf(output, "unit_names = {\n");*/ - //fprintf(output, " infantry_brigade = {\n"); - //fprintf(output, " \"Faizabad Division\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " cavalry_brigade = {\n"); - //fprintf(output, " \"Faizabad Cavalry\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " motorized_brigade = {\n"); - //fprintf(output, " \"Faizabad Motor Div.\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " mechanized_brigade = {\n"); - //fprintf(output, " \"Faizabad Half Track Div.\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " light_armor_brigade = {\n"); - //fprintf(output, " \"Faizabad Armoured Div.\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " armor_brigade = {\n"); - //fprintf(output, " \"Faizabad Armoured Div.\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " paratrooper_brigade = {\n"); - //fprintf(output, " \"Faizabad Para Division\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " marine_brigade = {\n"); - //fprintf(output, " \"Faizabad Marine Division\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " bergsjaeger_brigade = {\n"); - //fprintf(output, " \"Faizabad Mountain Division\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " garrison_brigade = {\n"); - //fprintf(output, " \"Faizabad Division\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " hq_brigade = {\n"); - //fprintf(output, " \"1st Afghanestani Army\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " militia_brigade = {\n"); - //fprintf(output, " \"Faizabad Militia\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " multi_role = {\n"); - //fprintf(output, " \"I.Fighter Group\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " interceptor = {\n"); - //fprintf(output, " \"I.Fighter Group\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " strategic_bomber = {\n"); - //fprintf(output, " \"I.Strategic Group\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " tactical_bomber = {\n"); - //fprintf(output, " \"I.Tactical Group\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " naval_bomber = {\n"); - //fprintf(output, " \"I.Naval Bomber Group\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " cas = {\n"); - //fprintf(output, " \"I.Dive Bomber Group\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " transport_plane = {\n"); - //fprintf(output, " \"I.Air Transport Group\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " battleship = {\n"); - //fprintf(output, " \"RAS Afghanistan\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " heavy_cruiser = {\n"); - //fprintf(output, " \"RAS Faizabad\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " destroyer = {\n"); - //fprintf(output, " \"D1 / D2 / D3\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " carrier = {\n"); - //fprintf(output, " \"RAS Zahir Shah\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " submarine = {\n"); - //fprintf(output, " \"1. Submarine Flotilla\"\n"); - //fprintf(output, " }\n"); - //fprintf(output, " transport_ship = {\n"); - //fprintf(output, " \"1. Troop Transport Flotilla\"\n"); - //fprintf(output, " }\n"); - /*fprintf(output, "}\n"); - fprintf(output, "\n"); - fprintf(output, "ministers = {\n"); - for (auto ministerItr: ministers) - { - ministerItr.output(output); - } - fprintf(output, "}\n");*/ - //output.close(); - } - - if (nationalFocus != nullptr) - { - nationalFocus->output(); - } -} - -void HoI4Country::outputCommonCountryFile() const -{ - ofstream output; - output.open("Output/" + Configuration::getOutputName() + "/common/countries/" + Utils::convertUTF8ToASCII(commonCountryFile)); - if (!output.is_open()) - { - Log(LogLevel::Error) << "Could not open " << "Output/" << Configuration::getOutputName() << "/common/countries/" << Utils::convertUTF8ToASCII(commonCountryFile); - exit(-1); - } - - int red = 0; - int green = 0; - int blue = 0; - color.GetRGB(red, green, blue); - output << "color = { " << red << " " << green << " " << blue << " }" << endl; - - output.close(); -} - -void HoI4Country::outputColors(ofstream& out) const -{ - int red; - int green; - int blue; - color.GetRGB(red, green, blue); - - out << tag << " = {\n"; - out << "\tcolor = rgb { " << red << " " << green << " " << blue << " }\n"; - out << "\tcolor_ui = rgb { " << red << " " << green << " " << blue << " }"; - out << "}\n"; -} - - -void HoI4Country::outputToCommonCountriesFile(ofstream& countriesFile) const -{ - countriesFile << tag.c_str() << " = \"countries" << Utils::convertUTF8ToASCII(commonCountryFile) << "\"\n"; -} - - -void HoI4Country::outputPracticals(FILE* output) const -{ - fprintf(output, "\n"); - for (auto itr : practicals) - { - if (itr.second > 0.0) - { - fprintf(output, "%s = %.2f\n", itr.first.c_str(), min(20.0, itr.second)); - } - } -} - -void HoI4Country::outputTech(FILE* output) const -{ - fprintf(output, "\n"); - for (auto itr : technologies) - { - fprintf(output, "%s = %d\n", itr.first.c_str(), itr.second); - } -} - -void HoI4Country::outputParties(FILE* output) const -{ - /*fprintf(output, "popularity = {\n"); - for (auto party: parties) - { - fprintf(output, "\t%s = %d\n", party.ideology.c_str(), party.popularity); - } - fprintf(output, "}\n"); - fprintf(output, "\n"); - - fprintf(output, "organization = {\n"); - for (auto party : parties) - { - fprintf(output, "\t%s = %d\n", party.ideology.c_str(), party.organization); - } - fprintf(output, "}\n"); - fprintf(output, "\n"); - - FILE* partyLocalisations; - if (fopen_s(&partyLocalisations, ("Output/" + Configuration::getOutputName() + "/localisation/Parties.csv").c_str(), "a") != 0) - { - LOG(LogLevel::Error) << "Could not open " << "Output/" << Configuration::getOutputName() << "/localisation/Parties.csv"; - exit(-1); - } - for (auto party: parties) - { - fprintf(partyLocalisations, "%s;\n", party.localisationString.c_str()); - } - fclose(partyLocalisations);*/ -} - -void HoI4Country::outputLeaders() const -{ - FILE* leadersFile; - if (fopen_s(&leadersFile, ("Output/" + Configuration::getOutputName() + "/history/leaders/" + tag + ".txt").c_str(), "w") != 0) - { - LOG(LogLevel::Error) << "Could not open " << "Output/" << Configuration::getOutputName() << "/history/leaders/" << tag << ".txt"; - } - int landLeaders = 0; - int seaLeaders = 0; - int airLeaders = 0; - for (auto leader : leaders) - { - leader.output(leadersFile); - - if (leader.getType() == "land") - { - landLeaders++; - } - else if (leader.getType() == "sea") - { - seaLeaders++; - } - else if (leader.getType() == "air") - { - airLeaders++; - } - else - { - LOG(LogLevel::Warning) << "Leader of unknown type in " << tag; - } - } - fclose(leadersFile); - - LOG(LogLevel::Info) << tag << " has " << landLeaders << " land leaders, " << seaLeaders << " sea leaders, and " << airLeaders << " air leaders."; -} - - -void HoI4Country::outputRelations(ofstream& output) const -{ - for (auto relation: relations) - { - if (relation.first != tag) - { - output << "add_opinion_modifier = { target = " << relation.first << " modifier = "; - if (relation.second->getRelations() < 0) - { - output << "negative_"; - } - else - { - output << "positive_"; - } - output << abs(relation.second->getRelations()) << " }\n"; - } - } + srcCountry = nullptr; + human = false; } -void HoI4Country::outputOOB() const -{ - ofstream output("Output/" + Configuration::getOutputName() + "/history/units/" + tag + "_OOB.txt"); - if (!output.is_open()) - { - Log(LogLevel::Error) << "Could not open Output/" << Configuration::getOutputName() << "/history/units/" << tag << "_OOB.txt"; - exit(-1); - } - output << "\xEF\xBB\xBF"; // add the BOM to make HoI4 happy - - /*for (auto armyItr: armies) - { - if (armyItr->getProductionQueue()) - { - armyItr->outputIntoProductionQueue(output, tag); - } - else - { - armyItr->output(output); - } - }*/ - output << "start_equipment_factor = 0\n"; - for (auto divisionTemplate : divisionTemplates) - { - output << divisionTemplate; - output << endl; - } - output << "### No BHU air forces ###\n"; - output << "instant_effect = {\n"; - output << "\tadd_equipment_production = {\n"; - output << "\t\tequipment = {\n"; - output << "\t\t\ttype = infantry_equipment_0\n"; - output << "\t\t\tcreator = \"" << tag << "\"\n"; - output << "\t\t}\n"; - output << "\t\trequested_factories = 1\n"; - output << "\t\tprogress = 0.88\n"; - output << "\t\tefficiency = 100\n"; - output << "\t}\n"; - output << "}\n"; - output << "units = {\n"; - for (auto division : divisions) - { - output << division; - } - if (ships.size() > 0) - { - output << "\tnavy = {" << endl; - output << "\t\tname = \"Grand Fleet\"" << endl; - output << "\t\tlocation = " << navalLocation << endl; - for (auto ship : ships) - { - output << ship; - } - output << "\t}" << endl; - } - output << "}\n"; - if (planes.size() > 0) - { - output << "air_wings = {\n"; - output << "\t" << capital << " = {\n"; - for (auto plane : planes) - { - output << plane; - } - output << "\t}\n"; - output << "}\n"; - } - output.close(); -} - -void HoI4Country::initFromV2Country(const V2World& _srcWorld, const V2Country* _srcCountry, const string _vic2ideology, map& leaderMap, governmentJobsMap governmentJobs, const namesMapping& namesMap, portraitMapping& portraitMap, const cultureMapping& cultureMap, personalityMap& landPersonalityMap, personalityMap& seaPersonalityMap, backgroundMap& landBackgroundMap, backgroundMap& seaBackgroundMap, const map& stateMap, map states) +void HoI4Country::initFromV2Country(const V2World& _srcWorld, const V2Country* _srcCountry, const string _vic2ideology, map& leaderMap, governmentJobsMap governmentJobs, portraitMapping& portraitMap, const cultureMapping& cultureMap, personalityMap& landPersonalityMap, personalityMap& seaPersonalityMap, backgroundMap& landBackgroundMap, backgroundMap& seaBackgroundMap, const map& stateMap, map states) { srcCountry = _srcCountry; filename = Utils::GetFileFromTag("./blankMod/output/history/countries/", tag); @@ -613,12 +97,11 @@ void HoI4Country::initFromV2Country(const V2World& _srcWorld, const V2Country* _ } if (filename == "") { - string countryName = commonCountryFile; - int lastSlash = countryName.find_last_of("/"); - countryName = countryName.substr(lastSlash + 1, countryName.size()); - filename = tag + " - " + countryName; + filename = tag + " - " + commonCountryFile; } + human = _srcCountry->isHuman(); + // Color color = srcCountry->getColor(); @@ -637,53 +120,19 @@ void HoI4Country::initFromV2Country(const V2World& _srcWorld, const V2Country* _ } // Government - string srcGovernment = srcCountry->getGovernment(); - if (srcGovernment.size() > 0) - { - government = governmentMapper::getInstance()->getGovernmentForCountry(srcCountry, _vic2ideology); - if (government.empty()) - { - government = ""; - LOG(LogLevel::Warning) << "No government mapping defined for " << srcGovernment << " (" << srcCountry->getTag() << " -> " << tag << ')'; - } - } - if (tag == "X64") - { - ideology = "fascism"; - } + governmentIdeology = governmentMapper::getIdeologyForCountry(srcCountry, _vic2ideology); + leaderIdeology = governmentMapper::getLeaderIdeologyForCountry(srcCountry, _vic2ideology); + // Political parties - convertParties(_srcCountry, _srcCountry->getActiveParties(_srcWorld.getParties()), _srcCountry->getRulingParty(_srcWorld.getParties()), ideology); - for (auto partyItr : parties) - { - auto oldLocalisation = V2Localisations::GetTextInEachLanguage(partyItr.name); - partyItr.localisationString = partyItr.ideology + "_" + tag; - auto localisationItr = oldLocalisation.begin(); - localisationItr++; - for (; localisationItr != oldLocalisation.end(); localisationItr++) - { - partyItr.localisationString += ";" + localisationItr->second; - } - } + rulingParty = _srcCountry->getRulingParty(_srcWorld.getParties()); + parties = _srcCountry->getActiveParties(_srcWorld.getParties()); // Ministers - vector firstNames; - vector lastNames; - auto namesItr = namesMap.find(srcCountry->getPrimaryCulture()); - if (namesItr != namesMap.end()) - { - firstNames = namesItr->second.first; - lastNames = namesItr->second.second; - } - else - { - firstNames.push_back("nul"); - lastNames.push_back("nul"); - } - for (unsigned int ideologyIdx = 0; ideologyIdx <= stalinist; ideologyIdx++) + /*for (unsigned int ideologyIdx = 0; ideologyIdx <= stalinist; ideologyIdx++) { for (auto job : governmentJobs) { - HoI4Minister newMinister(firstNames, lastNames, ideologyNames[ideologyIdx], job, governmentJobs, portraitMap[graphicalCulture]); + HoI4Minister newMinister(namesMapper::getMaleNames(srcCountry->getPrimaryCulture()), namesMapper::getSurnames(srcCountry->getPrimaryCulture()), ideologyNames[ideologyIdx], job, governmentJobs, portraitMap[graphicalCulture]); ministers.push_back(newMinister); if (ideologyNames[ideologyIdx] == ideology) @@ -691,13 +140,14 @@ void HoI4Country::initFromV2Country(const V2World& _srcWorld, const V2Country* _ rulingMinisters.push_back(newMinister); } } - } + }*/ // Faction is handled in HoI4World::configureFactions nationalUnity = 70.0 + (_srcCountry->getRevanchism() / 0.05) - (_srcCountry->getWarExhaustion() / 2.5); // civil law - democracies get open society, communist dicatorships get totalitarian, everyone else gets limited restrictions + string srcGovernment = srcCountry->getGovernment(); if (srcGovernment == "democracy" || srcGovernment == "hms_government") { civil_law = "open_society"; @@ -821,6 +271,7 @@ void HoI4Country::initFromV2Country(const V2World& _srcWorld, const V2Country* _ majorNation = srcCountry->isGreatNation(); } + void HoI4Country::determineCapitalFromVic2(const map& provinceToStateIDMap, const map& states) { int oldCapital = srcCountry->getCapital(); @@ -895,10 +346,7 @@ void HoI4Country::initFromHistory() if (filename == "") { - string countryName = commonCountryFile; - int lastSlash = countryName.find_last_of("/"); - countryName = countryName.substr(lastSlash + 1, countryName.size()); - filename = tag + " - " + countryName; + filename = tag + " - " + commonCountryFile; return; } else @@ -914,16 +362,10 @@ void HoI4Country::initFromHistory() exit(-1); } - vector results = obj->getValue("government"); - if (results.size() > 0) - { - government = results[0]->getLeaf(); - } - - results = obj->getValue("ideology"); + auto results = obj->getValue("ideology"); if (results.size() > 0) { - ideology = results[0]->getLeaf(); + governmentIdeology = results[0]->getLeaf(); } results = obj->getValue("capital"); @@ -933,22 +375,50 @@ void HoI4Country::initFromHistory() } } -void HoI4Country::generateLeaders(leaderTraitsMap leaderTraits, const namesMapping& namesMap, portraitMapping& portraitMap) + +void HoI4Country::setGovernmentToNeutral() +{ + governmentIdeology = "neutrality"; + leaderIdeology += "_neutral"; +} + + +void HoI4Country::convertIdeologySupport(const set& majorIdeologies) { - vector firstNames; - vector lastNames; - auto namesItr = namesMap.find(srcCountry->getPrimaryCulture()); - if (namesItr != namesMap.end()) + for (auto upperHouseIdeology: srcCountry->getUpperHouseComposition()) + { + string ideology = governmentMapper::getSupportedIdeology(governmentIdeology, upperHouseIdeology.first); + if (majorIdeologies.count(ideology) == 0) + { + ideology = "neutrality"; + } + + auto supportItr = ideologySupport.find(ideology); + if (supportItr == ideologySupport.end()) + { + ideologySupport.insert(make_pair(ideology, 0)); + supportItr = ideologySupport.find(ideology); + } + supportItr->second += static_cast(upperHouseIdeology.second * 100); + } + + int remainingSupport = 100; + for (auto ideology: ideologySupport) { - firstNames = namesItr->second.first; - lastNames = namesItr->second.second; + remainingSupport -= ideology.second; } - else + auto supportItr = ideologySupport.find("neutrality"); + if (supportItr == ideologySupport.end()) { - firstNames.push_back("nul"); - lastNames.push_back("nul"); + ideologySupport.insert(make_pair("neutrality", 0)); + supportItr = ideologySupport.find("neutrality"); } + supportItr->second += remainingSupport; +} + +void HoI4Country::generateLeaders(leaderTraitsMap leaderTraits, portraitMapping& portraitMap) +{ // generated leaders int totalOfficers = 0; /*vector srcProvinces = srcCountry->getCores(); @@ -973,7 +443,7 @@ void HoI4Country::generateLeaders(leaderTraitsMap leaderTraits, const namesMappi } for (unsigned int i = 0; i <= totalLand; i++) { - HoI4Leader newLeader(firstNames, lastNames, tag, "land", leaderTraits, portraitMap[graphicalCulture]); + HoI4Leader newLeader(namesMapper::getMaleNames(srcCountry->getPrimaryCulture()), namesMapper::getSurnames(srcCountry->getPrimaryCulture()), tag, "land", leaderTraits, portraitMap[graphicalCulture]); leaders.push_back(newLeader); } @@ -1000,7 +470,7 @@ void HoI4Country::generateLeaders(leaderTraitsMap leaderTraits, const namesMappi } for (unsigned int i = 0; i <= totalSea; i++) { - HoI4Leader newLeader(firstNames, lastNames, tag, "sea", leaderTraits, portraitMap[graphicalCulture]); + HoI4Leader newLeader(namesMapper::getMaleNames(srcCountry->getPrimaryCulture()), namesMapper::getSurnames(srcCountry->getPrimaryCulture()), tag, "sea", leaderTraits, portraitMap[graphicalCulture]); leaders.push_back(newLeader); } @@ -1027,7 +497,7 @@ void HoI4Country::generateLeaders(leaderTraitsMap leaderTraits, const namesMappi } for (unsigned int i = 0; i <= totalAir; i++) { - HoI4Leader newLeader(firstNames, lastNames, tag, "air", leaderTraits, portraitMap[graphicalCulture]); + HoI4Leader newLeader(namesMapper::getMaleNames(srcCountry->getPrimaryCulture()), namesMapper::getSurnames(srcCountry->getPrimaryCulture()), tag, "air", leaderTraits, portraitMap[graphicalCulture]); leaders.push_back(newLeader); } } @@ -1711,775 +1181,503 @@ vector HoI4Country::getPortProvinces(vector locationCandidates, map V2Parties, V2Party* rulingParty, string& rulingIdeology) + +void HoI4Country::setTechnology(string tech, int level) +{ + // don't allow downgrades + map::iterator techEntry = technologies.find(tech); + if (techEntry == technologies.end() || technologies[tech] < level) + technologies[tech] = level; +} + +void HoI4Country::calculateIndustry() { - // sort Vic2 parties by ideology - map> V2Ideologies; - for (auto partyItr : V2Parties) + militaryFactories = 0.0; + civilianFactories = 0.0; + dockyards = 0.0; + for (auto state : states) { - string ideology = partyItr->ideology; - auto ideologyItr = V2Ideologies.find(ideology); - if (ideologyItr == V2Ideologies.end()) - { - vector newPartyVector; - newPartyVector.push_back(partyItr); - V2Ideologies.insert(make_pair(ideology, newPartyVector)); - } - else - { - ideologyItr->second.push_back(partyItr); - } + civilianFactories += state.second->getCivFactories(); + militaryFactories += state.second->getMilFactories(); + dockyards += state.second->getDockyards(); } - // prep unmapped HoI4 parties - map unmappedParties; - unmappedParties.insert(make_pair("national_socialist", "fascist_group")); - unmappedParties.insert(make_pair("fascistic", "fascist_group")); - unmappedParties.insert(make_pair("paternal_autocrat", "fascist_group")); - unmappedParties.insert(make_pair("social_conservative", "democratic_group")); - unmappedParties.insert(make_pair("market_liberal", "democratic_group")); - unmappedParties.insert(make_pair("social_liberal", "democratic_group")); - unmappedParties.insert(make_pair("social_democrat", "democratic_group")); - unmappedParties.insert(make_pair("left_wing_radical", "communist_group")); - unmappedParties.insert(make_pair("leninist", "communist_group")); - unmappedParties.insert(make_pair("stalinist", "communist_group")); - // map all the simplistic cases - auto ideologyItr = V2Ideologies.find("fascist"); - if ((ideologyItr != V2Ideologies.end())) - { - for (unsigned int i = 0; i < ideologyItr->second.size(); i++) - { - HoI4Party newParty; - newParty.name = ideologyItr->second[i]->name; - newParty.war_pol = ideologyItr->second[i]->war_policy; - newParty.ideology = "fascistic"; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage("fascist") * 100 + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty == ideologyItr->second[i]) - { - RulingPartyModel = newParty; - rulingIdeology = "fascistic"; - rulingHoI4Ideology = "fascism"; - } +} - V2Ideologies.erase(ideologyItr); - auto itr = unmappedParties.find("fascistic"); - unmappedParties.erase(itr); - } - } - ideologyItr = V2Ideologies.find("reactionary"); - if ((ideologyItr != V2Ideologies.end())) +void HoI4Country::reportIndustry(ofstream& out) +{ + if (states.size() > 0) { - for (unsigned int i = 0; i < ideologyItr->second.size(); i++) - { - HoI4Party newParty; - newParty.name = ideologyItr->second[i]->name; - newParty.war_pol = ideologyItr->second[i]->war_policy; - newParty.ideology = "paternal_autocrat"; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage("reactionary") * 100 + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty == ideologyItr->second[i]) - { - RulingPartyModel = newParty; - rulingIdeology = "paternal_autocrat"; - rulingHoI4Ideology = "autocratic"; - } - - V2Ideologies.erase(ideologyItr); - auto itr = unmappedParties.find("paternal_autocrat"); - unmappedParties.erase(itr); - } + out << tag << ','; + out << militaryFactories << ','; + out << civilianFactories << ','; + out << dockyards << ','; + out << militaryFactories + civilianFactories + dockyards << '\n'; } - ideologyItr = V2Ideologies.find("conservative"); - if ((ideologyItr != V2Ideologies.end())) - { - for (unsigned int i = 0; i < ideologyItr->second.size(); i++) - { - HoI4Party newParty; - newParty.name = ideologyItr->second[i]->name; - newParty.war_pol = ideologyItr->second[i]->war_policy; - newParty.ideology = "social_conservative"; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage("conservative") * 100 + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty == ideologyItr->second[i]) - { - RulingPartyModel = newParty; - rulingIdeology = "social_conservative"; - rulingHoI4Ideology = "democratic"; - } +} - V2Ideologies.erase(ideologyItr); - auto itr = unmappedParties.find("social_conservative"); - unmappedParties.erase(itr); - } - } - ideologyItr = V2Ideologies.find("socialist"); - if ((ideologyItr != V2Ideologies.end())) +void HoI4Country::addVPsToCapital(int VPs) +{ + auto capital = getCapital(); + if (capital != NULL) { - for (unsigned int i = 0; i < ideologyItr->second.size(); i++) - { - HoI4Party newParty; - newParty.name = ideologyItr->second[i]->name; - newParty.war_pol = ideologyItr->second[i]->war_policy; - newParty.ideology = "left_wing_radical"; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage("socialist") * 100 + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty == ideologyItr->second[i]) - { - RulingPartyModel = newParty; - rulingIdeology = "left_wing_radical"; - rulingHoI4Ideology = "socialist"; - } - - V2Ideologies.erase(ideologyItr); - auto itr = unmappedParties.find("left_wing_radical"); - unmappedParties.erase(itr); - } + capital->addVictoryPointValue(VPs); } - ideologyItr = V2Ideologies.find("communist"); - if ((ideologyItr != V2Ideologies.end())) - { - for (unsigned int i = 0; i < ideologyItr->second.size(); i++) - { - HoI4Party newParty; - newParty.name = ideologyItr->second[i]->name; - newParty.war_pol = ideologyItr->second[i]->war_policy; - newParty.ideology = "stalinist"; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage("communist") * 100 + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty == ideologyItr->second[i]) - { - RulingPartyModel = newParty; - rulingIdeology = "stalinist"; - rulingHoI4Ideology = "communism"; - } +} - V2Ideologies.erase(ideologyItr); - auto itr = unmappedParties.find("stalinist"); - unmappedParties.erase(itr); - } - } - ideologyItr = V2Ideologies.find("liberal"); - if ((ideologyItr != V2Ideologies.end())) +HoI4State* HoI4Country::getCapital(void) +{ + auto capitalItr = states.find(capital); + if (capitalItr == states.end()) { - for (unsigned int i = 0; i < ideologyItr->second.size(); i++) + if (states.size() > 0) { - HoI4Party newParty; - newParty.name = ideologyItr->second[i]->name; - newParty.war_pol = ideologyItr->second[i]->war_policy; - newParty.ideology = "social_liberal"; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage("liberal") * 100 + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty == ideologyItr->second[i]) - { - RulingPartyModel = newParty; - rulingIdeology = "social_liberal"; - rulingHoI4Ideology = "liberal"; - } - - V2Ideologies.erase(ideologyItr); - auto itr = unmappedParties.find("social_liberal"); - unmappedParties.erase(itr); + capitalItr = states.begin(); } - } - ideologyItr = V2Ideologies.find("anarcho_liberal"); - if ((ideologyItr != V2Ideologies.end())) - { - for (unsigned int i = 0; i < ideologyItr->second.size(); i++) + else { - HoI4Party newParty; - newParty.name = ideologyItr->second[i]->name; - newParty.war_pol = ideologyItr->second[i]->war_policy; - newParty.ideology = "market_liberal"; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage("anarcho_liberal") * 100 + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty == ideologyItr->second[i]) - { - RulingPartyModel = newParty; - rulingIdeology = "market_liberal"; - rulingHoI4Ideology = "ancap"; - } - - V2Ideologies.erase(ideologyItr); - auto itr = unmappedParties.find("market_liberal"); - unmappedParties.erase(itr); + return nullptr; } } - if (V2Ideologies.size() == 0) - { - setPartyPopularity(); - return; - } + return capitalItr->second; +} + +double HoI4Country::getStrengthOverTime(double years) const +{ + return getMilitaryStrength() + getEconomicStrength(years); +} + +double HoI4Country::getMilitaryStrength() const +{ + return armyStrength; +} + +double HoI4Country::getEconomicStrength(double years) const +{ + double militarySectorStrength = militaryFactories * 3 * 365 * years; + double civilianSectorStrength = civilianFactories * 0.469 * 0.5 * 3 * 365 * 0.5* years * years; /*.469 is milfac per year, .5 since half are used by consumer goods*/ + + return militarySectorStrength + civilianSectorStrength; +} + + +void HoI4Country::outputToCommonCountriesFile(ofstream& countriesFile) const +{ + countriesFile << tag.c_str() << " = \"countries/" << Utils::convertUTF8ToASCII(commonCountryFile) << "\"\n"; +} + + +void HoI4Country::outputColors(ofstream& out) const +{ + out << tag << " = {\n"; + out << "\tcolor = rgb { " << color << " }\n"; + out << "\tcolor_ui = rgb { " << color << " }"; + out << "}\n"; +} + + +void HoI4Country::outputToNamesFiles(ofstream& namesFile) const +{ + namesFile << tag << " = {\n"; + + namesFile << "\tmale = {\n"; + namesFile << "\t\tnames = {\n"; + outputNamesSet(namesFile, namesMapper::getMaleNames(srcCountry->getPrimaryCulture()), "\t\t\t"); + namesFile << "\t\t}\n"; + namesFile << "\t}\n"; + + namesFile << "\tfemale = {\n"; + namesFile << "\t\tnames = {\n"; + outputNamesSet(namesFile, namesMapper::getFemaleNames(srcCountry->getPrimaryCulture()), "\t\t\t"); + namesFile << "\t\t}\n"; + namesFile << "\t}\n"; + + namesFile << "\tsurnames = {\n"; + outputNamesSet(namesFile, namesMapper::getSurnames(srcCountry->getPrimaryCulture()), "\t\t"); + namesFile << "\t}\n"; - // map the simple excess cases - map> V2IdeologyGroups; - ideologyItr = V2Ideologies.find("fascist"); - if (ideologyItr != V2Ideologies.end()) + namesFile << "\tcallsigns = {\n"; + outputNamesSet(namesFile, namesMapper::getCallsigns(srcCountry->getPrimaryCulture()), "\t\t"); + namesFile << "\t}\n"; + + namesFile << "}\n"; +} + + +void HoI4Country::outputNamesSet(ofstream& namesFile, const vector& names, const string& tabs) const +{ + if (names[0] != "null") { - for (auto partyItr : ideologyItr->second) + namesFile << tabs; + + for (unsigned int i = 0; i < names.size(); i++) { - auto groupItr = V2IdeologyGroups.find("fascist_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else + namesFile << '\"' << names[i] << '\"'; + if (i == names.size()) { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("fascist_group", parties)); + continue; } - } - } - ideologyItr = V2Ideologies.find("reactionary"); - if (ideologyItr != V2Ideologies.end()) - { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("fascist_group"); - if (groupItr != V2IdeologyGroups.end()) + else if (((i + 1) % 10) == 0) { - groupItr->second.push_back(partyItr); + namesFile << "\n"; + namesFile << tabs; } else { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("fascist_group", parties)); + namesFile << " "; } } + + namesFile << '\n'; } - ideologyItr = V2Ideologies.find("conservative"); - if (ideologyItr != V2Ideologies.end()) +} + + +void HoI4Country::output(const map& states, const vector& Factions) const +{ + outputHistory(states, Factions); + outputOOB(); + outputCommonCountryFile(); + outputIdeas(); + + //fprintf(output, "graphical_culture = %s\n", graphicalCulture.c_str()); + + if (nationalFocus != nullptr) { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("democratic_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("democratic_group", parties)); - } - } + nationalFocus->output(); } - ideologyItr = V2Ideologies.find("socialist"); - if (ideologyItr != V2Ideologies.end()) +} + + +void HoI4Country::outputHistory(const map& states, const vector& Factions) const +{ + ofstream output("Output/" + Configuration::getOutputName() + "/history/countries/" + Utils::convertUTF8ToASCII(filename)); + if (!output.is_open()) { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("communist_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("communist_group", parties)); - } - } + Log(LogLevel::Error) << "Could not open " << "Output/" << Configuration::getOutputName() << "/history/countries" << Utils::convertUTF8ToASCII(filename); + exit(-1); } - ideologyItr = V2Ideologies.find("communist"); - if (ideologyItr != V2Ideologies.end()) + output << "\xEF\xBB\xBF"; // add the BOM to make HoI4 happy + + if (((capital > 0) && (capital <= static_cast(states.size())))) { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("communist_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("communist_group", parties)); - } - } + output << "capital = " << capital << '\n'; } - ideologyItr = V2Ideologies.find("liberal"); - if (ideologyItr != V2Ideologies.end()) + else if (states.size() > 0) { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("democratic_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("democratic_group", parties)); - } - } + output << "capital = " << states.begin()->first << '\n'; } - ideologyItr = V2Ideologies.find("anarcho_liberal"); - if (ideologyItr != V2Ideologies.end()) + else { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("democratic_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("democratic_group", parties)); - } - } + output << "capital = 1\n"; } - map> HoI4IdeologyGroups; - for (auto HoI4PartyItr : unmappedParties) + if (majorNation) { - auto groupItr = HoI4IdeologyGroups.find(HoI4PartyItr.second); - if (groupItr != HoI4IdeologyGroups.end()) - { - groupItr->second.push_back(HoI4PartyItr.first); - } - else - { - vector parties; - parties.push_back(HoI4PartyItr.first); - HoI4IdeologyGroups.insert(make_pair(HoI4PartyItr.second, parties)); - } + output << "set_research_slots = 4\n"; } - for (auto V2GroupItr : V2IdeologyGroups) - { - auto HoI4GroupItr = HoI4IdeologyGroups.find(V2GroupItr.first); - if ((HoI4GroupItr != HoI4IdeologyGroups.end()) && (V2GroupItr.second.size() <= HoI4GroupItr->second.size())) - { - for (auto V2PartyItr : V2GroupItr.second) - { - ideologyItr = V2Ideologies.find(V2PartyItr->ideology); - - HoI4Party newParty; - newParty.name = V2PartyItr->name; - newParty.ideology = HoI4GroupItr->second[0]; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage(ideologyItr->first) * 100 / ideologyItr->second.size() + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); - - if (rulingParty->name == V2PartyItr->name) - { - rulingIdeology = HoI4GroupItr->second[0]; - } - - HoI4GroupItr->second.erase(HoI4GroupItr->second.begin()); + output << "\n"; + output << "oob = \"" << tag << "_OOB\"\n"; + output << "\n"; - auto itr = unmappedParties.find(newParty.ideology); - unmappedParties.erase(itr); - } - for (auto V2PartyItr : V2GroupItr.second) - { - ideologyItr = V2Ideologies.find(V2PartyItr->ideology); - if (ideologyItr != V2Ideologies.end()) - { - V2Ideologies.erase(ideologyItr); - } - } - V2GroupItr.second.clear(); - } - if (HoI4GroupItr->second.size() == 0) - { - HoI4IdeologyGroups.erase(HoI4GroupItr); - } - } - if (V2Ideologies.size() == 0) + output << "# Starting tech\n"; + output << "set_technology = {\n"; + for (auto tech : technologies) { - setPartyPopularity(); - return; + output << tech.first << " = 1\n"; } + output << "}\n"; - // merge Vic2 parties by ideology, then map those cases - for (auto ideologyItr : V2Ideologies) - { - while (ideologyItr.second.size() > 1) - { - ideologyItr.second.pop_back(); - } - } + output << "set_convoys = " << convoys << '\n'; - V2IdeologyGroups.clear(); - ideologyItr = V2Ideologies.find("fascist"); - if (ideologyItr != V2Ideologies.end()) + output << "set_politics = {\n"; + output << "\n"; + output << " parties = {\n"; + for (auto ideology: ideologySupport) { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("fascist_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("fascist_group", parties)); - } - } + output << " " << ideology.first << " = {\n"; + output << " popularity = " << ideology.second << "\n"; + output << " }\n"; } - ideologyItr = V2Ideologies.find("reactionary"); - if (ideologyItr != V2Ideologies.end()) - { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("fascist_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("fascist_group", parties)); - } - } - } - ideologyItr = V2Ideologies.find("conservative"); - if (ideologyItr != V2Ideologies.end()) + output << " }\n"; + output << " \n"; + + output << " ruling_party = " << governmentIdeology << "\n"; + output << " last_election = \"1936.1.1\"\n"; + output << " election_frequency = 48\n"; + output << " elections_allowed = no\n"; + output << "}\n"; + + outputRelations(output); + output << "\n"; + + for (auto Faction : Factions) { - for (auto partyItr : ideologyItr->second) + if (Faction->getLeader()->getTag() == tag) { - auto groupItr = V2IdeologyGroups.find("democratic_group"); - if (groupItr != V2IdeologyGroups.end()) + output << "create_faction = \"Alliance of " + getSourceCountry()->getName("english") + "\"\n"; + for (auto factionmem : Faction->getMembers()) { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("democratic_group", parties)); + output << "add_to_faction = " + factionmem->getTag() + "\n"; } } } - ideologyItr = V2Ideologies.find("socialist"); - if (ideologyItr != V2Ideologies.end()) + output << '\n'; + + output << "add_ideas = {\n"; + if (majorNation) { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("communist_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("communist_group", parties)); - } - } + output << "\tgreat_power\n"; } - ideologyItr = V2Ideologies.find("communist"); - if (ideologyItr != V2Ideologies.end()) + if (!civilized) { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("communist_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("communist_group", parties)); - } - } + output << "\tuncivilized\n"; } - ideologyItr = V2Ideologies.find("liberal"); - if (ideologyItr != V2Ideologies.end()) + if (rulingParty->war_policy == "jingoism") { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("democratic_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("democratic_group", parties)); - } - } + output << "\tpartial_economic_mobilisation\n"; } - ideologyItr = V2Ideologies.find("anarcho_liberal"); - if (ideologyItr != V2Ideologies.end()) + if (rulingParty->war_policy == "pro_military") { - for (auto partyItr : ideologyItr->second) - { - auto groupItr = V2IdeologyGroups.find("democratic_group"); - if (groupItr != V2IdeologyGroups.end()) - { - groupItr->second.push_back(partyItr); - } - else - { - vector parties; - parties.push_back(partyItr); - V2IdeologyGroups.insert(make_pair("democratic_group", parties)); - } - } + output << "\tlow_economic_mobilisation\n"; } + output << "}\n"; - for (auto V2GroupItr : V2IdeologyGroups) - { - auto HoI4GroupItr = HoI4IdeologyGroups.find(V2GroupItr.first); - if ((HoI4GroupItr != HoI4IdeologyGroups.end()) && (V2GroupItr.second.size() <= HoI4GroupItr->second.size())) - { - for (auto V2PartyItr : V2GroupItr.second) - { - ideologyItr = V2Ideologies.find(V2PartyItr->ideology); - - HoI4Party newParty; - newParty.name = V2PartyItr->name; - newParty.ideology = HoI4GroupItr->second[0]; - newParty.popularity = static_cast(srcCountry->getUpperHousePercentage(ideologyItr->first) * 100 / ideologyItr->second.size() + 0.5); - newParty.organization = newParty.popularity; - parties.push_back(newParty); + outputCountryLeader(output); - HoI4GroupItr->second.erase(HoI4GroupItr->second.begin()); + output << "\n"; + output << "1939.1.1 = {\n"; + output << "}\n" << endl; + output.close(); +} - auto itr = unmappedParties.find(newParty.ideology); - unmappedParties.erase(itr); - if (rulingParty->ideology == V2PartyItr->ideology) - { - rulingIdeology = HoI4GroupItr->second[0]; - } +void HoI4Country::outputRelations(ofstream& output) const +{ + for (auto relation: relations) + { + if (relation.first != tag) + { + output << "add_opinion_modifier = { target = " << relation.first << " modifier = "; + if (relation.second->getRelations() < 0) + { + output << "negative_"; } - for (auto V2PartyItr : V2GroupItr.second) + else { - ideologyItr = V2Ideologies.find(V2PartyItr->ideology); - if (ideologyItr != V2Ideologies.end()) - { - V2Ideologies.erase(ideologyItr); - } + output << "positive_"; } - V2GroupItr.second.clear(); - } - if (HoI4GroupItr->second.size() == 0) - { - HoI4IdeologyGroups.erase(HoI4GroupItr); + output << abs(relation.second->getRelations()) << " }\n"; } } - - if (rulingHoI4Ideology == "") - { - rulingHoI4Ideology = "neutrality"; - } - - if (V2Ideologies.size() > 0) - { - LOG(LogLevel::Warning) << "Unmapped Vic2 parties for " << tag; - } - setPartyPopularity(); } -void HoI4Country::setPartyPopularity() -{ - communismPopularity = 0; - democraticPopularity = 0; - facismPopularity = 0; - neutralityPopularity = 0; - liberalPopularity = 0; - socialistPopularity = 0; - syndicalistPopularity = 0; - ancapPopularity = 0; - autocraticPopularity = 0; - - if (rulingHoI4Ideology == "fascism") - ideology = "fascism_ideology"; - else if (rulingHoI4Ideology == "democratic") - ideology = "democratic_conservative"; - else if (rulingHoI4Ideology == "ancap") - ideology = "anarcho_cap"; - else if (rulingHoI4Ideology == "communism") - ideology = "marxism"; - else if (rulingHoI4Ideology == "syndicalism") - ideology = "national_syndicalist"; - else if (rulingHoI4Ideology == "liberal") - ideology = "democratic_liberal"; - else if (rulingHoI4Ideology == "autocratic") - ideology = "absolute_monarchy"; - else if (rulingHoI4Ideology == "socialist") - ideology = "democratic_socialist "; - else - ideology = "despotism"; - for (auto party : parties) - { - if (party.name.find("fascist") != string::npos) - { - facismPopularity += party.popularity; - } - if (party.name.find("communist") != string::npos) - { - communismPopularity += party.popularity; - } - if (party.name.find("liberal") != string::npos) - { - liberalPopularity += party.popularity; - } - if (party.name.find("conservative") != string::npos && (government == "democratic" || government == "hms_government ")) - { - democraticPopularity += party.popularity; - } - if (party.name.find("conservative") != string::npos && government != "democratic" && government != "hms_government ") - { - autocraticPopularity += party.popularity; - } - if (party.name.find("socialist") != string::npos && (party.war_pol == "anti_military" || party.war_pol == "pacifism")) - { - socialistPopularity += party.popularity; - } - if (party.name.find("socialist") != string::npos && (party.war_pol == "pro_military" || party.war_pol == "jingoism")) - { - syndicalistPopularity += party.popularity; - } - if (party.name.find("anarcho_liberal") != string::npos) - { - ancapPopularity += party.popularity; - } - if (party.name.find("reactionary") != string::npos) - { - autocraticPopularity += party.popularity; - } - } -} -void HoI4Country::setTechnology(string tech, int level) +void HoI4Country::outputCountryLeader(ofstream& output) const { - // don't allow downgrades - map::iterator techEntry = technologies.find(tech); - if (techEntry == technologies.end() || technologies[tech] < level) - technologies[tech] = level; + string firstName = namesMapper::getMaleName(srcCountry->getPrimaryCulture()); + string surname = namesMapper::getSurname(srcCountry->getPrimaryCulture()); + string portrait = graphicsMapper::getLeaderPortrait(srcCountry->getPrimaryCultureGroup(), governmentIdeology); + + output << "create_country_leader = {\n"; + output << " name = \"" << firstName << " " << surname << "\"\n"; + output << " desc = \"POLITICS_" << boost::to_upper_copy(firstName) << "_" << boost::to_upper_copy(surname) << "_DESC\"\n"; + output << " picture = \"" << portrait << "\"\n"; + output << " expire = \"1965.1.1\"\n"; + output << " ideology = " << leaderIdeology << "\n"; + output << " traits = {\n"; + output << " }\n"; + output << "}\n"; } -void HoI4Country::calculateIndustry() + +void HoI4Country::outputOOB() const { - militaryFactories = 0.0; - civilianFactories = 0.0; - dockyards = 0.0; - for (auto state : states) + ofstream output("Output/" + Configuration::getOutputName() + "/history/units/" + tag + "_OOB.txt"); + if (!output.is_open()) { - civilianFactories += state.second->getCivFactories(); - militaryFactories += state.second->getMilFactories(); - dockyards += state.second->getDockyards(); + Log(LogLevel::Error) << "Could not open Output/" << Configuration::getOutputName() << "/history/units/" << tag << "_OOB.txt"; + exit(-1); } + output << "\xEF\xBB\xBF"; // add the BOM to make HoI4 happy - if (RulingPartyModel.war_pol == "jingoism") - { - civilianFactories *= 1.1; - } - else if (RulingPartyModel.war_pol == "pro_military") + /*for (auto armyItr: armies) + { + if (armyItr->getProductionQueue()) + { + armyItr->outputIntoProductionQueue(output, tag); + } + else + { + armyItr->output(output); + } + }*/ + output << "start_equipment_factor = 0\n"; + for (auto divisionTemplate : divisionTemplates) { - civilianFactories *= 0.9; + output << divisionTemplate; + output << endl; } - else + output << "### No BHU air forces ###\n"; + output << "instant_effect = {\n"; + output << "\tadd_equipment_production = {\n"; + output << "\t\tequipment = {\n"; + output << "\t\t\ttype = infantry_equipment_0\n"; + output << "\t\t\tcreator = \"" << tag << "\"\n"; + output << "\t\t}\n"; + output << "\t\trequested_factories = 1\n"; + output << "\t\tprogress = 0.88\n"; + output << "\t\tefficiency = 100\n"; + output << "\t}\n"; + output << "}\n"; + output << "units = {\n"; + for (auto division : divisions) { - civilianFactories *= 0.7; + output << division; } -} - -void HoI4Country::reportIndustry(ofstream& out) -{ - if (states.size() > 0) + if (ships.size() > 0) { - double actualCivilianFactories; - if (RulingPartyModel.war_pol == "jingoism") - { - actualCivilianFactories = civilianFactories / 1.1; - } - else if (RulingPartyModel.war_pol == "pro_military") + output << "\tnavy = {" << endl; + output << "\t\tname = \"Grand Fleet\"" << endl; + output << "\t\tlocation = " << navalLocation << endl; + for (auto ship : ships) { - actualCivilianFactories = civilianFactories / 0.9; + output << ship; } - else + output << "\t}" << endl; + } + output << "}\n"; + if (planes.size() > 0) + { + output << "air_wings = {\n"; + output << "\t" << capital << " = {\n"; + for (auto plane : planes) { - actualCivilianFactories = civilianFactories / 0.7; + output << plane; } - - out << tag << ','; - out << militaryFactories << ','; - out << actualCivilianFactories << ','; - out << dockyards << ','; - out << militaryFactories + actualCivilianFactories + dockyards << '\n'; + output << "\t}\n"; + output << "}\n"; } + output.close(); } -void HoI4Country::addVPsToCapital(int VPs) + +void HoI4Country::outputCommonCountryFile() const { - auto capital = getCapital(); - if (capital != NULL) + ofstream output("Output/" + Configuration::getOutputName() + "/common/countries/" + Utils::convertUTF8ToASCII(commonCountryFile)); + if (!output.is_open()) { - capital->addVictoryPointValue(VPs); + Log(LogLevel::Error) << "Could not open " << "Output/" << Configuration::getOutputName() << "/common/countries/" << Utils::convertUTF8ToASCII(commonCountryFile); + exit(-1); } + + output << "color = { " << color << " }" << endl; + + output.close(); } -HoI4State* HoI4Country::getCapital(void) + +void HoI4Country::outputIdeas() const { - auto capitalItr = states.find(capital); - if (capitalItr == states.end()) + ofstream ideasFile("Output/" + Configuration::getOutputName() + "/common/ideas/" + tag + ".txt"); + if (!ideasFile.is_open()) { - if (states.size() > 0) - { - capitalItr = states.begin(); - } - else - { - return nullptr; - } + LOG(LogLevel::Error) << "Could not open Output/" << Configuration::getOutputName() << "/common/ideas/" << tag << ".txt"; + exit(-1); } - return capitalItr->second; -} - -double HoI4Country::getStrengthOverTime(double years) const -{ - return getMilitaryStrength() + getEconomicStrength(years); + ideasFile << "ideas = {\n"; + ideasFile << "\tpolitical_advisor = {\n"; + + ideasFile << "\t\t" << tag << "_communist_advisor = {\n"; + ideasFile << "\t\t\tallowed = {\n"; + ideasFile << "\t\t\t\toriginal_tag = \"" << tag << "\"\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\ttraits = { communist_revolutionary }\n"; + ideasFile << "\n"; + ideasFile << "\t\t\ton_add = {\n"; + ideasFile << "\t\t\t\tcountry_event = political.1\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\tdo_effect = {\n"; + ideasFile << "\t\t\t\tNOT = {\n"; + ideasFile << "\t\t\t\t\thas_government = communism\n"; + ideasFile << "\t\t\t\t}\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\tai_will_do = {\n"; + ideasFile << "\t\t\t\tfactor = 0\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\t\t}\n"; + + ideasFile << "\t\t" << tag << "_democratic_advisor = {\n"; + ideasFile << "\t\t\tallowed = {\n"; + ideasFile << "\t\t\t\toriginal_tag = \"" << tag << "\"\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\ttraits = { democratic_reformer }\n"; + ideasFile << "\n"; + ideasFile << "\t\t\ton_add = {\n"; + ideasFile << "\t\t\t\tcountry_event = political.13\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\tdo_effect = {\n"; + ideasFile << "\t\t\t\tNOT = {\n"; + ideasFile << "\t\t\t\t\thas_government = democratic\n"; + ideasFile << "\t\t\t\t}\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\tai_will_do = {\n"; + ideasFile << "\t\t\t\tfactor = 0\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\t\t}\n"; + + ideasFile << "\t\t" << tag << "_fascist_advisor = {\n"; + ideasFile << "\t\t\tallowed = {\n"; + ideasFile << "\t\t\t\toriginal_tag = \"" << tag << "\"\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\ttraits = { fascist_demagogue }\n"; + ideasFile << "\n"; + ideasFile << "\t\t\ton_add = {\n"; + ideasFile << "\t\t\t\tcountry_event = political.7\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\tdo_effect = {\n"; + ideasFile << "\t\t\t\tNOT = {\n"; + ideasFile << "\t\t\t\t\thas_government = fascism\n"; + ideasFile << "\t\t\t\t}\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\n"; + ideasFile << "\t\t\tai_will_do = {\n"; + ideasFile << "\t\t\t\tfactor = 0\n"; + ideasFile << "\t\t\t}\n"; + ideasFile << "\t\t}\n"; + + ideasFile << "\t}\n"; + ideasFile << "}\n"; } -double HoI4Country::getMilitaryStrength() const -{ - return armyStrength; -} -double HoI4Country::getEconomicStrength(double years) const +void HoI4Country::outputIdeaGraphics(ofstream& ideasFile) const { - double militarySectorStrength = militaryFactories * 3 * 365 * years; - double civilianSectorStrength = civilianFactories * 0.469 * 0.5 * 3 * 365 * 0.5* years * years; /*.469 is milfac per year, .5 since half are used by consumer goods*/ - - return militarySectorStrength + civilianSectorStrength; + ideasFile << "\n"; + ideasFile << "\tspriteType = {\n"; + ideasFile << "\t\tname = \"GFX_idea_" << tag << "_communist_advisor\"\n"; + ideasFile << "\t\ttexturefile = \"" << graphicsMapper::getIdeologyMinisterPortrait(srcCountry->getPrimaryCultureGroup(), "communism") << "\"\n"; + ideasFile << "\t}\n"; + + ideasFile << "\n"; + ideasFile << "\tspriteType = {\n"; + ideasFile << "\t\tname = \"GFX_idea_" << tag << "_democratic_advisor\"\n"; + ideasFile << "\t\ttexturefile = \"" << graphicsMapper::getIdeologyMinisterPortrait(srcCountry->getPrimaryCultureGroup(), "democratic") << "\"\n"; + ideasFile << "\t}\n"; + + ideasFile << "\n"; + ideasFile << "\tspriteType = {\n"; + ideasFile << "\t\tname = \"GFX_idea_" << tag << "_fascist_advisor\"\n"; + ideasFile << "\t\ttexturefile = \"" << graphicsMapper::getIdeologyMinisterPortrait(srcCountry->getPrimaryCultureGroup(), "fascism") << "\"\n"; + ideasFile << "\t}\n"; } \ No newline at end of file diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4Country.h b/Vic2ToHoI4/Source/HOI4World/HoI4Country.h index 4f9d6cb9a..4f16e89e0 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4Country.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4Country.h @@ -39,178 +39,160 @@ using namespace std; class HoI4World; class V2Country; +struct V2Party; class HoI4Minister; class HoI4Leader; class HoI4Faction; -typedef struct -{ - string name; - string localisationString; - string ideology; - string economic_pol; - string trade_pol; - string rel_pol; - string citizen_pol; - string war_pol; - unsigned int popularity; - unsigned int organization; -} HoI4Party; class HoI4Country { -public: - HoI4Country(string _tag, string _commonCountryFile, HoI4World* _theWorld, bool _newCountry = false); - void output(const map& states, const vector& Factions) const; - void outputCommonCountryFile() const; - void outputColors(ofstream& out) const; - void outputToCommonCountriesFile(ofstream& countriesFile) const; - - void initFromV2Country(const V2World& _srcWorld, const V2Country* _srcCountry, const string _vic2ideology, map& leaderMap, governmentJobsMap governmentJobs, const namesMapping& namesMap, portraitMapping& portraitMap, const cultureMapping& cultureMap, personalityMap& landPersonalityMap, personalityMap& seaPersonalityMap, backgroundMap& landBackgroundMap, backgroundMap& seaBackgroundMap, const map& stateMap, map states); - void initFromHistory(); - void generateLeaders(leaderTraitsMap leaderTraits, const namesMapping& namesMap, portraitMapping& portraitMap); - void convertNavy(map states); - void convertAirforce(); - void convertArmyDivisions(); - void setTechnology(string tech, int level); - void addProvince(int _province); - void addState(HoI4State* _state); - void calculateIndustry(); - void reportIndustry(ofstream& out); - void addVPsToCapital(int VPs); - - void setSphereLeader(string SphereLeader) { sphereLeader == SphereLeader; } - void setFaction(HoI4Faction* newFaction) { faction = newFaction; } - void setFactionLeader() { factionLeader = true; } - void addNationalFocus(HoI4FocusTree* NF) { nationalFocus = NF; } - void setGreatPower() { greatPower = true; } - - HoI4Relations* getRelations(string withWhom) const; - HoI4State* getCapital(); - double getStrengthOverTime(double years) const; - double getMilitaryStrength() const; - double getEconomicStrength(double years) const; - - const map& getRelations() const { return relations; } - set getProvinces() const { return provinces; } - string getTag() const { return tag; } - const V2Country* getSourceCountry() const { return srcCountry; } - string getGovernment() const { return government; } - bool isNewCountry() const { return newCountry; } - HoI4Faction* getFaction() const { return faction; } - HoI4Alignment* getAlignment() { return &alignment; } - string getIdeology() const { return ideology; } - string getRulingIdeology() const { return rulingHoI4Ideology; } - const set& getAllies() const { return allies; } - set& editAllies() { return allies; } - map& getPracticals() { return practicals; } - int getCapitalNum() { return capital; } - vector getBrigs() const { return brigs; } - int getCapitalProv() const { return capital; } - const string getSphereLeader() const { return sphereLeader; } - HoI4Party getRulingParty() const { return RulingPartyModel; } - map getStates() const { return states; } - bool isInFaction() const { return faction != nullptr; } - bool isCivilized() const { return civilized; } - - vector getParties() const { return parties; } - int getTotalFactories() const { return totalfactories; } - int getTechnologyCount() const { return technologies.size(); } - int getProvinceCount() const { return provinceCount; } - void setProvinceCount(int count) { provinceCount = count; } - bool isGreatPower() const { return greatPower; } - -private: - void outputOOB() const; - void outputPracticals(FILE*) const; - void outputTech(FILE*) const; - void outputParties(FILE*) const; - void outputLeaders() const; - void outputRelations(ofstream& output) const; - - void determineCapitalFromVic2(const map& provinceToStateIDMap, const map& states); - bool isStateValidForCapital(map::const_iterator capitalState, const map& states); - bool isThisStateOwnedByUs(const HoI4State* state) const; - bool isThisStateACoreWhileWeOwnNoStates(const HoI4State* state) const; - void setCapitalInCapitalState(int capitalProvince, const map& states); - void findBestCapital(); - - vector getPortProvinces(vector locationCandidates, map allProvinces); - void convertParties(const V2Country* srcCountry, vector V2Parties, V2Party* rulingParty, string& rulingIdeology); - - void setPartyPopularity(); - - HoI4World* theWorld; - const V2Country* srcCountry; - string filename; - bool newCountry; // true if this country is being added by the converter, i.e. doesn't already exist in HoI4 - const string sphereLeader = ""; - string tag; - set provinces; - map states; - int capital; - string commonCountryFile; - map technologies; - string government; - HoI4Alignment alignment; - string ideology; - int totalfactories; - map relations; - Color color; - double nationalUnity; - HoI4Faction* faction; - bool factionLeader; - set allies; - map practicals; - vector parties; - vector ministers; - vector rulingMinisters; - vector leaders; - string graphicalCulture; - string rulingHoI4Ideology; - bool majorNation; - bool civilized; - vector brigs; - int convoys; - HoI4Party RulingPartyModel; - map, string> NFT; - map> CountryTargets; - int provinceCount; - long armyStrength; - double militaryFactories; - double civilianFactories; - double dockyards; - - // laws - string civil_law; - string conscription_law; - string economic_law; - string educational_investment_law; - string industrial_policy_laws; - string press_laws; - string training_laws; - - // faction popularity - int communismPopularity; - int democraticPopularity; - int facismPopularity; - int liberalPopularity; - int socialistPopularity; - int syndicalistPopularity; - int ancapPopularity; - int autocraticPopularity; - int neutralityPopularity; - - bool greatPower; - - // military stuff - vector divisionTemplates; - vector divisions; - vector ships; - vector planes; - int navalLocation; - - HoI4FocusTree* nationalFocus; + public: + HoI4Country(string _tag, string _commonCountryFile, HoI4World* _theWorld); + + void initFromV2Country(const V2World& _srcWorld, const V2Country* _srcCountry, const string _vic2ideology, map& leaderMap, governmentJobsMap governmentJobs, portraitMapping& portraitMap, const cultureMapping& cultureMap, personalityMap& landPersonalityMap, personalityMap& seaPersonalityMap, backgroundMap& landBackgroundMap, backgroundMap& seaBackgroundMap, const map& stateMap, map states); + void initFromHistory(); + void setGovernmentToNeutral(); + void convertIdeologySupport(const set& majorIdeologies); + void generateLeaders(leaderTraitsMap leaderTraits, portraitMapping& portraitMap); + void convertNavy(map states); + void convertAirforce(); + void convertArmyDivisions(); + void setTechnology(string tech, int level); + void addProvince(int _province); + void addState(HoI4State* _state); + void calculateIndustry(); + void reportIndustry(ofstream& out); + void addVPsToCapital(int VPs); + void outputToCommonCountriesFile(ofstream& countriesFile) const; + void outputColors(ofstream& out) const; + void outputToNamesFiles(ofstream& namesFile) const; + void output(const map& states, const vector& Factions) const; + void outputIdeaGraphics(ofstream& ideasFile) const; + + void setSphereLeader(string SphereLeader) { sphereLeader == SphereLeader; } + void setFaction(HoI4Faction* newFaction) { faction = newFaction; } + void setFactionLeader() { factionLeader = true; } + void addNationalFocus(HoI4FocusTree* NF) { nationalFocus = NF; } + void setGreatPower() { greatPower = true; } + + HoI4Relations* getRelations(string withWhom) const; + HoI4State* getCapital(); + double getStrengthOverTime(double years) const; + double getMilitaryStrength() const; + double getEconomicStrength(double years) const; + + bool isHuman() const { return human; } + const map& getRelations() const { return relations; } + set getProvinces() const { return provinces; } + string getTag() const { return tag; } + const V2Country* getSourceCountry() const { return srcCountry; } + HoI4Faction* getFaction() const { return faction; } + HoI4Alignment* getAlignment() { return &alignment; } + string getGovernmentIdeology() const { return governmentIdeology; } + map getIdeologySupport() const { return ideologySupport; } + const set& getAllies() const { return allies; } + set& editAllies() { return allies; } + map& getPracticals() { return practicals; } + int getCapitalNum() { return capital; } + vector getBrigs() const { return brigs; } + int getCapitalProv() const { return capital; } + const string getSphereLeader() const { return sphereLeader; } + V2Party* getRulingParty() const { return rulingParty; } + set getParties() const { return parties; } + map getStates() const { return states; } + bool isInFaction() const { return faction != nullptr; } + bool isCivilized() const { return civilized; } + + int getTotalFactories() const { return totalfactories; } + int getTechnologyCount() const { return technologies.size(); } + int getProvinceCount() const { return provinceCount; } + void setProvinceCount(int count) { provinceCount = count; } + bool isGreatPower() const { return greatPower; } + + private: + void determineCapitalFromVic2(const map& provinceToStateIDMap, const map& states); + bool isStateValidForCapital(map::const_iterator capitalState, const map& states); + bool isThisStateOwnedByUs(const HoI4State* state) const; + bool isThisStateACoreWhileWeOwnNoStates(const HoI4State* state) const; + void setCapitalInCapitalState(int capitalProvince, const map& states); + void findBestCapital(); + + vector getPortProvinces(vector locationCandidates, map allProvinces); + + void outputNamesSet(ofstream& namesFile, const vector& names, const string& tabs) const; + void outputHistory(const map& states, const vector& Factions) const; + void outputRelations(ofstream& output) const; + void outputCountryLeader(ofstream& output) const; + void outputOOB() const; + void outputCommonCountryFile() const; + void outputIdeas() const; + + + HoI4World* theWorld; + const V2Country* srcCountry; + string filename; + + bool human; + + string governmentIdeology; + string leaderIdeology; + V2Party* rulingParty; + set parties; + map ideologySupport; + + const string sphereLeader = ""; + string tag; + set provinces; + map states; + int capital; + string commonCountryFile; + map technologies; + HoI4Alignment alignment; + int totalfactories; + map relations; + Color color; + double nationalUnity; + HoI4Faction* faction; + bool factionLeader; + set allies; + map practicals; + vector ministers; + vector rulingMinisters; + vector leaders; + string graphicalCulture; + bool majorNation; + bool civilized; + vector brigs; + int convoys; + + map, string> NFT; + map> CountryTargets; + int provinceCount; + long armyStrength; + double militaryFactories; + double civilianFactories; + double dockyards; + + // laws + string civil_law; + string conscription_law; + string economic_law; + string educational_investment_law; + string industrial_policy_laws; + string press_laws; + string training_laws; + + bool greatPower; + + // military stuff + vector divisionTemplates; + vector divisions; + vector ships; + vector planes; + int navalLocation; + + HoI4FocusTree* nationalFocus; }; #endif // HoI4COUNTRY_H_ diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.cpp index 8e892035f..9e97140b5 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.cpp @@ -1,4360 +1,4376 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ - - - -#include "HoI4FocusTree.h" -#include "HoI4Country.h" -#include "HoI4Focus.h" -#include "../Configuration.h" -#include "Log.h" -#include "Object.h" -#include "OSCompatibilityLayer.h" -#include "ParadoxParserUTF8.h" -#include -using namespace std; - - - -HoI4FocusTree::HoI4FocusTree() -{ -} - - -HoI4FocusTree::HoI4FocusTree(const HoI4Country* country) -{ - srcCountryTag = country->getSourceCountry()->getTag(); - dstCountryTag = country->getTag(); -} - - -void HoI4FocusTree::addGenericFocusTree() -{ -/* Object2* genericObj = processFile(Configuration::getHoI4Path() + "/common/national_focus/generic.txt"); - vector focusTreeLeaves = genericObj->getLeaves(); - vector focusObjects = focusTreeLeaves[0]->getValue("focus"); - for (auto focusObject: focusObjects) - { - HoI4Focus* newFocus = new HoI4Focus(focusObject); - focuses.push_back(newFocus); - }*/ - - if (Configuration::getHOI4Version() >= HOI4Version("1.3.0")) - { - addVersion1_3GenericFocusTree(); - } - else - { - addVersion1_0GenericFocusTree(); - } -} - - -void HoI4FocusTree::addVersion1_0GenericFocusTree() -{ - HoI4Focus* newFocus = new HoI4Focus; - newFocus->id = "army_effort"; - newFocus->icon = "GFX_goal_generic_allies_build_infantry"; - newFocus->xPos = 1; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->completionReward = " army_experience = 5\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = land_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = land_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "equipment_effort"; - newFocus->icon = "GFX_goal_generic_small_arms"; - newFocus->prerequisites.push_back("focus = army_effort"); - newFocus->xPos = 0; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_weapons_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "motorization_effort"; - newFocus->icon = "GFX_goal_generic_army_motorized"; - newFocus->prerequisites.push_back("focus = army_effort"); - newFocus->bypass = " has_tech = motorised_infantry"; - newFocus->xPos = 2; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = motorized_bonus\n"; - newFocus->completionReward += " bonus = 0.75\n"; - newFocus->completionReward += " technology = motorised_infantry\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "doctrine_effort"; - newFocus->icon = "GFX_goal_generic_army_doctrines"; - newFocus->prerequisites.push_back("focus = army_effort"); - newFocus->xPos = 1; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->completionReward = " army_experience = 5\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = land_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = land_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "equipment_effort_2"; - newFocus->icon = "GFX_goal_generic_army_artillery"; - newFocus->prerequisites.push_back("focus = equipment_effort"); - newFocus->xPos = 0; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_artillery_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "mechanization_effort"; - newFocus->icon = "GFX_goal_generic_build_tank"; - newFocus->prerequisites.push_back("focus = motorization_effort"); - newFocus->xPos = 2; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = motorized_bonus\n"; - newFocus->completionReward += " ahead_reduction = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = motorized_equipment\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "doctrine_effort_2"; - newFocus->icon = "GFX_goal_generic_army_doctrines"; - newFocus->prerequisites.push_back("focus = doctrine_effort"); - newFocus->xPos = 1; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->completionReward = " army_experience = 5\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = land_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = land_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "equipment_effort_3"; - newFocus->icon = "GFX_goal_generic_army_artillery2"; - newFocus->prerequisites.push_back("focus = equipment_effort_2"); - newFocus->xPos = 0; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_artillery_bonus\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "armor_effort"; - newFocus->icon = "GFX_goal_generic_army_tanks"; - newFocus->prerequisites.push_back("focus = mechanization_effort"); - newFocus->xPos = 2; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = armor_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " category = armor\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "special_forces"; - newFocus->icon = "GFX_goal_generic_special_forces"; - newFocus->prerequisites.push_back("focus = equipment_effort_3"); - newFocus->prerequisites.push_back("focus = doctrine_effort_2"); - newFocus->prerequisites.push_back("focus = armor_effort"); - newFocus->xPos = 1; - newFocus->yPos = 6; - newFocus->cost = 10; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = special_forces_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = paratroopers\n"; - newFocus->completionReward += " technology = paratroopers2\n"; - newFocus->completionReward += " technology = marines\n"; - newFocus->completionReward += " technology = marines2\n"; - newFocus->completionReward += " technology = tech_mountaineers\n"; - newFocus->completionReward += " technology = tech_mountaineers2\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "aviation_effort"; - newFocus->icon = "GFX_goal_generic_build_airforce"; - newFocus->xPos = 5; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->completeTooltip = " air_experience = 25\n"; - newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_AB }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = air_base\n"; - newFocus->completeTooltip += " level = 2\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " } \n"; - newFocus->completeTooltip += " add_tech_bonus = {\n"; - newFocus->completeTooltip += " name = air_doc_bonus\n"; - newFocus->completeTooltip += " bonus = 0.5\n"; - newFocus->completeTooltip += " uses = 1\n"; - newFocus->completeTooltip += " category = air_doctrine\n"; - newFocus->completeTooltip += " } "; - newFocus->completionReward += " air_experience = 25\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = air_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = air_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "fighter_focus"; - newFocus->icon = "GFX_goal_generic_air_fighter"; - newFocus->prerequisites.push_back("focus = aviation_effort"); - newFocus->mutuallyExclusive = "focus = bomber_focus"; - newFocus->xPos = 4; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = fighter_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " technology = early_fighter\n"; - newFocus->completionReward += " technology = fighter1\n"; - newFocus->completionReward += " technology = fighter2\n"; - newFocus->completionReward += " technology = fighter3\n"; - newFocus->completionReward += " technology = heavy_fighter1\n"; - newFocus->completionReward += " technology = heavy_fighter2\n"; - newFocus->completionReward += " technology = heavy_fighter3\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "bomber_focus"; - newFocus->icon = "GFX_goal_generic_air_bomber"; - newFocus->prerequisites.push_back("focus = aviation_effort"); - newFocus->mutuallyExclusive = "focus = fighter_focus"; - newFocus->xPos = 6; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = bomber_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " technology = strategic_bomber1\n"; - newFocus->completionReward += " technology = strategic_bomber2\n"; - newFocus->completionReward += " technology = strategic_bomber3\n"; - newFocus->completionReward += " category = tactical_bomber\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "aviation_effort_2"; - newFocus->icon = "GFX_goal_generic_air_doctrine"; - newFocus->prerequisites.push_back("focus = bomber_focus focus = fighter_focus"); - newFocus->xPos = 5; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->completeTooltip += " air_experience = 25\n"; - newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_2_AB }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = air_base\n"; - newFocus->completeTooltip += " level = 2\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " add_tech_bonus = {\n"; - newFocus->completeTooltip += " name = air_doc_bonus\n"; - newFocus->completeTooltip += " bonus = 0.5\n"; - newFocus->completeTooltip += " uses = 1\n"; - newFocus->completeTooltip += " category = air_doctrine\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " air_experience = 25\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = air_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = air_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "CAS_effort"; - newFocus->icon = "GFX_goal_generic_CAS"; - newFocus->prerequisites.push_back("focus = aviation_effort_2"); - newFocus->prerequisites.push_back("focus = motorization_effort"); - newFocus->xPos = 4; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = CAS_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = cas_bomber\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "rocket_effort"; - newFocus->icon = "GFX_focus_rocketry"; - newFocus->prerequisites.push_back("focus = aviation_effort_2"); - newFocus->prerequisites.push_back("focus = infrastructure_effort"); - newFocus->xPos = 5; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = jet_rocket_bonus\n"; - newFocus->completionReward += " ahead_reduction = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " category = rocketry\n"; - newFocus->completionReward += " category = jet_technology\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.25\n"; - newFocus->aiWillDo += " always = yes\n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "NAV_effort"; - newFocus->icon = "GFX_goal_generic_air_naval_bomber"; - newFocus->prerequisites.push_back("focus = aviation_effort_2"); - newFocus->prerequisites.push_back("focus = flexible_navy"); - newFocus->xPos = 6; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = nav_bomber_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = naval_bomber\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "naval_effort"; - newFocus->icon = "GFX_goal_generic_construct_naval_dockyard"; - newFocus->xPos = 9; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->available += " any_state = {\n"; - newFocus->available += " is_coastal = yes\n"; - newFocus->available += " is_controlled_by = ROOT\n"; - newFocus->available += " }"; - newFocus->completeTooltip += " navy_experience = 25\n"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = dockyard\n"; - newFocus->completeTooltip += " level = 3\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " navy_experience = 25\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " dockyard > 0\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " is_coastal = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " is_coastal = yes\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = dockyard\n"; - newFocus->completionReward += " level = 3\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " set_country_flag = naval_effort_built\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " dockyard > 0\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " dockyard > 0\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = dockyard\n"; - newFocus->completionReward += " level = 3\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " set_country_flag = naval_effort_built\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " controller = { tag = ROOT }\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = dockyard\n"; - newFocus->completionReward += " level = 3\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "flexible_navy"; - newFocus->icon = "GFX_goal_generic_build_navy"; - newFocus->prerequisites.push_back("focus = naval_effort"); - newFocus->mutuallyExclusive = "focus = large_navy"; - newFocus->xPos = 8; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = sub_op_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " technology = convoy_interdiction_ti\n"; - newFocus->completionReward += " technology = unrestricted_submarine_warfare\n"; - newFocus->completionReward += " technology = wolfpacks\n"; - newFocus->completionReward += " technology = advanced_submarine_warfare\n"; - newFocus->completionReward += " technology = combined_operations_raiding\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "large_navy"; - newFocus->icon = "GFX_goal_generic_navy_doctrines_tactics"; - newFocus->prerequisites.push_back("focus = naval_effort"); - newFocus->mutuallyExclusive = "focus = flexible_navy"; - newFocus->xPos = 10; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = fleet_in_being_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " category = fleet_in_being_tree\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "submarine_effort"; - newFocus->icon = "GFX_goal_generic_navy_submarine"; - newFocus->prerequisites.push_back("focus = flexible_navy focus = large_navy"); - newFocus->xPos = 8; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = ss_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = early_submarine\n"; - newFocus->completionReward += " technology = basic_submarine\n"; - newFocus->completionReward += " technology = improved_submarine\n"; - newFocus->completionReward += " technology = advanced_submarine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "cruiser_effort"; - newFocus->icon = "GFX_goal_generic_navy_cruiser"; - newFocus->prerequisites.push_back("focus = large_navy focus = flexible_navy"); - newFocus->xPos = 10; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = cr_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = improved_light_cruiser\n"; - newFocus->completionReward += " technology = advanced_light_cruiser\n"; - newFocus->completionReward += " technology = improved_heavy_cruiser\n"; - newFocus->completionReward += " technology = advanced_heavy_cruiser\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "destroyer_effort"; - newFocus->icon = "GFX_goal_generic_wolf_pack"; - newFocus->prerequisites.push_back("focus = submarine_effort"); - newFocus->xPos = 8; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = dd_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = early_destroyer\n"; - newFocus->completionReward += " technology = basic_destroyer\n"; - newFocus->completionReward += " technology = improved_destroyer\n"; - newFocus->completionReward += " technology = advanced_destroyer\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "capital_ships_effort"; - newFocus->icon = "GFX_goal_generic_navy_battleship"; - newFocus->prerequisites.push_back("focus = cruiser_effort"); - newFocus->xPos = 10; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " navy_experience = 25\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = capital_ships_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = basic_battlecruiser\n"; - newFocus->completionReward += " technology = basic_battleship\n"; - newFocus->completionReward += " technology = improved_battleship\n"; - newFocus->completionReward += " technology = advanced_battleship\n"; - newFocus->completionReward += " technology = heavy_battleship\n"; - newFocus->completionReward += " technology = heavy_battleship2\n"; - newFocus->completionReward += " technology = early_carrier\n"; - newFocus->completionReward += " technology = basic_carrier\n"; - newFocus->completionReward += " technology = improved_carrier\n"; - newFocus->completionReward += " technology = advanced_carrier\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "industrial_effort"; - newFocus->icon = "GFX_goal_generic_production"; - newFocus->xPos = 13; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = industrial_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = industry\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 3\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " date < 1939.1.1\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " # we also dont want tiny nations to go crazy with slots right away\n"; - newFocus->aiWillDo += " num_of_controlled_states < 2\n"; - newFocus->aiWillDo += " } \n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "construction_effort"; - newFocus->icon = "GFX_goal_generic_construct_civ_factory"; - newFocus->prerequisites.push_back("focus = industrial_effort"); - newFocus->xPos = 12; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = construction_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = industrial_complex\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " } \n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = industrial_complex\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = industrial_complex\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "production_effort"; - newFocus->icon = "GFX_goal_generic_construct_mil_factory"; - newFocus->prerequisites.push_back("focus = industrial_effort"); - newFocus->xPos = 14; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = production_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = arms_factory\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = arms_factory\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "construction_effort_2"; - newFocus->icon = "GFX_goal_generic_construct_civ_factory"; - newFocus->prerequisites.push_back("focus = construction_effort"); - newFocus->xPos = 12; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = construction_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = industrial_complex\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = industrial_complex\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = industrial_complex\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "production_effort_2"; - newFocus->icon = "GFX_goal_generic_construct_mil_factory"; - newFocus->prerequisites.push_back("focus = production_effort"); - newFocus->xPos = 14; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = production_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = arms_factory\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = arms_factory\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "infrastructure_effort"; - newFocus->icon = "GFX_goal_generic_construct_infrastructure"; - newFocus->prerequisites.push_back("focus = construction_effort_2"); - newFocus->xPos = 12; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; - newFocus->bypass += " all_owned_state = { \n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = infrastructure\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "production_effort_3"; - newFocus->icon = "GFX_goal_generic_construct_mil_factory"; - newFocus->prerequisites.push_back("focus = production_effort_2"); - newFocus->xPos = 14; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = production_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = arms_factory\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = arms_factory\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "infrastructure_effort_2"; - newFocus->icon = "GFX_goal_generic_construct_infrastructure"; - newFocus->prerequisites.push_back("focus = infrastructure_effort"); - newFocus->xPos = 12; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; - newFocus->bypass += " all_owned_state = { \n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = infrastructure\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "construction_effort_3"; - newFocus->icon = "GFX_goal_generic_construct_civ_factory"; - newFocus->prerequisites.push_back("focus = infrastructure_effort"); - newFocus->xPos = 14; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = construction_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = industrial_complex\n"; - newFocus->bypass += " size < 2\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 2\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = industrial_complex\n"; - newFocus->completeTooltip += " level = 2\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 2\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = industrial_complex\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "nuclear_effort"; - newFocus->icon = "GFX_focus_wonderweapons"; - newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); - newFocus->xPos = 10; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = nuclear_bonus\n"; - newFocus->completionReward += " ahead_reduction = 0.5\n"; - newFocus->completionReward += " category = nuclear\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.25\n"; - newFocus->aiWillDo += " always = yes\n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "extra_tech_slot"; - newFocus->icon = "GFX_focus_research"; - newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); - newFocus->xPos = 12; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward += " add_research_slot = 1"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "extra_tech_slot_2"; - newFocus->icon = "GFX_focus_research"; - newFocus->prerequisites.push_back("focus = extra_tech_slot"); - newFocus->available += " num_of_factories > 50"; - newFocus->cancelIfInvalid += "no"; - newFocus->continueIfInvalid += "yes"; - newFocus->xPos = 12; - newFocus->yPos = 6; - newFocus->cost = 10; - newFocus->completionReward += " add_research_slot = 1"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "secret_weapons"; - newFocus->icon = "GFX_goal_generic_secret_weapon"; - newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); - newFocus->xPos = 14; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = secret_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 4\n"; - newFocus->completionReward += " category = electronics\n"; - newFocus->completionReward += " category = nuclear\n"; - newFocus->completionReward += " category = rocketry\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.25\n"; - newFocus->aiWillDo += " always = yes\n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "political_effort"; - newFocus->icon = "GFX_goal_generic_demand_territory"; - newFocus->xPos = 19; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->completionReward += " add_political_power = 120"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "collectivist_ethos"; - newFocus->icon = "GFX_goal_generic_national_unity #icon = GFX_goal_tripartite_pact"; - newFocus->prerequisites.push_back("focus = political_effort"); - newFocus->mutuallyExclusive = "focus = liberty_ethos"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = fascism\n"; - newFocus->available += " has_government = communism\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 18; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_historical_focus_on = yes\n"; - newFocus->aiWillDo += " has_idea = neutrality_idea\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = collectivist_ethos_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "nationalism_focus"; - newFocus->icon = "GFX_goal_support_fascism #icon = GFX_goal_tripartite_pact"; - newFocus->prerequisites.push_back("focus = collectivist_ethos"); - newFocus->mutuallyExclusive = "focus = internationalism_focus"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = fascism\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 16; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 2\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " has_government = fascism\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = nationalism"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "internationalism_focus"; - newFocus->icon = "GFX_goal_support_communism #icon = GFX_goal_tripartite_pact"; - newFocus->prerequisites.push_back("focus = collectivist_ethos"); - newFocus->mutuallyExclusive = "focus = nationalism_focus"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = communism\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 18; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 2\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " has_government = communism\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = internationalism"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "liberty_ethos"; - newFocus->icon = "GFX_goal_support_democracy"; - newFocus->prerequisites.push_back("focus = political_effort"); - newFocus->mutuallyExclusive = "focus = collectivist_ethos"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = democratic\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 20; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 95\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.1\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " has_government = communism\n"; - newFocus->aiWillDo += " has_government = fascism\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " NOT = {\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " has_government = democratic\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = liberty_ethos_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "militarism"; - newFocus->icon = "GFX_goal_generic_political_pressure"; - newFocus->prerequisites.push_back("focus = nationalism_focus"); - newFocus->xPos = 16; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; - newFocus->completionReward += " remove_ideas = neutrality_idea\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_ideas = militarism_focus\n"; - newFocus->completionReward += " army_experience = 20\n"; - newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "political_correctness"; - newFocus->icon = "GFX_goal_generic_dangerous_deal"; - newFocus->prerequisites.push_back("focus = internationalism_focus"); - newFocus->xPos = 18; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; - newFocus->completionReward += " remove_ideas = neutrality_idea\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " add_political_power = 200\n"; - newFocus->completionReward += " add_ideas = idea_political_correctness"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "neutrality_focus"; - newFocus->icon = "GFX_goal_generic_neutrality_focus"; - newFocus->prerequisites.push_back("focus = liberty_ethos"); - newFocus->mutuallyExclusive = "focus = interventionism_focus"; - newFocus->xPos = 20; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; - newFocus->completionReward += " add_ideas = neutrality_idea\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_political_power = 150"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "interventionism_focus"; - newFocus->icon = "GFX_goal_generic_political_pressure"; - newFocus->prerequisites.push_back("focus = liberty_ethos"); - newFocus->mutuallyExclusive = "focus = neutrality_focus"; - newFocus->xPos = 22; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " has_idea = neutrality_idea\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; - newFocus->completionReward += " remove_ideas = neutrality_idea\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " set_rule = { can_send_volunteers = yes }\n"; - newFocus->completionReward += " add_political_power = 150"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "military_youth"; - newFocus->icon = "GFX_goal_generic_more_territorial_claims"; - newFocus->prerequisites.push_back("focus = militarism"); - newFocus->xPos = 16; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = military_youth_focus\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = fascism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = fascism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = communism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = communism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "deterrence"; - newFocus->icon = "GFX_goal_generic_defence"; - newFocus->prerequisites.push_back("focus = neutrality_focus"); - newFocus->xPos = 20; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = deterrence"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "volunteer_corps"; - newFocus->icon = "GFX_goal_generic_allies_build_infantry"; - newFocus->prerequisites.push_back("focus = interventionism_focus"); - newFocus->xPos = 22; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = volunteer_corps_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "paramilitarism"; - newFocus->icon = "GFX_goal_generic_military_sphere"; - newFocus->prerequisites.push_back("focus = military_youth"); - newFocus->xPos = 16; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = paramilitarism_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "indoctrination_focus"; - newFocus->icon = "GFX_goal_generic_propaganda"; - newFocus->prerequisites.push_back("focus = political_correctness"); - newFocus->xPos = 18; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = indoctrination_focus\n"; - newFocus->completionReward += " add_political_power = 150"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "foreign_expeditions"; - newFocus->icon = "GFX_goal_generic_more_territorial_claims"; - newFocus->prerequisites.push_back("focus = volunteer_corps"); - newFocus->xPos = 22; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = foreign_expeditions_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "why_we_fight"; - newFocus->icon = "GFX_goal_generic_propaganda"; - newFocus->prerequisites.push_back("focus = foreign_expeditions focus = deterrence"); - newFocus->available += " OR = {\n"; - newFocus->available += " threat > 0.75\n"; - newFocus->available += " has_defensive_war = yes\n"; - newFocus->available += " }"; - newFocus->continueIfInvalid += "yes"; - newFocus->xPos = 20; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; - newFocus->completionReward += " set_rule = { can_create_factions = yes }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_ideas = why_we_fight_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "political_commissars"; - newFocus->icon = "GFX_goal_generic_forceful_treaty"; - newFocus->prerequisites.push_back("focus = indoctrination_focus"); - newFocus->available = " "; - newFocus->xPos = 18; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = political_commissars_focus\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = fascism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = fascism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = communism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = communism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_political_power = 200"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "ideological_fanaticism"; - newFocus->icon = "GFX_goal_generic_demand_territory"; - newFocus->prerequisites.push_back("focus = paramilitarism focus = political_commissars"); - newFocus->xPos = 17; - newFocus->yPos = 6; - newFocus->cost = 10; - newFocus->completionReward += " add_ideas = ideological_fanaticism_focus\n"; - newFocus->completionReward += " set_rule = {\n"; - newFocus->completionReward += " can_create_factions = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " hidden_effect = {\n"; - newFocus->completionReward += " set_rule = { can_use_kamikaze_pilots = yes }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " custom_effect_tooltip = kamikaze_focus_tooltip"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "technology_sharing"; - newFocus->icon = "GFX_goal_generic_scientific_exchange"; - newFocus->prerequisites.push_back("focus = ideological_fanaticism focus = why_we_fight"); - newFocus->available += " has_war = yes\n"; - newFocus->available += " is_in_faction = yes\n"; - newFocus->available += " OR = {\n"; - newFocus->available += " num_of_factories > 50\n"; - newFocus->available += " any_country = {\n"; - newFocus->available += " is_in_faction_with = ROOT\n"; - newFocus->available += " num_of_factories > 50\n"; - newFocus->available += " }\n"; - newFocus->available += " }"; - newFocus->xPos = 19; - newFocus->yPos = 7; - newFocus->cost = 10; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " original_research_slots < 3\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_research_slot = 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " original_research_slots > 2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = electronics_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = electronics\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = industrial_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = industry\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_weapons_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); -} - - -void HoI4FocusTree::addVersion1_3GenericFocusTree() -{ - HoI4Focus* newFocus = new HoI4Focus; - newFocus->id = "army_effort"; - newFocus->icon = "GFX_goal_generic_allies_build_infantry"; - newFocus->xPos = 1; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " army_experience = 5\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = land_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = land_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "equipment_effort"; - newFocus->icon = "GFX_goal_generic_small_arms"; - newFocus->prerequisites.push_back("focus = army_effort"); - newFocus->xPos = 0; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_weapons_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "motorization_effort"; - newFocus->icon = "GFX_goal_generic_army_motorized"; - newFocus->prerequisites.push_back("focus = army_effort"); - newFocus->bypass = " has_tech = motorised_infantry"; - newFocus->xPos = 2; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = motorized_bonus\n"; - newFocus->completionReward += " bonus = 0.75\n"; - newFocus->completionReward += " technology = motorised_infantry\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "doctrine_effort"; - newFocus->icon = "GFX_goal_generic_army_doctrines"; - newFocus->prerequisites.push_back("focus = army_effort"); - newFocus->xPos = 1; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " army_experience = 5\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = land_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = land_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "equipment_effort_2"; - newFocus->icon = "GFX_goal_generic_army_artillery"; - newFocus->prerequisites.push_back("focus = equipment_effort"); - newFocus->xPos = 0; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_artillery_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "mechanization_effort"; - newFocus->icon = "GFX_goal_generic_build_tank"; - newFocus->prerequisites.push_back("focus = motorization_effort"); - newFocus->xPos = 2; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = motorized_bonus\n"; - newFocus->completionReward += " ahead_reduction = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = motorized_equipment\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "doctrine_effort_2"; - newFocus->icon = "GFX_goal_generic_army_doctrines"; - newFocus->prerequisites.push_back("focus = doctrine_effort"); - newFocus->xPos = 1; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " army_experience = 5\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = land_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = land_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "equipment_effort_3"; - newFocus->icon = "GFX_goal_generic_army_artillery2"; - newFocus->prerequisites.push_back("focus = equipment_effort_2"); - newFocus->xPos = 0; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_artillery_bonus\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "armor_effort"; - newFocus->icon = "GFX_goal_generic_army_tanks"; - newFocus->prerequisites.push_back("focus = mechanization_effort"); - newFocus->xPos = 2; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = armor_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " category = armor\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "special_forces"; - newFocus->icon = "GFX_goal_generic_special_forces"; - newFocus->prerequisites.push_back("focus = equipment_effort_3"); - newFocus->prerequisites.push_back("focus = doctrine_effort_2"); - newFocus->prerequisites.push_back("focus = armor_effort"); - newFocus->xPos = 1; - newFocus->yPos = 6; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward = " add_tech_bonus = {\n"; - newFocus->completionReward += " name = special_forces_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = paratroopers\n"; - newFocus->completionReward += " technology = paratroopers2\n"; - newFocus->completionReward += " technology = marines\n"; - newFocus->completionReward += " technology = marines2\n"; - newFocus->completionReward += " technology = tech_mountaineers\n"; - newFocus->completionReward += " technology = tech_mountaineers2\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "aviation_effort"; - newFocus->icon = "GFX_goal_generic_build_airforce"; - newFocus->xPos = 5; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completeTooltip = " air_experience = 25\n"; - newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_AB }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = air_base\n"; - newFocus->completeTooltip += " level = 2\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " } \n"; - newFocus->completeTooltip += " add_tech_bonus = {\n"; - newFocus->completeTooltip += " name = air_doc_bonus\n"; - newFocus->completeTooltip += " bonus = 0.5\n"; - newFocus->completeTooltip += " uses = 1\n"; - newFocus->completeTooltip += " category = air_doctrine\n"; - newFocus->completeTooltip += " } "; - newFocus->completionReward += " air_experience = 25\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = air_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = air_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "fighter_focus"; - newFocus->icon = "GFX_goal_generic_air_fighter"; - newFocus->prerequisites.push_back("focus = aviation_effort"); - newFocus->mutuallyExclusive = "focus = bomber_focus"; - newFocus->xPos = 4; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = fighter_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " technology = early_fighter\n"; - newFocus->completionReward += " technology = fighter1\n"; - newFocus->completionReward += " technology = fighter2\n"; - newFocus->completionReward += " technology = fighter3\n"; - newFocus->completionReward += " technology = heavy_fighter1\n"; - newFocus->completionReward += " technology = heavy_fighter2\n"; - newFocus->completionReward += " technology = heavy_fighter3\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "bomber_focus"; - newFocus->icon = "GFX_goal_generic_air_bomber"; - newFocus->prerequisites.push_back("focus = aviation_effort"); - newFocus->mutuallyExclusive = "focus = fighter_focus"; - newFocus->xPos = 6; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = bomber_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " technology = strategic_bomber1\n"; - newFocus->completionReward += " technology = strategic_bomber2\n"; - newFocus->completionReward += " technology = strategic_bomber3\n"; - newFocus->completionReward += " category = tactical_bomber\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "aviation_effort_2"; - newFocus->icon = "GFX_goal_generic_air_doctrine"; - newFocus->prerequisites.push_back("focus = bomber_focus focus = fighter_focus"); - newFocus->xPos = 5; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completeTooltip += " air_experience = 25\n"; - newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_2_AB }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = air_base\n"; - newFocus->completeTooltip += " level = 2\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " add_tech_bonus = {\n"; - newFocus->completeTooltip += " name = air_doc_bonus\n"; - newFocus->completeTooltip += " bonus = 0.5\n"; - newFocus->completeTooltip += " uses = 1\n"; - newFocus->completeTooltip += " category = air_doctrine\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " air_experience = 25\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " NOT = { is_controlled_by = ROOT }\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " is_controlled_by = ROOT\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = air_base\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " capital_scope = {\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = air_base\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = air_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = air_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "CAS_effort"; - newFocus->icon = "GFX_goal_generic_CAS"; - newFocus->prerequisites.push_back("focus = aviation_effort_2"); - newFocus->prerequisites.push_back("focus = motorization_effort"); - newFocus->xPos = 4; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = CAS_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = cas_bomber\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "rocket_effort"; - newFocus->icon = "GFX_focus_rocketry"; - newFocus->prerequisites.push_back("focus = aviation_effort_2"); - newFocus->prerequisites.push_back("focus = infrastructure_effort"); - newFocus->xPos = 5; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = jet_rocket_bonus\n"; - newFocus->completionReward += " ahead_reduction = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " category = rocketry\n"; - newFocus->completionReward += " category = jet_technology\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.25\n"; - newFocus->aiWillDo += " always = yes\n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "NAV_effort"; - newFocus->icon = "GFX_goal_generic_air_naval_bomber"; - newFocus->prerequisites.push_back("focus = aviation_effort_2"); - newFocus->prerequisites.push_back("focus = flexible_navy"); - newFocus->xPos = 6; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = nav_bomber_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = naval_bomber\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "naval_effort"; - newFocus->icon = "GFX_goal_generic_construct_naval_dockyard"; - newFocus->xPos = 9; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->available += " any_state = {\n"; - newFocus->available += " is_coastal = yes\n"; - newFocus->available += " is_controlled_by = ROOT\n"; - newFocus->available += " }"; - newFocus->completeTooltip += " navy_experience = 25\n"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = dockyard\n"; - newFocus->completeTooltip += " level = 3\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " navy_experience = 25\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " dockyard > 0\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " is_coastal = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " is_coastal = yes\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = dockyard\n"; - newFocus->completionReward += " level = 3\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " set_country_flag = naval_effort_built\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " dockyard > 0\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " dockyard > 0\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = dockyard\n"; - newFocus->completionReward += " level = 3\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " set_country_flag = naval_effort_built\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " controller = { tag = ROOT }\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = dockyard\n"; - newFocus->completionReward += " size > 2\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = dockyard\n"; - newFocus->completionReward += " level = 3\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "flexible_navy"; - newFocus->icon = "GFX_goal_generic_build_navy"; - newFocus->prerequisites.push_back("focus = naval_effort"); - newFocus->mutuallyExclusive = "focus = large_navy"; - newFocus->xPos = 8; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = sub_op_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " technology = convoy_interdiction_ti\n"; - newFocus->completionReward += " technology = unrestricted_submarine_warfare\n"; - newFocus->completionReward += " technology = wolfpacks\n"; - newFocus->completionReward += " technology = advanced_submarine_warfare\n"; - newFocus->completionReward += " technology = combined_operations_raiding\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "large_navy"; - newFocus->icon = "GFX_goal_generic_navy_doctrines_tactics"; - newFocus->prerequisites.push_back("focus = naval_effort"); - newFocus->mutuallyExclusive = "focus = flexible_navy"; - newFocus->xPos = 10; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = fleet_in_being_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 2\n"; - newFocus->completionReward += " category = fleet_in_being_tree\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "submarine_effort"; - newFocus->icon = "GFX_goal_generic_navy_submarine"; - newFocus->prerequisites.push_back("focus = flexible_navy focus = large_navy"); - newFocus->xPos = 8; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = ss_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = early_submarine\n"; - newFocus->completionReward += " technology = basic_submarine\n"; - newFocus->completionReward += " technology = improved_submarine\n"; - newFocus->completionReward += " technology = advanced_submarine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "cruiser_effort"; - newFocus->icon = "GFX_goal_generic_navy_cruiser"; - newFocus->prerequisites.push_back("focus = large_navy focus = flexible_navy"); - newFocus->xPos = 10; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = cr_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = improved_light_cruiser\n"; - newFocus->completionReward += " technology = advanced_light_cruiser\n"; - newFocus->completionReward += " technology = improved_heavy_cruiser\n"; - newFocus->completionReward += " technology = advanced_heavy_cruiser\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "destroyer_effort"; - newFocus->icon = "GFX_goal_generic_wolf_pack"; - newFocus->prerequisites.push_back("focus = submarine_effort"); - newFocus->xPos = 8; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = dd_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = early_destroyer\n"; - newFocus->completionReward += " technology = basic_destroyer\n"; - newFocus->completionReward += " technology = improved_destroyer\n"; - newFocus->completionReward += " technology = advanced_destroyer\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "capital_ships_effort"; - newFocus->icon = "GFX_goal_generic_navy_battleship"; - newFocus->prerequisites.push_back("focus = cruiser_effort"); - newFocus->xPos = 10; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " all_owned_state = {\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_coastal = no\n"; - newFocus->aiWillDo += " dockyard < 1\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " navy_experience = 25\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = capital_ships_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " ahead_reduction = 1\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " technology = basic_battlecruiser\n"; - newFocus->completionReward += " technology = basic_battleship\n"; - newFocus->completionReward += " technology = improved_battleship\n"; - newFocus->completionReward += " technology = advanced_battleship\n"; - newFocus->completionReward += " technology = heavy_battleship\n"; - newFocus->completionReward += " technology = heavy_battleship2\n"; - newFocus->completionReward += " technology = early_carrier\n"; - newFocus->completionReward += " technology = basic_carrier\n"; - newFocus->completionReward += " technology = improved_carrier\n"; - newFocus->completionReward += " technology = advanced_carrier\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "industrial_effort"; - newFocus->icon = "GFX_goal_generic_production"; - newFocus->xPos = 13; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = industrial_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = industry\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 3\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " date < 1939.1.1\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " # we also dont want tiny nations to go crazy with slots right away\n"; - newFocus->aiWillDo += " num_of_controlled_states < 2\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "construction_effort"; - newFocus->icon = "GFX_goal_generic_construct_civ_factory"; - newFocus->prerequisites.push_back("focus = industrial_effort"); - newFocus->xPos = 12; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = construction_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = industrial_complex\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " } \n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = industrial_complex\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = industrial_complex\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "production_effort"; - newFocus->icon = "GFX_goal_generic_construct_mil_factory"; - newFocus->prerequisites.push_back("focus = industrial_effort"); - newFocus->xPos = 14; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = production_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = arms_factory\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = arms_factory\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "construction_effort_2"; - newFocus->icon = "GFX_goal_generic_construct_civ_factory"; - newFocus->prerequisites.push_back("focus = construction_effort"); - newFocus->xPos = 12; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = construction_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = industrial_complex\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = industrial_complex\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = industrial_complex\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "production_effort_2"; - newFocus->icon = "GFX_goal_generic_construct_mil_factory"; - newFocus->prerequisites.push_back("focus = production_effort"); - newFocus->xPos = 14; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = production_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = arms_factory\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = arms_factory\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "infrastructure_effort"; - newFocus->icon = "GFX_goal_generic_construct_infrastructure"; - newFocus->prerequisites.push_back("focus = construction_effort_2"); - newFocus->xPos = 12; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; - newFocus->bypass += " all_owned_state = { \n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = infrastructure\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "production_effort_3"; - newFocus->icon = "GFX_goal_generic_construct_mil_factory"; - newFocus->prerequisites.push_back("focus = production_effort_2"); - newFocus->xPos = 14; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = production_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = arms_factory\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = arms_factory\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "infrastructure_effort_2"; - newFocus->icon = "GFX_goal_generic_construct_infrastructure"; - newFocus->prerequisites.push_back("focus = infrastructure_effort"); - newFocus->xPos = 12; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; - newFocus->bypass += " all_owned_state = { \n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = infrastructure\n"; - newFocus->bypass += " size < 1\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = infrastructure\n"; - newFocus->completeTooltip += " level = 1\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "construction_effort_3"; - newFocus->icon = "GFX_goal_generic_construct_civ_factory"; - newFocus->prerequisites.push_back("focus = infrastructure_effort"); - newFocus->xPos = 14; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 2"; - newFocus->bypass += " custom_trigger_tooltip = {\n"; - newFocus->bypass += " tooltip = construction_effort_tt\n"; - newFocus->bypass += " all_owned_state = {\n"; - newFocus->bypass += " free_building_slots = {\n"; - newFocus->bypass += " building = industrial_complex\n"; - newFocus->bypass += " size < 2\n"; - newFocus->bypass += " include_locked = yes\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " }"; - newFocus->completeTooltip += " add_extra_state_shared_building_slots = 2\n"; - newFocus->completeTooltip += " add_building_construction = {\n"; - newFocus->completeTooltip += " type = industrial_complex\n"; - newFocus->completeTooltip += " level = 2\n"; - newFocus->completeTooltip += " instant_build = yes\n"; - newFocus->completeTooltip += " }"; - newFocus->completionReward += " random_owned_controlled_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 1\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 2\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = industrial_complex\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "nuclear_effort"; - newFocus->icon = "GFX_focus_wonderweapons"; - newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); - newFocus->xPos = 10; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = nuclear_bonus\n"; - newFocus->completionReward += " ahead_reduction = 0.5\n"; - newFocus->completionReward += " category = nuclear\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.25\n"; - newFocus->aiWillDo += " always = yes\n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "extra_tech_slot"; - newFocus->icon = "GFX_focus_research"; - newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); - newFocus->xPos = 12; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_research_slot = 1"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "extra_tech_slot_2"; - newFocus->icon = "GFX_focus_research"; - newFocus->prerequisites.push_back("focus = extra_tech_slot"); - newFocus->available += " num_of_factories > 50"; - newFocus->cancelIfInvalid += "no"; - newFocus->continueIfInvalid += "yes"; - newFocus->xPos = 12; - newFocus->yPos = 6; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_research_slot = 1"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "secret_weapons"; - newFocus->icon = "GFX_goal_generic_secret_weapon"; - newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); - newFocus->xPos = 14; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = secret_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 4\n"; - newFocus->completionReward += " category = electronics\n"; - newFocus->completionReward += " category = nuclear\n"; - newFocus->completionReward += " category = rocketry\n"; - newFocus->completionReward += " }"; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.25\n"; - newFocus->aiWillDo += " always = yes\n"; - newFocus->aiWillDo += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "political_effort"; - newFocus->icon = "GFX_goal_generic_demand_territory"; - newFocus->xPos = 19; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_political_power = 120"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "collectivist_ethos"; - newFocus->icon = "GFX_goal_generic_national_unity #icon = GFX_goal_tripartite_pact"; - newFocus->prerequisites.push_back("focus = political_effort"); - newFocus->mutuallyExclusive = "focus = liberty_ethos"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = fascism\n"; - newFocus->available += " has_government = communism\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 18; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " is_historical_focus_on = yes\n"; - newFocus->aiWillDo += " has_idea = neutrality_idea\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = collectivist_ethos_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "nationalism_focus"; - newFocus->icon = "GFX_goal_support_fascism #icon = GFX_goal_tripartite_pact"; - newFocus->prerequisites.push_back("focus = collectivist_ethos"); - newFocus->mutuallyExclusive = "focus = internationalism_focus"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = fascism\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 16; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 2\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " has_government = fascism\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = nationalism"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "internationalism_focus"; - newFocus->icon = "GFX_goal_support_communism #icon = GFX_goal_tripartite_pact"; - newFocus->prerequisites.push_back("focus = collectivist_ethos"); - newFocus->mutuallyExclusive = "focus = nationalism_focus"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = communism\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 18; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 2\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " has_government = communism\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = internationalism"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "liberty_ethos"; - newFocus->icon = "GFX_goal_support_democracy"; - newFocus->prerequisites.push_back("focus = political_effort"); - newFocus->mutuallyExclusive = "focus = collectivist_ethos"; - newFocus->available += " OR = {\n"; - newFocus->available += " has_government = democratic\n"; - newFocus->available += " has_government = neutrality\n"; - newFocus->available += " }"; - newFocus->xPos = 20; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 95\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0.1\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " OR = {\n"; - newFocus->aiWillDo += " has_government = communism\n"; - newFocus->aiWillDo += " has_government = fascism\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " NOT = {\n"; - newFocus->aiWillDo += " any_neighbor_country = {\n"; - newFocus->aiWillDo += " is_major = yes\n"; - newFocus->aiWillDo += " has_government = democratic\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = liberty_ethos_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "militarism"; - newFocus->icon = "GFX_goal_generic_political_pressure"; - newFocus->prerequisites.push_back("focus = nationalism_focus"); - newFocus->xPos = 16; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; - newFocus->completionReward += " remove_ideas = neutrality_idea\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_ideas = militarism_focus\n"; - newFocus->completionReward += " army_experience = 20\n"; - newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "political_correctness"; - newFocus->icon = "GFX_goal_generic_dangerous_deal"; - newFocus->prerequisites.push_back("focus = internationalism_focus"); - newFocus->xPos = 18; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; - newFocus->completionReward += " remove_ideas = neutrality_idea\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " add_political_power = 200\n"; - newFocus->completionReward += " add_ideas = idea_political_correctness"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "neutrality_focus"; - newFocus->icon = "GFX_goal_generic_neutrality_focus"; - newFocus->prerequisites.push_back("focus = liberty_ethos"); - newFocus->mutuallyExclusive = "focus = interventionism_focus"; - newFocus->xPos = 20; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; - newFocus->completionReward += " add_ideas = neutrality_idea\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_political_power = 150"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "interventionism_focus"; - newFocus->icon = "GFX_goal_generic_political_pressure"; - newFocus->prerequisites.push_back("focus = liberty_ethos"); - newFocus->mutuallyExclusive = "focus = neutrality_focus"; - newFocus->xPos = 22; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->aiWillDo += " factor = 1\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " has_idea = neutrality_idea\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; - newFocus->completionReward += " remove_ideas = neutrality_idea\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " set_rule = { can_send_volunteers = yes }\n"; - newFocus->completionReward += " add_political_power = 150"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "military_youth"; - newFocus->icon = "GFX_goal_generic_more_territorial_claims"; - newFocus->prerequisites.push_back("focus = militarism"); - newFocus->xPos = 16; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = military_youth_focus\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = fascism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = fascism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = communism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = communism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "deterrence"; - newFocus->icon = "GFX_goal_generic_defence"; - newFocus->prerequisites.push_back("focus = neutrality_focus"); - newFocus->xPos = 20; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = deterrence"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "volunteer_corps"; - newFocus->icon = "GFX_goal_generic_allies_build_infantry"; - newFocus->prerequisites.push_back("focus = interventionism_focus"); - newFocus->xPos = 22; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = volunteer_corps_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "paramilitarism"; - newFocus->icon = "GFX_goal_generic_military_sphere"; - newFocus->prerequisites.push_back("focus = military_youth"); - newFocus->xPos = 16; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = paramilitarism_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "indoctrination_focus"; - newFocus->icon = "GFX_goal_generic_propaganda"; - newFocus->prerequisites.push_back("focus = political_correctness"); - newFocus->xPos = 18; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = indoctrination_focus\n"; - newFocus->completionReward += " add_political_power = 150"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "foreign_expeditions"; - newFocus->icon = "GFX_goal_generic_more_territorial_claims"; - newFocus->prerequisites.push_back("focus = volunteer_corps"); - newFocus->xPos = 22; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = foreign_expeditions_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "why_we_fight"; - newFocus->icon = "GFX_goal_generic_propaganda"; - newFocus->prerequisites.push_back("focus = foreign_expeditions focus = deterrence"); - newFocus->available += " OR = {\n"; - newFocus->available += " threat > 0.75\n"; - newFocus->available += " has_defensive_war = yes\n"; - newFocus->available += " }"; - newFocus->continueIfInvalid += "yes"; - newFocus->xPos = 20; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; - newFocus->completionReward += " set_rule = { can_create_factions = yes }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_ideas = why_we_fight_focus"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "political_commissars"; - newFocus->icon = "GFX_goal_generic_forceful_treaty"; - newFocus->prerequisites.push_back("focus = indoctrination_focus"); - newFocus->available = " "; - newFocus->xPos = 18; - newFocus->yPos = 5; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = political_commissars_focus\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = fascism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = fascism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = { has_government = communism }\n"; - newFocus->completionReward += " add_popularity = {\n"; - newFocus->completionReward += " ideology = communism\n"; - newFocus->completionReward += " popularity = 0.2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_political_power = 200"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "ideological_fanaticism"; - newFocus->icon = "GFX_goal_generic_demand_territory"; - newFocus->prerequisites.push_back("focus = paramilitarism focus = political_commissars"); - newFocus->xPos = 17; - newFocus->yPos = 6; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " add_ideas = ideological_fanaticism_focus\n"; - newFocus->completionReward += " set_rule = {\n"; - newFocus->completionReward += " can_create_factions = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " hidden_effect = {\n"; - newFocus->completionReward += " set_rule = { can_use_kamikaze_pilots = yes }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " custom_effect_tooltip = kamikaze_focus_tooltip"; - focuses.push_back(newFocus); - - newFocus = new HoI4Focus; - newFocus->id = "technology_sharing"; - newFocus->icon = "GFX_goal_generic_scientific_exchange"; - newFocus->prerequisites.push_back("focus = ideological_fanaticism focus = why_we_fight"); - newFocus->available += " has_war = yes\n"; - newFocus->available += " is_in_faction = yes\n"; - newFocus->available += " OR = {\n"; - newFocus->available += " num_of_factories > 50\n"; - newFocus->available += " any_other_country = {\n"; - newFocus->available += " is_in_faction_with = ROOT\n"; - newFocus->available += " num_of_factories > 50\n"; - newFocus->available += " }\n"; - newFocus->available += " }"; - newFocus->xPos = 19; - newFocus->yPos = 7; - newFocus->cost = 10; - newFocus->availableIfCapitulated = true; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " original_research_slots < 3\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_research_slot = 1\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " if = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " original_research_slots > 2\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = electronics_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = electronics\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = industrial_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = industry\n"; - newFocus->completionReward += " } \n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = infantry_weapons_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = infantry_weapons\n"; - newFocus->completionReward += " category = artillery\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); -} - -HoI4FocusTree* HoI4FocusTree::makeCustomizedCopy(const HoI4Country* country) const -{ - HoI4FocusTree* newFocusTree = new HoI4FocusTree(country); - - for (auto focus: focuses) - { - HoI4Focus* newFocus = focus->makeCustomizedCopy(newFocusTree->dstCountryTag); - newFocusTree->addFocus(newFocus); - } - - return newFocusTree; -} - - -void HoI4FocusTree::addDemocracyNationalFocuses(HoI4Country* Home, vector CountriesToContain, int XStart) -{ - double WTModifier = 1; - if (Home->getGovernment() == "democratic") - { - string warPol = Home->getRulingParty().war_pol; - if (warPol == "jingoism") - WTModifier = 0; - if (warPol == "pro_military") - WTModifier = 0.25; - if (warPol == "anti_military") - WTModifier = 0.5; - } - if (Home->getGovernment() == "hms_government") - { - string warPol = Home->getRulingParty().war_pol; - if (warPol == "jingoism") - WTModifier = 0; - if (warPol == "pro_military") - WTModifier = 0; - if (warPol == "anti_military") - WTModifier = 0.25; - if (warPol == "pacifism" || warPol == "pacifist") - WTModifier = 0.5; - } - - //War Propoganda - HoI4Focus* newFocus = new HoI4Focus; - newFocus->id = "WarProp" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_propaganda"; - newFocus->text += "War Propoganda"; - newFocus->available += " threat > " + to_string(0.2*WTModifier); - newFocus->xPos = XStart; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - newFocus->completionReward += " add_ideas = militarism_focus"; - focuses.push_back(newFocus); - - //Prepare Intervention - newFocus = new HoI4Focus; - newFocus->id = "PrepInter" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_occupy_states_ongoing_war"; - newFocus->text += "War Propoganda"; - newFocus->prerequisites.push_back("focus = WarProp" + Home->getTag()); - newFocus->available += " threat > " + to_string(0.4 * WTModifier); - newFocus->xPos = XStart; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; - focuses.push_back(newFocus); - - int offBalance = 0; - if (CountriesToContain.size() >= 2) - offBalance = -3; - if (CountriesToContain.size() == 1) - offBalance = -2; - - //Limited Intervention - newFocus = new HoI4Focus; - newFocus->id = "Lim" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_more_territorial_claims"; - newFocus->text += "Limited Intervention"; - newFocus->prerequisites.push_back("focus = PrepInter" + Home->getTag()); - newFocus->available += " threat > " + to_string(0.8 * WTModifier); - newFocus->xPos = XStart + offBalance; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - newFocus->completionReward += " add_ideas = limited_interventionism\n"; - newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; - focuses.push_back(newFocus); - - int warPlannumber = 1; - //for (auto Country : CountriesToContain) - - for (int i = CountriesToContain.size() - 1; i >= 0; i--) - { - HoI4Country* Country = CountriesToContain[i]; - //War Plan - newFocus = new HoI4Focus; - newFocus->id = "WarPlan" + Home->getTag() + Country->getTag(); - newFocus->icon = "GFX_goal_generic_position_armies"; - newFocus->text += "War Plan " + Country->getSourceCountry()->getName("english"); - newFocus->prerequisites.push_back("focus = PrepInter" + Home->getTag()); - newFocus->available += " " + Country->getTag() + " = { is_in_faction_with = " + Home->getTag() + " }\n"; - newFocus->available += " " + Country->getTag() + " = { has_added_tension_amount > 30 }"; - newFocus->xPos = XStart + offBalance + warPlannumber * 2; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - newFocus->completionReward += " army_experience = 20\n"; - newFocus->completionReward += " add_tech_bonus = {\n"; - newFocus->completionReward += " name = land_doc_bonus\n"; - newFocus->completionReward += " bonus = 0.5\n"; - newFocus->completionReward += " uses = 1\n"; - newFocus->completionReward += " category = land_doctrine\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - //Embargo - newFocus = new HoI4Focus; - newFocus->id = "Embargo" + Home->getTag() + Country->getTag(); - newFocus->icon = "GFX_goal_generic_trade"; - newFocus->text += "Embargo " + Country->getSourceCountry()->getName("english"); - newFocus->prerequisites.push_back("focus = WarPlan" + Home->getTag() + Country->getTag()); - newFocus->available += " " + Country->getTag() + " = { is_in_faction_with = " + Home->getTag() + " }\n"; - newFocus->available += " " + Country->getTag() + " = { has_added_tension_amount > 30 }"; - newFocus->xPos = XStart + offBalance + warPlannumber * 2; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - newFocus->completionReward += " " + Country->getTag() + " = {\n"; - newFocus->completionReward += " add_opinion_modifier = { target = " + Home->getTag() + " modifier = embargo }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - //WAR - newFocus = new HoI4Focus; - newFocus->id = "WAR" + Home->getTag() + Country->getTag(); - newFocus->icon = "GFX_goal_support_democracy"; - newFocus->text += "Enact War Plan " + Country->getSourceCountry()->getName("english"); - newFocus->available += " " + Country->getTag() + " = { is_in_faction_with = " + Home->getTag() + " }"; - newFocus->prerequisites.push_back("focus = Embargo" + Home->getTag() + Country->getTag()); - newFocus->prerequisites.push_back("focus = Lim" + Home->getTag()); - newFocus->xPos = XStart + offBalance + warPlannumber++ * 2; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - newFocus->completionReward += " create_wargoal = {\n"; - newFocus->completionReward += " type = puppet_wargoal_focus\n"; - newFocus->completionReward += " target = " + Country->getTag() + "\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - } -} - - -void HoI4FocusTree::addMonarchyEmpireNationalFocuses(HoI4Country* Home, const vector& targetColonies, const vector& annexationTargets) -{ - //Glory to Empire! - HoI4Focus* newFocus = new HoI4Focus; - newFocus->id = "EmpireGlory" + Home->getTag(); - newFocus->icon = "GFX_goal_anschluss"; - newFocus->text += "Glory to the Empire!"; - //newFocus->available += " is_puppet = no\n"; - newFocus->xPos = 29; - newFocus->yPos = 0; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " date < 1937.6.6\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_national_unity = 0.1"; - focuses.push_back(newFocus); - - //Colonies Focus - newFocus = new HoI4Focus; - newFocus->id = "StrengthenColonies" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_position_armies"; - newFocus->text += "Strengthen the Colonies"; - newFocus->prerequisites.push_back("focus = EmpireGlory" + Home->getTag()); - newFocus->mutuallyExclusive = "focus = StrengthenHome" + Home->getTag(); - newFocus->xPos = 28; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " navy_experience = 25"; - focuses.push_back(newFocus); - - //Home Focus - newFocus = new HoI4Focus; - newFocus->id = "StrengthenHome" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_national_unity"; - newFocus->text += "Strengthen Home"; - newFocus->prerequisites.push_back("focus = EmpireGlory" + Home->getTag()); - newFocus->mutuallyExclusive = "focus = StrengthenColonies" + Home->getTag(); - newFocus->xPos = 30; - newFocus->yPos = 1; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " army_experience = 25"; - focuses.push_back(newFocus); - - //Colonial Factories - newFocus = new HoI4Focus; - newFocus->id = "ColonialInd" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_construct_civ_factory"; - newFocus->text += "Colonial Industry Buildup"; - newFocus->prerequisites.push_back("focus = StrengthenColonies" + Home->getTag()); - newFocus->xPos = 26; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = industrial_complex\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - //Colonial Highway - newFocus = new HoI4Focus; - newFocus->id = "ColonialHwy" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_construct_infrastructure"; - newFocus->text += "Colonial Highway"; - newFocus->prerequisites.push_back("focus = ColonialInd" + Home->getTag()); - newFocus->xPos = 24; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - //improve resources - newFocus = new HoI4Focus; - newFocus->id = "ResourceFac" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_oil_refinery"; - newFocus->text += "Improve Resource Factories"; - newFocus->prerequisites.push_back("focus = ColonialInd" + Home->getTag()); - newFocus->mutuallyExclusive = "focus = StrengthenColonies" + Home->getTag(); - newFocus->xPos = 26; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = improved_resource_industry"; - focuses.push_back(newFocus); - - //establish colonial army - newFocus = new HoI4Focus; - newFocus->id = "ColonialArmy" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_allies_build_infantry"; - newFocus->text += "Establish Colonial Army"; - newFocus->prerequisites.push_back("focus = StrengthenColonies" + Home->getTag()); - newFocus->xPos = 28; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = militarism_focus"; - focuses.push_back(newFocus); - - //establish protectorate - if (targetColonies.size() >= 1) - { - auto target = targetColonies.front(); - - newFocus = new HoI4Focus; - newFocus->id = "Protectorate" + Home->getTag() + target->getTag(); - newFocus->icon = "GFX_goal_generic_major_war"; - newFocus->text += "Establish Protectorate over " + target->getSourceCountry()->getName("english"); - newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; - newFocus->prerequisites.push_back("focus = ColonialArmy" + Home->getTag()); - newFocus->xPos = 28; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->bypass += " OR = {\n"; - newFocus->bypass += " " + Home->getTag() + " = {\n"; - newFocus->bypass += " is_in_faction_with = " + target->getTag() +"\n"; - newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; - newFocus->bypass += " }"; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " create_wargoal = {\n"; - newFocus->completionReward += " type = annex_everything\n"; - newFocus->completionReward += " target = " + target->getTag() + "\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - } - if (targetColonies.size() >= 2) - { - auto target = targetColonies.back(); - - newFocus = new HoI4Focus; - newFocus->id = "Protectorate" + Home->getTag() + target->getTag(); - newFocus->icon = "GFX_goal_generic_major_war"; - newFocus->text += "Establish Protectorate over " + target->getSourceCountry()->getName("english"); - newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; - newFocus->prerequisites.push_back("focus = Protectorate" + Home->getTag() + targetColonies.front()->getTag()); - newFocus->xPos = 28; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->bypass += " OR = {\n"; - newFocus->bypass += " " + Home->getTag() + " = {\n"; - newFocus->bypass += " is_in_faction_with = " + target->getTag() +"\n"; - newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; - newFocus->bypass += " }"; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " create_wargoal = {\n"; - newFocus->completionReward += " type = annex_everything\n"; - newFocus->completionReward += " target = " + target->getTag() + "\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - } - - //Trade Empire - newFocus = new HoI4Focus; - newFocus->id = "TradeEmpire" + Home->getTag(); - newFocus->icon = "GFX_goal_anschluss"; - newFocus->text += "Fund the " + Home->getSourceCountry()->getAdjective("english") + " Colonial Trade Corporation"; - newFocus->prerequisites.push_back("focus = ColonialHwy" + Home->getTag() + " focus = ResourceFac" + Home->getTag()); - newFocus->xPos = 25; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = established_traders"; - newFocus->completionReward += " set_country_flag = established_traders"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = no\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 2\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = dockyard\n"; - newFocus->completionReward += " level = 2\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - //Home Industry Buildup - newFocus = new HoI4Focus; - newFocus->id = "IndHome" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_production"; - newFocus->text += "Fund Industrial Improvement"; - newFocus->prerequisites.push_back("focus = StrengthenHome" + Home->getTag()); - newFocus->xPos = 31; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - //newFocus->completionReward += " research_time_factor = -0.1; - focuses.push_back(newFocus); - - //National Highway - newFocus = new HoI4Focus; - newFocus->id = "NationalHwy" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_construct_infrastructure"; - newFocus->text += "National Highway"; - newFocus->prerequisites.push_back("focus = IndHome" + Home->getTag()); - newFocus->xPos = 30; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = infrastructure\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = infrastructure\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - //National College - newFocus = new HoI4Focus; - newFocus->id = "NatCollege" + Home->getTag(); - newFocus->icon = "GFX_goal_anschluss"; - newFocus->text += "Establish National College"; - newFocus->prerequisites.push_back("focus = IndHome" + Home->getTag()); - newFocus->xPos = 32; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10"; - newFocus->completionReward += " add_ideas = national_college"; - focuses.push_back(newFocus); - - //Improve Factories - newFocus = new HoI4Focus; - newFocus->id = "MilitaryBuildup" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_construct_mil_factory"; - newFocus->text += "Military Buildup"; - newFocus->prerequisites.push_back("focus = NatCollege" + Home->getTag()); - newFocus->prerequisites.push_back("focus = NationalHwy" + Home->getTag()); - newFocus->xPos = 31; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " random_owned_state = {\n"; - newFocus->completionReward += " limit = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " OR = {\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " NOT = {\n"; - newFocus->completionReward += " owner = {\n"; - newFocus->completionReward += " any_owned_state = {\n"; - newFocus->completionReward += " free_building_slots = {\n"; - newFocus->completionReward += " building = arms_factory\n"; - newFocus->completionReward += " size > 0\n"; - newFocus->completionReward += " include_locked = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " is_in_home_area = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; - newFocus->completionReward += " add_building_construction = {\n"; - newFocus->completionReward += " type = arms_factory\n"; - newFocus->completionReward += " level = 1\n"; - newFocus->completionReward += " instant_build = yes\n"; - newFocus->completionReward += " }\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - - //PrepBorder - newFocus = new HoI4Focus; - newFocus->id = "PrepTheBorder" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_defence"; - newFocus->text += "Prepare the Border"; - newFocus->prerequisites.push_back("focus = StrengthenHome" + Home->getTag()); - newFocus->xPos = 34; - newFocus->yPos = 2; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = border_buildup"; - focuses.push_back(newFocus); - - //Promote Nationalistic Spirit - newFocus = new HoI4Focus; - newFocus->id = "NatSpirit" + Home->getTag(); - newFocus->icon = "GFX_goal_generic_political_pressure"; - newFocus->text += "Promote Nationalistic Spirit"; - newFocus->prerequisites.push_back("focus = PrepTheBorder" + Home->getTag()); - newFocus->xPos = 34; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->aiWillDo += " factor = 10\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " add_ideas = paramilitarism_focus"; - focuses.push_back(newFocus); - - //ANNEX - if (annexationTargets.size() >= 1) - { - auto target = annexationTargets.front(); - - newFocus = new HoI4Focus; - newFocus->id = "Annex" + Home->getTag() + target->getTag(); - newFocus->icon = "GFX_goal_generic_major_war"; - newFocus->text += "Conquer " + target->getSourceCountry()->getName("english"); - newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; - newFocus->prerequisites.push_back("focus = PrepTheBorder" + Home->getTag()); - newFocus->xPos = 36; - newFocus->yPos = 3; - newFocus->cost = 10; - newFocus->bypass += " OR = {\n"; - newFocus->bypass += " " + Home->getTag() + " = {\n"; - newFocus->bypass += " is_in_faction_with = " + target->getTag() + "\n"; - newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; - newFocus->bypass += " }"; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " create_wargoal = {\n"; - newFocus->completionReward += " type = annex_everything\n"; - newFocus->completionReward += " target = " + target->getTag() + "\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - } - if (annexationTargets.size() >= 2) - { - auto target = annexationTargets.back(); - - newFocus = new HoI4Focus; - newFocus->id = "Annex" + Home->getTag() + target->getTag(); - newFocus->icon = "GFX_goal_generic_major_war"; - newFocus->text += "Conquer " + target->getSourceCountry()->getName("english"); - newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; - newFocus->prerequisites.push_back("focus = NatSpirit" + Home->getTag()); - newFocus->xPos = 34; - newFocus->yPos = 4; - newFocus->cost = 10; - newFocus->bypass += " OR = {\n"; - newFocus->bypass += " " + Home->getTag() + " = {\n"; - newFocus->bypass += " is_in_faction_with = " + target->getTag() + "\n"; - newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; - newFocus->bypass += " }\n"; - newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; - newFocus->bypass += " }"; - newFocus->aiWillDo += " factor = 5\n"; - newFocus->aiWillDo += " modifier = {\n"; - newFocus->aiWillDo += " factor = 0\n"; - newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; - newFocus->aiWillDo += " }"; - newFocus->completionReward += " create_wargoal = {\n"; - newFocus->completionReward += " type = annex_everything\n"; - newFocus->completionReward += " target = " + target->getTag() + "\n"; - newFocus->completionReward += " }"; - focuses.push_back(newFocus); - } -} - - -void HoI4FocusTree::output() -{ - if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/common/national_focus")) - { - LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/common/national_focus\""; - exit(-1); - } - - string filename("Output/" + Configuration::getOutputName() + "/common/national_focus/" + srcCountryTag + "_NF.txt"); - ofstream out(filename); - if (!out.is_open()) - { - LOG(LogLevel::Error) << "Could not create " << filename; - exit(-1); - } - - out << "focus_tree = {\n"; - out << " id = " << dstCountryTag + "_focus\n"; - out << " \n"; - out << " country = {\n"; - out << " factor = 0\n"; - out << " \n"; - out << " modifier = {\n"; - out << " add = 10\n"; - out << " tag = " << dstCountryTag << "\n"; - out << " }\n"; - out << " }\n"; - out << " \n"; - out << " default = no\n"; - out << "\n"; - - for (auto focus: focuses) - { - out << *focus; - out <<"\n"; - } - - out << "}"; - - out.close(); +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#include "HoI4FocusTree.h" +#include "HoI4Country.h" +#include "HoI4Focus.h" +#include "../Configuration.h" +#include "../V2World/V2Party.h" +#include "Log.h" +#include "Object.h" +#include "OSCompatibilityLayer.h" +#include "ParadoxParserUTF8.h" +#include +using namespace std; + + + +HoI4FocusTree::HoI4FocusTree() +{ +} + + +HoI4FocusTree::HoI4FocusTree(const HoI4Country* country) +{ + srcCountryTag = country->getSourceCountry()->getTag(); + dstCountryTag = country->getTag(); +} + + +void HoI4FocusTree::addGenericFocusTree() +{ +/* Object2* genericObj = processFile(Configuration::getHoI4Path() + "/common/national_focus/generic.txt"); + vector focusTreeLeaves = genericObj->getLeaves(); + vector focusObjects = focusTreeLeaves[0]->getValue("focus"); + for (auto focusObject: focusObjects) + { + HoI4Focus* newFocus = new HoI4Focus(focusObject); + focuses.push_back(newFocus); + }*/ + + if (Configuration::getHOI4Version() >= HOI4Version("1.3.0")) + { + addVersion1_3GenericFocusTree(); + } + else + { + addVersion1_0GenericFocusTree(); + } +} + + +void HoI4FocusTree::addVersion1_0GenericFocusTree() +{ + HoI4Focus* newFocus = new HoI4Focus; + newFocus->id = "army_effort"; + newFocus->icon = "GFX_goal_generic_allies_build_infantry"; + newFocus->xPos = 1; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->completionReward = " army_experience = 5\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = land_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = land_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "equipment_effort"; + newFocus->icon = "GFX_goal_generic_small_arms"; + newFocus->prerequisites.push_back("focus = army_effort"); + newFocus->xPos = 0; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_weapons_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "motorization_effort"; + newFocus->icon = "GFX_goal_generic_army_motorized"; + newFocus->prerequisites.push_back("focus = army_effort"); + newFocus->bypass = " has_tech = motorised_infantry"; + newFocus->xPos = 2; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = motorized_bonus\n"; + newFocus->completionReward += " bonus = 0.75\n"; + newFocus->completionReward += " technology = motorised_infantry\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "doctrine_effort"; + newFocus->icon = "GFX_goal_generic_army_doctrines"; + newFocus->prerequisites.push_back("focus = army_effort"); + newFocus->xPos = 1; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->completionReward = " army_experience = 5\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = land_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = land_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "equipment_effort_2"; + newFocus->icon = "GFX_goal_generic_army_artillery"; + newFocus->prerequisites.push_back("focus = equipment_effort"); + newFocus->xPos = 0; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_artillery_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "mechanization_effort"; + newFocus->icon = "GFX_goal_generic_build_tank"; + newFocus->prerequisites.push_back("focus = motorization_effort"); + newFocus->xPos = 2; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = motorized_bonus\n"; + newFocus->completionReward += " ahead_reduction = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = motorized_equipment\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "doctrine_effort_2"; + newFocus->icon = "GFX_goal_generic_army_doctrines"; + newFocus->prerequisites.push_back("focus = doctrine_effort"); + newFocus->xPos = 1; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->completionReward = " army_experience = 5\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = land_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = land_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "equipment_effort_3"; + newFocus->icon = "GFX_goal_generic_army_artillery2"; + newFocus->prerequisites.push_back("focus = equipment_effort_2"); + newFocus->xPos = 0; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_artillery_bonus\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "armor_effort"; + newFocus->icon = "GFX_goal_generic_army_tanks"; + newFocus->prerequisites.push_back("focus = mechanization_effort"); + newFocus->xPos = 2; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = armor_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " category = armor\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "special_forces"; + newFocus->icon = "GFX_goal_generic_special_forces"; + newFocus->prerequisites.push_back("focus = equipment_effort_3"); + newFocus->prerequisites.push_back("focus = doctrine_effort_2"); + newFocus->prerequisites.push_back("focus = armor_effort"); + newFocus->xPos = 1; + newFocus->yPos = 6; + newFocus->cost = 10; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = special_forces_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = paratroopers\n"; + newFocus->completionReward += " technology = paratroopers2\n"; + newFocus->completionReward += " technology = marines\n"; + newFocus->completionReward += " technology = marines2\n"; + newFocus->completionReward += " technology = tech_mountaineers\n"; + newFocus->completionReward += " technology = tech_mountaineers2\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "aviation_effort"; + newFocus->icon = "GFX_goal_generic_build_airforce"; + newFocus->xPos = 5; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->completeTooltip = " air_experience = 25\n"; + newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_AB }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = air_base\n"; + newFocus->completeTooltip += " level = 2\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " } \n"; + newFocus->completeTooltip += " add_tech_bonus = {\n"; + newFocus->completeTooltip += " name = air_doc_bonus\n"; + newFocus->completeTooltip += " bonus = 0.5\n"; + newFocus->completeTooltip += " uses = 1\n"; + newFocus->completeTooltip += " category = air_doctrine\n"; + newFocus->completeTooltip += " } "; + newFocus->completionReward += " air_experience = 25\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = air_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = air_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "fighter_focus"; + newFocus->icon = "GFX_goal_generic_air_fighter"; + newFocus->prerequisites.push_back("focus = aviation_effort"); + newFocus->mutuallyExclusive = "focus = bomber_focus"; + newFocus->xPos = 4; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = fighter_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " technology = early_fighter\n"; + newFocus->completionReward += " technology = fighter1\n"; + newFocus->completionReward += " technology = fighter2\n"; + newFocus->completionReward += " technology = fighter3\n"; + newFocus->completionReward += " technology = heavy_fighter1\n"; + newFocus->completionReward += " technology = heavy_fighter2\n"; + newFocus->completionReward += " technology = heavy_fighter3\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "bomber_focus"; + newFocus->icon = "GFX_goal_generic_air_bomber"; + newFocus->prerequisites.push_back("focus = aviation_effort"); + newFocus->mutuallyExclusive = "focus = fighter_focus"; + newFocus->xPos = 6; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = bomber_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " technology = strategic_bomber1\n"; + newFocus->completionReward += " technology = strategic_bomber2\n"; + newFocus->completionReward += " technology = strategic_bomber3\n"; + newFocus->completionReward += " category = tactical_bomber\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "aviation_effort_2"; + newFocus->icon = "GFX_goal_generic_air_doctrine"; + newFocus->prerequisites.push_back("focus = bomber_focus focus = fighter_focus"); + newFocus->xPos = 5; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->completeTooltip += " air_experience = 25\n"; + newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_2_AB }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = air_base\n"; + newFocus->completeTooltip += " level = 2\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " add_tech_bonus = {\n"; + newFocus->completeTooltip += " name = air_doc_bonus\n"; + newFocus->completeTooltip += " bonus = 0.5\n"; + newFocus->completeTooltip += " uses = 1\n"; + newFocus->completeTooltip += " category = air_doctrine\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " air_experience = 25\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = air_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = air_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "CAS_effort"; + newFocus->icon = "GFX_goal_generic_CAS"; + newFocus->prerequisites.push_back("focus = aviation_effort_2"); + newFocus->prerequisites.push_back("focus = motorization_effort"); + newFocus->xPos = 4; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = CAS_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = cas_bomber\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "rocket_effort"; + newFocus->icon = "GFX_focus_rocketry"; + newFocus->prerequisites.push_back("focus = aviation_effort_2"); + newFocus->prerequisites.push_back("focus = infrastructure_effort"); + newFocus->xPos = 5; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = jet_rocket_bonus\n"; + newFocus->completionReward += " ahead_reduction = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " category = rocketry\n"; + newFocus->completionReward += " category = jet_technology\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.25\n"; + newFocus->aiWillDo += " always = yes\n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "NAV_effort"; + newFocus->icon = "GFX_goal_generic_air_naval_bomber"; + newFocus->prerequisites.push_back("focus = aviation_effort_2"); + newFocus->prerequisites.push_back("focus = flexible_navy"); + newFocus->xPos = 6; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = nav_bomber_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = naval_bomber\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "naval_effort"; + newFocus->icon = "GFX_goal_generic_construct_naval_dockyard"; + newFocus->xPos = 9; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->available += " any_state = {\n"; + newFocus->available += " is_coastal = yes\n"; + newFocus->available += " is_controlled_by = ROOT\n"; + newFocus->available += " }"; + newFocus->completeTooltip += " navy_experience = 25\n"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = dockyard\n"; + newFocus->completeTooltip += " level = 3\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " navy_experience = 25\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " dockyard > 0\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " is_coastal = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " is_coastal = yes\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = dockyard\n"; + newFocus->completionReward += " level = 3\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " set_country_flag = naval_effort_built\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " dockyard > 0\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " dockyard > 0\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = dockyard\n"; + newFocus->completionReward += " level = 3\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " set_country_flag = naval_effort_built\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " controller = { tag = ROOT }\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = dockyard\n"; + newFocus->completionReward += " level = 3\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "flexible_navy"; + newFocus->icon = "GFX_goal_generic_build_navy"; + newFocus->prerequisites.push_back("focus = naval_effort"); + newFocus->mutuallyExclusive = "focus = large_navy"; + newFocus->xPos = 8; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = sub_op_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " technology = convoy_interdiction_ti\n"; + newFocus->completionReward += " technology = unrestricted_submarine_warfare\n"; + newFocus->completionReward += " technology = wolfpacks\n"; + newFocus->completionReward += " technology = advanced_submarine_warfare\n"; + newFocus->completionReward += " technology = combined_operations_raiding\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "large_navy"; + newFocus->icon = "GFX_goal_generic_navy_doctrines_tactics"; + newFocus->prerequisites.push_back("focus = naval_effort"); + newFocus->mutuallyExclusive = "focus = flexible_navy"; + newFocus->xPos = 10; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = fleet_in_being_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " category = fleet_in_being_tree\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "submarine_effort"; + newFocus->icon = "GFX_goal_generic_navy_submarine"; + newFocus->prerequisites.push_back("focus = flexible_navy focus = large_navy"); + newFocus->xPos = 8; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = ss_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = early_submarine\n"; + newFocus->completionReward += " technology = basic_submarine\n"; + newFocus->completionReward += " technology = improved_submarine\n"; + newFocus->completionReward += " technology = advanced_submarine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "cruiser_effort"; + newFocus->icon = "GFX_goal_generic_navy_cruiser"; + newFocus->prerequisites.push_back("focus = large_navy focus = flexible_navy"); + newFocus->xPos = 10; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = cr_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = improved_light_cruiser\n"; + newFocus->completionReward += " technology = advanced_light_cruiser\n"; + newFocus->completionReward += " technology = improved_heavy_cruiser\n"; + newFocus->completionReward += " technology = advanced_heavy_cruiser\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "destroyer_effort"; + newFocus->icon = "GFX_goal_generic_wolf_pack"; + newFocus->prerequisites.push_back("focus = submarine_effort"); + newFocus->xPos = 8; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = dd_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = early_destroyer\n"; + newFocus->completionReward += " technology = basic_destroyer\n"; + newFocus->completionReward += " technology = improved_destroyer\n"; + newFocus->completionReward += " technology = advanced_destroyer\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "capital_ships_effort"; + newFocus->icon = "GFX_goal_generic_navy_battleship"; + newFocus->prerequisites.push_back("focus = cruiser_effort"); + newFocus->xPos = 10; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " navy_experience = 25\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = capital_ships_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = basic_battlecruiser\n"; + newFocus->completionReward += " technology = basic_battleship\n"; + newFocus->completionReward += " technology = improved_battleship\n"; + newFocus->completionReward += " technology = advanced_battleship\n"; + newFocus->completionReward += " technology = heavy_battleship\n"; + newFocus->completionReward += " technology = heavy_battleship2\n"; + newFocus->completionReward += " technology = early_carrier\n"; + newFocus->completionReward += " technology = basic_carrier\n"; + newFocus->completionReward += " technology = improved_carrier\n"; + newFocus->completionReward += " technology = advanced_carrier\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "industrial_effort"; + newFocus->icon = "GFX_goal_generic_production"; + newFocus->xPos = 13; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = industrial_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = industry\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 3\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " date < 1939.1.1\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " # we also dont want tiny nations to go crazy with slots right away\n"; + newFocus->aiWillDo += " num_of_controlled_states < 2\n"; + newFocus->aiWillDo += " } \n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "construction_effort"; + newFocus->icon = "GFX_goal_generic_construct_civ_factory"; + newFocus->prerequisites.push_back("focus = industrial_effort"); + newFocus->xPos = 12; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = construction_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = industrial_complex\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " } \n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = industrial_complex\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = industrial_complex\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "production_effort"; + newFocus->icon = "GFX_goal_generic_construct_mil_factory"; + newFocus->prerequisites.push_back("focus = industrial_effort"); + newFocus->xPos = 14; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = production_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = arms_factory\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = arms_factory\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "construction_effort_2"; + newFocus->icon = "GFX_goal_generic_construct_civ_factory"; + newFocus->prerequisites.push_back("focus = construction_effort"); + newFocus->xPos = 12; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = construction_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = industrial_complex\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = industrial_complex\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = industrial_complex\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "production_effort_2"; + newFocus->icon = "GFX_goal_generic_construct_mil_factory"; + newFocus->prerequisites.push_back("focus = production_effort"); + newFocus->xPos = 14; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = production_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = arms_factory\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = arms_factory\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "infrastructure_effort"; + newFocus->icon = "GFX_goal_generic_construct_infrastructure"; + newFocus->prerequisites.push_back("focus = construction_effort_2"); + newFocus->xPos = 12; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; + newFocus->bypass += " all_owned_state = { \n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = infrastructure\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "production_effort_3"; + newFocus->icon = "GFX_goal_generic_construct_mil_factory"; + newFocus->prerequisites.push_back("focus = production_effort_2"); + newFocus->xPos = 14; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = production_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = arms_factory\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = arms_factory\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "infrastructure_effort_2"; + newFocus->icon = "GFX_goal_generic_construct_infrastructure"; + newFocus->prerequisites.push_back("focus = infrastructure_effort"); + newFocus->xPos = 12; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; + newFocus->bypass += " all_owned_state = { \n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = infrastructure\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "construction_effort_3"; + newFocus->icon = "GFX_goal_generic_construct_civ_factory"; + newFocus->prerequisites.push_back("focus = infrastructure_effort"); + newFocus->xPos = 14; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = construction_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = industrial_complex\n"; + newFocus->bypass += " size < 2\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 2\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = industrial_complex\n"; + newFocus->completeTooltip += " level = 2\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 2\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = industrial_complex\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "nuclear_effort"; + newFocus->icon = "GFX_focus_wonderweapons"; + newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); + newFocus->xPos = 10; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = nuclear_bonus\n"; + newFocus->completionReward += " ahead_reduction = 0.5\n"; + newFocus->completionReward += " category = nuclear\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.25\n"; + newFocus->aiWillDo += " always = yes\n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "extra_tech_slot"; + newFocus->icon = "GFX_focus_research"; + newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); + newFocus->xPos = 12; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward += " add_research_slot = 1"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "extra_tech_slot_2"; + newFocus->icon = "GFX_focus_research"; + newFocus->prerequisites.push_back("focus = extra_tech_slot"); + newFocus->available += " num_of_factories > 50"; + newFocus->cancelIfInvalid += "no"; + newFocus->continueIfInvalid += "yes"; + newFocus->xPos = 12; + newFocus->yPos = 6; + newFocus->cost = 10; + newFocus->completionReward += " add_research_slot = 1"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "secret_weapons"; + newFocus->icon = "GFX_goal_generic_secret_weapon"; + newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); + newFocus->xPos = 14; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = secret_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 4\n"; + newFocus->completionReward += " category = electronics\n"; + newFocus->completionReward += " category = nuclear\n"; + newFocus->completionReward += " category = rocketry\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.25\n"; + newFocus->aiWillDo += " always = yes\n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "political_effort"; + newFocus->icon = "GFX_goal_generic_demand_territory"; + newFocus->xPos = 19; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->completionReward += " add_political_power = 120"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "collectivist_ethos"; + newFocus->icon = "GFX_goal_generic_national_unity #icon = GFX_goal_tripartite_pact"; + newFocus->prerequisites.push_back("focus = political_effort"); + newFocus->mutuallyExclusive = "focus = liberty_ethos"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = fascism\n"; + newFocus->available += " has_government = communism\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 18; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_historical_focus_on = yes\n"; + newFocus->aiWillDo += " has_idea = neutrality_idea\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = collectivist_ethos_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "nationalism_focus"; + newFocus->icon = "GFX_goal_support_fascism #icon = GFX_goal_tripartite_pact"; + newFocus->prerequisites.push_back("focus = collectivist_ethos"); + newFocus->mutuallyExclusive = "focus = internationalism_focus"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = fascism\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 16; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 2\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " has_government = fascism\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = nationalism"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "internationalism_focus"; + newFocus->icon = "GFX_goal_support_communism #icon = GFX_goal_tripartite_pact"; + newFocus->prerequisites.push_back("focus = collectivist_ethos"); + newFocus->mutuallyExclusive = "focus = nationalism_focus"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = communism\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 18; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 2\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " has_government = communism\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = internationalism"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "liberty_ethos"; + newFocus->icon = "GFX_goal_support_democracy"; + newFocus->prerequisites.push_back("focus = political_effort"); + newFocus->mutuallyExclusive = "focus = collectivist_ethos"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = democratic\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 20; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 95\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.1\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " has_government = communism\n"; + newFocus->aiWillDo += " has_government = fascism\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " NOT = {\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " has_government = democratic\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = liberty_ethos_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "militarism"; + newFocus->icon = "GFX_goal_generic_political_pressure"; + newFocus->prerequisites.push_back("focus = nationalism_focus"); + newFocus->xPos = 16; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; + newFocus->completionReward += " remove_ideas = neutrality_idea\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_ideas = militarism_focus\n"; + newFocus->completionReward += " army_experience = 20\n"; + newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "political_correctness"; + newFocus->icon = "GFX_goal_generic_dangerous_deal"; + newFocus->prerequisites.push_back("focus = internationalism_focus"); + newFocus->xPos = 18; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; + newFocus->completionReward += " remove_ideas = neutrality_idea\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " add_political_power = 200\n"; + newFocus->completionReward += " add_ideas = idea_political_correctness"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "neutrality_focus"; + newFocus->icon = "GFX_goal_generic_neutrality_focus"; + newFocus->prerequisites.push_back("focus = liberty_ethos"); + newFocus->mutuallyExclusive = "focus = interventionism_focus"; + newFocus->xPos = 20; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; + newFocus->completionReward += " add_ideas = neutrality_idea\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_political_power = 150"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "interventionism_focus"; + newFocus->icon = "GFX_goal_generic_political_pressure"; + newFocus->prerequisites.push_back("focus = liberty_ethos"); + newFocus->mutuallyExclusive = "focus = neutrality_focus"; + newFocus->xPos = 22; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " has_idea = neutrality_idea\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; + newFocus->completionReward += " remove_ideas = neutrality_idea\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " set_rule = { can_send_volunteers = yes }\n"; + newFocus->completionReward += " add_political_power = 150"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "military_youth"; + newFocus->icon = "GFX_goal_generic_more_territorial_claims"; + newFocus->prerequisites.push_back("focus = militarism"); + newFocus->xPos = 16; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = military_youth_focus\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = fascism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = fascism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = communism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = communism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "deterrence"; + newFocus->icon = "GFX_goal_generic_defence"; + newFocus->prerequisites.push_back("focus = neutrality_focus"); + newFocus->xPos = 20; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = deterrence"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "volunteer_corps"; + newFocus->icon = "GFX_goal_generic_allies_build_infantry"; + newFocus->prerequisites.push_back("focus = interventionism_focus"); + newFocus->xPos = 22; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = volunteer_corps_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "paramilitarism"; + newFocus->icon = "GFX_goal_generic_military_sphere"; + newFocus->prerequisites.push_back("focus = military_youth"); + newFocus->xPos = 16; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = paramilitarism_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "indoctrination_focus"; + newFocus->icon = "GFX_goal_generic_propaganda"; + newFocus->prerequisites.push_back("focus = political_correctness"); + newFocus->xPos = 18; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = indoctrination_focus\n"; + newFocus->completionReward += " add_political_power = 150"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "foreign_expeditions"; + newFocus->icon = "GFX_goal_generic_more_territorial_claims"; + newFocus->prerequisites.push_back("focus = volunteer_corps"); + newFocus->xPos = 22; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = foreign_expeditions_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "why_we_fight"; + newFocus->icon = "GFX_goal_generic_propaganda"; + newFocus->prerequisites.push_back("focus = foreign_expeditions focus = deterrence"); + newFocus->available += " OR = {\n"; + newFocus->available += " threat > 0.75\n"; + newFocus->available += " has_defensive_war = yes\n"; + newFocus->available += " }"; + newFocus->continueIfInvalid += "yes"; + newFocus->xPos = 20; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; + newFocus->completionReward += " set_rule = { can_create_factions = yes }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_ideas = why_we_fight_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "political_commissars"; + newFocus->icon = "GFX_goal_generic_forceful_treaty"; + newFocus->prerequisites.push_back("focus = indoctrination_focus"); + newFocus->available = " "; + newFocus->xPos = 18; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = political_commissars_focus\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = fascism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = fascism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = communism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = communism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_political_power = 200"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "ideological_fanaticism"; + newFocus->icon = "GFX_goal_generic_demand_territory"; + newFocus->prerequisites.push_back("focus = paramilitarism focus = political_commissars"); + newFocus->xPos = 17; + newFocus->yPos = 6; + newFocus->cost = 10; + newFocus->completionReward += " add_ideas = ideological_fanaticism_focus\n"; + newFocus->completionReward += " set_rule = {\n"; + newFocus->completionReward += " can_create_factions = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " hidden_effect = {\n"; + newFocus->completionReward += " set_rule = { can_use_kamikaze_pilots = yes }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " custom_effect_tooltip = kamikaze_focus_tooltip"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "technology_sharing"; + newFocus->icon = "GFX_goal_generic_scientific_exchange"; + newFocus->prerequisites.push_back("focus = ideological_fanaticism focus = why_we_fight"); + newFocus->available += " has_war = yes\n"; + newFocus->available += " is_in_faction = yes\n"; + newFocus->available += " OR = {\n"; + newFocus->available += " num_of_factories > 50\n"; + newFocus->available += " any_country = {\n"; + newFocus->available += " is_in_faction_with = ROOT\n"; + newFocus->available += " num_of_factories > 50\n"; + newFocus->available += " }\n"; + newFocus->available += " }"; + newFocus->xPos = 19; + newFocus->yPos = 7; + newFocus->cost = 10; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " original_research_slots < 3\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_research_slot = 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " original_research_slots > 2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = electronics_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = electronics\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = industrial_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = industry\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_weapons_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); +} + + +void HoI4FocusTree::addVersion1_3GenericFocusTree() +{ + HoI4Focus* newFocus = new HoI4Focus; + newFocus->id = "army_effort"; + newFocus->icon = "GFX_goal_generic_allies_build_infantry"; + newFocus->xPos = 1; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " army_experience = 5\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = land_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = land_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "equipment_effort"; + newFocus->icon = "GFX_goal_generic_small_arms"; + newFocus->prerequisites.push_back("focus = army_effort"); + newFocus->xPos = 0; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_weapons_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "motorization_effort"; + newFocus->icon = "GFX_goal_generic_army_motorized"; + newFocus->prerequisites.push_back("focus = army_effort"); + newFocus->bypass = " has_tech = motorised_infantry"; + newFocus->xPos = 2; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = motorized_bonus\n"; + newFocus->completionReward += " bonus = 0.75\n"; + newFocus->completionReward += " technology = motorised_infantry\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "doctrine_effort"; + newFocus->icon = "GFX_goal_generic_army_doctrines"; + newFocus->prerequisites.push_back("focus = army_effort"); + newFocus->xPos = 1; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " army_experience = 5\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = land_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = land_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "equipment_effort_2"; + newFocus->icon = "GFX_goal_generic_army_artillery"; + newFocus->prerequisites.push_back("focus = equipment_effort"); + newFocus->xPos = 0; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_artillery_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "mechanization_effort"; + newFocus->icon = "GFX_goal_generic_build_tank"; + newFocus->prerequisites.push_back("focus = motorization_effort"); + newFocus->xPos = 2; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = motorized_bonus\n"; + newFocus->completionReward += " ahead_reduction = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = motorized_equipment\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "doctrine_effort_2"; + newFocus->icon = "GFX_goal_generic_army_doctrines"; + newFocus->prerequisites.push_back("focus = doctrine_effort"); + newFocus->xPos = 1; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " army_experience = 5\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = land_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = land_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "equipment_effort_3"; + newFocus->icon = "GFX_goal_generic_army_artillery2"; + newFocus->prerequisites.push_back("focus = equipment_effort_2"); + newFocus->xPos = 0; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_artillery_bonus\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "armor_effort"; + newFocus->icon = "GFX_goal_generic_army_tanks"; + newFocus->prerequisites.push_back("focus = mechanization_effort"); + newFocus->xPos = 2; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = armor_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " category = armor\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "special_forces"; + newFocus->icon = "GFX_goal_generic_special_forces"; + newFocus->prerequisites.push_back("focus = equipment_effort_3"); + newFocus->prerequisites.push_back("focus = doctrine_effort_2"); + newFocus->prerequisites.push_back("focus = armor_effort"); + newFocus->xPos = 1; + newFocus->yPos = 6; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward = " add_tech_bonus = {\n"; + newFocus->completionReward += " name = special_forces_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = paratroopers\n"; + newFocus->completionReward += " technology = paratroopers2\n"; + newFocus->completionReward += " technology = marines\n"; + newFocus->completionReward += " technology = marines2\n"; + newFocus->completionReward += " technology = tech_mountaineers\n"; + newFocus->completionReward += " technology = tech_mountaineers2\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "aviation_effort"; + newFocus->icon = "GFX_goal_generic_build_airforce"; + newFocus->xPos = 5; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completeTooltip = " air_experience = 25\n"; + newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_AB }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = air_base\n"; + newFocus->completeTooltip += " level = 2\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " } \n"; + newFocus->completeTooltip += " add_tech_bonus = {\n"; + newFocus->completeTooltip += " name = air_doc_bonus\n"; + newFocus->completeTooltip += " bonus = 0.5\n"; + newFocus->completeTooltip += " uses = 1\n"; + newFocus->completeTooltip += " category = air_doctrine\n"; + newFocus->completeTooltip += " } "; + newFocus->completionReward += " air_experience = 25\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = air_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = air_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "fighter_focus"; + newFocus->icon = "GFX_goal_generic_air_fighter"; + newFocus->prerequisites.push_back("focus = aviation_effort"); + newFocus->mutuallyExclusive = "focus = bomber_focus"; + newFocus->xPos = 4; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = fighter_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " technology = early_fighter\n"; + newFocus->completionReward += " technology = fighter1\n"; + newFocus->completionReward += " technology = fighter2\n"; + newFocus->completionReward += " technology = fighter3\n"; + newFocus->completionReward += " technology = heavy_fighter1\n"; + newFocus->completionReward += " technology = heavy_fighter2\n"; + newFocus->completionReward += " technology = heavy_fighter3\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "bomber_focus"; + newFocus->icon = "GFX_goal_generic_air_bomber"; + newFocus->prerequisites.push_back("focus = aviation_effort"); + newFocus->mutuallyExclusive = "focus = fighter_focus"; + newFocus->xPos = 6; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = bomber_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " technology = strategic_bomber1\n"; + newFocus->completionReward += " technology = strategic_bomber2\n"; + newFocus->completionReward += " technology = strategic_bomber3\n"; + newFocus->completionReward += " category = tactical_bomber\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "aviation_effort_2"; + newFocus->icon = "GFX_goal_generic_air_doctrine"; + newFocus->prerequisites.push_back("focus = bomber_focus focus = fighter_focus"); + newFocus->xPos = 5; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completeTooltip += " air_experience = 25\n"; + newFocus->completeTooltip += " if = { limit = { has_country_flag = aviation_effort_2_AB }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = air_base\n"; + newFocus->completeTooltip += " level = 2\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " add_tech_bonus = {\n"; + newFocus->completeTooltip += " name = air_doc_bonus\n"; + newFocus->completeTooltip += " bonus = 0.5\n"; + newFocus->completeTooltip += " uses = 1\n"; + newFocus->completeTooltip += " category = air_doctrine\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " air_experience = 25\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " NOT = { is_controlled_by = ROOT }\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " is_controlled_by = ROOT\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = air_base\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " capital_scope = {\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = air_base\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " ROOT = { set_country_flag = aviation_effort_2_AB }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = air_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = air_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "CAS_effort"; + newFocus->icon = "GFX_goal_generic_CAS"; + newFocus->prerequisites.push_back("focus = aviation_effort_2"); + newFocus->prerequisites.push_back("focus = motorization_effort"); + newFocus->xPos = 4; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = CAS_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = cas_bomber\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "rocket_effort"; + newFocus->icon = "GFX_focus_rocketry"; + newFocus->prerequisites.push_back("focus = aviation_effort_2"); + newFocus->prerequisites.push_back("focus = infrastructure_effort"); + newFocus->xPos = 5; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = jet_rocket_bonus\n"; + newFocus->completionReward += " ahead_reduction = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " category = rocketry\n"; + newFocus->completionReward += " category = jet_technology\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.25\n"; + newFocus->aiWillDo += " always = yes\n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "NAV_effort"; + newFocus->icon = "GFX_goal_generic_air_naval_bomber"; + newFocus->prerequisites.push_back("focus = aviation_effort_2"); + newFocus->prerequisites.push_back("focus = flexible_navy"); + newFocus->xPos = 6; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = nav_bomber_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = naval_bomber\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "naval_effort"; + newFocus->icon = "GFX_goal_generic_construct_naval_dockyard"; + newFocus->xPos = 9; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->available += " any_state = {\n"; + newFocus->available += " is_coastal = yes\n"; + newFocus->available += " is_controlled_by = ROOT\n"; + newFocus->available += " }"; + newFocus->completeTooltip += " navy_experience = 25\n"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = dockyard\n"; + newFocus->completeTooltip += " level = 3\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " navy_experience = 25\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " dockyard > 0\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " is_coastal = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " is_coastal = yes\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = dockyard\n"; + newFocus->completionReward += " level = 3\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " set_country_flag = naval_effort_built\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " dockyard > 0\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " dockyard > 0\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = dockyard\n"; + newFocus->completionReward += " level = 3\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " set_country_flag = naval_effort_built\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " NOT = { has_country_flag = naval_effort_built }\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " controller = { tag = ROOT }\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = dockyard\n"; + newFocus->completionReward += " size > 2\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 3\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = dockyard\n"; + newFocus->completionReward += " level = 3\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "flexible_navy"; + newFocus->icon = "GFX_goal_generic_build_navy"; + newFocus->prerequisites.push_back("focus = naval_effort"); + newFocus->mutuallyExclusive = "focus = large_navy"; + newFocus->xPos = 8; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = sub_op_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " technology = convoy_interdiction_ti\n"; + newFocus->completionReward += " technology = unrestricted_submarine_warfare\n"; + newFocus->completionReward += " technology = wolfpacks\n"; + newFocus->completionReward += " technology = advanced_submarine_warfare\n"; + newFocus->completionReward += " technology = combined_operations_raiding\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "large_navy"; + newFocus->icon = "GFX_goal_generic_navy_doctrines_tactics"; + newFocus->prerequisites.push_back("focus = naval_effort"); + newFocus->mutuallyExclusive = "focus = flexible_navy"; + newFocus->xPos = 10; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = fleet_in_being_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 2\n"; + newFocus->completionReward += " category = fleet_in_being_tree\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "submarine_effort"; + newFocus->icon = "GFX_goal_generic_navy_submarine"; + newFocus->prerequisites.push_back("focus = flexible_navy focus = large_navy"); + newFocus->xPos = 8; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = ss_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = early_submarine\n"; + newFocus->completionReward += " technology = basic_submarine\n"; + newFocus->completionReward += " technology = improved_submarine\n"; + newFocus->completionReward += " technology = advanced_submarine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "cruiser_effort"; + newFocus->icon = "GFX_goal_generic_navy_cruiser"; + newFocus->prerequisites.push_back("focus = large_navy focus = flexible_navy"); + newFocus->xPos = 10; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = cr_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = improved_light_cruiser\n"; + newFocus->completionReward += " technology = advanced_light_cruiser\n"; + newFocus->completionReward += " technology = improved_heavy_cruiser\n"; + newFocus->completionReward += " technology = advanced_heavy_cruiser\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "destroyer_effort"; + newFocus->icon = "GFX_goal_generic_wolf_pack"; + newFocus->prerequisites.push_back("focus = submarine_effort"); + newFocus->xPos = 8; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = dd_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = early_destroyer\n"; + newFocus->completionReward += " technology = basic_destroyer\n"; + newFocus->completionReward += " technology = improved_destroyer\n"; + newFocus->completionReward += " technology = advanced_destroyer\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "capital_ships_effort"; + newFocus->icon = "GFX_goal_generic_navy_battleship"; + newFocus->prerequisites.push_back("focus = cruiser_effort"); + newFocus->xPos = 10; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " all_owned_state = {\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_coastal = no\n"; + newFocus->aiWillDo += " dockyard < 1\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " navy_experience = 25\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = capital_ships_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " ahead_reduction = 1\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " technology = basic_battlecruiser\n"; + newFocus->completionReward += " technology = basic_battleship\n"; + newFocus->completionReward += " technology = improved_battleship\n"; + newFocus->completionReward += " technology = advanced_battleship\n"; + newFocus->completionReward += " technology = heavy_battleship\n"; + newFocus->completionReward += " technology = heavy_battleship2\n"; + newFocus->completionReward += " technology = early_carrier\n"; + newFocus->completionReward += " technology = basic_carrier\n"; + newFocus->completionReward += " technology = improved_carrier\n"; + newFocus->completionReward += " technology = advanced_carrier\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "industrial_effort"; + newFocus->icon = "GFX_goal_generic_production"; + newFocus->xPos = 13; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = industrial_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = industry\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 3\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " date < 1939.1.1\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " # we also dont want tiny nations to go crazy with slots right away\n"; + newFocus->aiWillDo += " num_of_controlled_states < 2\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "construction_effort"; + newFocus->icon = "GFX_goal_generic_construct_civ_factory"; + newFocus->prerequisites.push_back("focus = industrial_effort"); + newFocus->xPos = 12; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = construction_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = industrial_complex\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " } \n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = industrial_complex\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = industrial_complex\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "production_effort"; + newFocus->icon = "GFX_goal_generic_construct_mil_factory"; + newFocus->prerequisites.push_back("focus = industrial_effort"); + newFocus->xPos = 14; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = production_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = arms_factory\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = arms_factory\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "construction_effort_2"; + newFocus->icon = "GFX_goal_generic_construct_civ_factory"; + newFocus->prerequisites.push_back("focus = construction_effort"); + newFocus->xPos = 12; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = construction_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = industrial_complex\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = industrial_complex\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = industrial_complex\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "production_effort_2"; + newFocus->icon = "GFX_goal_generic_construct_mil_factory"; + newFocus->prerequisites.push_back("focus = production_effort"); + newFocus->xPos = 14; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = production_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = arms_factory\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = arms_factory\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "infrastructure_effort"; + newFocus->icon = "GFX_goal_generic_construct_infrastructure"; + newFocus->prerequisites.push_back("focus = construction_effort_2"); + newFocus->xPos = 12; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; + newFocus->bypass += " all_owned_state = { \n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = infrastructure\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "production_effort_3"; + newFocus->icon = "GFX_goal_generic_construct_mil_factory"; + newFocus->prerequisites.push_back("focus = production_effort_2"); + newFocus->xPos = 14; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = production_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = arms_factory\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = arms_factory\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "infrastructure_effort_2"; + newFocus->icon = "GFX_goal_generic_construct_infrastructure"; + newFocus->prerequisites.push_back("focus = infrastructure_effort"); + newFocus->xPos = 12; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = infrastructure_effort_tt\n"; + newFocus->bypass += " all_owned_state = { \n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = infrastructure\n"; + newFocus->bypass += " size < 1\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = infrastructure\n"; + newFocus->completeTooltip += " level = 1\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "construction_effort_3"; + newFocus->icon = "GFX_goal_generic_construct_civ_factory"; + newFocus->prerequisites.push_back("focus = infrastructure_effort"); + newFocus->xPos = 14; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 2"; + newFocus->bypass += " custom_trigger_tooltip = {\n"; + newFocus->bypass += " tooltip = construction_effort_tt\n"; + newFocus->bypass += " all_owned_state = {\n"; + newFocus->bypass += " free_building_slots = {\n"; + newFocus->bypass += " building = industrial_complex\n"; + newFocus->bypass += " size < 2\n"; + newFocus->bypass += " include_locked = yes\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " }"; + newFocus->completeTooltip += " add_extra_state_shared_building_slots = 2\n"; + newFocus->completeTooltip += " add_building_construction = {\n"; + newFocus->completeTooltip += " type = industrial_complex\n"; + newFocus->completeTooltip += " level = 2\n"; + newFocus->completeTooltip += " instant_build = yes\n"; + newFocus->completeTooltip += " }"; + newFocus->completionReward += " random_owned_controlled_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 1\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 2\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = industrial_complex\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "nuclear_effort"; + newFocus->icon = "GFX_focus_wonderweapons"; + newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); + newFocus->xPos = 10; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = nuclear_bonus\n"; + newFocus->completionReward += " ahead_reduction = 0.5\n"; + newFocus->completionReward += " category = nuclear\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.25\n"; + newFocus->aiWillDo += " always = yes\n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "extra_tech_slot"; + newFocus->icon = "GFX_focus_research"; + newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); + newFocus->xPos = 12; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_research_slot = 1"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "extra_tech_slot_2"; + newFocus->icon = "GFX_focus_research"; + newFocus->prerequisites.push_back("focus = extra_tech_slot"); + newFocus->available += " num_of_factories > 50"; + newFocus->cancelIfInvalid += "no"; + newFocus->continueIfInvalid += "yes"; + newFocus->xPos = 12; + newFocus->yPos = 6; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_research_slot = 1"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "secret_weapons"; + newFocus->icon = "GFX_goal_generic_secret_weapon"; + newFocus->prerequisites.push_back("focus = infrastructure_effort_2"); + newFocus->xPos = 14; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = secret_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 4\n"; + newFocus->completionReward += " category = electronics\n"; + newFocus->completionReward += " category = nuclear\n"; + newFocus->completionReward += " category = rocketry\n"; + newFocus->completionReward += " }"; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.25\n"; + newFocus->aiWillDo += " always = yes\n"; + newFocus->aiWillDo += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "political_effort"; + newFocus->icon = "GFX_goal_generic_demand_territory"; + newFocus->xPos = 19; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_political_power = 120"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "collectivist_ethos"; + newFocus->icon = "GFX_goal_generic_national_unity #icon = GFX_goal_tripartite_pact"; + newFocus->prerequisites.push_back("focus = political_effort"); + newFocus->mutuallyExclusive = "focus = liberty_ethos"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = fascism\n"; + newFocus->available += " has_government = communism\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 18; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " is_historical_focus_on = yes\n"; + newFocus->aiWillDo += " has_idea = neutrality_idea\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = collectivist_ethos_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "nationalism_focus"; + newFocus->icon = "GFX_goal_support_fascism #icon = GFX_goal_tripartite_pact"; + newFocus->prerequisites.push_back("focus = collectivist_ethos"); + newFocus->mutuallyExclusive = "focus = internationalism_focus"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = fascism\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 16; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 2\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " has_government = fascism\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = nationalism"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "internationalism_focus"; + newFocus->icon = "GFX_goal_support_communism #icon = GFX_goal_tripartite_pact"; + newFocus->prerequisites.push_back("focus = collectivist_ethos"); + newFocus->mutuallyExclusive = "focus = nationalism_focus"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = communism\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 18; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 2\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " has_government = communism\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = internationalism"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "liberty_ethos"; + newFocus->icon = "GFX_goal_support_democracy"; + newFocus->prerequisites.push_back("focus = political_effort"); + newFocus->mutuallyExclusive = "focus = collectivist_ethos"; + newFocus->available += " OR = {\n"; + newFocus->available += " has_government = democratic\n"; + newFocus->available += " has_government = neutrality\n"; + newFocus->available += " }"; + newFocus->xPos = 20; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 95\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0.1\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " OR = {\n"; + newFocus->aiWillDo += " has_government = communism\n"; + newFocus->aiWillDo += " has_government = fascism\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " NOT = {\n"; + newFocus->aiWillDo += " any_neighbor_country = {\n"; + newFocus->aiWillDo += " is_major = yes\n"; + newFocus->aiWillDo += " has_government = democratic\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = liberty_ethos_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "militarism"; + newFocus->icon = "GFX_goal_generic_political_pressure"; + newFocus->prerequisites.push_back("focus = nationalism_focus"); + newFocus->xPos = 16; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; + newFocus->completionReward += " remove_ideas = neutrality_idea\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_ideas = militarism_focus\n"; + newFocus->completionReward += " army_experience = 20\n"; + newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "political_correctness"; + newFocus->icon = "GFX_goal_generic_dangerous_deal"; + newFocus->prerequisites.push_back("focus = internationalism_focus"); + newFocus->xPos = 18; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; + newFocus->completionReward += " remove_ideas = neutrality_idea\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " add_political_power = 200\n"; + newFocus->completionReward += " add_ideas = idea_political_correctness"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "neutrality_focus"; + newFocus->icon = "GFX_goal_generic_neutrality_focus"; + newFocus->prerequisites.push_back("focus = liberty_ethos"); + newFocus->mutuallyExclusive = "focus = interventionism_focus"; + newFocus->xPos = 20; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; + newFocus->completionReward += " add_ideas = neutrality_idea\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_political_power = 150"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "interventionism_focus"; + newFocus->icon = "GFX_goal_generic_political_pressure"; + newFocus->prerequisites.push_back("focus = liberty_ethos"); + newFocus->mutuallyExclusive = "focus = neutrality_focus"; + newFocus->xPos = 22; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->aiWillDo += " factor = 1\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " has_idea = neutrality_idea\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_idea = neutrality_idea }\n"; + newFocus->completionReward += " remove_ideas = neutrality_idea\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " set_rule = { can_send_volunteers = yes }\n"; + newFocus->completionReward += " add_political_power = 150"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "military_youth"; + newFocus->icon = "GFX_goal_generic_more_territorial_claims"; + newFocus->prerequisites.push_back("focus = militarism"); + newFocus->xPos = 16; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = military_youth_focus\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = fascism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = fascism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = communism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = communism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "deterrence"; + newFocus->icon = "GFX_goal_generic_defence"; + newFocus->prerequisites.push_back("focus = neutrality_focus"); + newFocus->xPos = 20; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = deterrence"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "volunteer_corps"; + newFocus->icon = "GFX_goal_generic_allies_build_infantry"; + newFocus->prerequisites.push_back("focus = interventionism_focus"); + newFocus->xPos = 22; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = volunteer_corps_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "paramilitarism"; + newFocus->icon = "GFX_goal_generic_military_sphere"; + newFocus->prerequisites.push_back("focus = military_youth"); + newFocus->xPos = 16; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = paramilitarism_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "indoctrination_focus"; + newFocus->icon = "GFX_goal_generic_propaganda"; + newFocus->prerequisites.push_back("focus = political_correctness"); + newFocus->xPos = 18; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = indoctrination_focus\n"; + newFocus->completionReward += " add_political_power = 150"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "foreign_expeditions"; + newFocus->icon = "GFX_goal_generic_more_territorial_claims"; + newFocus->prerequisites.push_back("focus = volunteer_corps"); + newFocus->xPos = 22; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = foreign_expeditions_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "why_we_fight"; + newFocus->icon = "GFX_goal_generic_propaganda"; + newFocus->prerequisites.push_back("focus = foreign_expeditions focus = deterrence"); + newFocus->available += " OR = {\n"; + newFocus->available += " threat > 0.75\n"; + newFocus->available += " has_defensive_war = yes\n"; + newFocus->available += " }"; + newFocus->continueIfInvalid += "yes"; + newFocus->xPos = 20; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { NOT = { has_idea = neutrality_idea } }\n"; + newFocus->completionReward += " set_rule = { can_create_factions = yes }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_ideas = why_we_fight_focus"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "political_commissars"; + newFocus->icon = "GFX_goal_generic_forceful_treaty"; + newFocus->prerequisites.push_back("focus = indoctrination_focus"); + newFocus->available = " "; + newFocus->xPos = 18; + newFocus->yPos = 5; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = political_commissars_focus\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = fascism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = fascism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = { has_government = communism }\n"; + newFocus->completionReward += " add_popularity = {\n"; + newFocus->completionReward += " ideology = communism\n"; + newFocus->completionReward += " popularity = 0.2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_political_power = 200"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "ideological_fanaticism"; + newFocus->icon = "GFX_goal_generic_demand_territory"; + newFocus->prerequisites.push_back("focus = paramilitarism focus = political_commissars"); + newFocus->xPos = 17; + newFocus->yPos = 6; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " add_ideas = ideological_fanaticism_focus\n"; + newFocus->completionReward += " set_rule = {\n"; + newFocus->completionReward += " can_create_factions = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " hidden_effect = {\n"; + newFocus->completionReward += " set_rule = { can_use_kamikaze_pilots = yes }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " custom_effect_tooltip = kamikaze_focus_tooltip"; + focuses.push_back(newFocus); + + newFocus = new HoI4Focus; + newFocus->id = "technology_sharing"; + newFocus->icon = "GFX_goal_generic_scientific_exchange"; + newFocus->prerequisites.push_back("focus = ideological_fanaticism focus = why_we_fight"); + newFocus->available += " has_war = yes\n"; + newFocus->available += " is_in_faction = yes\n"; + newFocus->available += " OR = {\n"; + newFocus->available += " num_of_factories > 50\n"; + newFocus->available += " any_other_country = {\n"; + newFocus->available += " is_in_faction_with = ROOT\n"; + newFocus->available += " num_of_factories > 50\n"; + newFocus->available += " }\n"; + newFocus->available += " }"; + newFocus->xPos = 19; + newFocus->yPos = 7; + newFocus->cost = 10; + newFocus->availableIfCapitulated = true; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " original_research_slots < 3\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_research_slot = 1\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " if = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " original_research_slots > 2\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = electronics_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = electronics\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = industrial_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = industry\n"; + newFocus->completionReward += " } \n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = infantry_weapons_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = infantry_weapons\n"; + newFocus->completionReward += " category = artillery\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); +} + +HoI4FocusTree* HoI4FocusTree::makeCustomizedCopy(const HoI4Country* country) const +{ + HoI4FocusTree* newFocusTree = new HoI4FocusTree(country); + + for (auto focus: focuses) + { + HoI4Focus* newFocus = focus->makeCustomizedCopy(newFocusTree->dstCountryTag); + newFocusTree->addFocus(newFocus); + } + + return newFocusTree; +} + + +void HoI4FocusTree::addDemocracyNationalFocuses(HoI4Country* Home, vector CountriesToContain, int XStart) +{ + double WTModifier = 1; + if (Home->getGovernmentIdeology() == "democratic") + { + string warPol = Home->getRulingParty()->war_policy; + if (warPol == "jingoism") + WTModifier = 0; + if (warPol == "pro_military") + WTModifier = 0.25; + if (warPol == "anti_military") + WTModifier = 0.5; + if (warPol == "pacifism" || warPol == "pacifist") + WTModifier = 0.5; + } + + //War Propoganda + HoI4Focus* newFocus = new HoI4Focus; + newFocus->id = "WarProp" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_propaganda"; + newFocus->text += "War Propoganda"; + newFocus->available += " threat > " + to_string(0.2*WTModifier); + newFocus->xPos = XStart; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + newFocus->completionReward += " add_ideas = militarism_focus"; + focuses.push_back(newFocus); + + //Prepare Intervention + newFocus = new HoI4Focus; + newFocus->id = "PrepInter" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_occupy_states_ongoing_war"; + newFocus->text += "War Propoganda"; + newFocus->prerequisites.push_back("focus = WarProp" + Home->getTag()); + newFocus->available += " threat > " + to_string(0.4 * WTModifier); + newFocus->xPos = XStart; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; + focuses.push_back(newFocus); + + int offBalance = 0; + if (CountriesToContain.size() >= 2) + offBalance = -3; + if (CountriesToContain.size() == 1) + offBalance = -2; + + //Limited Intervention + newFocus = new HoI4Focus; + newFocus->id = "Lim" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_more_territorial_claims"; + newFocus->text += "Limited Intervention"; + newFocus->prerequisites.push_back("focus = PrepInter" + Home->getTag()); + newFocus->available += " threat > " + to_string(0.8 * WTModifier); + newFocus->xPos = XStart + offBalance; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + newFocus->completionReward += " add_ideas = limited_interventionism\n"; + newFocus->completionReward += " set_rule = { can_send_volunteers = yes }"; + focuses.push_back(newFocus); + + int warPlannumber = 1; + //for (auto Country : CountriesToContain) + + for (int i = CountriesToContain.size() - 1; i >= 0; i--) + { + HoI4Country* Country = CountriesToContain[i]; + //War Plan + newFocus = new HoI4Focus; + newFocus->id = "WarPlan" + Home->getTag() + Country->getTag(); + newFocus->icon = "GFX_goal_generic_position_armies"; + newFocus->text += "War Plan " + Country->getSourceCountry()->getName("english"); + newFocus->prerequisites.push_back("focus = PrepInter" + Home->getTag()); + newFocus->available += " any_other_country = {"; + newFocus->available += " original_tag = " + Country->getTag(); + newFocus->available += " exists = yes"; + newFocus->available += " NOT = { is_in_faction_with = " + Home->getTag() + " }\n"; + newFocus->available += " OR = {"; + newFocus->available += " has_offensive_war = yes"; + newFocus->available += " has_added_tension_amount > 30"; + newFocus->available += " }"; + newFocus->available += " }"; + newFocus->xPos = XStart + offBalance + warPlannumber * 2; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + newFocus->completionReward += " army_experience = 20\n"; + newFocus->completionReward += " add_tech_bonus = {\n"; + newFocus->completionReward += " name = land_doc_bonus\n"; + newFocus->completionReward += " bonus = 0.5\n"; + newFocus->completionReward += " uses = 1\n"; + newFocus->completionReward += " category = land_doctrine\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + //Embargo + newFocus = new HoI4Focus; + newFocus->id = "Embargo" + Home->getTag() + Country->getTag(); + newFocus->icon = "GFX_goal_generic_trade"; + newFocus->text += "Embargo " + Country->getSourceCountry()->getName("english"); + newFocus->prerequisites.push_back("focus = WarPlan" + Home->getTag() + Country->getTag()); + newFocus->available += " any_other_country = {"; + newFocus->available += " original_tag = " + Country->getTag(); + newFocus->available += " exists = yes"; + newFocus->available += " NOT = { is_in_faction_with = " + Home->getTag() + " }\n"; + newFocus->available += " OR = {"; + newFocus->available += " has_offensive_war = yes"; + newFocus->available += " has_added_tension_amount > 30"; + newFocus->available += " threat > 0.6"; + newFocus->available += " }"; + newFocus->available += " }"; + newFocus->xPos = XStart + offBalance + warPlannumber * 2; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + newFocus->completionReward += " " + Country->getTag() + " = {\n"; + newFocus->completionReward += " add_opinion_modifier = { target = " + Home->getTag() + " modifier = embargo }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + //WAR + newFocus = new HoI4Focus; + newFocus->id = "WAR" + Home->getTag() + Country->getTag(); + newFocus->icon = "GFX_goal_support_democracy"; + newFocus->text += "Enact War Plan " + Country->getSourceCountry()->getName("english"); + newFocus->available += " any_other_country = {"; + newFocus->available += " original_tag = " + Country->getTag(); + newFocus->available += " exists = yes"; + newFocus->available += " NOT = { is_in_faction_with = " + Home->getTag() + " }\n"; + newFocus->available += " OR = {"; + newFocus->available += " has_offensive_war = yes"; + newFocus->available += " has_added_tension_amount > 30"; + newFocus->available += " threat > 0.6"; + newFocus->available += " }"; + newFocus->available += " }"; + newFocus->prerequisites.push_back("focus = Embargo" + Home->getTag() + Country->getTag()); + newFocus->prerequisites.push_back("focus = Lim" + Home->getTag()); + newFocus->xPos = XStart + offBalance + warPlannumber++ * 2; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + newFocus->completionReward += " create_wargoal = {\n"; + newFocus->completionReward += " type = puppet_wargoal_focus\n"; + newFocus->completionReward += " target = " + Country->getTag() + "\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + } +} + + +void HoI4FocusTree::addAbsolutistEmpireNationalFocuses(HoI4Country* Home, const vector& targetColonies, const vector& annexationTargets) +{ + //Glory to Empire! + HoI4Focus* newFocus = new HoI4Focus; + newFocus->id = "EmpireGlory" + Home->getTag(); + newFocus->icon = "GFX_goal_anschluss"; + newFocus->text += "Glory to the Empire!"; + //newFocus->available += " is_puppet = no\n"; + newFocus->xPos = 29; + newFocus->yPos = 0; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " date < 1937.6.6\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_national_unity = 0.1"; + focuses.push_back(newFocus); + + //Colonies Focus + newFocus = new HoI4Focus; + newFocus->id = "StrengthenColonies" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_position_armies"; + newFocus->text += "Strengthen the Colonies"; + newFocus->prerequisites.push_back("focus = EmpireGlory" + Home->getTag()); + newFocus->mutuallyExclusive = "focus = StrengthenHome" + Home->getTag(); + newFocus->xPos = 28; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " navy_experience = 25"; + focuses.push_back(newFocus); + + //Home Focus + newFocus = new HoI4Focus; + newFocus->id = "StrengthenHome" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_national_unity"; + newFocus->text += "Strengthen Home"; + newFocus->prerequisites.push_back("focus = EmpireGlory" + Home->getTag()); + newFocus->mutuallyExclusive = "focus = StrengthenColonies" + Home->getTag(); + newFocus->xPos = 30; + newFocus->yPos = 1; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " army_experience = 25"; + focuses.push_back(newFocus); + + //Colonial Factories + newFocus = new HoI4Focus; + newFocus->id = "ColonialInd" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_construct_civ_factory"; + newFocus->text += "Colonial Industry Buildup"; + newFocus->prerequisites.push_back("focus = StrengthenColonies" + Home->getTag()); + newFocus->xPos = 26; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = industrial_complex\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + //Colonial Highway + newFocus = new HoI4Focus; + newFocus->id = "ColonialHwy" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_construct_infrastructure"; + newFocus->text += "Colonial Highway"; + newFocus->prerequisites.push_back("focus = ColonialInd" + Home->getTag()); + newFocus->mutuallyExclusive = "focus = ResourceFac" + Home->getTag(); + newFocus->xPos = 24; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + //improve resources + newFocus = new HoI4Focus; + newFocus->id = "ResourceFac" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_oil_refinery"; + newFocus->text += "Improve Resource Factories"; + newFocus->prerequisites.push_back("focus = ColonialInd" + Home->getTag()); + newFocus->mutuallyExclusive = "focus = ColonialHwy" + Home->getTag(); + newFocus->xPos = 26; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = improved_resource_industry"; + focuses.push_back(newFocus); + + //establish colonial army + newFocus = new HoI4Focus; + newFocus->id = "ColonialArmy" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_allies_build_infantry"; + newFocus->text += "Establish Colonial Army"; + newFocus->prerequisites.push_back("focus = StrengthenColonies" + Home->getTag()); + newFocus->xPos = 28; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = militarism_focus"; + focuses.push_back(newFocus); + + //establish protectorate + if (targetColonies.size() >= 1) + { + auto target = targetColonies.front(); + + newFocus = new HoI4Focus; + newFocus->id = "Protectorate" + Home->getTag() + target->getTag(); + newFocus->icon = "GFX_goal_generic_major_war"; + newFocus->text += "Establish Protectorate over " + target->getSourceCountry()->getName("english"); + newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; + newFocus->prerequisites.push_back("focus = ColonialArmy" + Home->getTag()); + newFocus->xPos = 28; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->bypass += " OR = {\n"; + newFocus->bypass += " " + Home->getTag() + " = {\n"; + newFocus->bypass += " is_in_faction_with = " + target->getTag() +"\n"; + newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; + newFocus->bypass += " }"; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " create_wargoal = {\n"; + newFocus->completionReward += " type = annex_everything\n"; + newFocus->completionReward += " target = " + target->getTag() + "\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + } + if (targetColonies.size() >= 2) + { + auto target = targetColonies.back(); + + newFocus = new HoI4Focus; + newFocus->id = "Protectorate" + Home->getTag() + target->getTag(); + newFocus->icon = "GFX_goal_generic_major_war"; + newFocus->text += "Establish Protectorate over " + target->getSourceCountry()->getName("english"); + newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; + newFocus->prerequisites.push_back("focus = Protectorate" + Home->getTag() + targetColonies.front()->getTag()); + newFocus->xPos = 28; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->bypass += " OR = {\n"; + newFocus->bypass += " " + Home->getTag() + " = {\n"; + newFocus->bypass += " is_in_faction_with = " + target->getTag() +"\n"; + newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; + newFocus->bypass += " }"; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " create_wargoal = {\n"; + newFocus->completionReward += " type = annex_everything\n"; + newFocus->completionReward += " target = " + target->getTag() + "\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + } + + //Trade Empire + newFocus = new HoI4Focus; + newFocus->id = "TradeEmpire" + Home->getTag(); + newFocus->icon = "GFX_goal_anschluss"; + newFocus->text += "Fund the " + Home->getSourceCountry()->getAdjective("english") + " Colonial Trade Corporation"; + newFocus->prerequisites.push_back("focus = ColonialHwy" + Home->getTag() + " focus = ResourceFac" + Home->getTag()); + newFocus->xPos = 25; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = established_traders"; + newFocus->completionReward += " set_country_flag = established_traders"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = no\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 2\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = dockyard\n"; + newFocus->completionReward += " level = 2\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + //Home Industry Buildup + newFocus = new HoI4Focus; + newFocus->id = "IndHome" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_production"; + newFocus->text += "Fund Industrial Improvement"; + newFocus->prerequisites.push_back("focus = StrengthenHome" + Home->getTag()); + newFocus->xPos = 31; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + //newFocus->completionReward += " research_time_factor = -0.1; + focuses.push_back(newFocus); + + //National Highway + newFocus = new HoI4Focus; + newFocus->id = "NationalHwy" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_construct_infrastructure"; + newFocus->text += "National Highway"; + newFocus->prerequisites.push_back("focus = IndHome" + Home->getTag()); + newFocus->xPos = 30; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = infrastructure\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = infrastructure\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + //National College + newFocus = new HoI4Focus; + newFocus->id = "NatCollege" + Home->getTag(); + newFocus->icon = "GFX_goal_anschluss"; + newFocus->text += "Establish National College"; + newFocus->prerequisites.push_back("focus = IndHome" + Home->getTag()); + newFocus->xPos = 32; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10"; + newFocus->completionReward += " add_ideas = national_college"; + focuses.push_back(newFocus); + + //Improve Factories + newFocus = new HoI4Focus; + newFocus->id = "MilitaryBuildup" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_construct_mil_factory"; + newFocus->text += "Military Buildup"; + newFocus->prerequisites.push_back("focus = NatCollege" + Home->getTag()); + newFocus->prerequisites.push_back("focus = NationalHwy" + Home->getTag()); + newFocus->xPos = 31; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " random_owned_state = {\n"; + newFocus->completionReward += " limit = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " OR = {\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " NOT = {\n"; + newFocus->completionReward += " owner = {\n"; + newFocus->completionReward += " any_owned_state = {\n"; + newFocus->completionReward += " free_building_slots = {\n"; + newFocus->completionReward += " building = arms_factory\n"; + newFocus->completionReward += " size > 0\n"; + newFocus->completionReward += " include_locked = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " is_in_home_area = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " add_extra_state_shared_building_slots = 1\n"; + newFocus->completionReward += " add_building_construction = {\n"; + newFocus->completionReward += " type = arms_factory\n"; + newFocus->completionReward += " level = 1\n"; + newFocus->completionReward += " instant_build = yes\n"; + newFocus->completionReward += " }\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + + //PrepBorder + newFocus = new HoI4Focus; + newFocus->id = "PrepTheBorder" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_defence"; + newFocus->text += "Prepare the Border"; + newFocus->prerequisites.push_back("focus = StrengthenHome" + Home->getTag()); + newFocus->xPos = 34; + newFocus->yPos = 2; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = border_buildup"; + focuses.push_back(newFocus); + + //Promote Nationalistic Spirit + newFocus = new HoI4Focus; + newFocus->id = "NatSpirit" + Home->getTag(); + newFocus->icon = "GFX_goal_generic_political_pressure"; + newFocus->text += "Promote Nationalistic Spirit"; + newFocus->prerequisites.push_back("focus = PrepTheBorder" + Home->getTag()); + newFocus->xPos = 34; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->aiWillDo += " factor = 10\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_ideas = paramilitarism_focus"; + focuses.push_back(newFocus); + + //ANNEX + if (annexationTargets.size() >= 1) + { + auto target = annexationTargets.front(); + + newFocus = new HoI4Focus; + newFocus->id = "Annex" + Home->getTag() + target->getTag(); + newFocus->icon = "GFX_goal_generic_major_war"; + newFocus->text += "Conquer " + target->getSourceCountry()->getName("english"); + newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; + newFocus->prerequisites.push_back("focus = PrepTheBorder" + Home->getTag()); + newFocus->xPos = 36; + newFocus->yPos = 3; + newFocus->cost = 10; + newFocus->bypass += " OR = {\n"; + newFocus->bypass += " " + Home->getTag() + " = {\n"; + newFocus->bypass += " is_in_faction_with = " + target->getTag() + "\n"; + newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; + newFocus->bypass += " }"; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " create_wargoal = {\n"; + newFocus->completionReward += " type = annex_everything\n"; + newFocus->completionReward += " target = " + target->getTag() + "\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + } + if (annexationTargets.size() >= 2) + { + auto target = annexationTargets.back(); + + newFocus = new HoI4Focus; + newFocus->id = "Annex" + Home->getTag() + target->getTag(); + newFocus->icon = "GFX_goal_generic_major_war"; + newFocus->text += "Conquer " + target->getSourceCountry()->getName("english"); + newFocus->available += " " + target->getTag() + " = { is_in_faction = no }"; + newFocus->prerequisites.push_back("focus = NatSpirit" + Home->getTag()); + newFocus->xPos = 34; + newFocus->yPos = 4; + newFocus->cost = 10; + newFocus->bypass += " OR = {\n"; + newFocus->bypass += " " + Home->getTag() + " = {\n"; + newFocus->bypass += " is_in_faction_with = " + target->getTag() + "\n"; + newFocus->bypass += " has_war_with = " + target->getTag() + "\n"; + newFocus->bypass += " }\n"; + newFocus->bypass += " NOT = { country_exists = " + target->getTag() + " }\n"; + newFocus->bypass += " }"; + newFocus->aiWillDo += " factor = 5\n"; + newFocus->aiWillDo += " modifier = {\n"; + newFocus->aiWillDo += " factor = 0\n"; + newFocus->aiWillDo += " strength_ratio = { tag = " + target->getTag() + " ratio < 1 }\n"; + newFocus->aiWillDo += " }"; + newFocus->completionReward += " create_wargoal = {\n"; + newFocus->completionReward += " type = annex_everything\n"; + newFocus->completionReward += " target = " + target->getTag() + "\n"; + newFocus->completionReward += " }"; + focuses.push_back(newFocus); + } +} + + +void HoI4FocusTree::output() +{ + if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/common/national_focus")) + { + LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/common/national_focus\""; + exit(-1); + } + + string filename("Output/" + Configuration::getOutputName() + "/common/national_focus/" + srcCountryTag + "_NF.txt"); + ofstream out(filename); + if (!out.is_open()) + { + LOG(LogLevel::Error) << "Could not create " << filename; + exit(-1); + } + + out << "focus_tree = {\n"; + out << " id = " << dstCountryTag + "_focus\n"; + out << " \n"; + out << " country = {\n"; + out << " factor = 0\n"; + out << " \n"; + out << " modifier = {\n"; + out << " add = 10\n"; + out << " tag = " << dstCountryTag << "\n"; + out << " }\n"; + out << " }\n"; + out << " \n"; + out << " default = no\n"; + out << "\n"; + + for (auto focus: focuses) + { + out << *focus; + out <<"\n"; + } + + out << "}"; + + out.close(); } \ No newline at end of file diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.h b/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.h index dd145fa7b..5b4595fce 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.h @@ -47,7 +47,7 @@ class HoI4FocusTree void addGenericFocusTree(); void addDemocracyNationalFocuses(HoI4Country* Home, vector CountriesToContain, int XStart); - void addMonarchyEmpireNationalFocuses(HoI4Country* country, const vector& targetColonies, const vector& annexationTargets); + void addAbsolutistEmpireNationalFocuses(HoI4Country* country, const vector& targetColonies, const vector& annexationTargets); void output(); diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.cpp index ecb79b432..8ce8d0985 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.cpp @@ -22,11 +22,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "HoI4Localisation.h" -#include +#include "HoI4State.h" +#include "HoI4States.h" +#include "../Mappers/V2Localisations.h" #include "../V2World/V2Country.h" +#include "../V2World/Vic2State.h" #include "../Configuration.h" #include "Log.h" #include "OSCompatibilityLayer.h" +#include @@ -40,56 +44,93 @@ HoI4Localisation::HoI4Localisation() } -void HoI4Localisation::ReadFromCountry(const V2Country* source, string destTag) +void HoI4Localisation::CreateCountryLocalisations(const string& sourceTag, const string& destTag) { - for (auto nameInLanguage: source->getLocalisedNames()) + for (auto mapping: governmentMapper::getGovernmentMappings()) { - auto existingLocalisation = countryLocalisations.find(nameInLanguage.first); - if (existingLocalisation == countryLocalisations.end()) - { - keyToLocalisationMap newLocalisation; - countryLocalisations[nameInLanguage.first] = newLocalisation; - existingLocalisation = countryLocalisations.find(nameInLanguage.first); - } - - existingLocalisation->second.insert(make_pair(destTag + "_democratic", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_democratic_DEF", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_neutrality", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_neutrality_DEF", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_communism", "People's Republic of " + nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_communism_DEF", "People's Republic of " + nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_autocratic", "Kingdom of " + nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_autocratic_DEF", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_socialist", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_socialist_DEF", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_liberal", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_liberal_DEF", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_syndicalism", "Commune of "+nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_syndicalism_DEF", nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_ancap", "Bourgeois State of " + nameInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_ancap_DEF", nameInLanguage.second)); + auto localisationForGovernment = V2Localisations::GetTextInEachLanguage(sourceTag + "_" + mapping.vic2Government); + for (auto nameInLanguage: localisationForGovernment) + { + auto existingLanguage = countryLocalisations.find(nameInLanguage.first); + if (existingLanguage == countryLocalisations.end()) + { + keyToLocalisationMap newLocalisations; + countryLocalisations[nameInLanguage.first] = newLocalisations; + existingLanguage = countryLocalisations.find(nameInLanguage.first); + } + + string newKey = destTag + "_" + mapping.HoI4GovernmentIdeology; + auto existingLocalisation = existingLanguage->second.find(newKey); + if (existingLocalisation == existingLanguage->second.end()) + { + existingLanguage->second.insert(make_pair(newKey, nameInLanguage.second)); + existingLanguage->second.insert(make_pair(newKey + "_DEF", nameInLanguage.second)); + } + } + if (localisationForGovernment.size() == 0) + { + for (auto nameInLanguage: V2Localisations::GetTextInEachLanguage(sourceTag)) + { + auto existingLanguage = countryLocalisations.find(nameInLanguage.first); + if (existingLanguage == countryLocalisations.end()) + { + keyToLocalisationMap newLocalisations; + countryLocalisations[nameInLanguage.first] = newLocalisations; + existingLanguage = countryLocalisations.find(nameInLanguage.first); + } + + string newKey = destTag + "_" + mapping.HoI4GovernmentIdeology; + auto existingLocalisation = existingLanguage->second.find(newKey); + if (existingLocalisation == existingLanguage->second.end()) + { + existingLanguage->second.insert(make_pair(newKey, nameInLanguage.second)); + existingLanguage->second.insert(make_pair(newKey + "_DEF", nameInLanguage.second)); + } + } + } } - for (auto adjInLanguage: source->getLocalisedAdjectives()) + + for (auto mapping: governmentMapper::getGovernmentMappings()) { - auto existingLocalisation = countryLocalisations.find(adjInLanguage.first); - if (existingLocalisation == countryLocalisations.end()) - { - keyToLocalisationMap newLocalisation; - countryLocalisations[adjInLanguage.first] = newLocalisation; - existingLocalisation = countryLocalisations.find(adjInLanguage.first); - } - existingLocalisation->second.insert(make_pair(destTag + "_fascism", adjInLanguage.second + " Empire")); - existingLocalisation->second.insert(make_pair(destTag + "_fascism_DEF", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_fascism_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_democratic_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_neutrality_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_communism_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_autocratic_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_socialist_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_liberal_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_syndicalism_ADJ", adjInLanguage.second)); - existingLocalisation->second.insert(make_pair(destTag + "_ancap_ADJ", adjInLanguage.second)); + auto localisationForGovernment = V2Localisations::GetTextInEachLanguage(sourceTag + "_" + mapping.vic2Government + "_ADJ"); + for (auto nameInLanguage: localisationForGovernment) + { + auto existingLanguage = countryLocalisations.find(nameInLanguage.first); + if (existingLanguage == countryLocalisations.end()) + { + keyToLocalisationMap newLocalisations; + countryLocalisations[nameInLanguage.first] = newLocalisations; + existingLanguage = countryLocalisations.find(nameInLanguage.first); + } + + string newKey = destTag + "_" + mapping.HoI4GovernmentIdeology + "_ADJ"; + auto existingLocalisation = existingLanguage->second.find(newKey); + if (existingLocalisation == existingLanguage->second.end()) + { + existingLanguage->second.insert(make_pair(newKey, nameInLanguage.second)); + } + } + if (localisationForGovernment.size() == 0) + { + for (auto nameInLanguage: V2Localisations::GetTextInEachLanguage(sourceTag + "_ADJ")) + { + auto existingLanguage = countryLocalisations.find(nameInLanguage.first); + if (existingLanguage == countryLocalisations.end()) + { + keyToLocalisationMap newLocalisations; + countryLocalisations[nameInLanguage.first] = newLocalisations; + existingLanguage = countryLocalisations.find(nameInLanguage.first); + } + + string newKey = destTag + "_" + mapping.HoI4GovernmentIdeology + "_ADJ"; + auto existingLocalisation = existingLanguage->second.find(newKey); + if (existingLocalisation == existingLanguage->second.end()) + { + existingLanguage->second.insert(make_pair(newKey, nameInLanguage.second)); + } + } + } } } @@ -170,6 +211,114 @@ void HoI4Localisation::CopyFocusLocalisations(string oldKey, string newKey) } +void HoI4Localisation::AddStateLocalisations(const HoI4States* states) +{ + for (auto state: states->getStates()) + { + for (auto Vic2NameInLanguage: V2Localisations::GetTextInEachLanguage(state.second->getSourceState()->getStateID())) + { + addStateLocalisationForLanguage(state.second, Vic2NameInLanguage); + } + + int VPPositionInHoI4 = state.second->getVPLocation(); + auto VPProvinceMapping = provinceMapper::getHoI4ToVic2ProvinceMapping().find(VPPositionInHoI4); + if ( + (VPProvinceMapping != provinceMapper::getHoI4ToVic2ProvinceMapping().end()) && + (VPProvinceMapping->second.size() > 0) + ) + { + for (auto Vic2NameInLanguage: V2Localisations::GetTextInEachLanguage("PROV" + to_string(VPProvinceMapping->second[0]))) + { + addVPLocalisationForLanguage(state.second, Vic2NameInLanguage); + } + } + } + + addNonenglishStateLocalisations(); + addNonenglishVPLocalisations(); +} + + +void HoI4Localisation::addStateLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage) +{ + string key = string("STATE_") + to_string(state->getID()); + + string localisedName = ""; + if (state->getSourceState()->isPartialState()) + { + localisedName += V2Localisations::GetTextInLanguage(state->getSourceState()->getOwner() + "_ADJ", Vic2NameInLanguage.first) + " "; + } + localisedName += Vic2NameInLanguage.second; + + getExistingStateLocalisation(Vic2NameInLanguage.first).insert(make_pair(key, localisedName)); +} + + +void HoI4Localisation::addVPLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage) +{ + getExistingVPLocalisation(Vic2NameInLanguage.first).insert(make_pair("VICTORY_POINTS_" + to_string(state->getVPLocation()), Vic2NameInLanguage.second)); +} + + +keyToLocalisationMap& HoI4Localisation::getExistingStateLocalisation(const string& language) +{ + auto existingLocalisation = stateLocalisations.find(language); + if (existingLocalisation == stateLocalisations.end()) + { + addLanguageToStateLocalisations(language); + existingLocalisation = stateLocalisations.find(language); + } + + return existingLocalisation->second; +} + + +keyToLocalisationMap& HoI4Localisation::getExistingVPLocalisation(const string& language) +{ + auto existingLocalisation = VPLocalisations.find(language); + if (existingLocalisation == VPLocalisations.end()) + { + addLanguageToVPLocalisations(language); + existingLocalisation = VPLocalisations.find(language); + } + + return existingLocalisation->second; +} + + +void HoI4Localisation::addLanguageToStateLocalisations(const string& language) +{ + keyToLocalisationMap newLocalisation; + stateLocalisations[language] = newLocalisation; +} + + +void HoI4Localisation::addLanguageToVPLocalisations(const string& language) +{ + keyToLocalisationMap newLocalisation; + VPLocalisations[language] = newLocalisation; +} + + +void HoI4Localisation::addNonenglishStateLocalisations() +{ + auto englishLocalisations = stateLocalisations.find("english"); + stateLocalisations.insert(make_pair("braz_por", englishLocalisations->second)); + stateLocalisations.insert(make_pair("polish", englishLocalisations->second)); + stateLocalisations.insert(make_pair("russian", englishLocalisations->second)); +} + + +void HoI4Localisation::addNonenglishVPLocalisations() +{ + auto englishLocalisations = VPLocalisations.find("english"); + VPLocalisations.insert(make_pair("braz_por", englishLocalisations->second)); + VPLocalisations.insert(make_pair("polish", englishLocalisations->second)); + VPLocalisations.insert(make_pair("russian", englishLocalisations->second)); +} + + + void HoI4Localisation::Output() const { LOG(LogLevel::Debug) << "Writing localisations"; @@ -182,6 +331,8 @@ void HoI4Localisation::Output() const outputCountries(localisationPath); outputFocuses(localisationPath); + outputStateLocalisations(localisationPath); + outputVPLocalisations(localisationPath); } @@ -235,3 +386,53 @@ void HoI4Localisation::outputFocuses(string localisationPath) const } } } + + +void HoI4Localisation::outputStateLocalisations(string localisationPath) const +{ + for (auto languageToLocalisations: stateLocalisations) + { + if (languageToLocalisations.first == "") + { + continue; + } + ofstream localisationFile(localisationPath + "/state_names_l_" + languageToLocalisations.first + ".yml"); + if (!localisationFile.is_open()) + { + LOG(LogLevel::Error) << "Could not update localisation text file"; + exit(-1); + } + localisationFile << "\xEF\xBB\xBF"; // output a BOM to make HoI4 happy + localisationFile << "l_" << languageToLocalisations.first << ":\n"; + + for (auto mapping: languageToLocalisations.second) + { + localisationFile << " " << mapping.first << ":10 \"" << mapping.second << "\"" << endl; + } + } +} + + +void HoI4Localisation::outputVPLocalisations(string localisationPath) const +{ + for (auto languageToLocalisations: VPLocalisations) + { + if (languageToLocalisations.first == "") + { + continue; + } + ofstream localisationFile(localisationPath + "/victory_points_l_" + languageToLocalisations.first + ".yml"); + if (!localisationFile.is_open()) + { + LOG(LogLevel::Error) << "Could not update localisation text file"; + exit(-1); + } + localisationFile << "\xEF\xBB\xBF"; // output a BOM to make HoI4 happy + localisationFile << "l_" << languageToLocalisations.first << ":\n"; + + for (auto mapping: languageToLocalisations.second) + { + localisationFile << " " << mapping.first << ":10 \"" << mapping.second << "\"" << endl; + } + } +} \ No newline at end of file diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.h b/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.h index d32b2d9c6..1da36dfda 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4Localisation.h @@ -36,6 +36,8 @@ using namespace std; class V2Country; +class HoI4States; +class HoI4State; @@ -48,9 +50,14 @@ typedef std::map languageToLocalisationsMap; class HoI4Localisation { public: - static void readFromCountry(const V2Country* source, string destTag) + static void addStateLocalisations(const HoI4States* states) { - getInstance()->ReadFromCountry(source, destTag); + getInstance()->AddStateLocalisations(states); + } + + static void createCountryLocalisations(const string& sourceTag, const string& destTag) + { + getInstance()->CreateCountryLocalisations(sourceTag, destTag); } static void addNonenglishCountryLocalisations() @@ -83,13 +90,27 @@ class HoI4Localisation void AddNonenglishCountryLocalisations(); - void ReadFromCountry(const V2Country*, string destTag); + void CreateCountryLocalisations(const string& sourceTag, const string& destTag); void CopyFocusLocalisations(string oldKey, string newKey); + void AddStateLocalisations(const HoI4States* states); + void addStateLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage); + void addVPLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage); + keyToLocalisationMap& getExistingStateLocalisation(const string& language); + keyToLocalisationMap& getExistingVPLocalisation(const string& language); + void addLanguageToStateLocalisations(const string& language); + void addLanguageToVPLocalisations(const string& language); + void addNonenglishStateLocalisations(); + void addNonenglishVPLocalisations(); + void Output() const; void outputCountries(string localisationPath) const; void outputFocuses(string localisationPath) const; + void outputStateLocalisations(string localisationPath) const; + void outputVPLocalisations(string localisationPath) const; + languageToLocalisationsMap stateLocalisations; + languageToLocalisationsMap VPLocalisations; languageToLocalisationsMap countryLocalisations; languageToLocalisationsMap originalFocuses; languageToLocalisationsMap newFocuses; diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4State.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4State.cpp index dec907413..b159748f1 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4State.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4State.cpp @@ -29,9 +29,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "../Mappers/ProvinceMapper.h" #include "../Mappers/StateCategoryMapper.h" #include "../Mappers/StateMapper.h" -#include "../Mappers/V2Localisations.h" #include "../V2World/V2Province.h" -#include "../V2World/V2World.h" +#include "../V2World/Vic2State.h" #include "Log.h" #include "OSCompatibilityLayer.h" @@ -67,7 +66,6 @@ HoI4State::HoI4State(const Vic2State* _sourceState, int _ID, string _ownerTag) void HoI4State::output(string _filename) { - // create the file string filename("Output/" + Configuration::getOutputName() + "/history/states/" + _filename); ofstream out(filename); if (!out.is_open()) @@ -76,7 +74,6 @@ void HoI4State::output(string _filename) exit(-1); } - // output the data out << "state={" << endl; out << "\tid=" << ID << endl; out << "\tname= \"STATE_" << ID << "\"" << endl; @@ -118,7 +115,6 @@ void HoI4State::output(string _filename) } out << "\t\t\tair_base = "<< airbaseLevel << endl; out << "\t\t}" << endl; - //out << "\t}" << endl; for (auto core: cores) { out << "\t\tadd_core_of = " << core << endl; @@ -206,6 +202,24 @@ void HoI4State::addCores(const vector& newCores) } +bool HoI4State::assignVPFromVic2Province(int Vic2ProvinceNumber) +{ + auto provMapping = provinceMapper::getVic2ToHoI4ProvinceMapping().find(Vic2ProvinceNumber); + if ( + (provMapping != provinceMapper::getVic2ToHoI4ProvinceMapping().end()) && + (isProvinceInState(provMapping->second[0])) + ) + { + assignVP(provMapping->second[0]); + return true; + } + else + { + return false; + } +} + + void HoI4State::assignVP(int location) { victoryPointPosition = location; @@ -235,20 +249,55 @@ int HoI4State::getMainNavalLocation() const } -bool HoI4State::tryToCreateVP() +void HoI4State::tryToCreateVP() { auto vic2CapitalProvince = stateMapper::getCapitalProvince(sourceState->getStateID()); - auto provMapping = provinceMapper::getVic2ToHoI4ProvinceMapping().find(vic2CapitalProvince); - if ( - (provMapping != provinceMapper::getVic2ToHoI4ProvinceMapping().end()) && - (isProvinceInState(provMapping->second[0])) - ) + bool VPCreated = assignVPFromVic2Province(vic2CapitalProvince); + + if (!VPCreated) { - assignVP(provMapping->second[0]); - return true; + if (!sourceState->isPartialState()) + { + LOG(LogLevel::Warning) << "Could not initially create VP for state " << ID << ", but state is not split"; + } + for (auto province: sourceState->getProvinces()) + { + if (province->getPopulation("aristocrats") > 0) + { + VPCreated = assignVPFromVic2Province(province->getNumber()); + if (VPCreated) + { + break; + } + } + } } - return false; + if (!VPCreated) + { + for (auto province: sourceState->getProvinces()) + { + VPCreated = assignVPFromVic2Province(province->getNumber()); + if (VPCreated) + { + break; + } + } + } + + if (!VPCreated) + { + LOG(LogLevel::Warning) << "Could not create VP for state"; + } +} + + +void HoI4State::addManpower() +{ + for (auto sourceProvince: sourceState->getProvinces()) + { + manpower += static_cast(sourceProvince->getTotalPopulation() * 4 * Configuration::getManpowerFactor()); + } } @@ -403,43 +452,6 @@ bool HoI4State::amICoastal() } -pair HoI4State::makeLocalisation(const pair& Vic2NameInLanguage) const -{ - return make_pair( - makeLocalisationKey(), - makeLocalisationValue(Vic2NameInLanguage) - ); -} - - -string HoI4State::makeLocalisationKey() const -{ - return string("STATE_") + to_string(ID); -} - - -string HoI4State::makeLocalisationValue(const pair& Vic2NameInLanguage) const -{ - string localisedName = ""; - if (sourceState->isPartialState()) - { - localisedName += V2Localisations::GetTextInLanguage(sourceState->getOwner() + "_ADJ", Vic2NameInLanguage.first) + " "; - } - localisedName += Vic2NameInLanguage.second; - - return localisedName; -} - - -pair HoI4State::makeVPLocalisation(const pair& Vic2NameInLanguage) const -{ - return make_pair( - "VICTORY_POINTS_" + to_string(victoryPointPosition), - Vic2NameInLanguage.second - ); -} - - bool HoI4State::isProvinceInState(int provinceNum) { return (provinces.find(provinceNum) != provinces.end()); diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4State.h b/Vic2ToHoI4/Source/HOI4World/HoI4State.h index a9920d935..44ab95056 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4State.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4State.h @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -29,11 +29,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include #include #include -#include "..\V2World\Vic2State.h" +#include using namespace std; +class V2Province; +class Vic2State; + + + class HoI4State { public: @@ -44,7 +49,6 @@ class HoI4State void addProvince(int province) { provinces.insert(province); } void setAsCapitalState() { capitalState = true; civFactories++; } void addResource(string resource, double amount) { resources[resource] += amount; } - void addManpower(int newManpower) { manpower += newManpower; } void addAirBase(int newAirBase) { airbaseLevel += newAirBase; if (airbaseLevel > 10) airbaseLevel = 10; } void addVictoryPointValue(int additionalValue) { victoryPointValue += additionalValue; } void setVPLocation(int province) { victoryPointPosition = province; } @@ -67,13 +71,11 @@ class HoI4State int getMainNavalLocation() const; - bool tryToCreateVP(); + void tryToCreateVP(); + void addManpower(); void convertIndustry(double workerFactoryRatio); - pair makeLocalisation(const pair& Vic2NameInLanguage) const; - pair makeVPLocalisation(const pair& Vic2NameInLanguage) const; - private: int determineFactoryNumbers(double workerFactoryRatio); int constrainFactoryNumbers(double rawFactories); @@ -85,12 +87,10 @@ class HoI4State int determineNavalBaseLevel(const V2Province* sourceProvince); int determineNavalBaseLocation(const V2Province* sourceProvince); + bool assignVPFromVic2Province(int Vic2ProvinceNumber); void assignVP(int location); bool isProvinceInState(int provinceNum); - string makeLocalisationKey() const; - string makeLocalisationValue(const pair& Vic2NameInLanguage) const; - const Vic2State* sourceState; int ID; diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4States.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4States.cpp index 0513ee0f4..ae369dd1e 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4States.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4States.cpp @@ -22,180 +22,120 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "HoI4States.h" -#include "log.h" +#include "HoI4State.h" +#include "Log.h" #include "OSCompatibilityLayer.h" #include "ParadoxParserUTF8.h" #include "../Mappers/CountryMapping.h" #include "../Mappers/ProvinceDefinitions.h" #include "../Mappers/V2Localisations.h" #include "../V2World/V2Country.h" +#include "../V2World/V2Province.h" +#include "../V2World/Vic2State.h" #include "../V2World/V2World.h" #include -void HoI4States::importStates(map>& defaultStateToProvinceMap) -{ - LOG(LogLevel::Info) << "Importing states"; - - set statesFiles; - Utils::GetAllFilesInFolder(Configuration::getHoI4Path() + "/history/states", statesFiles); - for (auto stateFile: statesFiles) - { - int num = stoi(stateFile.substr(0, stateFile.find_first_of('-'))); - - // create the default state map - Object* fileObj = parser_UTF8::doParseFile(Configuration::getHoI4Path() + "/history/states/" + stateFile); - if (fileObj == nullptr) - { - LOG(LogLevel::Error) << "Could not parse " << Configuration::getHoI4Path() << "/history/states/" << stateFile; - exit(-1); - } - auto stateObj = fileObj->getValue("state"); - auto provincesObj = stateObj[0]->getValue("provinces"); - auto tokens = provincesObj[0]->getTokens(); - vector provinces; - for (auto provinceNumString: tokens) - { - provinces.push_back(stoi(provinceNumString)); - } - - defaultStateToProvinceMap.insert(make_pair(num, provinces)); - } -} - - -void HoI4States::convertStates() +HoI4States::HoI4States(const V2World* _sourceWorld) { LOG(LogLevel::Info) << "Converting states"; - map provinceOwnersandCores = determineProvinceOwners(); - createStates(provinceOwnersandCores); + + sourceWorld = _sourceWorld; + determineOwnersAndCores(); + createStates(); } -map HoI4States::determineProvinceOwners() +void HoI4States::determineOwnersAndCores() { - const map V2Countries = sourceWorld->getCountries(); - map ownersAndCoresMap; - for (auto provItr: provinceDefinitions::getLandProvinces()) + for (auto provinceNumber: provinceDefinitions::getLandProvinces()) { - HoI4ToVic2ProvinceMapping::const_iterator provinceLink; - if (!getAppropriateMapping(provItr, provinceLink)) - { - continue; - } + auto sourceProvinceNums = retrieveSourceProvinceNums(provinceNumber); + + map> potentialOwners = determinePotentialOwners(sourceProvinceNums); - map potentialOwners = determinePotentialOwners(provinceLink); const V2Country* oldOwner = selectProvinceOwner(potentialOwners); - if (oldOwner == NULL) + if (oldOwner == nullptr) { continue; } - // convert from the source provinces const string HoI4Tag = CountryMapper::getHoI4Tag(oldOwner->getTag()); if (HoI4Tag.empty()) { - LOG(LogLevel::Warning) << "Could not map provinces owned by " << oldOwner->getTag() << " in Vic2"; - } - else - { - ownersAndCores newOwnerandCores; - newOwnerandCores.owner = HoI4Tag; - ownersAndCoresMap.insert(make_pair(provItr, newOwnerandCores)); - for (auto srcOwnerItr: potentialOwners) - { - for (auto srcProvItr: srcOwnerItr.second.provinces) - { - // convert cores - for (auto oldCore: srcProvItr->getCores()) - { - // skip this core if the country is the owner of the V2 province but not the HoI4 province - // (i.e. "avoid boundary conflicts that didn't exist in V2"). - // this country may still get core via a province that DID belong to the current HoI4 owner - if ((oldCore == srcOwnerItr.first) && (oldCore != oldOwner)) - { - continue; - } - - const string coreOwner = CountryMapper::getHoI4Tag(oldCore->getTag()); - if (coreOwner != "") - { - auto coreItr = ownersAndCoresMap.find(provItr); - if (coreItr == ownersAndCoresMap.end()) - { - ownersAndCores newOwnerandCores; - newOwnerandCores.cores.push_back(coreOwner); - ownersAndCoresMap.insert(make_pair(provItr, newOwnerandCores)); - } - else - { - coreItr->second.cores.push_back(coreOwner); - } - } - } - } - } + LOG(LogLevel::Warning) << "Could not map states owned by " << oldOwner->getTag() << " in Vic2"; + continue; } - } + ownersMap.insert(make_pair(provinceNumber, HoI4Tag)); - return ownersAndCoresMap; + vector cores = determineCores(sourceProvinceNums, oldOwner); + coresMap.insert(make_pair(provinceNumber, cores)); + } } -bool HoI4States::getAppropriateMapping(int provNum, HoI4ToVic2ProvinceMapping::const_iterator& provinceLink) +vector HoI4States::retrieveSourceProvinceNums(int provNum) const { - provinceLink = provinceMapper::getHoI4ToVic2ProvinceMapping().find(provNum); + vector none; + + auto provinceLink = provinceMapper::getHoI4ToVic2ProvinceMapping().find(provNum); if ((provinceLink == provinceMapper::getHoI4ToVic2ProvinceMapping().end()) || (provinceLink->second.size() == 0)) { LOG(LogLevel::Warning) << "No source for HoI4 land province " << provNum; - return false; + return none; } else if (provinceLink->second[0] == 0) { - return false; + return none; + } + else + { + return provinceLink->second; } - - return true; } -map HoI4States::determinePotentialOwners(HoI4ToVic2ProvinceMapping::const_iterator provinceLink) +map> HoI4States::determinePotentialOwners(const vector& sourceProvinceNums) const { - map potentialOwners; - for (auto srcProvItr: provinceLink->second) + map> potentialOwners; + + for (auto srcProvNum: sourceProvinceNums) { - auto srcProvince = sourceWorld->getProvince(srcProvItr); - if (!srcProvince) + auto srcProvince = sourceWorld->getProvince(srcProvNum); + if (srcProvince == nullptr) { - LOG(LogLevel::Warning) << "Old province " << provinceLink->second[0] << " does not exist (bad mapping?)"; + LOG(LogLevel::Warning) << "Old province " << srcProvNum << " does not exist (bad mapping?)"; continue; } const V2Country* owner = srcProvince->getOwner(); if (potentialOwners.find(owner) == potentialOwners.end()) { - potentialOwners[owner] = MTo1ProvinceComp(); + potentialOwners[owner] = make_pair(0, 0); } - potentialOwners[owner].provinces.push_back(srcProvince); - potentialOwners[owner].totalPopulation += srcProvince->getTotalPopulation(); + potentialOwners[owner].first++; + potentialOwners[owner].second += srcProvince->getTotalPopulation(); } return potentialOwners; } -const V2Country* HoI4States::selectProvinceOwner(const map& potentialOwners) +const V2Country* HoI4States::selectProvinceOwner(const map>& potentialOwners) const { - const V2Country* oldOwner = NULL; + const V2Country* oldOwner = nullptr; for (auto potentialOwner: potentialOwners) { // I am the new owner if there is no current owner, or I have more provinces than the current owner, // or I have the same number of provinces, but more population, than the current owner - if ((oldOwner == NULL) - || (potentialOwner.second.provinces.size() > potentialOwners.find(oldOwner)->second.provinces.size()) - || ((potentialOwner.second.provinces.size() == potentialOwners.find(oldOwner)->second.provinces.size()) - && (potentialOwner.second.totalPopulation > potentialOwners.find(oldOwner)->second.totalPopulation))) + if ( (oldOwner == nullptr) || + (potentialOwner.second.first > potentialOwners.find(oldOwner)->second.first) || + ( + (potentialOwner.second.first == potentialOwners.find(oldOwner)->second.first) && + (potentialOwner.second.second > potentialOwners.find(oldOwner)->second.second) + ) + ) { oldOwner = potentialOwner.first; } @@ -205,7 +145,41 @@ const V2Country* HoI4States::selectProvinceOwner(const map& provinceToOwnersAndCoresMap) +vector HoI4States::determineCores(const vector& sourceProvinces, const V2Country* Vic2Owner) const +{ + vector cores; + + for (auto sourceProvinceNum: sourceProvinces) + { + auto sourceProvince = sourceWorld->getProvince(sourceProvinceNum); + if (sourceProvince == nullptr) + { + continue; + } + + for (auto Vic2Core: sourceProvince->getCores()) + { + // skip this core if the country is the owner of the V2 province but not the HoI4 province + // (i.e. "avoid boundary conflicts that didn't exist in V2"). + // this country may still get core via a province that DID belong to the current HoI4 owner + if ((Vic2Core == Vic2Owner) && (Vic2Core != Vic2Owner)) + { + continue; + } + + const string HoI4CoreTag = CountryMapper::getHoI4Tag(Vic2Core->getTag()); + if (HoI4CoreTag != "") + { + cores.push_back(HoI4CoreTag); + } + } + } + + return cores; +} + + +void HoI4States::createStates() { int stateID = 1; set assignedProvinces; @@ -213,7 +187,7 @@ void HoI4States::createStates(const map& provinceToOwnersAn { for (auto vic2State: country.second->getStates()) { - if (createMatchingHoI4State(vic2State, stateID, CountryMapper::getHoI4Tag(country.first), provinceToOwnersAndCoresMap, assignedProvinces)) + if (createMatchingHoI4State(vic2State, stateID, CountryMapper::getHoI4Tag(country.first))) { stateID++; } @@ -225,42 +199,45 @@ void HoI4States::createStates(const map& provinceToOwnersAn } -bool HoI4States::createMatchingHoI4State(const Vic2State* vic2State, int stateID, const string& stateOwner, const map& provinceToOwnersAndCoresMap, set& assignedProvinces) +bool HoI4States::createMatchingHoI4State(const Vic2State* vic2State, int stateID, const string& stateOwner) { - // create a matching HoI4 state HoI4State* newState = new HoI4State(vic2State, stateID, stateOwner); - addProvincesToNewState(newState, provinceToOwnersAndCoresMap, assignedProvinces); + addProvincesAndCoresToNewState(newState); if (newState->getProvinces().size() == 0) { delete newState; return false; } - createVPForState(newState); - addManpowerToNewState(newState); + newState->tryToCreateVP(); + newState->addManpower(); states.insert(make_pair(stateID, newState)); return true; } -void HoI4States::addProvincesToNewState(HoI4State* newState, const map& provinceToOwnersAndCoresMap, set& assignedProvinces) +void HoI4States::addProvincesAndCoresToNewState(HoI4State* newState) { for (auto vic2ProvinceNum: newState->getSourceState()->getProvinceNums()) { - // if the matching HoI4 provinces are owned by this country, add it to the HoI4 state auto provMapping = provinceMapper::getVic2ToHoI4ProvinceMapping().find(vic2ProvinceNum); if (provMapping != provinceMapper::getVic2ToHoI4ProvinceMapping().end()) { for (auto HoI4ProvNum: provMapping->second) { - if (isProvinceOwnedByCountryAndNotAlreadyAssigned(HoI4ProvNum, newState->getOwner(), provinceToOwnersAndCoresMap, assignedProvinces)) + if ( + isProvinceValid(HoI4ProvNum) && + isProvinceOwnedByCountry(HoI4ProvNum, newState->getOwner()) && + isProvinceNotAlreadyAssigned(HoI4ProvNum) + ) + { newState->addProvince(HoI4ProvNum); provinceToStateIDMap.insert(make_pair(HoI4ProvNum, newState->getID())); assignedProvinces.insert(HoI4ProvNum); - newState->addCores(provinceToOwnersAndCoresMap.find(HoI4ProvNum)->second.cores); + newState->addCores(coresMap.find(HoI4ProvNum)->second); } } } @@ -268,146 +245,47 @@ void HoI4States::addProvincesToNewState(HoI4State* newState, const map& provinceToOwnersAndCoresMap, set& assignedProvinces) +bool HoI4States::isProvinceValid(int provNum) const { if (provNum == 0) { return false; } - - auto provinceOwnerItr = provinceToOwnersAndCoresMap.find(provNum); - if ((provinceOwnerItr == provinceToOwnersAndCoresMap.end()) || (provinceOwnerItr->second.owner != stateOwner)) - { - return false; - } - - if ((assignedProvinces.find(provNum) != assignedProvinces.end())) + else { - return false; + return true; } - - return true; } -void HoI4States::createVPForState(HoI4State* newState) +bool HoI4States::isProvinceOwnedByCountry(int provNum, string stateOwner) const { - if (!newState->tryToCreateVP()) + auto provinceOwnerItr = ownersMap.find(provNum); + if ((provinceOwnerItr == ownersMap.end()) || (provinceOwnerItr->second != stateOwner)) { - LOG(LogLevel::Warning) << "Could not create VP for state"; - } -} - - -void HoI4States::addManpowerToNewState(HoI4State* newState) -{ - for (auto sourceProvince: newState->getSourceState()->getProvinces()) - { - int additionalManpower = static_cast(sourceProvince->getTotalPopulation() * 4 * Configuration::getManpowerFactor()); - newState->addManpower(additionalManpower); + return false; } -} - - -void HoI4States::addLocalisations() -{ - for (auto state: states) + else { - for (auto Vic2NameInLanguage: V2Localisations::GetTextInEachLanguage(state.second->getSourceState()->getStateID())) - { - addStateLocalisationForLanguage(state.second, Vic2NameInLanguage); - } - - int VPPositionInHoI4 = state.second->getVPLocation(); - auto VPProvinceMapping = provinceMapper::getHoI4ToVic2ProvinceMapping().find(VPPositionInHoI4); - if ( - (VPProvinceMapping != provinceMapper::getHoI4ToVic2ProvinceMapping().end()) && - (VPProvinceMapping->second.size() > 0) - ) - { - for (auto Vic2NameInLanguage: V2Localisations::GetTextInEachLanguage("PROV" + to_string(VPProvinceMapping->second[0]))) - { - addVPLocalisationForLanguage(state.second, Vic2NameInLanguage); - } - } + return true; } - - addNonenglishStateLocalisations(); - addNonenglishVPLocalisations(); } -void HoI4States::addStateLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage) +bool HoI4States::isProvinceNotAlreadyAssigned(int provNum) const { - getExistingStateLocalisation(Vic2NameInLanguage.first).insert(state->makeLocalisation(Vic2NameInLanguage)); -} - - -void HoI4States::addVPLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage) -{ - getExistingVPLocalisation(Vic2NameInLanguage.first).insert(state->makeVPLocalisation(Vic2NameInLanguage)); -} - - -keyToLocalisationMap& HoI4States::getExistingStateLocalisation(const string& language) -{ - auto existingLocalisation = stateLocalisations.find(language); - if (existingLocalisation == stateLocalisations.end()) + if ((assignedProvinces.find(provNum) != assignedProvinces.end())) { - addLanguageToStateLocalisations(language); - existingLocalisation = stateLocalisations.find(language); + return false; } - - return existingLocalisation->second; -} - - -keyToLocalisationMap& HoI4States::getExistingVPLocalisation(const string& language) -{ - auto existingLocalisation = VPLocalisations.find(language); - if (existingLocalisation == VPLocalisations.end()) + else { - addLanguageToVPLocalisations(language); - existingLocalisation = VPLocalisations.find(language); + return true; } - - return existingLocalisation->second; -} - - -void HoI4States::addLanguageToStateLocalisations(const string& language) -{ - keyToLocalisationMap newLocalisation; - stateLocalisations[language] = newLocalisation; -} - - -void HoI4States::addLanguageToVPLocalisations(const string& language) -{ - keyToLocalisationMap newLocalisation; - VPLocalisations[language] = newLocalisation; -} - - -void HoI4States::addNonenglishStateLocalisations() -{ - auto englishLocalisations = stateLocalisations.find("english"); - stateLocalisations.insert(make_pair("braz_por", englishLocalisations->second)); - stateLocalisations.insert(make_pair("polish", englishLocalisations->second)); - stateLocalisations.insert(make_pair("russian", englishLocalisations->second)); } -void HoI4States::addNonenglishVPLocalisations() -{ - auto englishLocalisations = VPLocalisations.find("english"); - VPLocalisations.insert(make_pair("braz_por", englishLocalisations->second)); - VPLocalisations.insert(make_pair("polish", englishLocalisations->second)); - VPLocalisations.insert(make_pair("russian", englishLocalisations->second)); -} - - -unsigned int HoI4States::getTotalManpower() +unsigned int HoI4States::getTotalManpower() const { unsigned int totalManpower = 0; for (auto state: states) @@ -422,19 +300,7 @@ unsigned int HoI4States::getTotalManpower() void HoI4States::output() const { LOG(LogLevel::Debug) << "Writing states"; - outputHistory(); - outputStateLocalisations(); - outputVPLocalisations(); -} - -void HoI4States::outputHistory() const -{ - if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/history")) - { - LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/history"; - exit(-1); - } if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/history/states")) { LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/history/states"; @@ -444,54 +310,4 @@ void HoI4States::outputHistory() const { state.second->output(to_string(state.first) + ".txt"); } -} - - -void HoI4States::outputStateLocalisations() const -{ - for (auto languageToLocalisations: stateLocalisations) - { - if (languageToLocalisations.first == "") - { - continue; - } - ofstream localisationFile("Output/" + Configuration::getOutputName() + "/localisation/state_names_l_" + languageToLocalisations.first + ".yml"); - if (!localisationFile.is_open()) - { - LOG(LogLevel::Error) << "Could not update localisation text file"; - exit(-1); - } - localisationFile << "\xEF\xBB\xBF"; // output a BOM to make HoI4 happy - localisationFile << "l_" << languageToLocalisations.first << ":\n"; - - for (auto mapping: languageToLocalisations.second) - { - localisationFile << " " << mapping.first << ":10 \"" << mapping.second << "\"" << endl; - } - } -} - - -void HoI4States::outputVPLocalisations() const -{ - for (auto languageToLocalisations: VPLocalisations) - { - if (languageToLocalisations.first == "") - { - continue; - } - ofstream localisationFile("Output/" + Configuration::getOutputName() + "/localisation/victory_points_l_" + languageToLocalisations.first + ".yml"); - if (!localisationFile.is_open()) - { - LOG(LogLevel::Error) << "Could not update localisation text file"; - exit(-1); - } - localisationFile << "\xEF\xBB\xBF"; // output a BOM to make HoI4 happy - localisationFile << "l_" << languageToLocalisations.first << ":\n"; - - for (auto mapping: languageToLocalisations.second) - { - localisationFile << " " << mapping.first << ":10 \"" << mapping.second << "\"" << endl; - } - } } \ No newline at end of file diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4States.h b/Vic2ToHoI4/Source/HOI4World/HoI4States.h index 9d2226114..58cf49ff4 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4States.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4States.h @@ -25,41 +25,27 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ +#include "../Mappers/ProvinceMapper.h" #include +#include #include #include -#include "HoI4Localisation.h" -#include "HoI4State.h" -#include "..\V2World\V2Province.h" -#include "../Mappers/ProvinceMapper.h" using namespace std; -struct MTo1ProvinceComp -{ - MTo1ProvinceComp() : totalPopulation(0) {}; - - vector provinces; - int totalPopulation; -}; +class HoI4State; +class V2Country; +class V2Province; +class Vic2State; +class V2World; -typedef struct ownersAndCores -{ - string owner; - vector cores; -} ownersAndCores; - class HoI4States { public: - HoI4States(const V2World* srcWorld): sourceWorld(srcWorld) {}; - - void importStates(map>& defaultStateToProvinceMap); - void convertStates(); - void addLocalisations(); + HoI4States(const V2World* _sourceWorld); const map& getStates() const { return states; } const map& getProvinceToStateIDMap() const { return provinceToStateIDMap; } @@ -67,37 +53,28 @@ class HoI4States void output() const; private: - map determineProvinceOwners(); - bool getAppropriateMapping(int provNum, HoI4ToVic2ProvinceMapping::const_iterator& provinceLink); - map determinePotentialOwners(HoI4ToVic2ProvinceMapping::const_iterator provinceLink); - const V2Country* selectProvinceOwner(const map& provinceBins); - void createStates(const map& provinceToOwnersAndCoresMap); - bool createMatchingHoI4State(const Vic2State* vic2State, int stateID, const string& stateOwner, const map& provinceToOwnersAndCoresMap, set& assignedProvinces); - void addProvincesToNewState(HoI4State* newState, const map& provinceToOwnersAndCoresMap, set& assignedProvinces); - bool isProvinceOwnedByCountryAndNotAlreadyAssigned(int provNum, string stateOwner, const map& provinceToOwnersAndCoresMap, set& assignedProvinces); - void createVPForState(HoI4State* newState); - void addManpowerToNewState(HoI4State* newState); - void addStateLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage); - void addVPLocalisationForLanguage(const HoI4State* state, const pair& Vic2NameInLanguage); - keyToLocalisationMap& getExistingStateLocalisation(const string& language); - keyToLocalisationMap& getExistingVPLocalisation(const string& language); - void addLanguageToStateLocalisations(const string& language); - void addLanguageToVPLocalisations(const string& language); - void addNonenglishStateLocalisations(); - void addNonenglishVPLocalisations(); - unsigned int getTotalManpower(); - - void outputHistory() const; - void outputStateLocalisations() const; - void outputVPLocalisations() const; + void determineOwnersAndCores(); + vector retrieveSourceProvinceNums(int provNum) const; + map> determinePotentialOwners(const vector& sourceProvinceNums) const; + const V2Country* selectProvinceOwner(const map>& potentialOwners) const; + vector determineCores(const vector& sourceProvinces, const V2Country* oldOwner) const; + + void createStates(); + bool createMatchingHoI4State(const Vic2State* vic2State, int stateID, const string& stateOwner); + void addProvincesAndCoresToNewState(HoI4State* newState); + bool isProvinceValid(int provNum) const; + bool isProvinceOwnedByCountry(int provNum, string stateOwner) const; + bool isProvinceNotAlreadyAssigned(int provNum) const; + unsigned int getTotalManpower() const; + const V2World* sourceWorld; + map ownersMap; + map> coresMap; + set assignedProvinces; map states; map provinceToStateIDMap; - - languageToLocalisationsMap stateLocalisations; - languageToLocalisationsMap VPLocalisations; }; diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.cpp index 7d3728eb7..4f7180236 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.cpp @@ -35,20 +35,49 @@ using namespace std; -HoI4SupplyZones::HoI4SupplyZones(map> defaultStateToProvinceMap) +HoI4SupplyZones::HoI4SupplyZones() { LOG(LogLevel::Info) << "Importing supply zones"; + importStates(); set supplyZonesFiles; Utils::GetAllFilesInFolder(Configuration::getHoI4Path() + "/map/supplyareas", supplyZonesFiles); for (auto supplyZonesFile: supplyZonesFiles) { - importSupplyZone(supplyZonesFile, defaultStateToProvinceMap); + importSupplyZone(supplyZonesFile); } } -void HoI4SupplyZones::importSupplyZone(const string& supplyZonesFile, const map>& defaultStateToProvinceMap) +void HoI4SupplyZones::importStates() +{ + set statesFiles; + Utils::GetAllFilesInFolder(Configuration::getHoI4Path() + "/history/states", statesFiles); + for (auto stateFile: statesFiles) + { + int num = stoi(stateFile.substr(0, stateFile.find_first_of('-'))); + + Object* fileObj = parser_UTF8::doParseFile(Configuration::getHoI4Path() + "/history/states/" + stateFile); + if (fileObj == nullptr) + { + LOG(LogLevel::Error) << "Could not parse " << Configuration::getHoI4Path() << "/history/states/" << stateFile; + exit(-1); + } + auto stateObj = fileObj->getValue("state"); + auto provincesObj = stateObj[0]->getValue("provinces"); + auto tokens = provincesObj[0]->getTokens(); + vector provinces; + for (auto provinceNumString: tokens) + { + provinces.push_back(stoi(provinceNumString)); + } + + defaultStateToProvinceMap.insert(make_pair(num, provinces)); + } +} + + +void HoI4SupplyZones::importSupplyZone(const string& supplyZonesFile) { int num = stoi(supplyZonesFile.substr(0, supplyZonesFile.find_first_of('-'))); supplyZonesFilenames.insert(make_pair(num, supplyZonesFile)); @@ -66,11 +95,11 @@ void HoI4SupplyZones::importSupplyZone(const string& supplyZonesFile, const map< HoI4SupplyZone* newSupplyZone = new HoI4SupplyZone(ID, value); supplyZones.insert(make_pair(ID, newSupplyZone)); - mapProvincesToSupplyZone(ID, supplyAreaObj[0], defaultStateToProvinceMap); + mapProvincesToSupplyZone(ID, supplyAreaObj[0]); } -void HoI4SupplyZones::mapProvincesToSupplyZone(int ID, Object* supplyAreaObj, const map>& defaultStateToProvinceMap) +void HoI4SupplyZones::mapProvincesToSupplyZone(int ID, Object* supplyAreaObj) { auto statesObj = supplyAreaObj->getValue("states"); for (auto idString: statesObj[0]->getTokens()) diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.h b/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.h index 42c999651..307fa2f6d 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4SupplyZones.h @@ -42,14 +42,16 @@ class Object; class HoI4SupplyZones { public: - HoI4SupplyZones(map> HoI4DefaultStateToProvinceMap); + HoI4SupplyZones(); void output(); void convertSupplyZones(const HoI4States* states); private: - void importSupplyZone(const string& supplyZonesFile, const map>& defaultStateToProvinceMap); - void mapProvincesToSupplyZone(int ID, Object* supplyAreaObj, const map>& defaultStateToProvinceMap); + void importStates(); + void importSupplyZone(const string& supplyZonesFile); + void mapProvincesToSupplyZone(int ID, Object* supplyAreaObj); + map> defaultStateToProvinceMap; map supplyZonesFilenames; map supplyZones; map provinceToSupplyZoneMap; diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.cpp index 6c9e06f3c..de1cfa08c 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.cpp @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -30,6 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "../Mappers/ProvinceDefinitions.h" #include "../Mappers/ProvinceNeighborMapper.h" #include "../Mappers/StateMapper.h" +#include "../V2World/V2Party.h" @@ -79,7 +80,7 @@ void HoI4WarCreator::addAllTargetsToWorldTargetMap() void HoI4WarCreator::addTargetsToWorldTargetMap(HoI4Country* country) { int maxGCWars = 0; - if ((country->getGovernment() != "hms_government" || (country->getGovernment() == "hms_government" && (country->getRulingParty().war_pol == "jingoism" || country->getRulingParty().war_pol == "pro_military"))) && country->getGovernment() != "democratic") + if (country->getGovernmentIdeology() != "democratic") { vector GCTargets; for (auto GC: getDistancesToGreatPowers(country)) @@ -153,30 +154,59 @@ double HoI4WarCreator::calculateWorldStrength(ofstream& AILog) void HoI4WarCreator::generateTotalitarianWars(ofstream& AILog, vector& LeaderCountries, set& factionsAtWar) { - AILog << "Creating Fascist/Communist/Monarchist wars\n"; + AILog << "Creating Fascist/Communist/Absolutist/Radical wars\n"; for (auto greatPower: theWorld->getGreatPowers()) { vector newFactionsAtWar; LeaderCountries.push_back(greatPower); - if ((greatPower->getGovernment() == "fascism") || greatPower->getRulingIdeology() == "fascism") + if (greatPower->getGovernmentIdeology() == "fascism") { newFactionsAtWar = fascistWarMaker(greatPower, AILog); } - else if (greatPower->getGovernment() == "communism") + else if (greatPower->getGovernmentIdeology() == "communism") { newFactionsAtWar = communistWarCreator(greatPower, AILog); } - else if ( - (greatPower->getGovernment() == "absolute_monarchy") || - (greatPower->getGovernment() == "prussian_constitutionalism" && greatPower->getRulingParty().war_pol == "jingoism") - ) + else if (greatPower->getGovernmentIdeology() == "absolutist") + { + newFactionsAtWar = absolutistWarCreator(greatPower); + } + else if (greatPower->getGovernmentIdeology() == "radical") { - newFactionsAtWar = MonarchyWarCreator(greatPower); + newFactionsAtWar = radicalWarCreator(greatPower); } factionsAtWar.insert(newFactionsAtWar.begin(), newFactionsAtWar.end()); } + + for (auto country: theWorld->getCountries()) + { + if (country.second->isHuman() && !country.second->isGreatPower()) + { + vector newFactionsAtWar; + + LeaderCountries.push_back(country.second); + if (country.second->getGovernmentIdeology() == "fascism") + { + newFactionsAtWar = fascistWarMaker(country.second, AILog); + } + else if (country.second->getGovernmentIdeology() == "communism") + { + newFactionsAtWar = communistWarCreator(country.second, AILog); + } + else if (country.second->getGovernmentIdeology() == "absolutist") + { + newFactionsAtWar = absolutistWarCreator(country.second); + } + else if (country.second->getGovernmentIdeology() == "radical") + { + newFactionsAtWar = radicalWarCreator(country.second); + } + + factionsAtWar.insert(newFactionsAtWar.begin(), newFactionsAtWar.end()); + } + } } @@ -201,13 +231,7 @@ void HoI4WarCreator::generateDemocracyWars(ofstream& AILog, set& f for (auto greatPower: theWorld->getGreatPowers()) { - if ( - (greatPower->getGovernment() == "democratic") || - ( - (greatPower->getGovernment() == "hms_government") && - (greatPower->getRulingParty().war_pol == "pacifism" || greatPower->getRulingParty().war_pol == "anti_military") - ) - ) + if (greatPower->getGovernmentIdeology() == "democratic") { vector newFactionsAtWar; newFactionsAtWar = democracyWarCreator(greatPower); @@ -225,7 +249,7 @@ void HoI4WarCreator::generateAdditionalWars(ofstream& AILog, vectorgetSourceCountry()->getName("english") << "\n"; vector newCountriesatWar; - newCountriesatWar = MonarchyWarCreator(GCEvilnessSorted[i]); + newCountriesatWar = absolutistWarCreator(GCEvilnessSorted[i]); for (auto addedFactions : newCountriesatWar) { @@ -250,39 +274,23 @@ vector HoI4WarCreator::calculateEvilness(vector Lead vector GCEvilnessSorted; for (auto GC: theWorld->getGreatPowers()) { - if ( GC->getGovernment() == "prussian_constitutionalism" || - GC->getGovernment() == "hms_government" || - GC->getGovernment() == "absolute_monarchy" && - std::find(LeaderCountries.begin(), LeaderCountries.end(), GC) == LeaderCountries.end() && - ( - GC->getGovernment() != "hms_government" || - ( - GC->getGovernment() == "hms_government" && - ( - GC->getRulingParty().war_pol == "jingoism" || - GC->getRulingParty().war_pol == "pro_military" - ) - ) - ) && - GC->getGovernment() != "democratic") + if ( GC->getGovernmentIdeology() == "absolutist" && + std::find(LeaderCountries.begin(), LeaderCountries.end(), GC) == LeaderCountries.end() + ) { double v1 = rand() % 95 + 1; v1 = v1 / 100; double evilness = v1; string government = ""; - if (GC->getGovernment() == "absolute_monarchy") + if (GC->getGovernmentIdeology() == "absolutist") evilness += 3; - else if (GC->getGovernment() == "prussian_constitutionalism") - evilness += 2; - else if (GC->getGovernment() == "hms_government") - evilness += 1; - HoI4Party countryrulingparty = GC->getRulingParty(); + V2Party* countryrulingparty = GC->getRulingParty(); - if (countryrulingparty.war_pol == "jingoism") + if (countryrulingparty->war_policy == "jingoism") evilness += 3; - else if (countryrulingparty.war_pol == "pro_military") + else if (countryrulingparty->war_policy == "pro_military") evilness += 2; - else if (countryrulingparty.war_pol == "anti_military") + else if (countryrulingparty->war_policy == "anti_military") evilness += 1; //need to add ruling party to factor @@ -419,21 +427,18 @@ vector HoI4WarCreator::GetMorePossibleAllies(HoI4Country* CountryT } } } - string yourgovernment = CountryThatWantsAllies->getGovernment(); + string yourIdeology = CountryThatWantsAllies->getGovernmentIdeology(); volatile vector vCountriesWithin500Miles = CountriesWithin500Miles; //look for all capitals within a distance of Berlin to Tehran for (unsigned int i = 0; i < CountriesWithin500Miles.size(); i++) { - string allygovernment = CountriesWithin500Miles[i]->getGovernment(); + string allyIdeology = CountriesWithin500Miles[i]->getGovernmentIdeology(); //possible government matches - if (allygovernment == yourgovernment - || (yourgovernment == "absolute_monarchy" && (allygovernment == "fascism" || allygovernment == "democratic" || allygovernment == "prussian_constitutionalism" || allygovernment == "hms_government")) - || (yourgovernment == "democratic" && (allygovernment == "hms_government" || allygovernment == "absolute_monarchy" || allygovernment == "prussian_constitutionalism")) - || (yourgovernment == "prussian_constitutionalism" && (allygovernment == "hms_government" || allygovernment == "absolute_monarchy" || allygovernment == "democratic" || allygovernment == "fascism")) - || (yourgovernment == "hms_government" && (allygovernment == "democratic" || allygovernment == "absolute_monarchy" || allygovernment == "prussian_constitutionalism")) - || (yourgovernment == "communism" && (allygovernment == "syndicalism")) - || (yourgovernment == "syndicalism" && (allygovernment == "communism" || allygovernment == "fascism")) - || (yourgovernment == "fascism" && (allygovernment == "syndicalism" || allygovernment == "absolute_monarchy" || allygovernment == "prussian_constitutionalism" || allygovernment == "hms_government"))) + if ( + (allyIdeology == yourIdeology) /* || + // add other possible combinations here, but maybe coordinate with HoI4World::governmentsAllowFaction() + */ + ) { if (maxcountries < 2) @@ -855,6 +860,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre //FIXME //Need to get Drift Defense to work //newFocus->completionReward += " drift_defence_factor = 0.5\n"; + newFocus->completionReward += " add_named_threat = { threat = 2 name = " + newFocus->id + " }\n"; newFocus->completionReward += " add_ideas = fascist_influence"; FocusTree->addFocus(newFocus); @@ -886,7 +892,6 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre //int x = i * 3; string annexername = Leader->getSourceCountry()->getName("english"); string annexedname = nan[i]->getSourceCountry()->getName("english"); - findFaction(Leader)->addMember(nan[i]); //for random date int v1 = rand() % 5 + 1; int v2 = rand() % 5 + 1; @@ -909,6 +914,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre newFocus->aiWillDo += " factor = 0\n"; newFocus->aiWillDo += " date < 1937.6.6\n"; newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_named_threat = { threat = 2 name = " + newFocus->id + " }\n"; newFocus->completionReward += " army_experience = 10\n"; newFocus->completionReward += " if = {\n"; newFocus->completionReward += " limit = {\n"; @@ -984,7 +990,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre } newFocus->cost = 10; newFocus->aiWillDo = " factor = 5"; - newFocus->completionReward += " add_named_threat = { threat = 2 name = \"Fascist Expansion\" }";//give some claims or cores + newFocus->completionReward += " add_named_threat = { threat = 3 name = " + newFocus->id + " }";//give some claims or cores FocusTree->addFocus(newFocus); for (unsigned int i = 0; i < 1; i++) @@ -1022,6 +1028,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre newFocus->aiWillDo += " factor = 0\n"; newFocus->aiWillDo += " date < 1937.6.6\n"; newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_named_threat = { threat = 2 name = " + newFocus->id + " }\n"; newFocus->completionReward += " army_experience = 10\n"; newFocus->completionReward += " if = {\n"; newFocus->completionReward += " limit = {\n"; @@ -1057,6 +1064,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre newFocus->aiWillDo += " factor = 0\n"; newFocus->aiWillDo += " date < 1937.6.6\n"; newFocus->aiWillDo += " }"; + newFocus->completionReward += " add_named_threat = { threat = 3 name = " + newFocus->id + " }\n"; newFocus->completionReward += " create_wargoal = {\n"; newFocus->completionReward += " type = annex_everything\n"; newFocus->completionReward += " target = " + nan[i]->getTag() + "\n"; @@ -1097,10 +1105,6 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre } //events for allies vector newAllies = GetMorePossibleAllies(Leader); - for each (auto newally in newAllies) - { - findFaction(Leader)->addMember(newally); - } if (newAllies.size() > 0) { //Focus to call summit, maybe have events from summit @@ -1118,6 +1122,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre newFocus->aiWillDo += " }"; //FIXME //newFocus->completionReward += " opinion_gain_monthly_factor = 1.0"; + newFocus->completionReward += " add_named_threat = { threat = 3 name = " + newFocus->id + " }\n"; FocusTree->addFocus(newFocus); } @@ -1233,7 +1238,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre { GCDistanceSorted.push_back(iterator->second); } - sort(GCDistanceSorted.begin(), GCDistanceSorted.end()); + vector GCTargets; for each (auto GC in GCDistanceSorted) { @@ -1244,7 +1249,6 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre if (GC != Leader) GCTargets.push_back(GC); } - } int maxGCWars = 0; int start = 0; @@ -1316,6 +1320,7 @@ vector HoI4WarCreator::fascistWarMaker(HoI4Country* Leader, ofstre newFocus->aiWillDo += " }\n"; newFocus->aiWillDo += " }"; } + newFocus->completionReward += " add_named_threat = { threat = 3 name = " + newFocus->id + " }\n"; newFocus->completionReward += " create_wargoal = {\n"; newFocus->completionReward += " type = annex_everything\n"; newFocus->completionReward += " target = " + GC->getTag() + "\n"; @@ -1374,18 +1379,18 @@ vector HoI4WarCreator::communistWarCreator(HoI4Country* Leader, of { double com = 0; HoI4Faction* neighFaction = findFaction(neigh.second); - for (auto party : neigh.second->getParties()) + for (auto party : neigh.second->getIdeologySupport()) { - if (party.name.find("socialist") != string::npos || party.name.find("communist") != string::npos || party.name.find("anarcho_liberal") != string::npos) - com += party.popularity; + if ((party.first == "socialist") || (party.first == "communist") || (party.first == "anarcho_liberal")) + com += party.second; } - if (com > 25 && neigh.second->getRulingParty().ideology != "communist" && HowToTakeLand(neigh.second, Leader, 2.5) == "coup") + if (com > 25 && neigh.second->getRulingParty()->ideology != "communist" && HowToTakeLand(neigh.second, Leader, 2.5) == "coup") { //look for neighboring countries to spread communism too(Need 25 % or more Communism support), Prioritizing those with "Communism Allowed" Flags, prioritizing those who are weakest // Method() Influence Ideology and Attempt Coup coups.push_back(neigh.second); } - else if (neighFaction->getMembers().size() == 1 && neigh.second->getRulingParty().ideology != "communist") + else if (neighFaction->getMembers().size() == 1 && neigh.second->getRulingParty()->ideology != "communist") { // Then look for neighboring countries to spread communism by force, prioritizing weakest first forcedtakeover.push_back(neigh.second); @@ -1548,7 +1553,7 @@ vector HoI4WarCreator::communistWarCreator(HoI4Country* Leader, of newFocus->yPos = 1; newFocus->cost = 10; newFocus->aiWillDo = " factor = 5"; - newFocus->completionReward += " add_named_threat = { threat = 2 name = \"Socialist World Republic\" }"; + newFocus->completionReward += " add_named_threat = { threat = 2 name = " + newFocus->id + " }"; //FIXME //maybe add some claims? FocusTree->addFocus(newFocus); @@ -1613,6 +1618,7 @@ vector HoI4WarCreator::communistWarCreator(HoI4Country* Leader, of newFocus->aiWillDo += " }"; } + newFocus->completionReward += " add_named_threat = { threat = 3 name = " + newFocus->id + " }\n"; newFocus->completionReward += " create_wargoal = {\n"; newFocus->completionReward += " type = puppet_wargoal_focus\n"; newFocus->completionReward += " target = " + TargetsbyIC[i]->getTag() + "\n"; @@ -1837,6 +1843,8 @@ vector HoI4WarCreator::communistWarCreator(HoI4Country* Leader, of newFocus->aiWillDo += " }\n"; } + + newFocus->completionReward += " add_named_threat = { threat = 5 name = " + newFocus->id + " }\n"; newFocus->completionReward += " create_wargoal = {\n"; newFocus->completionReward += " type = puppet_wargoal_focus\n"; newFocus->completionReward += " target = " + GC->getTag() + "\n"; @@ -1866,7 +1874,7 @@ vector HoI4WarCreator::democracyWarCreator(HoI4Country* Leader) for (auto GC: theWorld->getGreatPowers()) { double relation = Leader->getRelations(GC->getTag())->getRelations(); - if (relation < 100 && (GC->getGovernment() != "hms_government" || (GC->getGovernment() == "hms_government" && (GC->getRulingParty().war_pol == "jingoism" || GC->getRulingParty().war_pol == "pro_military"))) && GC->getGovernment() != "democratic" && std::find(Allies.begin(), Allies.end(), GC->getTag()) == Allies.end()) + if (relation < 100 && GC->getGovernmentIdeology() != "democratic" && std::find(Allies.begin(), Allies.end(), GC->getTag()) == Allies.end()) { string HowToTakeGC = HowToTakeLand(GC, Leader, 3); //if (HowToTakeGC == "noactionneeded" || HowToTakeGC == "factionneeded") @@ -1891,7 +1899,7 @@ vector HoI4WarCreator::democracyWarCreator(HoI4Country* Leader) } -vector HoI4WarCreator::MonarchyWarCreator(HoI4Country* country) +vector HoI4WarCreator::absolutistWarCreator(HoI4Country* country) { HoI4FocusTree* focusTree = genericFocusTree->makeCustomizedCopy(country); @@ -1899,7 +1907,7 @@ vector HoI4WarCreator::MonarchyWarCreator(HoI4Country* country) vector weakNeighbors = findWeakNeighbors(country); vector weakColonies = findWeakColonies(country); - focusTree->addMonarchyEmpireNationalFocuses(country, weakColonies, weakNeighbors); + focusTree->addAbsolutistEmpireNationalFocuses(country, weakColonies, weakNeighbors); vector greatPowerTargets = getGreatPowerTargets(country); vector CountriesAtWar = addGreatPowerWars(country, focusTree, greatPowerTargets); @@ -1911,6 +1919,14 @@ vector HoI4WarCreator::MonarchyWarCreator(HoI4Country* country) } +vector HoI4WarCreator::radicalWarCreator(HoI4Country* country) +{ + vector countriesAtWar; + + return countriesAtWar; +} + + vector HoI4WarCreator::findWeakNeighbors(const HoI4Country* country) { vector weakNeighbors; @@ -2121,6 +2137,7 @@ vector HoI4WarCreator::addGreatPowerWars(HoI4Country* country, HoI newFocus->aiWillDo += " }\n"; newFocus->aiWillDo += " }"; } + newFocus->completionReward += " add_named_threat = { threat = 5 name = " + newFocus->id + " }\n"; newFocus->completionReward += " create_wargoal = {\n"; newFocus->completionReward += " type = annex_everything\n"; newFocus->completionReward += " target = " + target->getTag() + "\n"; diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.h b/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.h index e27308a32..49eab3058 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4WarCreator.h @@ -52,7 +52,8 @@ class HoI4WarCreator vector fascistWarMaker(HoI4Country* country, ofstream& AILog); vector communistWarCreator(HoI4Country* country, ofstream& AILog); vector democracyWarCreator(HoI4Country* country); - vector MonarchyWarCreator(HoI4Country* country); + vector absolutistWarCreator(HoI4Country* country); + vector radicalWarCreator(HoI4Country* country); vector calculateEvilness(vector LeaderCountries); vector findWeakNeighbors(const HoI4Country* country); diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4World.cpp b/Vic2ToHoI4/Source/HOI4World/HoI4World.cpp index 0c5170333..a94c3d8bf 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4World.cpp +++ b/Vic2ToHoI4/Source/HOI4World/HoI4World.cpp @@ -52,19 +52,15 @@ HoI4World::HoI4World(const V2World* _sourceWorld) LOG(LogLevel::Info) << "Parsing HoI4 data"; sourceWorld = _sourceWorld; - map> HoI4DefaultStateToProvinceMap; states = new HoI4States(sourceWorld); - states->importStates(HoI4DefaultStateToProvinceMap); - + buildings = new HoI4Buildings(states->getProvinceToStateIDMap()); + supplyZones = new HoI4SupplyZones; events = new HoI4Events; - supplyZones = new HoI4SupplyZones(HoI4DefaultStateToProvinceMap); - diplomacy = new HoI4Diplomacy; - states->convertStates(); convertNavalBases(); convertCountries(); - states->addLocalisations(); + HoI4Localisation::addStateLocalisations(states); convertIndustry(); convertResources(); supplyZones->convertSupplyZones(states); @@ -76,13 +72,15 @@ HoI4World::HoI4World(const V2World* _sourceWorld) convertNavies(); convertAirforces(); determineGreatPowers(); + identifyMajorIdeologies(); + addNeutrality(); + convertIdeologySupport(); convertCapitalVPs(); convertAirBases(); createFactions(); HoI4WarCreator warCreator; warCreator.generateWars(this); - buildings = new HoI4Buildings(states->getProvinceToStateIDMap()); } @@ -112,7 +110,6 @@ void HoI4World::convertCountries() backgroundMap seaBackgroundMap; //initLeaderBackgroundMap(obj->getLeaves()[0], landBackgroundMap, seaBackgroundMap); - initNamesMapping(namesMap); initPortraitMapping(portraitMap); map leaderMap; @@ -138,15 +135,16 @@ void HoI4World::convertCountry(pair country, map& const std::string& HoI4Tag = CountryMapper::getHoI4Tag(country.first); if (!HoI4Tag.empty()) { - std::string countryFileName = '/' + country.second->getName("english") + ".txt"; - destCountry = new HoI4Country(HoI4Tag, countryFileName, this, true); + std::string countryFileName = country.second->getName("english") + ".txt"; + destCountry = new HoI4Country(HoI4Tag, countryFileName, this); V2Party* rulingParty = country.second->getRulingParty(sourceWorld->getParties()); if (rulingParty == nullptr) { - LOG(LogLevel::Error) << "Could not find the ruling party for " << country.first << ". Were all mods correctly included?"; + LOG(LogLevel::Error) << "Could not find the ruling party for " << country.first << ". Most likely a mod was not included."; + LOG(LogLevel::Error) << "Double-check your settings, and remember to included EU4 to Vic2 mods. See the FAQ for more information."; exit(-1); } - destCountry->initFromV2Country(*sourceWorld, country.second, rulingParty->ideology, leaderMap, governmentJobs, namesMap, portraitMap, cultureMap, landPersonalityMap, seaPersonalityMap, landBackgroundMap, seaBackgroundMap, states->getProvinceToStateIDMap(), states->getStates()); + destCountry->initFromV2Country(*sourceWorld, country.second, rulingParty->ideology, leaderMap, governmentJobs, portraitMap, cultureMap, landPersonalityMap, seaPersonalityMap, landBackgroundMap, seaBackgroundMap, states->getProvinceToStateIDMap(), states->getStates()); countries.insert(make_pair(HoI4Tag, destCountry)); } else @@ -154,7 +152,45 @@ void HoI4World::convertCountry(pair country, map& LOG(LogLevel::Warning) << "Could not convert V2 tag " << country.first << " to HoI4"; } - HoI4Localisation::readFromCountry(country.second, HoI4Tag); + HoI4Localisation::createCountryLocalisations(country.first, HoI4Tag); +} + + +void HoI4World::identifyMajorIdeologies() +{ + for (auto greatPower: greatPowers) + { + majorIdeologies.insert(greatPower->getGovernmentIdeology()); + } + + for (auto country: countries) + { + if (country.second->isHuman()) + { + majorIdeologies.insert(country.second->getGovernmentIdeology()); + } + } +} + + +void HoI4World::addNeutrality() +{ + for (auto country: countries) + { + if (majorIdeologies.count(country.second->getGovernmentIdeology()) == 0) + { + country.second->setGovernmentToNeutral(); + } + } +} + + +void HoI4World::convertIdeologySupport() +{ + for (auto country: countries) + { + country.second->convertIdeologySupport(majorIdeologies); + } } @@ -780,7 +816,7 @@ void HoI4World::generateLeaders() for (auto country: countries) { - country.second->generateLeaders(leaderTraits, namesMap, portraitMap); + country.second->generateLeaders(leaderTraits, portraitMap); } } @@ -962,7 +998,7 @@ void HoI4World::createFactions() vector factionMembers; factionMembers.push_back(leader); - string leaderGovernment = leader->getGovernment(); + string leaderIdeology = leader->getGovernmentIdeology(); logFactionMember(factionsLog, leader); double factionMilStrength = leader->getStrengthOverTime(3.0); @@ -975,10 +1011,10 @@ void HoI4World::createFactions() } HoI4Country* allycountry = ally->second; - string allygovernment = allycountry->getGovernment(); + string allygovernment = allycountry->getGovernmentIdeology(); string sphereLeader = returnSphereLeader(allycountry); - if ((sphereLeader == leader->getTag()) || ((sphereLeader == "") && governmentsAllowFaction(leaderGovernment, allygovernment))) + if ((sphereLeader == leader->getTag()) || ((sphereLeader == "") && governmentsAllowFaction(leaderIdeology, allygovernment))) { logFactionMember(factionsLog, allycountry); factionMembers.push_back(allycountry); @@ -1004,7 +1040,7 @@ void HoI4World::createFactions() void HoI4World::logFactionMember(ofstream& factionsLog, const HoI4Country* member) { factionsLog << member->getSourceCountry()->getName("english") << ","; - factionsLog << member->getGovernment() << ","; + factionsLog << member->getGovernmentIdeology() << ","; factionsLog << member->getMilitaryStrength() << ","; factionsLog << member->getEconomicStrength(1.0) << ","; factionsLog << member->getEconomicStrength(3.0) << "\n"; @@ -1030,37 +1066,25 @@ string HoI4World::returnSphereLeader(HoI4Country* possibleSphereling) } -bool HoI4World::governmentsAllowFaction(string leaderGovernment, string allyGovernment) +bool HoI4World::governmentsAllowFaction(string leaderIdeology, string allyGovernment) { - if (leaderGovernment == allyGovernment) - { - return true; - } - else if (leaderGovernment == "absolute_monarchy" && (allyGovernment == "fascism" || allyGovernment == "democratic" || allyGovernment == "prussian_constitutionalism" || allyGovernment == "hms_government")) + if (leaderIdeology == allyGovernment) { return true; } - else if (leaderGovernment == "democratic" && (allyGovernment == "hms_government" || allyGovernment == "absolute_monarchy" || allyGovernment == "prussian_constitutionalism")) + else if (leaderIdeology == "absolutist" && allyGovernment == "fascism") { return true; } - else if (leaderGovernment == "prussian_constitutionalism" && (allyGovernment == "hms_government" || allyGovernment == "absolute_monarchy" || allyGovernment == "democratic" || allyGovernment == "fascism")) + else if (leaderIdeology == "democratic" && allyGovernment == "absolutist") { return true; } - else if (leaderGovernment == "hms_government" && (allyGovernment == "democratic" || allyGovernment == "absolute_monarchy" || allyGovernment == "prussian_constitutionalism")) + else if (leaderIdeology == "communism" && allyGovernment == "fascism") { return true; } - else if (leaderGovernment == "communism" && (allyGovernment == "syndicalism")) - { - return true; - } - else if (leaderGovernment == "syndicalism" && (allyGovernment == "communism" || allyGovernment == "fascism")) - { - return true; - } - else if (leaderGovernment == "fascism" && (allyGovernment == "syndicalism" || allyGovernment == "absolute_monarchy" || allyGovernment == "prussian_constitutionalism")) + else if (leaderIdeology == "fascism" && (allyGovernment == "communism" || allyGovernment == "absolutist")) { return true; } @@ -1076,8 +1100,15 @@ void HoI4World::output() const { LOG(LogLevel::Info) << "Outputting world"; + if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/history")) + { + LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/history"; + exit(-1); + } + outputCommonCountries(); outputColorsfile(); + outputNames(); HoI4Localisation::output(); states->output(); diplomacy->output(); @@ -1092,11 +1123,6 @@ void HoI4World::output() const void HoI4World::outputCommonCountries() const { - if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/common/countries")) - { - LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/common/countries\""; - exit(-1); - } if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/common/country_tags")) { LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/common/country_tags\""; @@ -1126,6 +1152,12 @@ void HoI4World::outputCommonCountries() const void HoI4World::outputColorsfile() const { + if (!Utils::TryCreateFolder("Output/" + Configuration::getOutputName() + "/common/countries")) + { + LOG(LogLevel::Error) << "Could not create \"Output/" + Configuration::getOutputName() + "/common/countries\""; + exit(-1); + } + ofstream output("Output/" + Configuration::getOutputName() + "/common/countries/colors.txt"); if (!output.is_open()) { @@ -1146,6 +1178,24 @@ void HoI4World::outputColorsfile() const } +void HoI4World::outputNames() const +{ + ofstream namesFile("Output/" + Configuration::getOutputName() + "/common/names/01_names.txt"); + namesFile << "\xEF\xBB\xBF"; // add the BOM to make HoI4 happy + + if (!namesFile.is_open()) + { + Log(LogLevel::Error) << "Could not open Output/" << Configuration::getOutputName() << "/common/names/01_names.txt"; + exit(-1); + } + + for (auto country: countries) + { + country.second->outputToNamesFiles(namesFile); + } +} + + void HoI4World::outputMap() const { LOG(LogLevel::Debug) << "Writing Map Info"; @@ -1222,6 +1272,21 @@ void HoI4World::outputCountries() const { country.second->output(states->getStates(), factions); } + + ofstream ideasFile("Output/" + Configuration::getOutputName() + "/interface/converter_ideas.gfx"); + if (!ideasFile.is_open()) + { + LOG(LogLevel::Error) << "Could not open Output/" << Configuration::getOutputName() << "/interface/ideas.gfx"; + exit(-1); + } + + ideasFile << "spriteTypes = {\n"; + for (auto country: countries) + { + country.second->outputIdeaGraphics(ideasFile); + } + ideasFile << "\n"; + ideasFile << "}\n"; } diff --git a/Vic2ToHoI4/Source/HOI4World/HoI4World.h b/Vic2ToHoI4/Source/HOI4World/HoI4World.h index 30c14c268..eaf356c0a 100644 --- a/Vic2ToHoI4/Source/HOI4World/HoI4World.h +++ b/Vic2ToHoI4/Source/HOI4World/HoI4World.h @@ -29,6 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "HoI4States.h" #include "../Mappers/Mapper.h" #include +#include #include #include using namespace std; @@ -68,6 +69,9 @@ class HoI4World void convertCountries(); void convertCountry(pair country, map& leaderMap, governmentJobsMap governmentJobs, const cultureMapping& cultureMap, personalityMap& landPersonalityMap, personalityMap& seaPersonalityMap, backgroundMap& landBackgroundMap, backgroundMap& seaBackgroundMap); + void identifyMajorIdeologies(); + void addNeutrality(); + void convertIdeologySupport(); void convertIndustry(); void addStatesToCountries(); @@ -129,6 +133,7 @@ class HoI4World void outputCommonCountries() const; void outputColorsfile() const; + void outputNames() const; void outputMap() const; void outputCountries() const; void outputRelations() const; @@ -150,13 +155,14 @@ class HoI4World map countries; map landedCountries; vector greatPowers; + + set majorIdeologies; vector factions; HoI4Diplomacy* diplomacy; HoI4Events* events; leaderTraitsMap leaderTraits; - namesMapping namesMap; portraitMapping portraitMap; }; diff --git a/Vic2ToHoI4/Source/Mappers/CountryMapping.cpp b/Vic2ToHoI4/Source/Mappers/CountryMapping.cpp index 79c791cf0..d90d89041 100644 --- a/Vic2ToHoI4/Source/Mappers/CountryMapping.cpp +++ b/Vic2ToHoI4/Source/Mappers/CountryMapping.cpp @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include #include #include -#include "Object.h" #include "paradoxParserUTF8.h" #include "../V2World/V2World.h" #include "../HoI4World/HoI4World.h" @@ -44,6 +43,64 @@ CountryMapper* CountryMapper::instance = NULL; CountryMapper::CountryMapper() { + LOG(LogLevel::Info) << "Getting country mappings"; + readRules(); +} + + +void CountryMapper::readRules() +{ + LOG(LogLevel::Info) << "Reading country mapping rules"; + vector ruleNodes = getRules(); + for (auto rule: ruleNodes) + { + importRule(rule); + } +} + + +vector CountryMapper::getRules() +{ + Object* countryMappingsFile = parser_UTF8::doParseFile("country_mappings.txt"); + if (!countryMappingsFile) + { + LOG(LogLevel::Error) << "Failed to parse country_mappings.txt"; + exit(-1); + } + vector nodes = countryMappingsFile->getLeaves(); + if (nodes.empty()) + { + LOG(LogLevel::Error) << "country_mappings.txt does not contain a mapping"; + exit(-1); + } + + return nodes[0]->getLeaves(); +} + + +void CountryMapper::importRule(Object* rule) +{ + vector ruleItems = rule->getLeaves(); + + string newVic2Tag; + vector HoI4Tags; + for (auto item: ruleItems) + { + string key = boost::to_upper_copy(item->getKey()); + if (key == "VIC") + { + newVic2Tag = boost::to_upper_copy(item->getLeaf()); + } + else if (key == "HOI") + { + HoI4Tags.push_back(boost::to_upper_copy(item->getLeaf())); + } + else + { + LOG(LogLevel::Warning) << "Ignoring unknown key '" << key << "' while mapping countries"; + } + } + Vic2TagToHoI4TagsRules.insert(make_pair(newVic2Tag, HoI4Tags)); } @@ -52,11 +109,9 @@ void CountryMapper::CreateMappings(const V2World* srcWorld) LOG(LogLevel::Info) << "Creating country mapping"; resetMappingData(); - for (auto Vic2Tag: srcWorld->getCountries()) + for (auto Vic2Country: srcWorld->getCountries()) { - string HoI4Tag = generateNewTag(); - V2TagToHoI4TagMap.left.insert(make_pair(Vic2Tag.first, HoI4Tag)); - LogMapping(Vic2Tag.first, HoI4Tag, "generated tag"); + makeOneMapping(Vic2Country.first); } } @@ -70,7 +125,43 @@ void CountryMapper::resetMappingData() } -string CountryMapper::generateNewTag() +void CountryMapper::makeOneMapping(const string& Vic2Tag) +{ + auto mappingRule = Vic2TagToHoI4TagsRules.find(Vic2Tag); + + bool mapped = false; + if (mappingRule != Vic2TagToHoI4TagsRules.end()) + { + auto possibleHoI4Tags = mappingRule->second; + mapped = mapToFirstUnusedVic2Tag(possibleHoI4Tags, Vic2Tag); + } + + if (!mapped) + { + string HoI4Tag = generateNewHoI4Tag(Vic2Tag); + mapToNewTag(Vic2Tag, HoI4Tag); + } +} + + +bool CountryMapper::mapToFirstUnusedVic2Tag(const vector& possibleHoI4Tags, const string& Vic2Tag) +{ + for (auto possibleHoI4Tag: possibleHoI4Tags) + { + if (!tagIsAlreadyAssigned(possibleHoI4Tag)) + { + V2TagToHoI4TagMap.left.insert(make_pair(Vic2Tag, possibleHoI4Tag)); + LogMapping(Vic2Tag, possibleHoI4Tag, "mapping rule"); + + return true; + } + } + + return false; +} + + +string CountryMapper::generateNewHoI4Tag(const string& Vic2Tag) { ostringstream generatedHoI4TagStream; generatedHoI4TagStream << generatedHoI4TagPrefix << setfill('0') << setw(2) << generatedHoI4TagSuffix; @@ -87,12 +178,25 @@ string CountryMapper::generateNewTag() } +void CountryMapper::mapToNewTag(const string& Vic2Tag, const string& HoI4Tag) +{ + V2TagToHoI4TagMap.left.insert(make_pair(Vic2Tag, HoI4Tag)); + LogMapping(Vic2Tag, HoI4Tag, "generated tag"); +} + + void CountryMapper::LogMapping(const string& sourceTag, const string& targetTag, const string& reason) { LOG(LogLevel::Debug) << "Mapping " << sourceTag << " -> " << targetTag << " (" << reason << ')'; } +bool CountryMapper::tagIsAlreadyAssigned(const string& HoI4Tag) +{ + return (V2TagToHoI4TagMap.right.find(HoI4Tag) != V2TagToHoI4TagMap.right.end()); +} + + const string CountryMapper::GetHoI4Tag(const string& V2Tag) const { boost::bimap::left_const_iterator findIter = V2TagToHoI4TagMap.left.find(V2Tag); diff --git a/Vic2ToHoI4/Source/Mappers/CountryMapping.h b/Vic2ToHoI4/Source/Mappers/CountryMapping.h index 37cb08f51..e0eb265f4 100644 --- a/Vic2ToHoI4/Source/Mappers/CountryMapping.h +++ b/Vic2ToHoI4/Source/Mappers/CountryMapping.h @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -26,6 +26,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ +#include "Object.h" #include #include #include @@ -33,6 +34,7 @@ using namespace std; +class Object; class V2World; @@ -68,14 +70,23 @@ class CountryMapper } CountryMapper(); + void readRules(); + vector getRules(); + void importRule(Object* rule); + void CreateMappings(const V2World* srcWorld); void resetMappingData(); - string generateNewTag(); + void makeOneMapping(const string& Vic2Tag); + bool mapToFirstUnusedVic2Tag(const vector& possibleVic2Tags, const string& EU4Tag); + string generateNewHoI4Tag(const string& Vic2Tag); + void mapToNewTag(const string& Vic2Tag, const string& HoI4Tag); void LogMapping(const string& sourceTag, const string& targetTag, const string& reason); + bool tagIsAlreadyAssigned(const string& HoI4Tag); const string GetHoI4Tag(const string& V2Tag) const; const string GetVic2Tag(const string& HoI4Tag) const; + map> Vic2TagToHoI4TagsRules; boost::bimap V2TagToHoI4TagMap; char generatedHoI4TagPrefix; diff --git a/Vic2ToHoI4/Source/Mappers/CultureGroupMapper.cpp b/Vic2ToHoI4/Source/Mappers/CultureGroupMapper.cpp new file mode 100644 index 000000000..fc1846278 --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/CultureGroupMapper.cpp @@ -0,0 +1,86 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#include "CultureGroupmapper.h" +#include "../Configuration.h" +#include "Log.h" +#include "Object.h" +#include "ParadoxParser8859_15.h" + + + +cultureGroupMapper* cultureGroupMapper::instance = nullptr; + + +cultureGroupMapper::cultureGroupMapper() +{ + LOG(LogLevel::Info) << "Determining culture groups"; + + for (auto mod: Configuration::getVic2Mods()) + { + LOG(LogLevel::Debug) << "Reading mod cultures from " << mod; + processVic2CulturesFile((Configuration::getV2Path() + "/mod/" + mod + "/common/cultures.txt")); + } + + processVic2CulturesFile((Configuration::getV2Path() + "/common/cultures.txt")); +} + + +void cultureGroupMapper::processVic2CulturesFile(string culturesFile) +{ + Object* obj = parser_8859_15::doParseFile(culturesFile); + if (obj == nullptr) + { + return; + } + + vector groupsObj = obj->getLeaves(); + for (auto groupsItr: groupsObj) + { + string group = groupsItr->getKey(); + + vector culturesObj = groupsItr->getLeaves(); + for (auto culturesItr: culturesObj) + { + string key = culturesItr->getKey(); + if ((key != "union") && (key != "leader") && (key != "unit") && (key != "is_overseas") && (mappings.find(key) == mappings.end())) + { + mappings.insert(make_pair(key, group)); + } + } + } +} + + +string cultureGroupMapper::GetCultureGroup(string culture) +{ + auto mapping = mappings.find(culture); + if (mapping != mappings.end()) + { + return mapping->second; + } + else + { + return ""; + } +} \ No newline at end of file diff --git a/Vic2ToHoI4/Source/Mappers/CultureGroupMapper.h b/Vic2ToHoI4/Source/Mappers/CultureGroupMapper.h new file mode 100644 index 000000000..fea460f18 --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/CultureGroupMapper.h @@ -0,0 +1,65 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#ifndef CULTUREGROUPMAPPER_H +#define CULTUREGROUPMAPPER_H + + + +#include +#include +#include +#include +using namespace std; + + + +class cultureGroupMapper +{ + public: + static string getCultureGroup(string culture) + { + return getInstance()->GetCultureGroup(culture); + } + private: + static cultureGroupMapper* instance; + static cultureGroupMapper* getInstance() + { + if (instance == nullptr) + { + instance = new cultureGroupMapper; + } + return instance; + } + cultureGroupMapper(); + void processVic2CulturesFile(string culturesFile); + + string GetCultureGroup(string culture); + + map mappings; +}; + + + + +#endif //CULTUREGROUPMAPPER_H diff --git a/Vic2ToHoI4/Source/Mappers/GovernmentMapper.cpp b/Vic2ToHoI4/Source/Mappers/GovernmentMapper.cpp index 9f294938a..621b11a8d 100644 --- a/Vic2ToHoI4/Source/Mappers/GovernmentMapper.cpp +++ b/Vic2ToHoI4/Source/Mappers/GovernmentMapper.cpp @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -22,206 +22,166 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "GovernmentMapper.h" -#include -#include #include "../V2World/V2Country.h" -#include "../Configuration.h" #include "Log.h" #include "Object.h" -#include "OSCompatibilityLayer.h" -#include "ParadoxParser8859_15.h" #include "ParadoxParserUTF8.h" -governmentMapper* governmentMapper::instance = NULL; +governmentMapper* governmentMapper::instance = nullptr; + governmentMapper::governmentMapper() { - reformsInitialized = false; - totalPoliticalReforms = 0; - totalSocialReforms = 0; - LOG(LogLevel::Info) << "Parsing governments mappings"; - Object* obj = parser_UTF8::doParseFile("governmentMapping.txt"); - if (obj == NULL) + auto obj = parser_UTF8::doParseFile("governmentMapping.txt"); + if (obj == nullptr) { LOG(LogLevel::Error) << "Could not parse file governmentMapping.txt"; exit(-1); } - initGovernmentMap(obj->getLeaves()[0]); - LOG(LogLevel::Info) << "Parsing governments reforms"; - for (auto itr : Configuration::getVic2Mods()) + auto governmentObjects = obj->getValue("government_mappings"); + if (governmentObjects.size() > 0) { - if (Utils::DoesFileExist(Configuration::getV2Path() + "/mod/" + itr + "/common/issues.txt")) - { - obj = parser_8859_15::doParseFile((Configuration::getV2Path() + "/mod/" + itr + "/common/issues.txt")); - if (obj != NULL) - { - initReforms(obj); - break; - } - } + importGovernmentMappings(governmentObjects[0]); } - if (!areReformsInitialized()) + else { - obj = parser_8859_15::doParseFile((Configuration::getV2Path() + "/common/issues.txt")); - if (obj != NULL) - { - initReforms(obj); - } + LOG(LogLevel::Error) << "governmentMapping.txt did not contain government mappings"; + exit(-1); + } + + auto partyObjects = obj->getValue("party_mappings"); + if (partyObjects.size() > 0) + { + importPartyMappings(partyObjects[0]); + } + else + { + LOG(LogLevel::Error) << "governmentMapping.txt did not contain party mappings"; + exit(-1); } } -void governmentMapper::initGovernmentMap(Object* obj) +void governmentMapper::importGovernmentMappings(Object* obj) { - vector links = obj->getValue("link"); - for (auto link: links) + for (auto mapping: obj->getValue("mapping")) { - govMapping newMapping; - newMapping.require_political_reforms = 0.0; - newMapping.require_social_reforms_above = 0.0; - newMapping.require_social_reforms_below = 1.0; - - vector items = link->getLeaves(); - for (auto item : items) + governmentMapping newMapping; + for (auto item: mapping->getLeaves()) { string key = item->getKey(); if (key == "vic") { - newMapping.vic_gov = item->getLeaf(); - } - else if (key == "hoi") - { - newMapping.HoI4_gov = item->getLeaf(); - } - else if (key == "ruling_party") - { - newMapping.ruling_party_required = item->getLeaf(); + newMapping.vic2Government = item->getLeaf(); } - else if (key == "political_reforms") + else if (key == "hoi_gov") { - newMapping.require_political_reforms = stof(item->getLeaf()); + newMapping.HoI4GovernmentIdeology = item->getLeaf(); } - else if (key == "social_reforms_above") + else if (key == "hoi_leader") { - newMapping.require_social_reforms_above = stof(item->getLeaf()); + newMapping.HoI4LeaderIdeology = item->getLeaf(); } - else if (key == "social_reforms_below") + else if (key == "ruling_party") { - newMapping.require_social_reforms_below = stof(item->getLeaf()); + newMapping.rulingPartyRequired = item->getLeaf(); } } + governmentMap.push_back(newMapping); } } -void governmentMapper::initReforms(Object* obj) +void governmentMapper::importPartyMappings(Object* obj) { - vector topObjects = obj->getLeaves(); - for (auto topObject : topObjects) + for (auto mapping: obj->getValue("mapping")) { - if (topObject->getKey() == "political_reforms") + partyMapping newMapping; + for (auto item: mapping->getLeaves()) { - vector reformObjs = topObject->getLeaves(); - for (auto reformObj : reformObjs) + string key = item->getKey(); + if (key == "ruling_ideology") { - reformTypes.insert(make_pair(reformObj->getKey(), "")); - - int reformLevelNum = 0; - vector reformLevelObjs = reformObj->getLeaves(); - for (auto reformLevel : reformLevelObjs) - { - if ((reformLevel->getKey() == "next_step_only") || (reformLevel->getKey() == "administrative")) - { - continue; - } - - politicalReformScores.insert(make_pair(reformLevel->getKey(), reformLevelNum)); - reformLevelNum++; - totalPoliticalReforms++; - } - totalPoliticalReforms--; + newMapping.rulingIdeology = item->getLeaf(); } - } - - if (topObject->getKey() == "social_reforms") - { - vector reformObjs = topObject->getLeaves(); - for (auto reformObj : reformObjs) + else if (key == "vic2_ideology") + { + newMapping.vic2Ideology = item->getLeaf(); + } + else if (key == "supported_ideology") { - reformTypes.insert(make_pair(reformObj->getKey(), "")); - - int reformLevelNum = 0; - vector reformLevelObjs = reformObj->getLeaves(); - for (auto reformLevel : reformLevelObjs) - { - if ((reformLevel->getKey() == "next_step_only") || (reformLevel->getKey() == "administrative")) - { - continue; - } - - socialReformScores.insert(make_pair(reformLevel->getKey(), reformLevelNum)); - reformLevelNum++; - totalSocialReforms++; - } - totalSocialReforms--; + newMapping.supportedIdeology = item->getLeaf(); } } + + partyMap.push_back(newMapping); } } -string governmentMapper::getGovernmentForCountry(const V2Country* country, const string ideology) +string governmentMapper::GetIdeologyForCountry(const V2Country* country, const string& Vic2RulingIdeology) { - // calculate the percent of reforms passed - int politicalReforms = 0; - int socialReforms = 0; - auto currentReforms = country->getAllReforms(); - for (auto reform: currentReforms) + string ideology = "neutrality"; + for (auto mapping: governmentMap) { - auto politicalReform = politicalReformScores.find(reform.second); - if (politicalReform != politicalReformScores.end()) - { - politicalReforms += politicalReform->second; - } - auto socialReform = socialReformScores.find(reform.second); - if (socialReform != socialReformScores.end()) + if (governmentMatches(mapping, country->getGovernment()) && rulingIdeologyMatches(mapping, Vic2RulingIdeology)) { - socialReforms += socialReform->second; + ideology = mapping.HoI4GovernmentIdeology; + break; } } - double politicalReformsPercent = 1.0 * politicalReforms / totalPoliticalReforms; - double socialReformsPercent = 1.0 * socialReforms / totalSocialReforms; - // find the goverment type - string hoiGov; - for (auto mapping : governmentMap) + LOG(LogLevel::Debug) << "Mapped " << country->getTag() << " government " << country->getGovernment() << " to " << ideology; + return ideology; +} + + +string governmentMapper::GetLeaderIdeologyForCountry(const V2Country* country, const string& Vic2RulingIdeology) +{ + string ideology = "neutrality"; + for (auto mapping: governmentMap) { - if ( - (mapping.vic_gov == country->getGovernment()) && - ((mapping.ruling_party_required == "") || (mapping.ruling_party_required == ideology)) && - (mapping.require_political_reforms <= politicalReformsPercent) && - (mapping.require_social_reforms_above <= socialReformsPercent) && - (mapping.require_social_reforms_below >= socialReformsPercent) - ) + if (governmentMatches(mapping, country->getGovernment()) && rulingIdeologyMatches(mapping, Vic2RulingIdeology)) { - hoiGov = mapping.HoI4_gov; + ideology = mapping.HoI4LeaderIdeology; break; } } - LOG(LogLevel::Debug) << "Mapped " << country->getTag() << " government " << country->getGovernment() << " to " << hoiGov; - - return hoiGov; + LOG(LogLevel::Debug) << "Mapped " << country->getTag() << " leader " << country->getGovernment() << " to " << ideology; + return ideology; } +bool governmentMapper::governmentMatches(const governmentMapping& mapping, const string& government) +{ + return ((mapping.vic2Government == "") || (mapping.vic2Government == government)); +} + +bool governmentMapper::rulingIdeologyMatches(const governmentMapping& mapping, const string& rulingIdeology) +{ + return ((mapping.rulingPartyRequired == "") || (mapping.rulingPartyRequired == rulingIdeology)); +} +string governmentMapper::GetSupportedIdeology(const string& rulingIdeology, const string& Vic2Ideology) +{ + string ideology = "neutrality"; + for (auto mapping: partyMap) + { + if ((rulingIdeology == mapping.rulingIdeology) && (Vic2Ideology == mapping.vic2Ideology)) + { + ideology = mapping.supportedIdeology; + break; + } + } + return ideology; +} \ No newline at end of file diff --git a/Vic2ToHoI4/Source/Mappers/GovernmentMapper.h b/Vic2ToHoI4/Source/Mappers/GovernmentMapper.h index 98400fd5c..7b514f3ac 100644 --- a/Vic2ToHoI4/Source/Mappers/GovernmentMapper.h +++ b/Vic2ToHoI4/Source/Mappers/GovernmentMapper.h @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -26,58 +26,81 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ -#include "Object.h" -#include +#include #include +#include using namespace std; +class Object; class V2Country; -struct govMapping + +typedef struct governmentMapping { - string vic_gov; - string HoI4_gov; - string ruling_party_required; - double require_political_reforms; - double require_social_reforms_above; - double require_social_reforms_below; -}; + string vic2Government; + string HoI4GovernmentIdeology; + string HoI4LeaderIdeology; + string rulingPartyRequired; +} governmentMapping; + + + +typedef struct partyMapping +{ + string rulingIdeology; + string vic2Ideology; + string supportedIdeology; +} partyMapping; class governmentMapper { public: - governmentMapper(); - void initGovernmentMap(Object* obj); - void initReforms(Object* obj); + static string getIdeologyForCountry(const V2Country* country, const string& Vic2RulingIdeology) + { + return getInstance()->GetIdeologyForCountry(country, Vic2RulingIdeology); + } - string getGovernmentForCountry(const V2Country* country, const string _ideology); + static string getLeaderIdeologyForCountry(const V2Country* country, const string& Vic2RulingIdeology) + { + return getInstance()->GetLeaderIdeologyForCountry(country, Vic2RulingIdeology); + } - bool areReformsInitialized() const { return reformsInitialized; } - map getReformTypes() const { return reformTypes; } + static string getSupportedIdeology(const string& rulingIdeology, const string& Vic2Ideology) + { + return getInstance()->GetSupportedIdeology(rulingIdeology, Vic2Ideology); + } + + static vector getGovernmentMappings() + { + return getInstance()->governmentMap; + } + private: + static governmentMapper* instance; static governmentMapper* getInstance() { - if (instance == NULL) + if (instance == nullptr) { instance = new governmentMapper(); } return instance; } + governmentMapper(); + void importGovernmentMappings(Object* obj); + void importPartyMappings(Object* obj); - private: - static governmentMapper* instance; + string GetIdeologyForCountry(const V2Country* country, const string& Vic2RulingIdeology); + string GetLeaderIdeologyForCountry(const V2Country* country, const string& Vic2RulingIdeology); + string GetSupportedIdeology(const string& rulingIdeology, const string& Vic2Ideology); + bool governmentMatches(const governmentMapping& mapping, const string& government); + bool rulingIdeologyMatches(const governmentMapping& mapping, const string& rulingIdeology); - vector governmentMap; - map reformTypes; - map politicalReformScores; - map socialReformScores; - int totalPoliticalReforms; - int totalSocialReforms; - bool reformsInitialized; + vector governmentMap; + vector partyMap; }; diff --git a/Vic2ToHoI4/Source/Mappers/GraphicsMapper.cpp b/Vic2ToHoI4/Source/Mappers/GraphicsMapper.cpp new file mode 100644 index 000000000..a96c3108a --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/GraphicsMapper.cpp @@ -0,0 +1,176 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#include "GraphicsMapper.h" +#include "Log.h" +#include "Object.h" +#include "ParadoxParserUTF8.h" + + + +graphicsMapper* graphicsMapper::instance = nullptr; + + + +graphicsMapper::graphicsMapper() +{ + LOG(LogLevel::Info) << "Reading graphics mappings"; + + auto fileObj = parser_UTF8::doParseFile("cultureGroupToGraphics.txt"); + if (fileObj == nullptr) + { + return; + } + + auto cultureGroupObjs = fileObj->getLeaves(); + for (auto cultureGroupObj: cultureGroupObjs) + { + string cultureGroup = cultureGroupObj->getKey(); + + auto leaderPortraitObjs = cultureGroupObj->getValue("leader_portraits"); + if (leaderPortraitObjs.size() > 0) + { + loadLeaderPortraitMappings(cultureGroup, leaderPortraitObjs[0]); + } + + auto ideologyMinisterPortraitObjs = cultureGroupObj->getValue("ideology_minister_portraits"); + if (leaderPortraitObjs.size() > 0) + { + loadIdeologyMinisterPortraitMappings(cultureGroup, ideologyMinisterPortraitObjs[0]); + } + } +} + + +void graphicsMapper::loadLeaderPortraitMappings(const string& cultureGroup, Object* portraitMappings) +{ + auto cultureGroupMappings = leaderPortraitMappings.element.find(cultureGroup); + if (cultureGroupMappings == leaderPortraitMappings.element.end()) + { + cultureGroupToPortraitsMap newCultureGroupMappings; + leaderPortraitMappings.element.insert(make_pair(cultureGroup, newCultureGroupMappings)); + cultureGroupMappings = leaderPortraitMappings.element.find(cultureGroup); + } + + auto ideologyObjs = portraitMappings->getLeaves(); + for (auto ideologyObj: ideologyObjs) + { + string ideology = ideologyObj->getKey(); + auto ideologyMapping = cultureGroupMappings->second.element.find(ideology); + if (ideologyMapping == cultureGroupMappings->second.element.end()) + { + vector newPortaits; + cultureGroupMappings->second.element.insert(make_pair(ideology, newPortaits)); + ideologyMapping = cultureGroupMappings->second.element.find(ideology); + } + + for (auto portraitStr: ideologyObj->getTokens()) + { + ideologyMapping->second.push_back(portraitStr); + } + } +} + + +void graphicsMapper::loadIdeologyMinisterPortraitMappings(const string& cultureGroup, Object* portraitMappings) +{ + auto cultureGroupMappings = ideologyMinisterMappings.element.find(cultureGroup); + if (cultureGroupMappings == ideologyMinisterMappings.element.end()) + { + cultureGroupToPortraitsMap newCultureGroupMappings; + ideologyMinisterMappings.element.insert(make_pair(cultureGroup, newCultureGroupMappings)); + cultureGroupMappings = ideologyMinisterMappings.element.find(cultureGroup); + } + + auto ideologyObjs = portraitMappings->getLeaves(); + for (auto ideologyObj: ideologyObjs) + { + string ideology = ideologyObj->getKey(); + auto ideologyMapping = cultureGroupMappings->second.element.find(ideology); + if (ideologyMapping == cultureGroupMappings->second.element.end()) + { + vector newPortaits; + cultureGroupMappings->second.element.insert(make_pair(ideology, newPortaits)); + ideologyMapping = cultureGroupMappings->second.element.find(ideology); + } + + for (auto portraitStr: ideologyObj->getTokens()) + { + ideologyMapping->second.push_back(portraitStr); + } + } +} + + +string graphicsMapper::GetLeaderPortrait(string cultureGroup, string ideology) +{ + vector portraits = GetLeaderPortraits(cultureGroup, ideology); + + std::uniform_int_distribution firstNameGen(0, portraits.size() - 1); + return portraits[firstNameGen(rng)]; +} + + +vector graphicsMapper::GetLeaderPortraits(string cultureGroup, string ideology) +{ + auto mapping = leaderPortraitMappings.element.find(cultureGroup); + if (mapping != leaderPortraitMappings.element.end()) + { + auto portraits = mapping->second.element.find(ideology); + if (portraits != mapping->second.element.end()) + { + return portraits->second; + } + } + + vector genericPortait; + genericPortait.push_back("gfx/leaders/leader_unknown.dds"); + return genericPortait; +} + + +string graphicsMapper::GetIdeologyMinisterPortrait(string cultureGroup, string ideology) +{ + vector portraits = GetIdeologyMinisterPortraits(cultureGroup, ideology); + + std::uniform_int_distribution firstNameGen(0, portraits.size() - 1); + return portraits[firstNameGen(rng)]; +} + + +vector graphicsMapper::GetIdeologyMinisterPortraits(string cultureGroup, string ideology) +{ + auto mapping = ideologyMinisterMappings.element.find(cultureGroup); + if (mapping != ideologyMinisterMappings.element.end()) + { + auto portraits = mapping->second.element.find(ideology); + if (portraits != mapping->second.element.end()) + { + return portraits->second; + } + } + + vector genericPortait; + genericPortait.push_back("gfx/interface/ideas/idea_unknown.dds"); + return genericPortait; +} \ No newline at end of file diff --git a/Vic2ToHoI4/Source/Mappers/GraphicsMapper.h b/Vic2ToHoI4/Source/Mappers/GraphicsMapper.h new file mode 100644 index 000000000..6593506d2 --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/GraphicsMapper.h @@ -0,0 +1,94 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#ifndef GRAPHICS_MAPPER_H_ +#define GRAPHICS_MAPPER_H_ + + + +#include +#include +#include +#include +using namespace std; + + + +class Object; + + + +typedef struct +{ + map> element; +} cultureGroupToPortraitsMap; + +typedef struct +{ + map element; +} ideologyToPortraitsMap; + + + +class graphicsMapper +{ + public: + static string getLeaderPortrait(string cultureGroup, string ideology) + { + return getInstance()->GetLeaderPortrait(cultureGroup, ideology); + } + + static string getIdeologyMinisterPortrait(string cultureGroup, string ideology) + { + return getInstance()->GetIdeologyMinisterPortrait(cultureGroup, ideology); + } + + private: + static graphicsMapper* instance; + static graphicsMapper* getInstance() + { + if (instance == nullptr) + { + instance = new graphicsMapper; + } + return instance; + } + graphicsMapper(); + void loadLeaderPortraitMappings(const string& cultureGroup, Object* portraitMappings); + void loadIdeologyMinisterPortraitMappings(const string& cultureGroup, Object* portraitMappings); + + string GetLeaderPortrait(string cultureGroup, string ideology); + vector GetLeaderPortraits(string cultureGroup, string ideology); + string GetIdeologyMinisterPortrait(string cultureGroup, string ideology); + vector GetIdeologyMinisterPortraits(string cultureGroup, string ideology); + + ideologyToPortraitsMap leaderPortraitMappings; + ideologyToPortraitsMap ideologyMinisterMappings; + + std::mt19937 rng; +}; + + + + +#endif //GRAPHICS_MAPPER_H_ \ No newline at end of file diff --git a/Vic2ToHoI4/Source/Mappers/Mapper.cpp b/Vic2ToHoI4/Source/Mappers/Mapper.cpp index 43739e7cc..689160b38 100644 --- a/Vic2ToHoI4/Source/Mappers/Mapper.cpp +++ b/Vic2ToHoI4/Source/Mappers/Mapper.cpp @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -405,54 +405,6 @@ void initLeaderBackgroundMap(backgroundMap& landBackgroundMap, backgroundMap& se } -void initNamesMapping(namesMapping& namesMap) -{ - LOG(LogLevel::Info) << "Parsing names"; - for (auto itr: Configuration::getVic2Mods()) - { - LOG(LogLevel::Debug) << "Reading mod cultures"; - processNamesFile((Configuration::getV2Path() + "/mod/" + itr + "/common/cultures.txt"), namesMap); - } - processNamesFile((Configuration::getV2Path() + "/common/cultures.txt"), namesMap); -} - - -void processNamesFile(string filename, namesMapping& namesMap) -{ - Object* obj = parser_8859_15::doParseFile(filename); - if (obj == nullptr) - { - return; - } - - vector groupsObj = obj->getLeaves(); - for (auto groupsItr: groupsObj) - { - vector culturesObj = groupsItr->getLeaves(); - for (auto culturesItr: culturesObj) - { - string key = culturesItr->getKey(); - if ((key == "union") || (key == "leader") || (key == "unit") || (key == "is_overseas")) - { - continue; - } - vector firstNamesObj = culturesItr->getValue("first_names"); - vector lastNamesObj = culturesItr->getValue("last_names"); - if ((firstNamesObj.size() > 0) && (lastNamesObj.size() > 0)) - { - vector firstNames = firstNamesObj[0]->getTokens(); - vector lastNames = lastNamesObj[0]->getTokens(); - namesMap.insert(make_pair(key, make_pair(firstNames, lastNames))); - } - else - { - LOG(LogLevel::Error) << "No names for " << key; - } - } - } -} - - void initPortraitMapping(portraitMapping& portraitMap) { LOG(LogLevel::Info) << "Parsing portraits list"; diff --git a/Vic2ToHoI4/Source/Mappers/Mapper.h b/Vic2ToHoI4/Source/Mappers/Mapper.h index 42bf17e69..2d8d17bf0 100644 --- a/Vic2ToHoI4/Source/Mappers/Mapper.h +++ b/Vic2ToHoI4/Source/Mappers/Mapper.h @@ -1,4 +1,4 @@ -/*Copyright (c) 2016 The Paradox Game Converters Project +/*Copyright (c) 2017 The Paradox Game Converters Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -92,11 +92,6 @@ typedef map> backgroundMap; // , vector>> namesMapping; -void initNamesMapping(namesMapping& namesMap); -void processNamesFile(string filename, namesMapping& namesMap); - // portraits typedef map> portraitMapping; // void initPortraitMapping(portraitMapping& portraitMap); diff --git a/Vic2ToHoI4/Source/Mappers/NamesMapper.cpp b/Vic2ToHoI4/Source/Mappers/NamesMapper.cpp new file mode 100644 index 000000000..3d88c42e0 --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/NamesMapper.cpp @@ -0,0 +1,216 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#include "NamesMapper.h" +#include "Log.h" +#include "ParadoxParser8859_15.h" +#include "ParadoxParserUTF8.h" +#include "../Configuration.h" + + + +namesMapper* namesMapper::instance = nullptr; + + + +namesMapper::namesMapper() +{ + LOG(LogLevel::Info) << "Parsing names"; + + for (auto mod: Configuration::getVic2Mods()) + { + LOG(LogLevel::Debug) << "Reading mod cultures from " << mod; + processVic2CulturesFile((Configuration::getV2Path() + "/mod/" + mod + "/common/cultures.txt")); + } + + processVic2CulturesFile((Configuration::getV2Path() + "/common/cultures.txt")); + + processFemaleNamesFile(); + processCallsignsFile(); +} + + +void namesMapper::processVic2CulturesFile(string filename) +{ + Object* obj = parser_8859_15::doParseFile(filename); + if (obj == nullptr) + { + return; + } + + vector groupsObj = obj->getLeaves(); + for (auto groupsItr: groupsObj) + { + vector culturesObj = groupsItr->getLeaves(); + for (auto culturesItr: culturesObj) + { + string key = culturesItr->getKey(); + if ((key == "union") || (key == "leader") || (key == "unit") || (key == "is_overseas")) + { + continue; + } + + vector firstNamesObj = culturesItr->getValue("first_names"); + vector lastNamesObj = culturesItr->getValue("last_names"); + if ((firstNamesObj.size() > 0) && (lastNamesObj.size() > 0)) + { + maleNamesMap.insert(make_pair(key, firstNamesObj[0]->getTokens())); + surnamesMap.insert(make_pair(key, lastNamesObj[0]->getTokens())); + } + else + { + LOG(LogLevel::Error) << "No names for " << key; + } + } + } +} + + +void namesMapper::processFemaleNamesFile() +{ + Object* obj = parser_UTF8::doParseFile("femaleNames.txt"); + for (auto cultureObj: obj->getLeaves()) + { + string culture = cultureObj->getKey(); + femaleNamesMap.insert(make_pair(culture, cultureObj->getLeaves()[0]->getTokens())); + } +} + + +void namesMapper::processCallsignsFile() +{ + Object* obj = parser_UTF8::doParseFile("callsigns.txt"); + for (auto cultureObj: obj->getLeaves()) + { + string culture = cultureObj->getKey(); + callsignsMap.insert(make_pair(culture, cultureObj->getLeaves()[0]->getTokens())); + } +} + + +vector namesMapper::GetMaleNames(string culture) const +{ + vector maleNames; + + auto namesItr = maleNamesMap.find(culture); + if (namesItr != maleNamesMap.end()) + { + maleNames = namesItr->second; + } + else + { + maleNames.push_back("null"); + } + + return maleNames; +} + + +vector namesMapper::GetFemaleNames(string culture) const +{ + vector femaleNames; + + auto namesItr = femaleNamesMap.find(culture); + if (namesItr != femaleNamesMap.end()) + { + femaleNames = namesItr->second; + } + else + { + femaleNames.push_back("null"); + } + + return femaleNames; +} + + +vector namesMapper::GetSurnames(string culture) const +{ + vector surnames; + + auto namesItr = surnamesMap.find(culture); + if (namesItr != surnamesMap.end()) + { + surnames = namesItr->second; + } + else + { + surnames.push_back("null"); + } + + return surnames; +} + + +vector namesMapper::GetCallsigns(string culture) const +{ + vector callsigns; + + auto namesItr = callsignsMap.find(culture); + if (namesItr != callsignsMap.end()) + { + callsigns = namesItr->second; + } + else + { + callsigns.push_back("null"); + } + + return callsigns; +} + + +string namesMapper::GetMaleName(string culture) +{ + vector firstNames = GetMaleNames(culture); + + std::uniform_int_distribution firstNameGen(0, firstNames.size() - 1); + return firstNames[firstNameGen(rng)]; +} + + +string namesMapper::GetFemaleName(string culture) +{ + vector firstNames = GetFemaleNames(culture); + + std::uniform_int_distribution firstNameGen(0, firstNames.size() - 1); + return firstNames[firstNameGen(rng)]; +} + + +string namesMapper::GetSurname(string culture) +{ + vector surnames = GetSurnames(culture); + + std::uniform_int_distribution surnameGen(0, surnames.size() - 1); + return surnames[surnameGen(rng)]; +} + + +string namesMapper::GetCallsign(string culture) +{ + vector callsigns = GetCallsigns(culture); + + std::uniform_int_distribution surnameGen(0, callsigns.size() - 1); + return callsigns[surnameGen(rng)]; +} \ No newline at end of file diff --git a/Vic2ToHoI4/Source/Mappers/NamesMapper.h b/Vic2ToHoI4/Source/Mappers/NamesMapper.h new file mode 100644 index 000000000..fc4b7da27 --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/NamesMapper.h @@ -0,0 +1,111 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#ifndef NAMES_MAPPER_H +#define NAMES_MAPPER_H + + + +#include +#include +#include +#include +using namespace std; + + + +class namesMapper +{ + public: + static vector getMaleNames(string culture) + { + return getInstance()->GetMaleNames(culture); + } + static vector getFemaleNames(string culture) + { + return getInstance()->GetFemaleNames(culture); + } + static vector getSurnames(string culture) + { + return getInstance()->GetSurnames(culture); + } + static vector getCallsigns(string culture) + { + return getInstance()->GetCallsigns(culture); + } + + static string getMaleName(string culture) + { + return getInstance()->GetMaleName(culture); + } + static string getFemaleName(string culture) + { + return getInstance()->GetFemaleName(culture); + } + static string getSurname(string culture) + { + return getInstance()->GetSurname(culture); + } + static string getCallsign(string culture) + { + return getInstance()->GetCallsign(culture); + } + private: + static namesMapper* instance; + static namesMapper* getInstance() + { + if (instance == nullptr) + { + instance = new namesMapper(); + } + return instance; + } + namesMapper(); + + void processVic2CulturesFile(string filename); + void processFemaleNamesFile(); + void processCallsignsFile(); + + vector GetMaleNames(string culture) const; + vector GetFemaleNames(string culture) const; + vector GetSurnames(string culture) const; + vector GetCallsigns(string culture) const; + string GetMaleName(string culture); + string GetFemaleName(string culture); + string GetSurname(string culture); + string GetCallsign(string culture); + + + map> maleNamesMap; + map> femaleNamesMap; + map> surnamesMap; + map> callsignsMap; + + std::mt19937 rng; +}; + + + + + +#endif // NAMES_MAPPER_H \ No newline at end of file diff --git a/Vic2ToHoI4/Source/Mappers/ReformMapper.cpp b/Vic2ToHoI4/Source/Mappers/ReformMapper.cpp new file mode 100644 index 000000000..211de45df --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/ReformMapper.cpp @@ -0,0 +1,124 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#include "ReformMapper.h" +#include +#include +#include "../V2World/V2Country.h" +#include "../Configuration.h" +#include "Log.h" +#include "Object.h" +#include "OSCompatibilityLayer.h" +#include "ParadoxParser8859_15.h" +#include "ParadoxParserUTF8.h" + + + +reformMapper* reformMapper::instance = nullptr; + + + +reformMapper::reformMapper() +{ + reformsInitialized = false; + totalPoliticalReforms = 0; + totalSocialReforms = 0; + + LOG(LogLevel::Info) << "Parsing governments reforms"; + for (auto itr : Configuration::getVic2Mods()) + { + if (Utils::DoesFileExist(Configuration::getV2Path() + "/mod/" + itr + "/common/issues.txt")) + { + auto obj = parser_8859_15::doParseFile((Configuration::getV2Path() + "/mod/" + itr + "/common/issues.txt")); + if (obj != nullptr) + { + initReforms(obj); + break; + } + } + } + if (!reformsInitialized) + { + auto obj = parser_8859_15::doParseFile((Configuration::getV2Path() + "/common/issues.txt")); + if (obj != nullptr) + { + initReforms(obj); + } + } +} + + +void reformMapper::initReforms(Object* obj) +{ + vector topObjects = obj->getLeaves(); + for (auto topObject : topObjects) + { + if (topObject->getKey() == "political_reforms") + { + vector reformObjs = topObject->getLeaves(); + for (auto reformObj : reformObjs) + { + reformTypes.insert(make_pair(reformObj->getKey(), "")); + + int reformLevelNum = 0; + vector reformLevelObjs = reformObj->getLeaves(); + for (auto reformLevel : reformLevelObjs) + { + if ((reformLevel->getKey() == "next_step_only") || (reformLevel->getKey() == "administrative")) + { + continue; + } + + politicalReformScores.insert(make_pair(reformLevel->getKey(), reformLevelNum)); + reformLevelNum++; + totalPoliticalReforms++; + } + totalPoliticalReforms--; + } + } + + if (topObject->getKey() == "social_reforms") + { + vector reformObjs = topObject->getLeaves(); + for (auto reformObj : reformObjs) + { + reformTypes.insert(make_pair(reformObj->getKey(), "")); + + int reformLevelNum = 0; + vector reformLevelObjs = reformObj->getLeaves(); + for (auto reformLevel : reformLevelObjs) + { + if ((reformLevel->getKey() == "next_step_only") || (reformLevel->getKey() == "administrative")) + { + continue; + } + + socialReformScores.insert(make_pair(reformLevel->getKey(), reformLevelNum)); + reformLevelNum++; + totalSocialReforms++; + } + totalSocialReforms--; + } + } + } +} \ No newline at end of file diff --git a/Vic2ToHoI4/Source/Mappers/ReformMapper.h b/Vic2ToHoI4/Source/Mappers/ReformMapper.h new file mode 100644 index 000000000..0b572d387 --- /dev/null +++ b/Vic2ToHoI4/Source/Mappers/ReformMapper.h @@ -0,0 +1,71 @@ +/*Copyright (c) 2017 The Paradox Game Converters Project + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + + +#ifndef REFORMMAPPER_H +#define REFORMMAPPER_H + + + +#include +#include +using namespace std; + + +class Object; + + + +class reformMapper +{ + public: + static map getReformTypes() + { + return getInstance()->reformTypes; + } + + private: + static reformMapper* instance; + static reformMapper* getInstance() + { + if (instance == nullptr) + { + instance = new reformMapper(); + } + return instance; + } + reformMapper(); + void initReforms(Object* obj); + + map reformTypes; + + map politicalReformScores; + map socialReformScores; + int totalPoliticalReforms; + int totalSocialReforms; + bool reformsInitialized; +}; + + + + +#endif // REFORMMAPPER_H diff --git a/Vic2ToHoI4/Source/V2World/V2Country.cpp b/Vic2ToHoI4/Source/V2World/V2Country.cpp index 011c59e9e..a80c5cd57 100644 --- a/Vic2ToHoI4/Source/V2World/V2Country.cpp +++ b/Vic2ToHoI4/Source/V2World/V2Country.cpp @@ -19,9 +19,13 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ + + #include "V2Country.h" #include "Log.h" #include "Object.h" +#include "../Mappers/CultureGroupMapper.h" +#include "../Mappers/ReformMapper.h" #include "../Mappers/V2Localisations.h" #include "V2Army.h" #include "V2Leader.h" @@ -29,6 +33,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #include "V2Relations.h" #include "Vic2State.h" + + V2Country::V2Country(Object* countryObj) { tag = countryObj->getKey(); @@ -53,8 +59,10 @@ V2Country::V2Country(Object* countryObj) readInMilitary(countryObj); readInLeaders(countryObj); readInStates(countryObj); + detectIfHuman(countryObj); } + void V2Country::readInDomainNameAndAdjective(const Object* countryObj) { vector nameObj = countryObj->getValue("domain_region"); // the region name for dynamically generated dominions @@ -70,6 +78,7 @@ void V2Country::readInDomainNameAndAdjective(const Object* countryObj) } } + void V2Country::readInCapital(const Object* countryObj) { vector capitalObjs = countryObj->getValue("capital"); @@ -97,6 +106,8 @@ void V2Country::readInCultures(const Object* countryObj) primaryCulture = ""; } + primaryCultureGroup = cultureGroupMapper::getCultureGroup(primaryCulture); + vector cultureSectionObjs = countryObj->getValue("culture"); if (cultureSectionObjs.size() > 0) { @@ -111,10 +122,10 @@ void V2Country::readInCultures(const Object* countryObj) void V2Country::readInCivilized(const Object* countryObj) { - vector primaryCultureObjs = countryObj->getValue("civilized"); - if (primaryCultureObjs.size() > 0) + vector civilizedObjs = countryObj->getValue("civilized"); + if (civilizedObjs.size() > 0) { - civilized = (primaryCultureObjs[0]->getLeaf() == "yes"); + civilized = (civilizedObjs[0]->getLeaf() == "yes"); } else { @@ -122,6 +133,7 @@ void V2Country::readInCivilized(const Object* countryObj) } } + void V2Country::readInTechnology(const Object* countryObj) { vector techsObjs = countryObj->getValue("technology"); // the object holding the technology levels @@ -131,6 +143,7 @@ void V2Country::readInTechnology(const Object* countryObj) } } + void V2Country::readInInventions(const Object* countryObj) { inventionNumToName inventionNumsToNames = getInventionNums(); @@ -155,6 +168,7 @@ void V2Country::readInInventions(const Object* countryObj) } } + void V2Country::readInPoliticalParties(const Object* countryObj) { activePartyIDs.clear(); @@ -179,6 +193,7 @@ void V2Country::readInPoliticalParties(const Object* countryObj) } } + void V2Country::readInSpending(const Object* countryObj) { vector spendingObjs = countryObj->getValue("education_spending"); @@ -210,6 +225,7 @@ void V2Country::readInSpending(const Object* countryObj) } } + void V2Country::readInRevanchism(const Object* countryObj) { vector revanchismObjs = countryObj->getValue("revanchism"); @@ -223,6 +239,7 @@ void V2Country::readInRevanchism(const Object* countryObj) } } + void V2Country::readInWarExhaustion(const Object* countryObj) { vector warExhaustionObjs = countryObj->getValue("war_exhaustion"); @@ -236,9 +253,10 @@ void V2Country::readInWarExhaustion(const Object* countryObj) } } + void V2Country::readInReforms(Object* countryObj) { - map reformTypes = governmentMapper::getInstance()->getReformTypes(); + map reformTypes = reformMapper::getReformTypes(); for (auto leaf : countryObj->getLeaves()) { @@ -250,6 +268,7 @@ void V2Country::readInReforms(Object* countryObj) } } + void V2Country::readInGovernment(const Object* countryObj) { vector governmentObjs = countryObj->getValue("government"); @@ -263,6 +282,7 @@ void V2Country::readInGovernment(const Object* countryObj) } } + void V2Country::readInUpperHouse(const Object* countryObj) { auto upperHouseObjs = countryObj->getValue("upper_house"); @@ -273,6 +293,7 @@ void V2Country::readInUpperHouse(const Object* countryObj) } } + void V2Country::readInRelations(Object* countryObj) { for (auto leaf : countryObj->getLeaves()) @@ -287,6 +308,7 @@ void V2Country::readInRelations(Object* countryObj) } } + bool V2Country::isCountryTag(string potentialTag) { if (potentialTag.size() != 3) @@ -315,6 +337,7 @@ bool V2Country::isCountryTag(string potentialTag) return false; } + void V2Country::readInMilitary(const Object* countryObj) { armies.clear(); @@ -341,6 +364,7 @@ void V2Country::readInMilitary(const Object* countryObj) } } + void V2Country::readInLeaders(const Object* countryObj) { leaders.clear(); @@ -352,6 +376,7 @@ void V2Country::readInLeaders(const Object* countryObj) } } + void V2Country::readInStates(const Object* countryObj) { vector stateObjs = countryObj->getValue("state"); @@ -361,12 +386,27 @@ void V2Country::readInStates(const Object* countryObj) } } + void V2Country::createNewState(const Object* stateObj) { Vic2State* newState = new Vic2State(stateObj, tag); states.push_back(newState); } + +void V2Country::detectIfHuman(const Object* countryObj) +{ + if (countryObj->getValue("human").size() > 0) + { + human = true; + } + else + { + human = false; + } +} + + void V2Country::eatCountry(V2Country* target) { if (target->tag == tag) @@ -410,6 +450,7 @@ void V2Country::eatCountry(V2Country* target) LOG(LogLevel::Debug) << "Merged " << target->tag << " into " << tag; } + void V2Country::putProvincesInStates() { for (auto state : states) @@ -428,6 +469,7 @@ void V2Country::putProvincesInStates() } } + void V2Country::determineEmployedWorkers() { for (auto state : states) @@ -436,6 +478,7 @@ void V2Country::determineEmployedWorkers() } } + void V2Country::setLocalisationNames() { auto nameInAllLanguages = V2Localisations::GetTextInEachLanguage(tag); @@ -445,6 +488,7 @@ void V2Country::setLocalisationNames() } } + void V2Country::setLocalisationName(const string& language, const string& name) { if (dominionName != "") @@ -457,6 +501,7 @@ void V2Country::setLocalisationName(const string& language, const string& name) } } + void V2Country::setLocalisationAdjectives() { auto adjectiveInAllLanguages = V2Localisations::GetTextInEachLanguage(tag + "_ADJ"); @@ -466,6 +511,7 @@ void V2Country::setLocalisationAdjectives() } } + void V2Country::setLocalisationAdjective(const string& language, const string& adjective) { if (dominionAdjective != "") // Domains have their adjective set from domain_region @@ -478,6 +524,7 @@ void V2Country::setLocalisationAdjective(const string& language, const string& a } } + std::string V2Country::getReform(const string& reform) const { map::const_iterator itr = reformsArray.find(reform); @@ -489,6 +536,7 @@ std::string V2Country::getReform(const string& reform) const return itr->second; } + string V2Country::getName(const string& language) const { map::const_iterator findIter = namesByLanguage.find(language); @@ -502,6 +550,7 @@ string V2Country::getName(const string& language) const } } + string V2Country::getAdjective(const string& language) const { map::const_iterator findIter = adjectivesByLanguage.find(language); @@ -515,6 +564,7 @@ string V2Country::getAdjective(const string& language) const } } + double V2Country::getUpperHousePercentage(const string& ideology) const { map::const_iterator itr = upperHouseComposition.find(ideology); @@ -524,6 +574,7 @@ double V2Country::getUpperHousePercentage(const string& ideology) const return itr->second; } + long V2Country::getEmployedWorkers() const { long employedWorkers = 0; @@ -535,6 +586,7 @@ long V2Country::getEmployedWorkers() const return employedWorkers; } + V2Party* V2Country::getRulingParty(const vector& allParties) const { if ((rulingPartyID <= allParties.size()) && (rulingPartyID > 0)) @@ -547,15 +599,16 @@ V2Party* V2Country::getRulingParty(const vector& allParties) const } } -vector V2Country::getActiveParties(const vector& allParties) const + +set V2Country::getActiveParties(const vector& allParties) const { - vector activeParties; + set activeParties; for (auto ID : activePartyIDs) { if (ID < allParties.size()) { - activeParties.push_back(allParties[ID - 1]); // Subtract 1, because party ID starts from index of 1 + activeParties.insert(allParties[ID - 1]); // Subtract 1, because party ID starts from index of 1 } else { diff --git a/Vic2ToHoI4/Source/V2World/V2Country.h b/Vic2ToHoI4/Source/V2World/V2Country.h index 770bdc72f..148bcc917 100644 --- a/Vic2ToHoI4/Source/V2World/V2Country.h +++ b/Vic2ToHoI4/Source/V2World/V2Country.h @@ -59,6 +59,7 @@ class V2Country vector getStates() const { return states; } string getTag() const { return tag; } string getPrimaryCulture() const { return primaryCulture; } + string getPrimaryCultureGroup() const { return primaryCultureGroup; } set getAcceptedCultures() const { return acceptedCultures; } bool isAnAcceptedCulture(const string& culture) const { return (acceptedCultures.count(culture) > 0); } set getInventions() const { return inventions; } @@ -74,12 +75,12 @@ class V2Country double getWarExhaustion() const { return warExhaustion; } map getAllReforms() const { return reformsArray; } bool isGreatNation() const { return greatNation; } - map getLocalisedNames() const { return namesByLanguage; } - map getLocalisedAdjectives() const { return adjectivesByLanguage; } map getProvinces() const { return provinces; } vector getCores() const { return cores; } bool isEmpty() const { return ((cores.size() == 0) && (provinces.size() == 0)); } bool isCivilized() const { return civilized; } + bool isHuman() const { return human; } + map getUpperHouseComposition() const { return upperHouseComposition; } string getReform(const string& reform) const; string getName(const string& language) const; @@ -87,7 +88,7 @@ class V2Country double getUpperHousePercentage(const string& ideology) const; long getEmployedWorkers() const; V2Party* getRulingParty(const vector& allParties) const; - vector getActiveParties(const vector& allParties) const; + set getActiveParties(const vector& allParties) const; bool hasCoreOnCapital() const; private: @@ -110,6 +111,7 @@ class V2Country void readInLeaders(const Object* countryObj); void readInStates(const Object* countryObj); void createNewState(const Object* stateObj); + void detectIfHuman(const Object* stateObj); void setLocalisationName(const string& language, const string& name); void setLocalisationAdjective(const string& language, const string& adjective); @@ -123,6 +125,7 @@ class V2Country int capital; string primaryCulture; + string primaryCultureGroup; set acceptedCultures; vector techs; @@ -151,6 +154,8 @@ class V2Country string dominionAdjective; map namesByLanguage; map adjectivesByLanguage; + + bool human; }; #endif // V2COUNTRY_H_ \ No newline at end of file diff --git a/Vic2ToHoI4/Source/V2World/V2World.cpp b/Vic2ToHoI4/Source/V2World/V2World.cpp index d4d745c32..635632846 100644 --- a/Vic2ToHoI4/Source/V2World/V2World.cpp +++ b/Vic2ToHoI4/Source/V2World/V2World.cpp @@ -520,7 +520,7 @@ void V2World::setLocalisations() const V2Province* V2World::getProvince(int provNum) const { auto provinceItr = provinces.find(provNum); - return (provinceItr != provinces.end()) ? provinceItr->second : NULL; + return (provinceItr != provinces.end()) ? provinceItr->second : nullptr; } diff --git a/Vic2ToHoI4/Source/V2toHOI4Converter.cpp b/Vic2ToHoI4/Source/V2toHOI4Converter.cpp index d044dca7d..6bba8789c 100644 --- a/Vic2ToHoI4/Source/V2toHOI4Converter.cpp +++ b/Vic2ToHoI4/Source/V2toHOI4Converter.cpp @@ -171,11 +171,15 @@ void createModFile() LOG(LogLevel::Error) << "Could not create .mod file"; exit(-1); } + + if (Configuration::getHOI4Version() >= HOI4Version("1.3.3")) + { + modFile << "\xEF\xBB\xBF"; // add the BOM to make HoI4 happy + } modFile << "name = \"Converted - " << Configuration::getOutputName() << "\"\n"; modFile << "path = \"mod/" << Configuration::getOutputName() << "/\"\n"; modFile << "user_dir = \"" << Configuration::getOutputName() << "_user_dir\"\n"; modFile << "replace_path=\"history/countries\"\n"; - //modFile << "replace = \"history/diplomacy\"\n"; modFile << "replace_path=\"history/states\"\n"; modFile << "supported_version=\"" << Configuration::getHOI4Version() << "\""; modFile.close(); diff --git a/Vic2ToHoI4/Vic2ToHoI4.vcxproj b/Vic2ToHoI4/Vic2ToHoI4.vcxproj index 2317047a2..e4a96d131 100644 --- a/Vic2ToHoI4/Vic2ToHoI4.vcxproj +++ b/Vic2ToHoI4/Vic2ToHoI4.vcxproj @@ -99,11 +99,15 @@ + + + + @@ -161,15 +165,19 @@ + + + + diff --git a/Vic2ToHoI4/Vic2ToHoI4.vcxproj.filters b/Vic2ToHoI4/Vic2ToHoI4.vcxproj.filters index 2dca958b6..c30d099c8 100644 --- a/Vic2ToHoI4/Vic2ToHoI4.vcxproj.filters +++ b/Vic2ToHoI4/Vic2ToHoI4.vcxproj.filters @@ -185,6 +185,18 @@ HoI4World + + Mappers + + + Mappers + + + Mappers + + + Mappers + @@ -358,5 +370,17 @@ HoI4World + + Mappers + + + Mappers + + + Mappers + + + Mappers + \ No newline at end of file