fixes big evebts abd on actions plus mroe

This commit is contained in:
Greekman 2026-11-21 19:27:08 +00:00
parent c9d520e5a1
commit bce2aa31a1
207 changed files with 100377 additions and 9296 deletions

View file

@ -298,6 +298,7 @@ yearly_global_pulse = {
on_actions = {
inspiration_maintenance_global_pulse
natural_disaster_maintenance_global_pulse
gdp_merchant_population_global_pulse
}
}
@ -556,6 +557,8 @@ yearly_playable_pulse = {
if = {
limit = {
has_treasury = yes
# We exclude republics here - they are a bit different and require separate handling (see republic_event.0020)
NOT = { government_has_flag = government_is_republic }
}
trigger_event = tgp_china_ministry.0100
}
@ -916,6 +919,127 @@ yearly_playable_pulse = {
}
ai_attempt_to_host_activity = activity_imperial_examination
}
# MERCHANTS
if = {
limit = { government_has_flag = government_is_merchant }
# AI Associate handling
if = {
limit = {
is_available_quick = {
ai = yes
adult = yes
imprisoned = no
alive = yes
}
is_house_head = yes
exists = location.county
NOT = { has_character_flag = gdp_merchant_ai_market_recruit_cooldown }
short_term_gold >= gdp_merchant_ai_market_recruit_gold_value
any_courtier = {
gdp_can_be_trader_trigger = yes
count < root.num_trade_routes
}
}
gdp_merchant_ai_market_recruit_effect = yes
}
# Contracts
if = {
limit = {
house ?= { # Trade opportunities only spawn yearly with high unity
OR = {
has_house_unity_stage = grasping_cs
has_house_unity_stage = ennobled_cs
}
}
trigger_if = {
limit = { is_ai = yes }
is_available = yes
}
}
# Trade opportunities
random = {
chance = {
value = 50
if = {
limit = { has_character_flag = trade_opportunity_frequency_cooldown }
subtract = 35
}
else_if = {
limit = {
house ?= { has_house_unity_stage = ennobled_cs }
}
add = 25
}
}
trigger_event = {
on_action = spawn_trade_opportunity_contract_on_action
}
}
# Luxury contracts
random = {
chance = {
value = 70
if = {
limit = { has_character_flag = luxury_contract_frequency_cooldown }
subtract = 50
}
if = {
limit = {
NOT = { has_realm_law = company_purpose_caravaneer }
}
subtract = 50
}
}
trigger_event = {
on_action = spawn_luxury_contract_on_action
}
}
# Unity contracts
if = {
limit = {
house ?= { # Unity contracts do not spawn yearly with high unity
OR = {
has_house_unity_stage = rapacious_cs
has_house_unity_stage = opportunistic_cs
}
}
}
random = {
chance = {
value = 25
if = {
limit = {
house ?= { has_house_unity_stage = opportunistic_cs }
}
add = 25
}
if = {
limit = { has_character_flag = unity_contract_frequency_cooldown }
multiply = 0
}
}
trigger_event = { on_action = spawn_unity_contract_on_action }
}
}
}
# Passive XP
if = {
limit = {
is_adult = yes # children never learn anything
any_trade_route = { gdp_merchant_trade_route_grants_caravaneer_xp_trigger = yes }
}
send_interface_message = {
type = event_trade_good
title = caravaneer_passive_xp_title
add_trait_xp = {
trait = lifestyle_merchant
track = caravaneer
value = gdp_merchant_yearly_caravaneer_xp_value
}
}
}
}
# Scalable Modifiers which needs to be reapplied
hidden_effect = {
@ -1936,7 +2060,7 @@ yearly_playable_pulse = {
weight = {
base = 1
modifier = {
divide = development_level
divide = prosperity_level
}
modifier = {
divide = county_control
@ -1977,12 +2101,22 @@ yearly_playable_pulse = {
events = {
court_maintenance.0012 # Dynasty banner improves with renown
court_maintenance.0013 # Remove duplicate dynasty banners
gdp_purpose_events.0001 # You're in debt, a merchant offers a way out
gdp_merchant.9020 # Commission trade route
gdp_merchant.1200 # Merchant associate promise
vassal.2205 # Loan reminder
}
on_actions = {
ai_character_pulse
delay = { days = 75 }
pagan_conversion_pulse
# GDP
gdp_republic_popular_opinion_pulse
gdp_merchant_ai_trade_monopoly_pulse
gdp_republic_ai_trade_monopoly_pulse
gdp_trade_league_ai_trade_monopoly_pulse
}
}
@ -1991,6 +2125,11 @@ yearly_playable_pulse = {
three_year_playable_pulse = {
events = {
adultery.0001 #Suspected spouse/soulmate of cheating (increased chance when there is a lover, but can also trigger otherwise)
gdp_merchant.8020 # Domicile visitor
ep2_accolade_events.0100
ep2_accolade_events.0200
ep2_accolade_events.0300
ach_maintenance_events.0002
}
# random_events = {
# 800 = 0
@ -2277,6 +2416,31 @@ three_year_playable_pulse = {
}
}
pam_christian_situation_hof_incite_holy_war_effect = yes
# Republic maintenance
if = {
limit = {
gdp_is_assembly_head_trigger = yes
}
# Effect to add more patricians as needed
gdp_adjust_number_of_patrician_families_effect = yes
# Update the treasury budget
trigger_event = republic_event.0020
# Read by gdp_merchant_company_keep_trigger if the republic falls
add_character_flag = {
flag = gdp_notable_republic_family
years = 4
}
if = {
limit = { highest_held_title_tier >= tier_kingdom }
every_vassal = {
limit = { government_has_flag = government_is_republic }
add_character_flag = {
flag = gdp_notable_republic_family
years = 4
}
}
}
}
}
}
@ -2537,6 +2701,13 @@ quarterly_playable_pulse = {
# MPO
mpo_tributary_check_pulse
# GDP
gdp_merchant_company_debt_pulse
gdp_trade_route_maturity_pulse
gdp_trade_envoys_resume_pulse
ep5_09_wearer_of_many_hats_achievement_pulse
}
random_on_action = {
chance_to_happen = 50
@ -2591,11 +2762,12 @@ random_yearly_playable_pulse = {
#2 = bp1_yearly_events # Retired on purpose; contents are all in on_yearly_events
6 = ep3_yearly_events_admin
6 = NEOW_yearly_flavor_events
6 = tgp_japan_yearly_events
6 = tgp_china_yearly_events
3 = tgp_mandala_yearly_events
# 6 = tgp_japan_yearly_events # NEOW 2555: removed East/South Asian regions
# 6 = tgp_china_yearly_events # NEOW 2555: removed East/South Asian regions
# 3 = tgp_mandala_yearly_events # NEOW 2555: removed East/South Asian regions
6 = ongoing_house_feud_events
10 = mpo_yearly_events_nomads
6 = gdp_merchant_yearly_events
}
effect = {
# Special Holy Seeds drops
@ -2729,9 +2901,9 @@ random_yearly_everyone_pulse = {
house_feud_ai_scheme_pulse
}
events = {
holy_order.0206 #To increment the years passed since loan
# NEOW 2555: event not loaded. holy_order.0206 #To increment the years passed since loan
marriage_interaction.0007 #One of the betrothed became part of clergy that doesn't allow marriage
tgp_silk_road_events.0100 #Culture adopts controlled Silk Road market innovation
# NEOW 2555: event not loaded. tgp_silk_road_events.0100 #Culture adopts controlled Silk Road market innovation
}
random_events = {
500 = 0
@ -2912,6 +3084,10 @@ three_year_pool_pulse = {
}
100 = courtier_guest_management.4001 # Wanderer becomes an adventurer
}
on_actions = {
gdp_merchant_pool_pulse
gdp_minority_merchant_pool_pulse
}
}
#Only triggered if you actually have prisoners
@ -2980,14 +3156,7 @@ on_yearly_common_events = {
}
# Accolades yearly events
three_year_playable_pulse = {
events = {
ep2_accolade_events.0100 #Huntsmaster gives you or heir Hunter trait event
ep2_accolade_events.0200 #Blademaster gives you or heir Blademaster trait event
ep2_accolade_events.0300 #Master of Revels gives you or heir Reveler trait event
ach_maintenance_events.0002 # ACH Oath synergy culture rewards
}
}
on_yearly_invisible_events = {
random_events = {
@ -3833,43 +4002,43 @@ on_yearly_events = {
# 200 = tgp_dynastic_cycle_events.0050 # Debate the Favoured Movement and get ahead of them
# TGP - Confucianism Events
250 = tgp_china_yearly.0001 # Charitable Acts
250 = tgp_china_yearly.0005 # Child mourns the loss of a father
250 = tgp_china_yearly.0010 # Hack poet peddles "lucky" poems
250 = tgp_china_yearly.0015 # Settle merchant dispute
250 = tgp_china_yearly.0020 # County has unpaid back-taxes
# 250 = tgp_china_yearly.0001 # Charitable Acts
# 250 = tgp_china_yearly.0005 # Child mourns the loss of a father
# 250 = tgp_china_yearly.0010 # Hack poet peddles "lucky" poems
# 250 = tgp_china_yearly.0015 # Settle merchant dispute
# 250 = tgp_china_yearly.0020 # County has unpaid back-taxes
100 = tgp_japan_yearly_events.0001 # 0001 - Spreading Joy - furoshiki
10 = tgp_japan_yearly_events.0021 # 0021 - Among the Blossoms - Hanami (Cherry Blossoms)
20 = tgp_japan_yearly_events.0026 # 0026 - Tales of the Tengu - Tengu
10 = tgp_japan_yearly_events.0036 # 0036 - Green Thumb
50 = tgp_japan_yearly_events.1010 # 1010 - Two buddhist sects are fighting, and ask you to pick a side
5 = tgp_japan_yearly_events.1020 # 1020 - Your senses are playing tricks on you, and you encounter a new Yokai
100 = tgp_japan_yearly_events.1030 # 1030 - You pray at a shrine for future success
20 = tgp_japan_yearly_events.1050 # 1050 - You are accused of violating a dumb rule
5 = tgp_japan_yearly_events.1060 # 1060 - A prisoner requests to be mercy killed
20 = tgp_japan_yearly_events.1070 # 1070 - A temple in your realm has burned down
100 = tgp_japan_yearly_events.1080 # 1080 - Someone is fishing in the tsuri-dono
10 = tgp_japan_yearly_events.1090 # 1090 - Growing old with no heir
20 = tgp_japan_yearly_events.1100 # 1100 - You contract Guilt Fever
100 = tgp_japan_yearly_events.1110 # 1110 - An animal is seen near the shrine of a God
# 100 = tgp_japan_yearly_events.0001 # 0001 - Spreading Joy - furoshiki
# 10 = tgp_japan_yearly_events.0021 # 0021 - Among the Blossoms - Hanami (Cherry Blossoms)
# 20 = tgp_japan_yearly_events.0026 # 0026 - Tales of the Tengu - Tengu
# 10 = tgp_japan_yearly_events.0036 # 0036 - Green Thumb
# 50 = tgp_japan_yearly_events.1010 # 1010 - Two buddhist sects are fighting, and ask you to pick a side
# 5 = tgp_japan_yearly_events.1020 # 1020 - Your senses are playing tricks on you, and you encounter a new Yokai
# 100 = tgp_japan_yearly_events.1030 # 1030 - You pray at a shrine for future success
# 20 = tgp_japan_yearly_events.1050 # 1050 - You are accused of violating a dumb rule
# 5 = tgp_japan_yearly_events.1060 # 1060 - A prisoner requests to be mercy killed
# 20 = tgp_japan_yearly_events.1070 # 1070 - A temple in your realm has burned down
# 100 = tgp_japan_yearly_events.1080 # 1080 - Someone is fishing in the tsuri-dono
# 10 = tgp_japan_yearly_events.1090 # 1090 - Growing old with no heir
# 20 = tgp_japan_yearly_events.1100 # 1100 - You contract Guilt Fever
# 100 = tgp_japan_yearly_events.1110 # 1110 - An animal is seen near the shrine of a God
#5 = tgp_japan_yearly_events.1070 # 1070 A temple in your realm has burned down
10 = tgp_japan_yearly_events.1090 # 1090 - Growing old with no heir
20 = tgp_japan_yearly_events.1100 # 1100 - You contract Guilt Fever
100 = tgp_japan_yearly_events.1110 # 1110 - An animal is seen near the shrine of a God
50 = tgp_japan_yearly_events.1130 # 1130 - Your daughter expresses an interest in poetry
50 = tgp_japan_yearly_events.1150 # 1150 - The emperor is passing in your lands
100 = tgp_japan_yearly_events.1160 # 1160 - You are offered a concubine from a rival house
100 = tgp_japan_yearly_events.1170 # 1170 - The prose that you're reading is of an unknown language
50 = tgp_japan_yearly_events.1180 # 1180 - You've been gifted a Bonsai tree for your garden
20 = tgp_japan_yearly_events.1190 # 1190 - You have a bad trait and you're making some decisions at night
200 = tgp_japan_yearly_events.1200 # 1200 - Congestion in the Capital
200 = tgp_japan_yearly_events.1210 # 1210 - Fit to Lead
200 = tgp_japan_yearly_events.1225 # 1225 - A Poetic Life
25 = tgp_japan_yearly_events.1220 # 1220 - You've witnessed a miracle made by a Buddhist monk
25 = tgp_japan_yearly_events.1230 # 1230 - Fear of a low durability artifact coming to life (Yokai)
100 = tgp_japan_yearly_events.1240 # 1240 - A traveler poet visits court and can't read from right to left
100 = tgp_japan_yearly_events.1260 #1260 - Begin a journey of poetic discovery
# 10 = tgp_japan_yearly_events.1090 # 1090 - Growing old with no heir
# 20 = tgp_japan_yearly_events.1100 # 1100 - You contract Guilt Fever
# 100 = tgp_japan_yearly_events.1110 # 1110 - An animal is seen near the shrine of a God
# 50 = tgp_japan_yearly_events.1130 # 1130 - Your daughter expresses an interest in poetry
# 50 = tgp_japan_yearly_events.1150 # 1150 - The emperor is passing in your lands
# 100 = tgp_japan_yearly_events.1160 # 1160 - You are offered a concubine from a rival house
# 100 = tgp_japan_yearly_events.1170 # 1170 - The prose that you're reading is of an unknown language
# 50 = tgp_japan_yearly_events.1180 # 1180 - You've been gifted a Bonsai tree for your garden
# 20 = tgp_japan_yearly_events.1190 # 1190 - You have a bad trait and you're making some decisions at night
# 200 = tgp_japan_yearly_events.1200 # 1200 - Congestion in the Capital
# 200 = tgp_japan_yearly_events.1210 # 1210 - Fit to Lead
# 200 = tgp_japan_yearly_events.1225 # 1225 - A Poetic Life
# 25 = tgp_japan_yearly_events.1220 # 1220 - You've witnessed a miracle made by a Buddhist monk
# 25 = tgp_japan_yearly_events.1230 # 1230 - Fear of a low durability artifact coming to life (Yokai)
# 100 = tgp_japan_yearly_events.1240 # 1240 - A traveler poet visits court and can't read from right to left
# 100 = tgp_japan_yearly_events.1260 #1260 - Begin a journey of poetic discovery
# TGP- Mandala Events
10000 = tgp_east_asia_mandala_events.9000 #Freak accident makes you seem inclined to divinity
@ -3907,6 +4076,41 @@ on_yearly_events = {
1200 = elder_events.1500 # Faltering heart - Chance to kill your spouse if you're young and they are old
1600 = elder_events.1600 # Faltering heart/Fragile bones/Infirm - Lose athletic
# GDP - Merchant Events
300 = gdp_merchant.0010 #Associate asks to be adopted
300 = gdp_merchant.0020 #Associates struggle for empty/ineffectual Partner position
300 = gdp_merchant.1100 # Merchant overcrowded
300 = gdp_merchant.0025 # Artisan Purpose Recruitment Opportunity
300 = gdp_merchant.0030 # Creditor Purpose Recruitment Opportunity
300 = gdp_merchant.0035 # Caravaneer Purpose Recruitment Opportunity
300 = gdp_merchant.3000 # Translator court position boon
300 = gdp_merchant.3010 # Fixer court position boon
300 = gdp_merchant.3020 # Bailiff court position boon
300 = gdp_merchant.3030 # Market Agent court position boon
300 = gdp_merchant.3040 # Antiquarian court position boon
300 = gdp_merchant.4000 # You are a Silk Road Merchant in China/Korea who isn't Confucian
300 = gdp_merchant.4010 # You're a Merchant in China/Korea who hasn't taken the exam
300 = gdp_merchant.4030 # You're a Merchant outside of the Silk Road hearing about it
# GDP - Republic Events
300 = yearly_republic.1001 #Spouse ask you to stop working late and come to bed.
300 = yearly_republic.1002 #Spouse's bad opinion of you cause friction with her house.
300 = yearly_republic.1003 #Young relative has been in a fight that might cause friction with another house.
300 = yearly_republic.1005 #The masses have grown tired of the feud between two houses and demand change.
300 = yearly_republic.1008 # A patrician has hired a bandit for ill-deeds.
300 = yearly_republic.1009 # A spouse has set up a salon to spy on her peers.
300 = yearly_republic.1010 # An ambassador will report secrets in the palace and you can spy on them from the roof.
300 = yearly_republic.1011 # A summons from the council gives opportunity to shirk your duties.
10000 = yearly_republic.1012 #Doge's procession (Once Per life. Blocked by Character Flag)
1000 = yearly_republic.1013 #Marriage to the sea (Once Per life. Blocked by Character Flag)
# 300 = yearly_republic.1014 #Patrician with the same house ambition meet to align their interests.
300 = yearly_republic.1015 #A patrician offers to sell you their vote at the next assembly
300 = yearly_republic.1016 #You get the chance to threaten a patrician to have them give you their next vote.
300 = yearly_republic.1017 #Three wise patricians have gathered for a debate. Influence them for the next vote using logic and reason!
400 = yearly_republic.1018 #Get an artifact from a friend.
300 = yearly_republic.1019 #Get some trade category experience.
300 = yearly_republic.1020 #Get a modifier from a friendly house.
# BFJ
300 = blotsven.0001 # Blot-Sven starter event, gives you a chance at getting a claim for the kingdom of Sweden.
@ -4007,3 +4211,41 @@ on_yearly_tutorial_events = {
1 = tutorial.1001
}
}
gdp_minority_merchant_pool_pulse = {
trigger = {
exists = global_var:gdp_minority_merchant_spawn_quota
global_var:gdp_minority_merchant_spawn_quota > 0
is_pool_character = yes
is_ai = yes
gdp_minority_merchant_candidate_trigger = yes
}
events = {
gdp_merchant.4002
}
}
gdp_merchant_pool_pulse = {
trigger = {
is_pool_character = yes
gdp_should_spawn_new_merchant_company_trigger = yes
}
random_events = {
chance_to_happen = 25
100 = gdp_merchant.4001 # Pool character becomes a merchant company
}
}
lifestyle_progress_pulse = {
first_valid_on_action = {
stewardship_lifestyle_progress_pulse
intrigue_lifestyle_progress_pulse
diplomacy_lifestyle_progress_pulse
martial_lifestyle_progress_pulse
learning_lifestyle_progress_pulse
wanderer_lifestyle_progress_pulse
}
}