Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

improved alliance focus/events #581

Merged
merged 1 commit into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions Vic2ToHoI4/Source/HOI4World/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ void HoI4::Events::createFactionEvents(std::shared_ptr<HoI4Country> Leader, std:
Event nfEvent;
nfEvent.type = "country_event";
nfEvent.id = "NFEvents." + std::to_string(nationalFocusEventNumber++);
nfEvent.title = "\"Alliance?\"";
nfEvent.descriptions.push_back("desc = \"Alliance with " + leaderName + "?\"");
nfEvent.title = "\"Alliance Offer\"";
nfEvent.descriptions.push_back("desc = \"We have been invited to an alliance with " + leaderName + ". Should we accept the invitation?\"");
nfEvent.picture = "news_event_generic_sign_treaty1";
nfEvent.majorEvent = false;
nfEvent.triggeredOnly = true;
Expand All @@ -245,6 +245,16 @@ void HoI4::Events::createFactionEvents(std::shared_ptr<HoI4Country> Leader, std:
yesOption += " }\n";
yesOption += " dismantle_faction = yes";
yesOption += " }\n";
yesOption += " if = {\n";
yesOption += " limit = {\n";
yesOption += " " + Leader->getTag() + " = {\n";
yesOption += " is_in_faction = no\n";
yesOption += " }\n";
yesOption += " }\n";
yesOption += " " + Leader->getTag() + " = {\n";
yesOption += " create_faction = " + leaderName + "\n";
yesOption += " }\n";
yesOption += " }\n";
yesOption += " " + Leader->getTag() + " = {\n";
yesOption += " add_to_faction = " + newAlly->getTag() + "\n";
yesOption += " }\n";
Expand All @@ -267,8 +277,8 @@ void HoI4::Events::createFactionEvents(std::shared_ptr<HoI4Country> Leader, std:
Event newsEventYes;
newsEventYes.type = "news_event";
newsEventYes.id = "news." + to_string(newsEventNumber);
newsEventYes.title = "\"" + newAllyName + " Now an Ally with " + leaderName + "!\"";
newsEventYes.descriptions.push_back("desc = \"They are now allies\"");
newsEventYes.title = "\"" + newAllyName + " formalizes alliance with " + leaderName + "\"";
newsEventYes.descriptions.push_back("desc = \"The leaders of both countries have announced their intent of military cooperation.\"");
newsEventYes.picture = "news_event_generic_sign_treaty1";
newsEventYes.majorEvent = true;
newsEventYes.triggeredOnly = true;
Expand All @@ -281,8 +291,8 @@ void HoI4::Events::createFactionEvents(std::shared_ptr<HoI4Country> Leader, std:
Event newsEventNo;
newsEventNo.type = "news_event";
newsEventNo.id = "news." + to_string(newsEventNumber + 1);
newsEventNo.title = "\"" + newAllyName + " Refused the Alliance offer of " + leaderName + "!\"";
newsEventNo.descriptions.push_back("desc = \"They are not allies\"");
newsEventNo.title = "\"" + newAllyName + " refuses the alliance offer of " + leaderName + "\"";
newsEventNo.descriptions.push_back("desc = \"The alliance negotiations ended in disagreement.\"");
newsEventNo.picture = "news_event_generic_sign_treaty1";
newsEventNo.majorEvent = true;
newsEventNo.triggeredOnly = true;
Expand Down
6 changes: 6 additions & 0 deletions Vic2ToHoI4/Source/HOI4World/HoI4FocusTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,12 @@ void HoI4FocusTree::addGPWarBranch(shared_ptr<HoI4Country> Home, const vector<sh
newFocus->icon = "GFX_goal_generic_allies_build_infantry";
newFocus->text = "Alliance with " + allyCountryName;
newFocus->prerequisites.push_back("= { focus = " + ideologyShort + "_Summit" + Home->getTag() + " }");
newFocus->available = "= {\n";
newFocus->available += " OR = {\n";
newFocus->available += " is_faction_leader = yes\n";
newFocus->available += " is_in_faction = no\n";
newFocus->available += " }";
newFocus->available += " }";
newFocus->xPos = nextFreeColumn + i * 2;
newFocus->yPos = 1;
newFocus->cost = 10;
Expand Down