Skip to content

Commit

Permalink
added achievement and custom game rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Helliaca committed Nov 17, 2024
1 parent 4dc4acc commit 76b632b
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 9 deletions.
11 changes: 11 additions & 0 deletions common/achievements/achievements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,15 @@ ELU_every_hole_is_home = {
state = 142
}
}
}

why_didnt_they_just = {
possible = {
achievement_standard_possible_check = yes
NOT = { tag = MOR }
}

happened = {
has_country_flag = ring_destroyed_with_eagles
}
}
16 changes: 16 additions & 0 deletions common/game_rules/00_game_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -844,5 +844,21 @@ enable_ring_mechanic = {
allow_achievements = no
}
}
cohesive_factions_restriction = {
name = "COHESIVE_FACTIONS_RESTRICTION"
group = "LOTR_MOD_RULES"
default = {
name = YES
text = "COHESIVE_FACTIONS_RESTRICTION_YES"
desc = "COHESIVE_FACTIONS_RESTRICTION_YES_DESC"
allow_achievements = yes
}
option = {
name = NO
text = "COHESIVE_FACTIONS_RESTRICTION_NO"
desc = "COHESIVE_FACTIONS_RESTRICTION_NO_DESC"
allow_achievements = no
}
}

#We could add stuff for political advisor visibility filters here too, in the future
6 changes: 6 additions & 0 deletions common/raids/destroy_ring_air.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ types = {
}
}
actor_effects = {
var:actor_country = {
set_country_flag = ring_destroyed_with_eagles
ring_remove_ring = yes
}
raid_damage_units = {
plane_loss = 1.0
ratio = yes
Expand All @@ -157,6 +161,7 @@ types = {
}
raid_add_unit_experience = 0.75
var:actor_country = {
set_country_flag = ring_destroyed_with_eagles
ring_remove_ring = yes
}
}
Expand All @@ -178,6 +183,7 @@ types = {
}
raid_add_unit_experience = 1.0
var:actor_country = {
set_country_flag = ring_destroyed_with_eagles
ring_remove_ring = yes
}
}
Expand Down
28 changes: 22 additions & 6 deletions common/scripted_triggers/diplomacy_scripted_triggers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,17 @@ DIPLOMACY_JOIN_FACTION_ENABLE_TRIGGER = {
always = no
}
}
OR = {
FROM = { has_common_enemy = yes }
FROM = { in_faction_neighbouring_root = yes }
if = {
limit = {
has_game_rule = {
rule = cohesive_factions_restriction
option = YES
}
}
OR = {
FROM = { has_common_enemy = yes }
FROM = { in_faction_neighbouring_root = yes }
}
}
}
DIPLOMACY_OFFER_JOIN_FACTION_ENABLE_TRIGGER = {
Expand All @@ -692,9 +700,17 @@ DIPLOMACY_OFFER_JOIN_FACTION_ENABLE_TRIGGER = {
always = no
}
}
OR = {
FROM = { has_common_enemy = yes }
FROM = { has_neighbour_in_roots_faction = yes }
if = {
limit = {
has_game_rule = {
rule = cohesive_factions_restriction
option = YES
}
}
OR = {
FROM = { has_common_enemy = yes }
FROM = { has_neighbour_in_roots_faction = yes }
}
}
}
DIPLOMACY_CREATE_FACTION_ACTION_ENABLE_TRIGGER = {
Expand Down
Binary file added gfx/achievements/why_didnt_they_just.dds
Binary file not shown.
Binary file added gfx/achievements/why_didnt_they_just_grey.dds
Binary file not shown.
Binary file not shown.
7 changes: 6 additions & 1 deletion localisation/english/achievements_l_english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ ROH_orthanc_you_very_much_DESC:0 "As Rohan, control Orthanc before 3022"
ELU_every_hole_is_home_NAME:0 "Every Hole's a Home"
ELU_every_hole_is_home_DESC:0 "As Ered Luin, have divisions in the Blue Mountains, Erebor and Moria."

why_didnt_they_just_NAME:0 "Why Didn't They just...?"
why_didnt_they_just_DESC:0 "As any country, take the Eagles to Mordor and cast the Ring into the fires of Mt Doom."


#Country flags
orcs_of_mordor_declared_war_on_ANG_achievement_flag:0 "§YOrcs of Mordor§! declared war on §YAngmar§!"
Expand All @@ -68,4 +71,6 @@ GON_taken_black_gate_from_MOR_achievement_flag:0 "§YGondor§! has taken the §Y
celeborn_and_galadriel_left_with_gondor_mordor_defeated_achievement_flag:0 "§YCeleborn§! and §YGaladriel§! have left Middle Earth for Valinor when Mordor and Gondor were gone, capitulated or subjects"

#Custom tooltip
achievement_tooltip_get_twice_as_many_factories_as_gondor:0 "As §YDol Amroth§! get twice as many factories as §YGondor§!"
achievement_tooltip_get_twice_as_many_factories_as_gondor:0 "As §YDol Amroth§! get twice as many factories as §YGondor§!"

ring_destroyed_with_eagles:0 "Has destroyed the One Ring using the §YDestroy Ring (Eagles)§! raid."
8 changes: 7 additions & 1 deletion localisation/english/custom_game_rules_l_english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,10 @@
ENABLE_RING_MECHANIC_YES:0 "Yes"
ENABLE_RING_MECHANIC_YES_DESC:0 "The fellowship of the ring will be formed and the ring will be able to be destroyed"
ENABLE_RING_MECHANIC_NO:0 "No"
ENABLE_RING_MECHANIC_NO_DESC:0 "The fellowship will never be formed and ring will remain in hiding forevermore. §ONOTE: Some focuses, decisions and events will become unavailable.§!"
ENABLE_RING_MECHANIC_NO_DESC:0 "The fellowship will never be formed and ring will remain in hiding forevermore. §ONOTE: Some focuses, decisions and events will become unavailable.§!"

COHESIVE_FACTIONS_RESTRICTION:0 "Cohesive Factions Restriction"
COHESIVE_FACTIONS_RESTRICTION_YES:0 "Yes"
COHESIVE_FACTIONS_RESTRICTION_YES_DESC:0 "Countries will only be able to invite/join factions they have a common enemy with or share a border with."
COHESIVE_FACTIONS_RESTRICTION_NO:0 "No"
COHESIVE_FACTIONS_RESTRICTION_NO_DESC:0 "Countries will be able to invite/join any faction, regardless of borders or common enemies. (Regular restrictions still apply)"
3 changes: 2 additions & 1 deletion patch_notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

- Fixed a bug with the 'Bulwark-Vassal' and 'Autonomous Tributary' autonomies
- Fixed the 'Secrets of Orcs' tech folder not showing up correctly
- Added new custom game rule for cohesive factions
- Added one new achievement
- Added/fixed some localizations and tooltips
- Extracted several hard-coded localizations

0 comments on commit 76b632b

Please sign in to comment.