Skip to content

Commit

Permalink
Merge pull request #101 from HoI4-LOTRMod-Team/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Helliaca authored Oct 11, 2023
2 parents 1f978df + 8f22161 commit cabc34f
Show file tree
Hide file tree
Showing 53 changed files with 442 additions and 630 deletions.
28 changes: 28 additions & 0 deletions common/ai_strategy/ISE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ISE_betray_sauron = {
enable = {
has_country_flag = saruman_betrayed_sauron
}
allowed = {
original_tag = ISE
}

abort_when_not_enabled = yes

ai_strategy = {
type = antagonize
id = MOR
value = 100
}

ai_strategy = {
type = ignore
id = MOR
value = 100
}

ai_strategy = {
type = befriend
id = MOR
value = -100
}
}
2 changes: 1 addition & 1 deletion common/ai_strategy/MOR.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ MOR_time_to_conquer_gondor = {
ai_strategy = {
type = antagonize
id = GON
value = -100
value = 100
}

ai_strategy = {
Expand Down
19 changes: 19 additions & 0 deletions common/ideas/gondor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ ideas = {
}
}

GON_eyes_of_the_white_tower = {

allowed = {
always = no
}

allowed_civil_war = {
always = yes
}

removal_cost = -1

picture = EST_vaps_4

modifier = {
decryption_factor = 0.2
}
}

GON_kingdom_without_king_1 = {

allowed = {
Expand Down
8 changes: 8 additions & 0 deletions common/map_modes/elven_alliance_map_mode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ scripted_map_modes = {
FROM = {
set_temp_variable = { alpha = 0.4 }
if = {
limit = {
elven_alliance_exists = no
}
set_temp_variable = { red = 0.5 }
set_temp_variable = { green = 0.5 }
set_temp_variable = { blue = 1.0 }
}
else_if = {
limit = {
is_elven_alliance_member = yes
}
Expand Down
2 changes: 1 addition & 1 deletion common/national_focus/elven_alliance_focus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ shared_focus = {
}
completion_reward = {
if = {
limit = { NOT = { has_global_flag = ea_alliance_resolutions_unlocked } } # lazy check to see if assembly already exists
limit = { NOT = { elven_alliance_exists = yes } }
# Form Elven UN
# Send out invites
elven_alliance_join = yes
Expand Down
12 changes: 9 additions & 3 deletions common/national_focus/gondor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2411,9 +2411,15 @@ continuous_focus_position = { x = 50 y = 1700 }
cost = 10
available_if_capitulated = yes
completion_reward = {
create_intelligence_agency = {
name = "Free People of Middle-Earth"
icon = GFX_intelligence_agency_logo_generic_2
if = {
limit = { has_dlc = "La Resistance" }
create_intelligence_agency = {
name = "Free People of Middle-Earth"
icon = GFX_intelligence_agency_logo_generic_2
}
}
else = {
add_ideas = GON_eyes_of_the_white_tower
}
}
}
Expand Down
1 change: 1 addition & 0 deletions common/national_focus/isengard.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,7 @@ default = no
completion_reward = {
MOR = { remove_from_faction = ISE }
MOR = { add_opinion_modifier = { target = ISE modifier = isr_treason } }
ISE = { add_opinion_modifier = { target = MOR modifier = isr_treason } }
news_event = { id = news.387 }
set_country_flag = saruman_betrayed_sauron
}
Expand Down
2 changes: 2 additions & 0 deletions common/national_focus/lothlorien.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5894,6 +5894,7 @@ focus_tree = {
ring_has_the_ring = yes
has_global_flag = fs_ring_seized_in_lth # Should only be available if Ring was taken in Lothlorien, otherwise the map will mess up
LTH_haldir = { is_unit_leader = yes } # NEED haldir because he is the ringbearer
has_civil_war = no
}
completion_reward = {
# form a new elven fellowship that will try to go to mordor
Expand All @@ -5916,6 +5917,7 @@ focus_tree = {
mutually_exclusive = { focus = lth_anelvenfellowship }
available = {
ring_has_the_ring = yes
has_civil_war = no
}
completion_reward = {

Expand Down
2 changes: 1 addition & 1 deletion common/national_focus/mirkwood.txt
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ shared_focus = ea_theelvenalliance
x =9
y =5
mutually_exclusive = { focus = drawclosertothedarkness }
prerequisite = { focus = greenwoodthegreatest}
prerequisite = { focus = greenwoodthegreatest focus = redinheartandmind }
cost = 10
available = {
is_in_faction = no
Expand Down
1 change: 0 additions & 1 deletion common/opinion_modifiers/00_opinion_modifiers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ opinion_modifiers = {

isr_treason = {
value = -300
trade = yes
}

isr_quarrel = {
Expand Down
130 changes: 67 additions & 63 deletions common/scripted_effects/ring_scripted_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1032,76 +1032,80 @@ ring_breakup_fellowship = {
# Lothlorien can set up an elven fellowship after taking the ring
ring_start_elven_fellowship = {
custom_effect_tooltip = ring_start_elven_fellowship_tt
hidden_effect = {
SHI = {
ring_clear_fellowship_members = yes

# Eventlog
add_to_array = { global.fs_eventlog_prefix_targets = 0 }
add_to_array = { global.fs_eventlog_suffix_targets = 0 }
add_to_array = { global.fs_eventlog = token:fs_event_elven_fellowship }
ring_trim_eventlog = yes
if = {
limit = { ring_has_the_ring = yes }

# News event:
news_event = { hours = 24 id = news.396 }
hidden_effect = {
SHI = {
ring_clear_fellowship_members = yes

# global flag
set_global_flag = fs_elven_fellowship
}
# Eventlog
add_to_array = { global.fs_eventlog_prefix_targets = 0 }
add_to_array = { global.fs_eventlog_suffix_targets = 0 }
add_to_array = { global.fs_eventlog = token:fs_event_elven_fellowship }
ring_trim_eventlog = yes

LTH = {
# take ring away
ring_remove_ring = yes
# News event:
news_event = { hours = 24 id = news.396 }

# Create fellowship
#ring_clear_fellowship_members = yes
# Haldir is ringbearer
#LTH_haldir = { retire = yes }
LTH_haldir = { retire = yes }
SHI = { FS_haldir = { ring_add_member_to_fellowship_nolog = yes } }
# Add the other elves (if available)
if = {
limit = { LTH_orophin = { is_unit_leader = yes } }
LTH_orophin = { retire = yes }
SHI = { FS_orophin = { ring_add_member_to_fellowship_nolog = yes } }
}
if = {
limit = { LTH_rumil = { is_unit_leader = yes } }
LTH_rumil = { retire = yes }
SHI = { FS_rumil = { ring_add_member_to_fellowship_nolog = yes } }
# global flag
set_global_flag = fs_elven_fellowship
}
if = {
limit = { LTH_tarborn = { is_unit_leader = yes } }
LTH_tarborn = { retire = yes }
SHI = { FS_tarborn = { ring_add_member_to_fellowship_nolog = yes } }
}
if = {
limit = { LTH_lethsael = { is_unit_leader = yes } }
LTH_lethsael = { retire = yes }
SHI = { FS_lethsael = { ring_add_member_to_fellowship_nolog = yes } }

LTH = {
# take ring away
ring_remove_ring = yes

# Create fellowship
#ring_clear_fellowship_members = yes
# Haldir is ringbearer
#LTH_haldir = { retire = yes }
LTH_haldir = { retire = yes }
SHI = { FS_haldir = { ring_add_member_to_fellowship_nolog = yes } }
# Add the other elves (if available)
if = {
limit = { LTH_orophin = { is_unit_leader = yes } }
LTH_orophin = { retire = yes }
SHI = { FS_orophin = { ring_add_member_to_fellowship_nolog = yes } }
}
if = {
limit = { LTH_rumil = { is_unit_leader = yes } }
LTH_rumil = { retire = yes }
SHI = { FS_rumil = { ring_add_member_to_fellowship_nolog = yes } }
}
if = {
limit = { LTH_tarborn = { is_unit_leader = yes } }
LTH_tarborn = { retire = yes }
SHI = { FS_tarborn = { ring_add_member_to_fellowship_nolog = yes } }
}
if = {
limit = { LTH_lethsael = { is_unit_leader = yes } }
LTH_lethsael = { retire = yes }
SHI = { FS_lethsael = { ring_add_member_to_fellowship_nolog = yes } }
}
}

SHI = {
# Clear all the ring stuff:
clr_global_flag = fs_ring_seized
clear_variable = global.fs_ring_owner

# Re-populate pathstack (Path shouldnt change)
add_to_array = { global.fs_path_stack = 191 }
add_to_array = { global.fs_path_stack = 179 }
add_to_array = { global.fs_path_stack = 30 }
add_to_array = { global.fs_path_stack = 206 }
add_to_array = { global.fs_path_stack = 27 }
add_to_array = { global.fs_path_stack = 98 }
add_to_array = { global.fs_path_stack = 182 }
add_to_array = { global.fs_path_stack = 98 }
add_to_array = { global.fs_path_stack = 101 }
add_to_array = { global.fs_path_stack = 204 }

# Get going
ring_fellowship_begin_move_to_next_state = yes
}
}

SHI = {
# Clear all the ring stuff:
clr_global_flag = fs_ring_seized
clear_variable = global.fs_ring_owner

# Re-populate pathstack (Path shouldnt change)
add_to_array = { global.fs_path_stack = 191 }
add_to_array = { global.fs_path_stack = 179 }
add_to_array = { global.fs_path_stack = 30 }
add_to_array = { global.fs_path_stack = 206 }
add_to_array = { global.fs_path_stack = 27 }
add_to_array = { global.fs_path_stack = 98 }
add_to_array = { global.fs_path_stack = 182 }
add_to_array = { global.fs_path_stack = 98 }
add_to_array = { global.fs_path_stack = 101 }
add_to_array = { global.fs_path_stack = 204 }

# Get going
ring_fellowship_begin_move_to_next_state = yes
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion common/scripted_effects/ring_scripted_effects_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ ring_seize_ring = {
}
LTH = { complete_national_focus = lth_seizetheonering }
}
# Ring was seized through events in Lothlorien -> Elven Fellowship available
# Ring was seized for the first time through events in Lothlorien -> Elven Fellowship available
if = {
limit = {
tag = LTH
Expand All @@ -1093,6 +1093,9 @@ ring_seize_ring = {
}
set_global_flag = fs_ring_seized_in_lth
}
else = {
clr_global_flag = fs_ring_seized_in_lth
}

set_variable = { global.fs_days_left_in_state = 0 }

Expand Down
6 changes: 6 additions & 0 deletions common/scripted_localisation/elven_alliance_localization.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ defined_text = {

defined_text = {
name = GetAssemblyDiplo
text = {
trigger = {
elven_alliance_exists = no
}
localization_key = "ea_diplo_neutral"
}
text = {
trigger = {
is_elven_alliance_member = yes
Expand Down
Loading

0 comments on commit cabc34f

Please sign in to comment.