Skip to content

Commit

Permalink
经济周期v1.6.1.1 BUG修复
Browse files Browse the repository at this point in the history
修复了市场因素危机增长不受国策因素乘数影响的BUG
修复了法令因素危机增长为负时不显示的BUG
优化了本地化显示顺序,使其符合实际计算流程
  • Loading branch information
Ryifer authored Jul 31, 2022
1 parent 646478e commit af43697
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 176 deletions.
334 changes: 169 additions & 165 deletions common/scripted_loc/economic_scripted_loc.txt
Original file line number Diff line number Diff line change
@@ -1,166 +1,170 @@
defined_text = {
name = CrisisAccumulated
text = {
trigger = { NOT = { has_global_flag = economic_accumulation_unshow } }
localization_key = ethic_economic_circle_desc_accumulated
}
text = {
trigger = { has_global_flag = economic_accumulation_unshow }
localization_key = ethic_economic_circle_desc_crisis_stage
}
}

defined_text = {
name = ListCrisisChange
text = {
trigger = { NOT = { has_situation_flag = economic_crisis } }
localization_key = ListCrisisAdd
}
text = {
trigger = { has_situation_flag = economic_crisis }
localization_key = ListCrisisDecline
}
}
defined_text = {
name = CrisisAddCivics
text = {
trigger = { check_variable = { which = rec_crisis_add_civic value = 0 } }
localization_key = economic_crisis_add_civics_neutral
}
text = {
trigger = { check_variable = { which = rec_crisis_add_civic value > 0 } }
localization_key = economic_crisis_add_civics_negative
}
text = {
trigger = { check_variable = { which = rec_crisis_add_civic value < 0 } }
localization_key = economic_crisis_add_civics_positive
}
}
defined_text = {
name = CrisisAddMarket
text = {
trigger = { check_variable = { which = rec_crisis_add_market value = 0 } }
localization_key = economic_crisis_add_market_neutral
}
text = {
trigger = { check_variable = { which = rec_crisis_add_market value > 0 } }
localization_key = economic_crisis_add_market_negative
}
text = {
trigger = { check_variable = { which = rec_crisis_add_market value < 0 } }
localization_key = economic_crisis_add_market_positive
}
}
defined_text = {
name = CrisisAddEdicts
text = {
trigger = { check_variable = { which = rec_crisis_add_edict value > 0 } }
localization_key = economic_crisis_add_edicts_negative
}
}
defined_text = {
name = CrisisAddApproach
text = {
trigger = { check_variable = { which = rec_crisis_add_approach value < 0 } }
localization_key = economic_crisis_add_approach_positive
}
}
defined_text = {
name = CrisisMultCivics
text = {
trigger = { check_variable = { which = rec_crisis_mult_civic value < 1 } }
localization_key = economic_crisis_mult_civics_positive
}
}
defined_text = {
name = CrisisAddChange
text = {
trigger = { check_variable = { which = rec_crisis_add_change value > 0 } }
localization_key = economic_crisis_add_change_negative
}
text = {
trigger = { check_variable = { which = rec_crisis_add_change value < 0 } }
localization_key = economic_crisis_add_change_positive
}
}
defined_text = {
name = CrisisAddOutside
text = {
trigger = { check_variable = { which = rec_crisis_add_outside value < 0 } }
localization_key = economic_crisis_add_outside_positive
}
}
defined_text = {
name = CrisisAddWar
text = {
trigger = { check_variable = { which = rec_crisis_add_war value < 0 } }
localization_key = economic_crisis_add_war_positive
}
}


defined_text = {
name = CrisisStage
text = {
trigger = { has_situation_flag = economic_crisis_distance_low }
localization_key = crisis_distance_low
}
text = {
trigger = { has_situation_flag = economic_crisis_distance_middle }
localization_key = crisis_distance_middle
}
text = {
trigger = { has_situation_flag = economic_crisis_distance_high }
localization_key = crisis_distance_high
}
}
defined_text = {
name = IsCrisis
text = {
trigger = { has_situation_flag = economic_crisis }
localization_key = in_crisis
}
text = {
trigger = { NOT = { has_situation_flag = economic_crisis } }
localization_key = out_crisis
}
}

