Skip to content

Commit

Permalink
Ballooning Rework and Alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
LordR19 committed Aug 19, 2023
1 parent 14068ce commit 5653e8c
Show file tree
Hide file tree
Showing 14 changed files with 904 additions and 469 deletions.
1 change: 1 addition & 0 deletions common/alert_groups/mr_alert_groups.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
morgenroete = {}
44 changes: 44 additions & 0 deletions common/alert_types/curtiss_alert_types.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# script_context = <script context> # see later for list of valid script contexts
# texture = <path> # the path is relative to the "game" folder
# valid = <trigger> # an invalid alert will not be shown
# open_panel = <panel_name>[|<tab>] # if specified, this panel will open when the alert is clicked. Cannot specify both open_panel and open_popup
# an optional tab name can be specified after a | character
# open_popup = <popup_name> # if specified, this popup will open when the alert is clicked. Cannot specify both open_panel and open_popup
# type = alert | important_action | angry_important_action # if unspecified or "alert", this will be a standard alert. Otherwise, it will be shown inside the important actions alert (angry_important_action alerts are sorted first)
# alert_group = <alert_group_name> # if specified, multiple alerts in the same group will be grouped in the important actions alert (if they are "important_action"). "important_actions with unspecified alert_group will never be grouped together
#
# ------------------------------------------------------------------------------
# Valid script contexts
# ------------------------------------------------------------------------------
# player_country
# player_diplomatic_play
# player_diplomatic_pact
# player_diplomatic_action
# player_diplomatic_relations
# player_interest_group
# player_invaded_state
# player_national_market
# player_involved_market
# player_state
# player_building
# player_market_goods
# player_commander
# player_trade_route

### ALERTS
### these need icons, if you create a new alert or move an important action here use texture = "gfx/interface/icons/alert_icons/placeholder.dds"
### and then ask art to make an icon, you can also check the unused folder if anything fits, you can also use ANY icon in the game if it would fit
### but always check with art to verify it is looking good

curtiss_balloonist_possible_alert = {
script_context = player_country

valid = {
has_journal_entry = je_curtiss_balloonist
curtiss_no_balloonist_trigger = yes
}

open_panel = journal
type = important_action
alert_group = morgenroete
}
Original file line number Diff line number Diff line change
Expand Up @@ -17486,6 +17486,38 @@ curtiss_balloonist_trait_level_type = {
}
}

#Balloonist trait
curtiss_balloonist_sponsor_balloonist_type = {
type = country

text = {
trigger = {
has_variable = curtiss_balloonist_var
}
localization_key = curtiss_custom_sponsoring_balloonist
}

text = {
localization_key = curtiss_custom_sponsoring_no_balloonist
}
}

#Existing Balloonist for Fire Button
curtiss_fire_balloonist_button_existence_type = {
type = country

text = {
trigger = {
has_variable = curtiss_balloonist_var
}
localization_key = curtiss_fire_existing_balloonist_loc
}

text = {
localization_key = curtiss_fire_non_existing_balloonist_loc
}
}

###Schneider Trophy Participiants###

#Participiant 1
Expand Down
82 changes: 46 additions & 36 deletions common/decisions/curtiss_decisions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ curtiss_sponsor_balloonist_decisions = {
NOT = {
has_variable = curtiss_balloonist_var
}
is_player = no
is_ai = yes
}

possible = {
Expand All @@ -460,7 +460,7 @@ curtiss_sponsor_balloonist_decisions = {
}

ai_chance = {
base = 6 #Hopefully mostly progressive countries should do this
base = -10000 #Hopefully mostly progressive countries should do this
modifier = {
trigger = {
ig:ig_devout = {
Expand All @@ -472,6 +472,18 @@ curtiss_sponsor_balloonist_decisions = {
}
add = -15
}
modifier = {
trigger = {
country_rank >= rank_value:major_power
}
add = 25
}
modifier = {
trigger = {
country_rank < rank_value:major_power
}
add = -5
}
modifier = {
trigger = {
ig:ig_landowners = {
Expand Down Expand Up @@ -532,12 +544,10 @@ curtiss_sponsor_balloonist_decisions = {
}
modifier = {
trigger = {
NOT = {
OR = {
average_sol >= 15
any_scope_pop = {
standard_of_living > 52
}
NOR = {
average_sol >= 15
any_scope_pop = {
standard_of_living > 52
}
}
}
Expand All @@ -559,31 +569,31 @@ curtiss_sponsor_balloonist_decisions = {

######Ballooning Window######

curtiss_show_ballooning_window_decision = {
is_shown = {
has_technology_researched = curtiss_montgolfier_balloon_tech
is_player = yes
NOT = {
has_variable = curtiss_aviation_decisions_hide
}
}

possible = {
NOT = {
has_variable = curtiss_ballooning_window_open_var
}
}

when_taken = {
set_variable = curtiss_ballooning_window_open_var

trigger_event = {
id = curtiss.651
popup = yes
}
}

ai_chance = {
base = 0 #AI should never do this
}
}
#curtiss_show_ballooning_window_decision = {
# is_shown = {
# has_technology_researched = curtiss_montgolfier_balloon_tech
# is_player = yes
# NOT = {
# has_variable = curtiss_aviation_decisions_hide
# }
# }
#
# possible = {
# NOT = {
# has_variable = curtiss_ballooning_window_open_var
# }
# }
#
# when_taken = {
# set_variable = curtiss_ballooning_window_open_var
#
# trigger_event = {
# id = curtiss.651
# popup = yes
# }
# }
#
# ai_chance = {
# base = 0 #AI should never do this
# }
#}
21 changes: 7 additions & 14 deletions common/journal_entries/curtiss_journal_entries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,12 @@ je_curtiss_balloonist = {

icon = "gfx/interface/icons/event_icons/event_ballooning.dds"

scripted_button = curtiss_ballooning_recruit_balloonist
scripted_button = curtiss_ballooning_fire_balloonist
scripted_button = curtiss_ballooning_no_more_flight_information
scripted_button = curtiss_ballooning_flight_information
scripted_button = curtiss_ballooning_no_more_death_information
scripted_button = curtiss_ballooning_death_information
scripted_button = ballooning_button

on_monthly_pulse = {
Expand All @@ -791,24 +797,11 @@ je_curtiss_balloonist = {
}

possible = {
has_variable = curtiss_balloonist_var
always = yes
}

immediate = {
set_up_records_je_effect = yes

hidden_effect = {
trigger_event = {
id = curtiss.652 #Balloonist's first flight
popup = yes
days = { 1 7 }
}
trigger_event = {
id = curtiss.657 #Balloonist's first flight (hidden)
popup = yes
days = { 1 7 }
}
}
}

can_deactivate = yes
Expand Down
Loading

0 comments on commit 5653e8c

Please sign in to comment.