Quick questions
HOI4 version: 1.10.3
Kaiserreich version: Dev master 22.12.20
Describe the change you would like:
I would like to suggest to change the mtth triggers for the following events: bra.75,
Explain the reasoning behind this change:
from my understanding that MTTH trigger is worse preformece wise, then directly fired events, and thus I would like to suggest some changes to these events, in the hopes that it will reduce their preformence cost without harming their functionality.
Additional context or comments:
The list:
Event ID: bra.75
Current MTTH trigger:
trigger = {
tag = BRA
has_country_flag = BRA_is_dictatorship
has_elected_government = yes
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: In file on_actions_Latin_America, inside the on_goverment_change put a trigger to fire the event if tag is BRA and has an elected goverment
on_government_change = {
effect = {
if = {
limit = {
tag = BRA
has_elected_government = yes
has_country_flag = BRA_is_dictatorship
}
country_event = { id = bra.75 }
}
Event ID: bra.139
Current MTTH trigger:
trigger = {
tag = BRA
is_subject = no
has_government = national_populist
has_completed_focus = BRA_the_empire_strikes_back
OR = {
NOT = { country_exists = ARG }
NOT = { country_exists = FOP }
}
}
mean_time_to_happen = {
months = 9
}
Suggested Replecment code: instead of having it fire sometime after taking BRA_the_empire_strikes_back if ARG war ended, I would just fire it directly from BRA_the_empire_strikes_back (or from another focus, but that's up to others to decide, really)
completion_reward = {
log = "[GetDateText]: [Root.GetName]: Focus BRA_the_empire_strikes_back"
country_event = {
id = bra.139 days = 135 random = 210 #(either 210 or 405, depnding on how long you feel this should take)
}
}
Notes: You might notice that this lacks a check if ARG or FOP exist- I personally think this is not a relevent check, as the event will most likely fire much later than
Event ID: bra.141
Current MTTH trigger:
trigger = {
tag = BRA
PRU = { has_civil_war = yes }
has_government = national_populist
has_manpower > 10000
has_war = no
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: change it so the event fires from event pru.112 (in events/peru)
if = {
limit = {
BRA = { has_government = national_populist }
}
hidden_effect = {
BRA = {
country_event = { id = bra.141 days = 15 random = 45 }
}
}
}
While keeping the following trigger (while removing MTTH and adding is_triggered_only = yes to the event of course) in the event bra.141
trigger = {
PRU = { has_civil_war = yes } #so they wont send volunteers to a non existent revolt
has_government = national_populist
has_manpower > 10000
has_war = no
is_subject = no #mostly so you won't have a PRU puppet Brazil send volunteers against their master
}
Event ID: bra.143
Current MTTH trigger:
trigger = {
tag = BRA
has_country_flag = BRA_quechua_volunteers
PRU = { has_civil_war = no }
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: add the following on_action to the file on_actions_Latin_America
on_civil_war_end = {
if = {
limit = {
FROM = { tag = PRU }
}
BRA = {
country_event = { id = bra.143 days = 10 }
}
}
}
trigger = {
tag = BRA
has_elected_government = yes
has_global_flag = USA_civil_war_begun_flag
}
mean_time_to_happen = {
months = 3
}
Suggested Replecment code: add to the BRA part of the scripted effect USA_civil_war_begins in American_Civil_War_scripted_effects the following
BRA = {
country_event = { id = bra.203 days = 45 random = 180 }
}
While keeping the following trigger in the event (adding a is_triggered_only of course)
trigger = {
has_elected_government = yes
}
Event ID: bra.204
Current MTTH trigger:
trigger = {
tag = BRA
has_elected_government = yes
has_global_flag = USA_civil_war_begun_flag
OR = {
AND = {
NOT = {
country_exists = USA
}
NOT = {
country_exists = TEX
}
country_exists = CSA
}
AND = {
NOT = {
country_exists = USA
}
NOT = {
country_exists = CSA
}
country_exists = TEX
}
}
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: in the USA_civil_war_ends scripted effect in American_Civil_War_scripted_effects add
BRA = {
country_event = { id = bra.204 days = 15 random = 45 }
}
and in the event keep the trigger:
trigger = {
has_elected_government = yes
OR = {
AND = {
NOT = {
country_exists = PSA
}
NOT = {
country_exists = USA
}
country_exists = CSA
}
AND = {
NOT = {
country_exists = PSA
}
NOT = {
country_exists = USA
}
country_exists = TEX
}
}
}
Event ID: bra.205
Current MTTH trigger:
trigger = {
tag = BRA
has_elected_government = yes
has_global_flag = USA_civil_war_begun_flag
has_war = no
NOT = {
country_exists = CSA
country_exists = TEX
}
OR = {
USA = {
exists = yes
has_war = no
}
AND = {
NOT = {
country_exists = USA
}
PSA = {
exists = yes
has_war = no
}
}
}
}
mean_time_to_happen = {
months = 2
}
Suggested Replecment code: like the former event, this one will be fired from USA_civil_war_ends scripted effect in American_Civil_War_scripted_effects :
BRA = {
country_event = { id = bra.204 days = 30 random = 90 }
}
and in the event trigger keep
trigger = {
has_elected_government = yes
has_war = no
NOT = {
country_exists = CSA
country_exists = TEX
}
OR = {
USA = {
exists = yes
has_war = no
}
AND = {
NOT = {
country_exists = USA
}
PSA = {
exists = yes
has_war = no
}
}
}
}
Event ID: bra.209
Current MTTH trigger:
trigger = {
tag = BRA
has_elected_government = yes
has_global_flag = second_weltkrieg_has_started
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: in events/ai file, in event ai_events.201, put the following:
BRA = {
country_event = { id = bra.209 days = 15 random = 45 }
}
and in the event keep the trigger
trigger = {
has_elected_government = yes
}
Notes: there are some more MTTH events related to this one, but I really don't feel like messing with those right now
Event ID: bra.215
Current MTTH trigger:
trigger = {
tag = BRA
has_elected_government = yes
american_civil_war = yes
GER = {
exists = yes
has_war = no
has_socialist_government = no
}
}
Suggested Replecment code: fire from the USA_civil_war_begins scripted effect like the following:
BRA = {
country_event = { id = bra.215 days = 90 random = 270 }
}
While keeping the following trigger
trigger = {
has_elected_government = yes
american_civil_war = yes
GER = {
exists = yes
has_war = no
has_socialist_government = no
}
}
Event ID: bra.306
Current MTTH trigger:
trigger = {
tag = BRA
has_government = paternal_autocrat
NOT = {
has_idea = BRA_state_armies
}
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: Put the following in the complete effects of both focus BRA_federal_army and BRA_regionalist_recruiting_tactics
hidden_effect = {
BRA = {
country_event = { id = bra.306 days = 15 random = 45 }
}
}
while keeping the following trigger in the event:
trigger = {
has_government = paternal_autocrat
}
Event ID: bra.352
Current MTTH trigger:
trigger = {
tag = BRA
has_government = market_liberal
has_country_flag = BRA_rubber_boom
855 = {
is_owned_and_controlled_by = BRA
} #Acre
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: put the following in both event 209 (which sets the BRA_rubber_boom flag) and in the on_actions latin america file under on_goverment_change with a limit of TAG=BRA and has has_government = market_liberal
country_event = { id = bra.352 days = 15 random = 45 }
while in the event keep the following trigger:
trigger = {
tag = BRA
has_government = market_liberal
}
mean_time_to_happen = {
months = 12
}
Suggested Replecment code: Just fire this directly from on_goverment_change in the on_actions_latin_america file-
on_government_change = {
effect = {
if = {
limit = {
tag = BRA
has_government = market_liberal
}
country_event = { id = bra.352 days = 180 random = 540 }
}
while keeping the following trigger in the event
trigger = {
has_government = market_liberal
}
Event ID: bra.400
Current MTTH trigger:
trigger = {
tag = BRA
has_government = social_liberal
has_completed_focus = BRA_civil_liberties
}
mean_time_to_happen = {
months = 3
}
Suggested Replecment code: just remove the MTTH trigger, the event is already fired from focus BRA_civil_liberties, so why does it also have a MTTH trigger on top of that. (you could also slim down the trigger afterwards, seeing as the tag=BRA and completed focus checks won't be needed anymore)
Event ID: bra.403
Current MTTH trigger:
trigger = {
tag = BRA
has_government = social_liberal
date > 1937.1.1
}
mean_time_to_happen = {
months = 12
}
Suggested Replecment code: fire from on goverment change in on_actions_latin_america
on_government_change = {
effect = {
if = {
limit = {
tag = BRA
has_government = social_liberal
}
country_event = { id = bra.352 days = 180 random = 540 }
}
While keeping the following trigger in the event itself:
trigger = {
has_government = social_liberal
date > 1937.1.1
}
Event ID: bra.500
Current MTTH trigger:
trigger = {
tag = BRA
has_socialist_government = yes
NOT = {
has_country_flag = BRA_first_congress_held
}
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: either just remove the MTTH, since the event already is fired by another event directly (bra.458) or just make it so its fired from an on_government_change on action- something like this
on_government_change = {
effect = {
if = {
limit = {
tag = BRA
has_socialist_government = yes
}
country_event = { id = bra.500 days = 8 }
}
Suggested Replecment code: fire it from a on_war on action - something like the following:
on_war = {
effect = {
if = {
limit = {
OR = {
AND = {
tag = BRA
FROM = { tag = GER }
}
AND = {
tag = GER
FROM = { tag = BRA }
}
}
country_event = { id = bra.508 days = 15 random = 45 }
}
}
and change the trigger to the following
trigger = {
has_socialist_government = yes
503 = {
is_owned_and_controlled_by = BRA
} #Santa Catarina
has_war_with = GER
}
Event ID: bra.510
Current MTTH trigger:
trigger = {
tag = BRA
has_socialist_government = yes
has_country_flag = BRA_first_congress_held
501 = {
is_owned_and_controlled_by = BRA #Sao Paulo
infrastructure > 3
}
}
mean_time_to_happen = {
months = 1
}
Suggested Replecment code: fire the event directly from event.500, like this:
country_event = { id = bra.510 days = 15 random = 45 }
While keeping the following trigger:
trigger = {
501 = {
is_owned_and_controlled_by = BRA #Sao Paulo
infrastructure > 3
}
}
- **Event ID:** bra.516
**Current MTTH trigger**:
trigger = {
tag = BRA
has_socialist_government = yes
has_war_with = GER
OR = {
is_in_faction_with = FRA
is_in_faction_with = ENG
}
}
mean_time_to_happen = {
months = 1
}
**Suggested Replecment code**: fire it from the on_war on action, like suggestion for bra.508
on_war = {
effect = {
if = {
limit = {
OR = {
AND = {
tag = BRA
FROM = { tag = GER }
}
AND = {
tag = GER
FROM = { tag = BRA }
}
}
country_event = { id = bra.516 days = 15 random = 45 }
}
}
while keeping this trigger in the event:
trigger = {
has_socialist_government = yes
OR = {
is_in_faction_with = FRA
is_in_faction_with = ENG
}
}
- **Event ID:** bra.701
**Current MTTH trigger**:
trigger = {
tag = BRA
has_global_flag = second_weltkrieg_has_started
NOT = {
has_government = national_populist
}
}
mean_time_to_happen = {
years = 1
}
**Suggested Replecment code**: fire it directly from event ai_event.201- like this:
`country_event = { id = bra.701 days = 180 random = 540 }`
while keeping this trigger in the event:
trigger = {
tag = BRA
has_country_flag = BRA_volunteers_POR
OR = {
NOT = {
country_exists = POR
}
POR = {
has_war = no
}
}
}
mean_time_to_happen = {
months = 1
}
**Suggested Replecment code**: Fire it from an on_peace in the on_actions_Portugal file-
on_peace = {
effect = {
if = {
limit = {
tag = POR
}
BRA = {
country_event = { id = bra.701 days = 180 random = 540 }
}
}
}
}
Quick questions HOI4 version: 1.10.3 Kaiserreich version: Dev master 22.12.20
Describe the change you would like: I would like to suggest to change the mtth triggers for the following events: bra.75,
Explain the reasoning behind this change: from my understanding that MTTH trigger is worse preformece wise, then directly fired events, and thus I would like to suggest some changes to these events, in the hopes that it will reduce their preformence cost without harming their functionality.
Additional context or comments:
The list:
Event ID: bra.75 Current MTTH trigger:
Suggested Replecment code: In file on_actions_Latin_America, inside the on_goverment_change put a trigger to fire the event if tag is BRA and has an elected goverment
Event ID: bra.139 Current MTTH trigger:
Suggested Replecment code: instead of having it fire sometime after taking BRA_the_empire_strikes_back if ARG war ended, I would just fire it directly from BRA_the_empire_strikes_back (or from another focus, but that's up to others to decide, really)
Notes: You might notice that this lacks a check if ARG or FOP exist- I personally think this is not a relevent check, as the event will most likely fire much later than
Event ID: bra.141 Current MTTH trigger:
Suggested Replecment code: change it so the event fires from event pru.112 (in events/peru)
While keeping the following trigger (while removing MTTH and adding is_triggered_only = yes to the event of course) in the event bra.141
Event ID: bra.143 Current MTTH trigger:
Suggested Replecment code: add the following on_action to the file on_actions_Latin_America
and keep the following trigger in bra.143
Event ID: bra.203 Current MTTH trigger:
Suggested Replecment code: add to the BRA part of the scripted effect USA_civil_war_begins in American_Civil_War_scripted_effects the following
While keeping the following trigger in the event (adding a is_triggered_only of course)
Event ID: bra.204 Current MTTH trigger:
Suggested Replecment code: in the USA_civil_war_ends scripted effect in American_Civil_War_scripted_effects add
and in the event keep the trigger:
Event ID: bra.205 Current MTTH trigger:
Suggested Replecment code: like the former event, this one will be fired from USA_civil_war_ends scripted effect in American_Civil_War_scripted_effects :
and in the event trigger keep
Event ID: bra.209 Current MTTH trigger:
Suggested Replecment code: in events/ai file, in event ai_events.201, put the following:
and in the event keep the trigger
Notes: there are some more MTTH events related to this one, but I really don't feel like messing with those right now
Event ID: bra.215 Current MTTH trigger:
Suggested Replecment code: fire from the USA_civil_war_begins scripted effect like the following:
While keeping the following trigger
Event ID: bra.306 Current MTTH trigger:
Suggested Replecment code: Put the following in the complete effects of both focus BRA_federal_army and BRA_regionalist_recruiting_tactics
while keeping the following trigger in the event:
Event ID: bra.352 Current MTTH trigger:
Suggested Replecment code: put the following in both event 209 (which sets the BRA_rubber_boom flag) and in the on_actions latin america file under on_goverment_change with a limit of TAG=BRA and has has_government = market_liberal
country_event = { id = bra.352 days = 15 random = 45 }
while in the event keep the following trigger:Event ID: bra.356 Current MTTH trigger:
Suggested Replecment code: Just fire this directly from on_goverment_change in the on_actions_latin_america file-
while keeping the following trigger in the event
Event ID: bra.400 Current MTTH trigger:
Suggested Replecment code: just remove the MTTH trigger, the event is already fired from focus BRA_civil_liberties, so why does it also have a MTTH trigger on top of that. (you could also slim down the trigger afterwards, seeing as the tag=BRA and completed focus checks won't be needed anymore)
Event ID: bra.403 Current MTTH trigger:
Suggested Replecment code: fire from on goverment change in on_actions_latin_america
While keeping the following trigger in the event itself:
Event ID: bra.500 Current MTTH trigger:
Suggested Replecment code: either just remove the MTTH, since the event already is fired by another event directly (bra.458) or just make it so its fired from an on_government_change on action- something like this
Event ID: bra.508 Current MTTH trigger:
Suggested Replecment code: fire it from a on_war on action - something like the following:
and change the trigger to the following
Event ID: bra.510 Current MTTH trigger:
Suggested Replecment code: fire the event directly from event.500, like this:
country_event = { id = bra.510 days = 15 random = 45 }
While keeping the following trigger:trigger = { tag = BRA has_global_flag = second_weltkrieg_has_started NOT = { has_government = national_populist } }
trigger = { NOT = { has_government = national_populist } }
on_peace = { effect = { if = { limit = { tag = POR } BRA = { country_event = { id = bra.701 days = 180 random = 540 } } } } }
trigger = { has_country_flag = BRA_volunteers_POR }