defined_text = {
name = EconomicSystemOption
text = {
trigger = { has_global_flag = economic_crisis_close }
localization_key = ethic_economic_crisis_close
}
text = {
trigger = { has_global_flag = economic_crisis_ai }
localization_key = ethic_economic_crisis_all
}
text = {
trigger = { NOT = { has_global_flag = economic_crisis_close
has_global_flag = economic_crisis_ai } }
localization_key = ethic_economic_crisis_player
}
}
defined_text = {
name = EconomicAccumulationOption
text = {
trigger = { has_global_flag = economic_accumulation_unshow }
localization_key = ethic_economic_accumulation_unshow
}
text = {
trigger = { NOT = { has_global_flag = economic_accumulation_unshow } }
localization_key = ethic_economic_accumulation_show
}
}
defined_text = {
name = EconomicEventsOption
text = {
trigger = { has_global_flag = economic_events_no }
localization_key = ethic_economic_more_events_no
}
text = {
trigger = { NOT = { has_global_flag = economic_events_no } }
localization_key = ethic_economic_more_events
}
defined_text = {
name = CrisisAccumulated
text = {
trigger = { NOT = { has_global_flag = economic_accumulation_unshow } }
localization_key = ethic_economic_circle_desc_accumulated
}
text = {
trigger = { has_global_flag = economic_accumulation_unshow }
localization_key = ethic_economic_circle_desc_crisis_stage
}
}

defined_text = {
name = ListCrisisChange
text = {
trigger = { NOT = { has_situation_flag = economic_crisis } }
localization_key = ListCrisisAdd
}
text = {
trigger = { has_situation_flag = economic_crisis }
localization_key = ListCrisisDecline
}
}
defined_text = {
name = CrisisAddMarket
text = {
trigger = { check_variable = { which = rec_crisis_add_market value = 0 } }
localization_key = economic_crisis_add_market_neutral
}
text = {
trigger = { check_variable = { which = rec_crisis_add_market value > 0 } }
localization_key = economic_crisis_add_market_negative
}
text = {
trigger = { check_variable = { which = rec_crisis_add_market value < 0 } }
localization_key = economic_crisis_add_market_positive
}
}
defined_text = {
name = CrisisAddCivics
text = {
trigger = { check_variable = { which = rec_crisis_add_civic value = 0 } }
localization_key = economic_crisis_add_civics_neutral
}
text = {
trigger = { check_variable = { which = rec_crisis_add_civic value > 0 } }
localization_key = economic_crisis_add_civics_negative
}
text = {
trigger = { check_variable = { which = rec_crisis_add_civic value < 0 } }
localization_key = economic_crisis_add_civics_positive
}
}
defined_text = {
name = CrisisMultCivics
text = {
trigger = { check_variable = { which = rec_crisis_mult_civic value < 1 } }
localization_key = economic_crisis_mult_civics_positive
}
}
defined_text = {
name = CrisisAddEdicts
text = {
trigger = { check_variable = { which = rec_crisis_add_edict value > 0 } }
localization_key = economic_crisis_add_edicts_negative
}
text = {
trigger = { check_variable = { which = rec_crisis_add_edict value < 0 } }
localization_key = economic_crisis_add_edicts_positive
}
}
defined_text = {
name = CrisisAddApproach
text = {
trigger = { check_variable = { which = rec_crisis_add_approach value < 0 } }
localization_key = economic_crisis_add_approach_positive
}
}
defined_text = {
name = CrisisAddChange
text = {
trigger = { check_variable = { which = rec_crisis_add_change value > 0 } }
localization_key = economic_crisis_add_change_negative
}
text = {
trigger = { check_variable = { which = rec_crisis_add_change value < 0 } }
localization_key = economic_crisis_add_change_positive
}
}
defined_text = {
name = CrisisAddOutside
text = {
trigger = { check_variable = { which = rec_crisis_add_outside value < 0 } }
localization_key = economic_crisis_add_outside_positive
}
}
defined_text = {
name = CrisisAddWar
text = {
trigger = { check_variable = { which = rec_crisis_add_war value < 0 } }
localization_key = economic_crisis_add_war_positive
}
}


defined_text = {
name = CrisisStage
text = {
trigger = { has_situation_flag = economic_crisis_distance_low }
localization_key = crisis_distance_low
}
text = {
trigger = { has_situation_flag = economic_crisis_distance_middle }
localization_key = crisis_distance_middle
}
text = {
trigger = { has_situation_flag = economic_crisis_distance_high }
localization_key = crisis_distance_high
}
}
defined_text = {
name = IsCrisis
text = {
trigger = { has_situation_flag = economic_crisis }
localization_key = in_crisis
}
text = {
trigger = { NOT = { has_situation_flag = economic_crisis } }
localization_key = out_crisis
}
}

defined_text = {
name = EconomicSystemOption
text = {
trigger = { has_global_flag = economic_crisis_close }
localization_key = ethic_economic_crisis_close
}
text = {
trigger = { has_global_flag = economic_crisis_ai }
localization_key = ethic_economic_crisis_all
}
text = {
trigger = { NOT = { has_global_flag = economic_crisis_close
has_global_flag = economic_crisis_ai } }
localization_key = ethic_economic_crisis_player
}
}
defined_text = {
name = EconomicAccumulationOption
text = {
trigger = { has_global_flag = economic_accumulation_unshow }
localization_key = ethic_economic_accumulation_unshow
}
text = {
trigger = { NOT = { has_global_flag = economic_accumulation_unshow } }
localization_key = ethic_economic_accumulation_show
}
}
defined_text = {
name = EconomicEventsOption
text = {
trigger = { has_global_flag = economic_events_no }
localization_key = ethic_economic_more_events_no
}
text = {
trigger = { NOT = { has_global_flag = economic_events_no } }
localization_key = ethic_economic_more_events
}
}
6 changes: 3 additions & 3 deletions events/ethic_economic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,11 @@ situation_event = { # 计算情况改善-其它 26号
}
change_variable = { which = rec_situation_add_approach_temp value = 0.5 }
}
else_if = { # 控制市场过热 -0.3增长
else_if = { # 控制市场过热 -0.5增长
limit={
rec_approach_is_cooling = yes
}
change_variable = { which = rec_situation_add_approach_temp value = -0.3 }
change_variable = { which = rec_situation_add_approach_temp value = -0.5 }
}
else_if = { # 控制商品经济 -0.1增长
limit={
Expand Down Expand Up @@ -696,11 +696,11 @@ situation_event = { # 计算危机增长-无危机时-总结 3号
immediate = {
set_variable = { which = rec_crisis_add_temp value = 0 } # 初始化增长

change_variable = { which = rec_crisis_add_temp value = rec_crisis_add_market }
change_variable = { which = rec_crisis_add_temp value = rec_crisis_add_civic }
multiply_variable = { which = rec_crisis_add_temp value = rec_crisis_mult_civic }
change_variable = { which = rec_crisis_add_temp value = rec_crisis_add_edict }
#multiply_variable = { which = rec_crisis_add_temp value = rec_crisis_mult_edict }
change_variable = { which = rec_crisis_add_temp value = rec_crisis_add_market }
change_variable = { which = rec_crisis_add_temp value = rec_crisis_add_approach }

situation_event = { id = ethic_economic.32 days = 5 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,23 @@ economic_situation_improve:0 "经济状态改善"
economic_crisis_accumulate:0 "经济危机积累"
economic_crisis_threshold:0 "经济危机阈值"

ListCrisisAdd:0 "§R危机积累中§! $economic_crisis_add_market$ $economic_crisis_add_civics$ $economic_crisis_add_edicts$ $economic_crisis_add_approach$ $economic_crisis_mult_civics$ $economic_crisis_add_change$ $economic_crisis_add_outside$ $economic_crisis_add_war$"
ListCrisisDecline:0 "§R危机消退中§! $economic_crisis_add_market$ $economic_crisis_add_civics$ $economic_crisis_add_edicts$ $economic_crisis_add_approach$ $economic_crisis_mult_civics$ $economic_crisis_add_change$ $economic_crisis_add_outside$ $economic_crisis_add_war$"
economic_crisis_add_civics:0 "\n$economic_factor_civics$: [this.CrisisAddCivics]"
economic_crisis_add_civics_neutral:0 "§Y0§!"
economic_crisis_add_civics_negative:0 "§R+[rec_crisis_add_civic]§!"
economic_crisis_add_civics_positive:0 "§G[rec_crisis_add_civic]§!"
ListCrisisAdd:0 "§R危机积累中§! $economic_crisis_add_market$ $economic_crisis_add_civics$ $economic_crisis_mult_civics$ $economic_crisis_add_edicts$ $economic_crisis_add_approach$ $economic_crisis_add_change$ $economic_crisis_add_outside$ $economic_crisis_add_war$"
ListCrisisDecline:0 "§R危机消退中§! $economic_crisis_add_market$ $economic_crisis_add_civics$ $economic_crisis_mult_civics$ $economic_crisis_add_edicts$ $economic_crisis_add_approach$ $economic_crisis_add_change$ $economic_crisis_add_outside$ $economic_crisis_add_war$"
economic_crisis_add_market:0 "\n$economic_factor_market$: [this.CrisisAddMarket]"
economic_crisis_add_market_neutral:0 "§Y0§!"
economic_crisis_add_market_negative:0 "§R+[rec_crisis_add_market]§!"
economic_crisis_add_market_positive:0 "§G[rec_crisis_add_market]§!"
economic_crisis_add_civics:0 "\n$economic_factor_civics$: [this.CrisisAddCivics]"
economic_crisis_add_civics_neutral:0 "§Y0§!"
economic_crisis_add_civics_negative:0 "§R+[rec_crisis_add_civic]§!"
economic_crisis_add_civics_positive:0 "§G[rec_crisis_add_civic]§!"
economic_crisis_mult_civics:0 "[this.CrisisMultCivics]"
economic_crisis_mult_civics_positive:0 "\n$economic_factor_civics$: §G*[rec_crisis_mult_civic]§!"
economic_crisis_add_edicts:0 "[this.CrisisAddEdicts]"
economic_crisis_add_edicts_negative:0 "\n$economic_factor_edicts$: §R+[rec_crisis_add_edict]§!"
economic_crisis_add_edicts_positive:0 "\n$economic_factor_edicts$: §G[rec_crisis_add_edict]§!"
economic_crisis_add_approach:0 "[this.CrisisAddApproach]"
economic_crisis_add_approach_positive:0 "n$economic_factor_approach$: §G[rec_crisis_add_approach]§!"
economic_crisis_mult_civics:0 "[this.CrisisMultCivics]"
economic_crisis_mult_civics_positive:0 "\n$economic_factor_civics$: §G*[rec_crisis_mult_civic]§!"
economic_crisis_add_outside:0 "[this.CrisisAddOutside]"
economic_crisis_add_outside_positive:0 "\n$economic_factor_outside$: §G[rec_crisis_add_outside]§!"
economic_crisis_add_change:0 "[this.CrisisAddChange]"
Expand Down

0 comments on commit af43697

Please sign in to comment.