更新时间 2020-03-11 18:04

开发日志#25:模组和1.9版本号补丁日志(第二部分)分属于《钢铁雄心4》的开发日志。

本页贡献者

冰糖给你吃
增0 改0 删0

基本信息

开发日志#25:模组和1.9版本号补丁日志(第二部分)
原标题 HOI4 Bonus Diary! - Modding & 1.9 Patchlog (Part-2)
原发表日期 2020年2月21日
对应版本 La Résistance
原链接 https://forum.paradoxplaza.com/forum/index.php?threads/hoi4-bonus-diary-modding-1-9-patchlog.1332541/
  1. 1.9版本号“哈士奇”补丁日志
  2. Stability & Performance
  3. 稳定性与性能
  4. 模组
  5. 历史记录器
  6. 崩溃记录
  7. 国家Tag别名
  8. 国家评分
  9. 修正项定义
  10. 更多AI战略
  11. 可改变的游戏速度
  12. 用Mod修改特工行动

1.9版本号“哈士奇”补丁日志

1.9版本号“哈士奇”
Modding
模组

  • Added the send_equipment_fraction effect
  • 添加了send_equipment_fraction效果。
  • Added the effect send_unit_fraction behaving much like the start_civil_war effect but with much less politics and blood
  • 添加了send_unit_fraction效果,与start_civil_war效果非常相似,但政治性和血腥程度却少得多。
  • Added the ability to hide some modifier enclosed in a hidden_modifier block while allowing to put a nicer description in a localized string specified by custom_modifier_tooltip
  • 添加了隐藏某些修正项到hidden_modifier中的功能,同时允许在custom_modifier_tooltip指定的本地化字符串中放置更好的描述文本。
  • Fixed the tooltip generated for ideas not picking up the localization key Name + '_instant_desc'
  • 修复了理念没有选择到“Name_instant_desc”本地化键值而产生的提示栏。
  • Changed add_resource effect to work with variables
  • 更改了add_resource效果以使用变量。
  • Added destroy_resource effect to temporarly/permanently destroy resources on a state
  • 添加了destroy_resource效果以临时/永久销毁某个地区的资源。
  • Added state_resource_steel & temporary_state_resource_steel (and other resources) state modifiers
  • 添加了state_resource_steel和temporary_state_resource_steel(和其他资源)的地区修正项。
  • Added non_damaged_building_level trigger
  • 添加了non_damaged_building_level触发器。
  • add_resource now can temporarily add or remove resources
  • add_resource现在可以临时添加或删除资源。
  • add_dynamic_modifier now updates the duration if modifier already exists
  • 如果修正项已存在,add_dynamic_modifier现在会更新持续时间。
  • Added legitimacy_gain_factor modifier, that applies to legitimacy change as a factor
  • 添加了legitimacy_gain_factor修正项,该修正项作为一个乘数使用在流亡政府的正统性上面。
  • swap_idea effect now allows you to modify the duration of previous idea
  • swap_idea效果现在允许修改先前理念的持续时间。
  • add_building_construction, set_building_level now accepts stuff like limit_to_victory_point > 5 / limit_to_victory_point < 10 along with limit_to_victory_point = yes (which checks if vp > 0) and can be used to apply the effect only provinces within certain VP threshold
  • add_building_construction、set_building_level现在接受诸如limit_to_victory_point> 5 / limit_to_victory_point <10以及limit_to_victory_point = yes(胜利点> 0时检查)之类的东西,并且可以仅在某些胜利点阈值内的省份中应用效果。
  • Added is_debug trigger that will return true if debug mode is on (game is launched with -debug flag)
  • 添加了is_debug触发器,在debug调试模式下它将返回true(使用-debug标志启动游戏)。
  • Added a bunch of triggers for checking resistance & compliance variables & modifiers
  • 添加了一堆触发器来检查抵抗度、顺从度的变量和修正项。
  • Added effects for adding resistance/compliance and initing/cancelling resistance
  • 添加了增加抵抗度/顺从度和初始化/取消抵抗度的效果。
  • Occupied can be used to access occupied (Resistance) country of a state
  • 占领的效果可以用于占领(抵抗)只有一个地区的国家。
  • Added variables to access core compliance/resistance
  • 添加有核心地区可用的顺从度/抵抗度变量。
  • Add a warning if there is multiple 'limit' in a trigger/effect.
  • 如果触发器/效果中有多个“限制”,则添加警告。
  • add the modifiers navy_leader_start_level, navy_leader_start_attack_level, navy_leader_start_defense_level, navy_leader_start_maneuvering_level, navy_leader_start_coordination_level to match the sames for army_leader.
  • 添加修饰符navy_leader_start_level,navy_leader_start_attack_level,navy_leader_start_defense_level,navy_leader_start_maneuvering_level,navy_leader_start_coordination_level以与Army_leader保持相同。
  • Add effects add_days_remove and add_days_mission_timeout for decisions
  • 为决议添加add_days_remove和add_days_mission_timeout效果。
  • Fixed sending diplo actions with scripted guis not setting expiration date correctly
  • 修复了发送带有脚本编写GUI的外交行动时,无法正确设置过期时间的问题。
  • Added modifiers intel_network_gain and intel_network_gain_factor
  • 添加了intel_network_gain和intel_network_gain_factor的修正项。
  • Dynamic variables that are added to state now shows up in gui if has a gfx entry
  • 如果有gfx条目,则添加给地区的动态变量现在会显示在gui中。
  • Added random_occupied_country every_occupied_country effects
  • 添加了random_occupied_country every_occupied_country效果。
  • Added any_occupied_country all_occupied_country country triggers
  • 添加了any_occupied_country all_occupied_country国家触发器。
  • Added occupied_countries as a country array to country scope
  • 在国家域中添加了occupied_countries作为国家数组。
  • should_initiate_resistance scripted trigger will be checked to decide if resistance should be inited or not
  • should_initiate_resistance脚本触发器将会被检查,以确定是否应该发动抵抗。
  • Added teleport_armies, which can teleport armies in one state to another
  • 添加了teleport_armies,可以将处于一个地区的军队传送到另一个地区。
  • Add controls_province trigger
  • 添加controls_province触发器。
  • Added set_state_province_controller effect which partially flips controller of some provinces under a state
  • 添加了set_state_province_controller效果,该效果会部分改变一个地区内某些省份的控制者。
  • Added is_friend trigger
  • 添加了is_friend触发器。
  • Added create_dynamic_country effect
  • 添加了create_dynamic_country效果。
  • Added trigger operative_leader_mission
  • 添加了operative_leader_mission触发器。
  • Added unitleader variable own_capure_chance_factor: the sum of modifiers applied to the chance of this operative to be captured
  • 添加了unitleader变量own_capure_chance_factor:影响捕获该特工几率的修正项总和。
  • Added unitleader variable own_forced_into_hiding_time_factor: the sum of modifiers applied to the time this operative is infliceted the status forced into hiding
  • 添加了unitleader变量own_forced_into_hiding_time_factor:影响该特工被迫进入隐蔽之时间的修正项总和。
  • Added unitleader variable own_harmed_time_factor: the sum of modifiers applied to the time this operative is infliceted the status harmed
  • 添加了unitleader变量own_harmed_time_factor:影响该特工进入受伤状态用的修正项总和。
  • Added unitleader variable own_intel_extraction_rate: the sum of modifiers applied to rate of extraction of intel from this operative by an enemy country
  • 添加了unitleader变量own_intel_extraction_rate:被敌国特工提取情报的速率所应用的修正项总和。
  • Added on_action on_operative_on_mission_spotted: triggered when an operative has been spotted while on an offensive mission. Should decide what happens to the operative
  • 添加了on_action效果on_operative_on_mission_spotted:一个特工在执行进攻性任务被发现则会触发。决定这名特工身上会发生什么。
  • The effect remove_unit_leader now supports the scope of an unit leader in which case it behaves like a bool effect where the boolean is ignored
  • 效果remove_unit_leader现在支持unitleader的作用域,在这种情况下,它的行为就像是布尔值被忽略的布尔效果。
  • Added the effect randomize_{,temp_}variable which assign a random number to a variable with various parameters to specify the range and the distribution to use
  • 添加了randomize_{,temp_}variable效果,该变量为具有各种参数的变量分配一个随机数,以指定要使用的范围和分布。
  • Change divide_temp_variable effect not to crash on division by zero and return the value specified by the parameter ~if_zero~ which default to zero.
  • 更改divive_temp_variable效果,使其在除以零时不崩溃,并返回由参数“if_zero”指定的值,该值默认为零。
  • Added effects harm_operative_leader and force_operative_leader_into_hiding
  • 添加了harm_operative_leader和force_operative_leader_into_hiding效果。
  • Add state_production_speed_buildings_factor modifier (that can be added to a state with add_state_modifier)
  • 添加state_production_speed_buildings_factor修正项(可以使用add_state_modifier添加到一个地区中)。
  • Add state_resources_factor modifier (that can be added to a state with add_state_modifier)
  • 添加state_resources_factor修正项(可以使用add_state_modifier添加到一个地区中)。
  • Random lists now supports variables as factor & add values
  • 随机列表现在支持变量作为因子和增加值。
  • Added "\common\modifier_definitions" entries to declare new modifiers which can be access by scripts
    -添加了“\common\modifier_definitions”条目,以声明可以被脚本访问的新修正项。
  • Added delete_units effect
  • 添加了delete_units效果。
  • delete_unit_template_and_units can also refund equipment/manpower
  • delete_unit_template_and_units也可以返还装备/人力。
    -Added following effects & triggers://any_country_with_original_tag // all_country_with_original_tag//random_country_with_original_tag// every_country_with_original_tag
  • 添加了以下效果和触发器:// any_country_with_original_tag // all_country_with_original_tag // random_country_with_original_tag // every_country_with_original_tag。
  • original_tag can now be accessed as a game variable
  • original_tag现在可以作为游戏变量访问。
  • Fixed create_equipment_variant not setting modules in correctly in some cases
  • 修复了create_equipment_variant在某些情况下不能正确设定模块的问题。
  • Fixed tooltips of add_days_remove effect & days can take variables now
  • 修复了add_days_remove的效果及天数的提示框,它现在可以采用变量了。
  • create_unit now allows spawning multiple units, spawning units at ally or enemy controlled provinces and has a scoring system for controller
  • create_unit 现在可以生成多个单位,可以在盟友或敌军控制的省份生成单位,并且现在对于控制者有一个评分权重机制。
  • Added console command "save " to save game directly from console
  • 添加了控制台命令“save ”,以便直接从控制台保存游戏。
  • Added static modifiers intel_network_state_level_bonus and intel_network_state_level_penalty
  • 添加了静态修正项intel_network_state_level_bonus和intel_network_state_level_penalty。
  • The planning_speed modifier can now be applied to a state. Only the adjacent state (for fronts) or the targeted states (for invasion and paradrops) are taken into account.
  • planning_speed修正可以被应用于地区。只将相邻地区(通过前线)或目标地区(海军入侵及伞兵空降)纳入考虑。
  • Modifiers max_dig_in and max_dig_in_factor can now be applied to a state
  • 修正项max_dig_in和max_dig_in_factor现在可以被应用于地区。
  • Modifiers amphibious_invasion_defense and naval_invasion_penalty can now be applied to a state
  • 修正项amphibious_invasion_defense和naval_invasion_penalty可以被应用于地区。
  • Added add_resistance_target & remove_resistance_target effects
  • 添加了add_resistance_target和remove_resistance_target效果
  • Added random_hours and random_days fields to country_, state_, news_, and unit_leader_event effects to clarify how much random time is being added to the effect. The random field, which is equivalent to random_hours when assigned a numeric value, is preserved for backwards compatibility.
  • 向country_,state_,news_和unit_leader_event效果中添加了random_hours和random_days字段,以说明该效果增加了多少随机时间。为了向后兼容性,保留了random字段,当分配数值时,它等效于random_hours。
  • Added decryption_ratio_trigger
  • 添加了decryption_ratio_trigger。
  • on_capitulation will now always fire. It was previously not firing if a war ended with the capitulation of a single country and would previously go straight to peace conference
  • on_capitulation现在将总是触发。如果战争直接以单个国家的投降而结束,则此前它不会触发,而是直接进入和平会谈。
  • Added is_cryptology_department_active is_decrypting is_fully_decrypted is_active_decryption_bonuses_enabled triggers
  • 添加了is_cryptology_department_active、is_decrypting is_fully_decrypted、 is_active_decryption_bonuses_enabled等触发器
  • Added a reservation mechanic for dynamic tags using reserve_dynamic_country effect
  • 使用reserve_dynamic_country效果,为动态tag添加了保留机制。
  • Added add_decryption effect
  • 添加了add_decryption效果。
  • Added on_fully_decrypted_cipher & on_activated_active_decryption_bonuses on actions
  • 在on_action中添加了on_fully_decrypted_cipher及on_activated_active_decryption_bonuses。
  • Added trigger compare_intel_with
  • 添加了触发器compare_intel_with。
  • Added effect add_intel
  • 添加了add_intel效果。
  • Added decrypt_target strategy
  • 添加了decrypt_target战术。
  • Added a database that can score countries which can be accessed with scripts & effects using get_highest_scored_country & get_sorted_scored_countries effects & triggers
  • 添加了一个数据库,该数据库可以通过使用get_highest_scored_country & get_sorted_scored_countries效果及触发器通过脚本及效果进行访问,并对国家进行权重评分。
  • Mutually exclusive focuses now gives warning if the other focus is not mutually exclusive
  • 如果与其他国策并不互斥,现在互斥的国策会发出警告。
  • Added has_collaboration trigger and add/set_collaboration effect
  • 添加了has_collaboration触发器及add/set_collaboration效果。
  • Add a new on_action, on_send_volunteers
  • 添加了新的on_action即on_send_volunteers。
  • Add a new ai_strategy, send_lend_lease_desire.
  • 添加了新的ai_strategy, send_lend_lease_desire。
  • Added "delivered" support for state resources trigger
  • 为地区资源的触发器添加了“已送达”支持。
  • Added crypto enable strategy
  • 添加了密码解锁的战略。
  • Add AI strategies intelligence_agency_usable_factories, intelligence_agency_branch_desire and intelligence_agency_upgrade_desire (examples in ai_strategy/default.txt)
    -添加了AI策略intelligence_agency_usable_factories、intelligence_agency_branch_desire和intelligence_agency_upgrade_desire(用例在ai_strategy/default.txt中)
  • Added activate_invasions front_unit_request invasion_unit_request strategies
  • 添加了activate_invasions、front_unit_request、invasion_unit_request战略。
  • Added support in focus_tree database for custom initial window position via the member initial_show_position
  • 通过成员initial_show_position在focus_tree数据库中添加了对自定义初始窗口位置的支持。
  • Add is_spymaster trigger
  • 添加了is_spymaster触发器。
  • effect & trigger console commands now autocompletes and can take arguments
  • 效果及触发器控制台命令现在可以自动完成,并可以接受参数。
  • log effect & trigger now will log stuff to console if console is open
  • 效果及触发器日志现在将在控制台打开的情况下将日志记录在其中。
  • Added strategies for accepting/requesting diplo actions
  • 添加了接受/请求外交行动的战略。
  • Can now mod game speeds under NGame::GAME_SPEED_SECONDS
  • 现在可以通过NGame::GAME_SPEED_SECONDS调节游戏时间。
  • has_game_rule now safety checks for non existing rules
  • has_game_rule现在会对不存在的规则进行安全性检查。
  • Added debug logs for peace ai
  • 为和平AI添加了调试日志。
  • Improved/added add_ideas/remove_ideas console commands
  • 改进/添加了控制台命令add_ideas/remove_ideas。
  • In debug mode control alt click on a decision/national focus/idea/spirit will now open the text file for the object
  • 在debug模式下,按住alt并点击决议/国策/理念/国家精神将会打开该对象的文本文件。
  • Added targeted state decisions
  • 添加了目标地区决议。
  • Added ctrl alt click for techs & events as well
  • 为科技/事件添加了ctrl alt点击。
  • Added capital country variable
  • 添加了主要国家变量。
  • Improved the logging of duplicate UI object names in gui files.
  • 改进了在图形界面文件中重复UI对象名的日志记录。
  • icons for decisions are now dynamics, and can be changed by a trigger as icon = { key = name, trigger = {} }
  • 决议图标现在是动态的,并可以通过触发器更改,如icon={key=name,trigger={} }
  • Added highlight_color_before_active and _while_active attributes to decisions, which indicate which custom color highlight from graphics defines to always show on the map for the relevant provinces, while the decision is in the corresponding state.
  • 在决议中添加了highlight_color_before_active和_while_active属性,这些属性指示在决议处于相应状态时,图形中定义的自定义颜色高亮始终显示在相关省份的地图上。
  • Moved the BORDER_COLOR_CUSTOM_HIGHLIGHT_* into the larger BORDER_COLOR_CUSTOM_HIGHLIGHTS array that can support multiple colors, currently accessible only from decisions.
  • 将BORDER_COLOR_CUSTOM_HIGHLIGHT_*移动至BORDER_COLOR_CUSTOM_HIGHLIGHTS数组中,以便支持多种颜色,目前只能通过决议访问.
  • Add create_ship effect
  • 添加了create_ship效果。
  • Its now possible to mod which subtech icon to use by setting sub_tech_index on the tech
  • 现在可以通过在科技上设置sub_tech_index来修改要使用的子科技图标。
  • Changed the capital attribute of the start_civil_war effect into scriptable variable, not just a raw state ID.
  • 将start_civil_war效果的主要属性更改为可编写脚本的变量,而不仅仅是原始状态ID。
  • Fixed the capital attribute of the start_civil_war effect to not get overridden and ignored if the list of states is also specified.
  • 修复了start_civil_war效果的主要属性,如果还指定了状态列表,则不会被覆盖和忽略。
  • You can specify a country tag before effect/trigger name in effect/trigger console commands to set scope now
  • 你可以在效果/触发器控制台命令中的效果/触发器名称之前指定国家Tag,以立即设置作用域。
  • its now possible to scrip if a battalion or support company affects overall speed or not
  • 现在,可以在脚本中编写营或支援连是否影响整体速度。
  • Added trigger intel_level_over allowing to compare the absolute intel level a country has over another
  • 添加了触发器intel_level_over,可以比较一个国家相对于另一个国家的绝对情报水平。
  • Add set_faction_spymaster effect
  • 添加了set_faction_spymaster效果。
  • Added effect mark_focus_tree_layout_dirty to force the UI to rebuild the focus tree of the scoped country
  • 添加了mark_focus_tree_layout_dirty效果以强制UI重建作用域国家的国策树。
  • Added any_controlled_state and all_controlled_state trigger
  • 添加了any_controlled_state和all_controlled_state触发器。
  • Added random_controlled_state effect
  • 添加了random_controlled_state效果。
  • Added support for 'prioritize' list for random_state effect like for other similar random_x_state effects
  • 添加了对random_state效果的“优先化”列表的支持,就像其他类似的random_x_state效果一样。
  • Fixed set_political_power effect to properly set PP directly, instead of its old behavior of functioning just like add_political_power.
  • 修复了set_political_power效果以直接设置政治点数,而不是像过去的add_political_power那样起作用。
  • Changed default behavior of repeatable decision with random effects so that they re-roll the random sequence each time the decision is repeated. Previous default was to produce the same result every time within a single game session, but content designers rarely expect or want this behavior. Explicitly specify fixed_random_seed = yes in a decision to opt in to this same-every-time behavior.
  • 更改具有随机效果的可重复决议的默认行为,以便在每次重复决策时重新滚动随机序列。以前的默认设置是每次在一个游戏会话中产生相同的结果,但是内容设计者很少期望或想要这种行为。在每次选择此相同行为的决策中显式指定fixed_random_seed=yes。
  • Fixed adding new events breaking fire_only_once for old saves
  • 修复了对旧存档添加新事件会打破fire_only_once的问题。
  • Add garrison_manpower_need trigger, to check how much manpower we need for our current garrisons.
  • 添加garrison_manpower_need触发器,以检查当前驻军所需的人力。
  • Added command line argument '-dump_script_doc' that generates a JSON file containing the script documentation
  • 添加了命令行参数-dump_script_doc,该参数的作用是生成包含脚本文档的JSON文件。
  • console command 'trigger_docs' can now generate the documentation in a JSON format if given the argument 'json'
  • 控制台命令“trigger_docs”现在可以给定参数“json”时生成JSON格式的文档。
  • Unit leaders can now be stored as variable and can be used in scripted guis
  • 现在可以将单位领袖存储为变量,并可以在脚本图形界面中使用。
  • Added army_leaders navy_leaders operators variables for country
  • 为国家添加了Army_leaders navy_leaders运算符变量。
  • Added on_remove for ideas
  • 为理念添加了on_remove。
  • Added tooltip for selectable trigger
  • 为可选触发器添加了提示框。
  • Added tooltip for selectable trigger of scripted diplo actions
  • 为脚本编写的外交行动的可选择触发器添加了提示框。
  • Following triggers can have tooltip="loc" to override its default localization: every_country every_other_country every_state every_owned_state every_controlled_state every_neighbor_state every_unit_leader every_navy_leader global_every_army_leader every_operative
  • 以下触发器可以具有tooltip =“ loc”来覆盖其默认本地化文本:every_country every_other_country every_state every_owned_state every_controlled_state every_neighbor_state every_unit_leader every_navy_leader global_every_army_leader every_operative。
  • Added tooltip=key option for many all_X any_X triggers
  • 为许多all_X any_X触发器添加了tooltip=key选项。
  • Added tooltip support for all_of_scopes & any_of_scopes trigger
  • 为all_of_scopes和any_of_scopes触发器添加了提示框支持。
  • Added modifiers impacting the chances of detecting an operative on mission: own_operative_detection_chance, own_operative_detection_chance_factor, enemy_operative_detection_chance, enemy_operative_detection_chance_factor
  • 增加了影响在任务中侦测到一名特工的几率的修正项:own_operative_detection_chance, own_operative_detection_chance_factor, enemy_operative_detection_chance, enemy_operative_detection_chance_factor。
  • transfer_ship target entry now accepts variable
  • transfer_ship目标现在接受变量。
  • added highest_party_ideology and highest_party_popularity variables both with @exclude_ruling_party support
  • 在@exclude_ruling_party支持下添加了highest_party_ideology和highest_party_popularity变量。
  • Added effect operative_leader_event
  • 添加了operative_leader_event效果。
  • set_technology effect now has popup = no to disable pop up
  • set_technology效果现在具有popup = no以禁用弹出。
  • Add agency_upgrade_number trigger
  • 添加了agency_upgrade_number触发器。
  • Added support for disabled_ideas modifier that can be used for disabling law & minister assignments
  • 对disable_ideas修正项的支持,该修正项可用于禁用法案和部长的委任。
  • Add new modifier max_surrender_limit_offset that controls the maximum surrender progress of a nation
  • 添加新的修正项max_surrender_limit_offset以控制国家的最大投降倾向。
  • Added cancel_effect for decisions
  • 为决议添加了cancel_effect。
  • Added effect gain_xp that can be used in an unit leader scope
  • 增加了可以以部队将领为作用域使用的效果gain_xp。
  • Added is_diplomatic_action_valid_DIPLO_TOKEN trigger support for diplo actions to disable diplomatic actions
  • 添加了is_diplomatic_action_valid_DIPLO_TOKEN触发器支持,以支持外交行动来禁用外交行动。
  • Fixed some triggers not producing correct tooltip under NOT = {}
    -修复了一些触发器未在NOT = {}下产生正确的提示框的问题
  • Added weight support for reading unit leader names
  • 添加了对读取领袖名称的权重支持。
  • Allow traits to specify multiple eligible unit leader types
  • 允许特性特定对复数合格的单位领袖类型可用。
  • Added support for storing equipment types in tokens
  • 增加了对存储装备种类的intokens支持。
  • Equipment types can be stored in variables now and effects & triggers that can take equipment types can take variables
  • 现在可以将装备种类存储在变量中,可以使用装备种类的效果和触发器也可以使用变量。
  • Effects that reads database objects as variables now needs to be explicitly use var:var_name (example set_temp_variable = { t = token:fascism } has_government = var:t)
  • 读取数据库对象作为变量的效果现在需要显式地使用var:var_name(例如set_temp_variable = {t = token:} has_government = var:t)。
  • Added trigger num_of_operatives num_operative_slots and num_free_operative_slots
    -新增了触发器num_of_operatives num_operative_slots 和 num_free_operative_slots
  • setowner/setcontroller console commands now works with state selection as well
  • setowner/setcontroller 这两个控制台指令现在在国家选择界面也可以正常工作。
  • Subjects can now have more general fallback names like COUNTRY_ and COUNTRY__, also a NONIDEOLOGY value is available for accessing a non-political country name like Germany rather than German Reich.
  • 傀儡政权现在有更综合的后缀名了,如COUNTRY_ 和 COUNTRY__,与此同时,NONIDEOLOGY值将能带来一个非政治性的国名,如德国而不是德意志国。
  • Added front_control ai strategy for forcing ai to attack/not attack or changing execution types for specific fronts
  • 新增了front_control 的ai策略,以强制让ai进攻/不进攻,或根据特定的前线情况变化执行策略。
  • Game now logs the last read line from saves/script files on crash which can be used for debugging crashes during loading saves or at startup
  • 游戏现在会记录来自崩溃的存档/脚本文件的最后一行,这可以用来在读取存档或开始游戏时解决崩溃问题。
  • Last executed script will also be logged on crash reports now
  • 最后被执行的脚本现在也会被记录在崩溃报告上了。
  • Crash log data is now only logged if the game launched with -crash_data_log (to not reduce performance of -debug performance)
  • 崩溃的记录数据现在只会在游戏在-crash_data_log模式下启动时才会被记录(以避免削弱-debug performance的性能)。
  • Add trigger foreign_manpower
  • 新增了触发器foreign_manpower。
  • Add country_lock_all_division_template effect.
  • 新增了country_lock_all_division_template效果。
  • unlock_decision_category_tooltip effect now does deferred loading to avoid
    load order issues in certain places
  • unlock_decision_category_tooltip这一效果现在会被延迟加载以避免在某些情况下的加载指令问题。
  • Added effect add_nationlity for operative
  • 给特工新增了add_nationlity效果。
  • Added days_since_capitulated trigger.
  • 新增了days_since_capitulated触发器
  • Added on_paradrop & on_naval_invasion onactions
  • 新增了on_paradrop & on_naval_invasion 的on_action。
  • Added on_ruling_party_change onaction
  • 新增了on_ruling_party_change onaction的on_action。
  • Added trigger has_nationality for operatives
  • 为特工新增了has_nationality触发器。
  • Changed triggers all_operatives and any_operatives to work with an Operation scope
  • 改动了触发器all_operatives和any_operatives让其在特工行动作用域工作。
  • Changed effects random_operative and every_operative to work with an Operation scope
  • 改动了触发器random_operative 和every_operative让其在特工行动作用域工作。
  • Added on_action on_operation_completed executed when an operation finishes before the outcome effect is executed and the operative detection chance is rolled
  • 新增了on_operation_completed的on_action,并在行动完成后,行动效果和特工被发现几率被执行前执行它们。
  • Added support for scripted localization of operation. E.g. GetName is replaced the operation name.
  • 为特工行动的脚本编写本地化提供支持。比如,GetName会被行动名取代。
  • Added effect recall_volunteers_from = TAG
  • 新增效果recall_volunteers_from = TAG
  • New effect set_garrison_strength to set a states garrison strength
  • 新效果set_garrison_strength以设置地区的驻军强度。
  • Added support for multiple on_map_area on decision categories
  • 为决议界面的多个on_map_area提供了支持。
  • Added effect turn_operative to move an operative from one country to another while making it appear as dead to the country of origin
  • 增加效果turn_operative以将一名特工移动至另一国家,同时让此特工对于原国家而言死亡。
  • Added conscription_ratio target_conscription_amount current_conscription_amount triggers
  • 新增conscription_ratio target_conscription_amount current_conscription_amount 触发器。
  • Add new country rule can_boost_own_ideology
  • 新增国家规则can_boost_own_ideology。
  • Decision categories now can be displayed regardless of decisions by setting visibility_type to one of map_only decision_view_only map_and_decisions_view and always
  • 决议分类现在可以被正常展示,不管决议如何。通过设置并固定visibility_type到map_only、decision_view_only、map_and_decisions_view其中之一来实现。
  • context_type = diplomacy_target_context can be set to make a scripted window always target the country that is selected in diplomacy
  • context_type = diplomacy_target_context可以被设置以生成一个脚本窗口,其会一直标记在外交界面被选中之国家的位置。
  • Added country_is_at_peace & country_is_at_war static modifiers
  • 新增country_is_at_peace和country_is_at_war的静态修正项。
  • Added on_weekly on_weekly_TAG on_monthly on_monthly_TAG actions
  • 新增on_weekly、on_weekly_TAG、on_monthly、on_monthly_TAG行动。
  • Added trigger network_national_coverage to test for Intel Network National Coverage
  • 新增触发器network_national_coverage以测试情报网络国家覆盖率。
  • added error logging for invalid prov stack positions
  • 新增无效的省份堆栈位置错误日志。
  • Focus tree window now keeps its position on reload
  • 国策树窗口现在会在加载时维持原位。
  • Improved logging of national focus errors to indicate file and line number.
  • 通过指明文件和行数以改进对国策树错误的日志记录。
  • Added female = yes support for country leaders and added is_female trigger which can be used for unit leader/country leaders/aces
  • 新增female = yes以支持女性国家领袖,并新增is_female触发器,并在单位将领/国家领袖/王牌分类中可用。
  • Add 'kill_ideology_leader' and 'retire_ideology_leader' effects to kill or retire an ideology leader.
  • 新增kill_ideology_leader和retire_ideology_leader效果以杀死或使派系领袖退休。
  • Added %% support to localization, which will print a percentage without multiplying it 100
  • 新增对本地化文件的百分号支持,这能够在不将其乘以100的情况下表示出百分号。
  • added history log viewer tool to game
  • 在游戏中新增历史记录查看器。
  • added is_operation_type trigger
  • 新增is_operation_type触发器。
  • operation can be accessed from operative using operation = {}
  • 行动现在可以在特工中通过使用using operation = {}被打开。
  • log effect now logs to console (if visible) and to history logger (if enabled)
  • log效果现在会记录日志到控制台(如果可见)和记录到历史记录器(如果启用)中。
  • focus.autocomplete now only works for player
  • focus.autocomplete现在只对玩家起效。
  • added background textures for leaders & operatives under game/tools/art
  • 在game/tools/art目录下为领导人和特工新增背景材质。
#

Stability & Performance

稳定性与性能

#
  • Parallelized daily updates of AI country threat assessments of other countries.
  • 并行运算AI国家对他国威胁评估的每日更新。
  • Parallelized daily computation of country relation status border friction.
  • 并行运算在边界冲突情况下之国家关系的每日计算。
  • Parallelized daily updates of country and logistics history entries.
  • 并行运算国家和后勤历史条目的每日更新。
  • Parallelized the checksum computation for countries during the hourly out-of-sync checks.
  • 并行运算每小时对国家的失去同步检查的校验码计算。
  • Skip all out-of-sync checks for standard single player games.
  • 为标准单人游戏跳过所有失去同步检查。
  • Prevented a crash if a script tries to make a non-existing country declare war on another country.
  • 避免当一个脚本尝试让一个并不存在的国家向另一个国家宣战时的游戏崩溃问题。
  • Prevented a crash when a country that had been part of a faction and would normally go into exile under their faction leader is instead forcibly annexed by the on_capitulation script.
  • 阻止当一个曾在阵营中,正常情况下会流亡至派系领袖的国家却被on_capitulation脚本强制吞并时的游戏崩溃问题。
  • Updated crash reporter to detect and report crashes on all threads, not just the main thread.
  • 更新了崩溃报告器以探测并报告所有线程的游戏崩溃,而不只是主要线程的。
  • Guaranteed that countries liberated during a peace conference will be given a capital state.
  • 保证在和平会议期间获得解放的国家将获得首都地区。
  • Fixed sporadic crash when editing defines while in debug mode
  • 修正了在debug模式下编辑defines文件时偶尔发生的崩溃。
  • Fixed CTD when exiting the game while expeditionary forces are engaged in combat from a naval invasion
  • 修复了当远征军正在在海军入侵行动中时关闭游戏时的闪退回桌面问题。
  • Avoid hard crash when calculating threat of country that is missing a capital, reporting an error instead.
  • 避免了计算无首都国家的威胁时的恶性崩溃,现在只会报错。
  • Removed exile donation modifier from save file which could cause out of syncs, in favor of recalculating it on loading a game save.
    -为了方便在加载游戏存档时的重新计算,移除了存档里的可能会导致失去同步的流亡捐赠修正项。
  • Fix to avoid using data within the supply system after it has been deallocated.
  • 修正以避免在补给系统被解除后依旧使用里面的数据。
  • Deferred looking up unit leader trait in database in triggers and effects so that database load order causes fewer problems for other scripted objects that need to use these triggers and effects.
  • 减缓了触发器和效果对数据库中单位将领特质的查询,在这些触发器和效果被其它脚本化对象使用时,数据库的加载顺序会导致更少的问题。
  • Fixed cross-platform out-of-sync when calculating front line shape.
  • 修复了在计算前线形状时不同平台的不同步问题。
  • Optimized calculation of convoys passing through naval mission regions used in a variety of places, but especially during the hourly tick assignment of division by the AI.
  • 优化了对穿过海军任务区域的运输船之运算,尤其是在AI的每小时分配的时候。
  • Fixed CTD when going back to the main menu after hosting a game but not starting it
  • 修复了当在主持却并未开始游戏时返回主菜单时的闪退回桌面问题。
  • Fixed a ctd related to carriers in naval combat
  • 修复了一个和海军战斗中的航母有关的闪退回桌面问题。
  • Fixed a ctd with deleting division templates
  • 修复了一个删除师模板时的闪退回桌面问题。
  • Fixed Steam API shutdown for Linux host that was causing the program to hang on exit
  • 修复了由Linux系统的Steam API宕机导致的程序退出时无响应问题。
  • Fixed Mersenne Twister implementation to produce exactly the same pseudorandom sequence as reference implementation.
    -修复了马特赛特旋转演算法的应用方式,使其生成完全相同的伪随机数序列。
  • Changed music to stream directly from file instead of loading the entire song into memory first.
  • 改动了音乐播放方式,让它直接从文件中播放,而不是先把整首歌加载进电脑内存中。
  • fixed a ctd in ai fleet assignments
  • 修复了一个和AI的舰队任务分配有关的闪退回桌面问题。
  • Fixed a ctd that can happen when exiting from mp lobby using esc key
  • 修复了一个当用esc键从多人游戏大厅退出时的闪退回桌面问题。
  • Fixed CTD when AI evaluates sending volunteers to a country that has an enemy on the verge of capitulating
  • 修复了当AI 打算向一个敌人已在投降边缘的国家派遣志愿者时的闪退回桌面问题。
  • Fixed CTD caused by deleting units from effect running right after a combat ended
  • 修复了在战斗刚刚结束后删除单位时的闪退回桌面问题。
  • Added safety checks on nations without capitals (random ai ctd fix)
  • 新增了对国家无首都的安全检查(随机AI闪退修复)。

模组

1.9.0版本号将包含诸多工具/改进项,但愿它们能够帮到Mod制作者们开发出好玩的Mod。Bug修复和小改动实在太多这里就不列举了,其实它们也都可以在补丁日志里找到,只不过在这篇开发日志里我们要列出些更为重要的内容。

更多的效果、触发器以及游戏变量,同时还有更多的变量支持

我们在新的免费补丁中添加了相当数量的新效果/触发器,以及游戏变量。完整清单可以在补丁说明或者游戏生成的文档文件里找到。

除了这些新的脚本工具之外,我们还给现有的效果/触发器增添了更多的变量支持 。所以现在HOI4的脚本语言支持存储Token作为变量。举个例子,你可以做到如下图所示:

我们在这里将infantry_equipment的Token存储到一个临时变量里,随后再将这个存储好的Token用到add_equipment_to_stockpile的运行效果里。

现在下列对象可被存储到变量里,并且所有的效果/触发器都将会适用这些变量:

意识形态/意识形态组
装备类型
行动

我们正计划添加更多的支持,如果你们还觉得有其它类型的Token有用,请随意提出建议。

我们还为脚本语言增加了更棒的文档支持。下列的html文件便是我们新的脚本文档工具的导出内容:

历史记录器

“历史记录器”是我们开发出用于观察AI进行游戏活动的工具,而现在它也将对各位开放。更多细节请详见AI开发日志。

你可以通过下列链接了解到些例子:

我们希望这会帮助到制作想要魔改mod或是AI mod的玩家。你需要运行游戏才能使用到这项功能,还需要在游戏启动时使用“不干涉(-hands_off)”选项来让游戏自动以被定义成NGame::HANDS_OFF_START_TAG 的观察国开始(或者你可以手动启用这项功能,在开始游戏后运行控制台命令“history_logger”)。在运行过程中,游戏会收集数据并且会按照每月一次的频率将数据转储到"documents/user/Hearts of Iron IV/history_dump"的文件夹下。如果你觉得游戏所收集到足够的数据已经足够,你就可以压缩文件夹的内容,接着将压缩内容加载到game\tools\history_viewer\history_viewer.html文件里。

不干涉模式还会输出你所想要达到的测试条件。如果你想的话,你可以添加更多的条件到game\tests 里,而它们成功或失败的结果将会反馈在用户\文档\Paradox Interactive\Hearts of Iron IV\logs\tests内。

崩溃记录

如果在脚本运行期间或是加载游戏时出现问题、游戏崩溃,游戏将会运行最后一次执行的脚本或上次加载的script/history/save line。但愿这些可以在直到我们解决崩溃问题之前给你提供更多有关游戏为何崩溃与如何避免这些问题的信息。

这些信息仅会在游戏使用“崩溃数据记录(-crash_data_log)”选项运行时保存(这个选项会对游戏性能造成一定的影响,所以我建议在日常开发过程中还是不要使用它)。崩溃将被导出到用户\文档\Paradox Interactive\Hearts of Iron IV\crashes\...\meta.yml 下,应该能够告诉你提供发生崩溃的文件&行的信息。

如果游戏在加载存档时崩溃,我回建议你在user\Documents \Paradox Interactive\Hearts of Iron IV\settings.txt下将save_as_binary改为no,这样你就能在文本格式下查看存档内容。

当然,如果你遇到游戏崩溃,还请生成错误报告,这样我们便可实际地修复它们。

国家Tag别名

我们添加了一套国家Tag别名系统。这些别名将如正常国家Tag般运作(它们是3个字母的Tag,可以用在绝大部分你能够使用国家Tag的地方),但在游戏运作中,它们可以被映射到不同的国家。就比如说:

SPD、VIC和MOT都是国家Tag的别名。SPD映射到初始Tag为SPR(这是一个真实Tag),国旗为SPR_carlist_spain_flag的国家。当一个脚本调用:

它将找到正确对应的SPR国家,同时将政治点数添加到那里。

除了初始的国家Tag/触发器组合,你还能将一个Tag别名标签映射到一个变量、事件目标或者评分系统中。在之前的例子里,作为国家Tag别名的MOT映射到了generic_operation_target的变量当中,而在另外一部分脚本里,每个国家的映射设置都不相同。

国家评分

我们在脚本语言里添加了一套评分系统。可在game\common\scorers\country目录下找到例子。

在这里你可以为使用各种触发器与修正项的国家评分,然后通过所得到的评分条目你就能够确实用到get_sorted_scored_countries跟get_highest_scored_country诸如此类的指令啦。

这个系统还被应用到多种AI执行上。举例来说,特工行动AI被完全脚本化,并使用这个评分系统来挑选目标。破译密码AI也使用这个评分系统来捕捉译码目标。

修正项定义

现在可以使用脚本语言添加自定义的修正。这些新的修正被存储在game\common\modifier_definitions里。

一旦这样的修正项被定义之后,它将可被用于国家/地区/领袖的修正项上。它将会显示在修正项的提示栏里,对国家/地区类的修正你可以使用"modifier@modifier_token",或者对领袖类的修正使用leader_modifier/unit_modifier,从而访问该修正项效果或触发器的值。

Ctrl+Alt+鼠标左键来打开脚本文件

你可以在debug模式下使用ctrl+alt+鼠标左键来打开如国策、理念、决议、事件、研究、民族精神等的脚本文件。

这里是一个编辑现有国策的例子。正如你所看到的那样,我们还改进了重新加载的功能,这样的话当改动国策的时候,国策树不会再朝默认位置滚屏下去。

更多AI战略

我们添加了大量全新的策略来重做/改变AI的行为表现。现在将能够创造各种各样更多的AI策略,比如说让AI委派更多单位到特定的前线,或是让AI军队激活/不激活它的计划,或是改变侵略性等等。这些策略帮了我们很大的忙,大大提升了盟军在欧洲反攻轴心国的成功率。

可改变的游戏速度

许多做多人游戏Mod的制作者都曾向我们请求过类似的功能。现在可以通过改变NGame::GAME_SPEED_SECONDS的值来实现修改游戏速度了。

用Mod修改特工行动

特工行动的系统最初就被设计成有很强的可编写性,并且用Mod能拓展出更多新的特工行动。

在最底层,一次行动是由三部分行动阶段构成的。在最初的实现过程中,这些阶段(的结果)都随机产生于三个独立的池子:分别是渗透、执行和撤出。另外说一句,你并不是一定非要严格遵循这一套(有些例外——比如说,假情报制作行动就不需要渗透和撤出阶段)。

每个阶段都有它自己的一系列独特条件以决定这个阶段是否可行(比如说,如果你的目标国是一个内陆国,那么你就无法选用通过潜艇渗透)。每个阶段也有装备需求,会从储备中自动调取。也可能会需要些比如运输机之类的昂贵装备,你可以设置这些装备在行动完成之后返还库存。

对一些阶段,我们会设置工业花费,也就是在一段时间内征用一定数量的工厂。

每个阶段中被选中的概率是由一个基础值决定的,这个值可以被修改,就像修改事件中ai_chances变量一样。

每个阶段都与三个本地文件有关:计划、结果,以及行动失败之后的额外结果。下一步会需要两张图片,一张是在概述界面底部的,另一张则很小,是在地图上出现的一个小图标。

这个阶段完成之后,让我们来康康特工行动的脚本到底是怎么实现的:

它看起来要比实际上可怕多了。我们先从头看起:

这一部分主要是说图形界面的,对于mod制作者来说应该没有什么难度。Icon就是在情报界面显示的图片。Map_icon是当情报活动可行的时候在地图上出现的小图标。Name和desc是名字和介绍的本地文本。Priority决定了在可用行动的列表里该行动出现的位置。

Days是当行动开始后所持续的时间。准备阶段完全由获取了多少所需资源决定。

Network strength是在目标国的情报网络强度。

Operatives是执行这项行动所需的情报人员数量。这个数字同样也意味着只有这个国家的情报人员数量达到这个标准,行动才会变成可行状态。这个变量可以用来制作测试更有难度的情报行动,可以设置成3,或者恶趣味一点,设成更高。

visible = {}触发器就像决议和理念里的那样,你应该很熟悉这一套了。如果它的评估值为true,这项行动就会变为可见。

没有在这里出现的是allowed = {}和available = {}触发器。Allowed = {}是用来检查这项行动对这个国家来说是否可行。如果你想要让某项行动只对特定国家可行的话,这项功能就特别有用了(比如说突袭重水工厂只能由德国之外的国家执行)。Available = {}是用来检查这项活动是否能执行(当它可见的时候)。这项功能在你希望玩家在能采取行动之前,能先知道自己能干哪些事的时候特别有用(通过设置visible = {}触发器的限制比available = {} trigger小一点来实现)。

Selection_target限制了行动能针对目标的数量(FROM总是指向目标国,FROM.FROM是目标地区(如果有的话),ROOT是执行活动的国家)。这个触发器用来避免游戏不断检查每一个可能的国家的每一个地区是否有执行任务的可能,这会损害游戏性能。

Selection_target_state用来决定哪些地区可以被选择执行任务(在这里的例子当中是存在抵抗的省份)的触发条件。结合selection_target,结果就是在当前的例子里,你只能在目标国家有抵抗的地区执行任务了。

Equipment是一个单独的种类,决定了一次行动中需要什么样的装备。就像之前说到过的,装备还跟行动阶段有关,但使用这个参数就可以为所选行动的每个阶段建立单独的基础消耗基准。

Required_tokens是用来检查这个国家的Token。在最初阶段,Token只能通过其他行动获得,但理论上通过国策、事件或者决议也能获得。Token这个变量本身的变化其实没啥目的,但可以用来迫使玩家完成一项行动之后再开启下一个活动,以确保两个Token准确连接。

Risk_chance决定了你的特工们会有多少几率把事搞砸。在我们的例子中,这个值被设定成了20%。如果随机数之神决定你的特工们今天诸事不顺,系统就会跑一段 on_action的代码,之后名为on_operative_detected_during_operation的特工在行动中则会被发现,然后触发相关的不同类型的结果(被捕、被杀、受伤、被迫隐藏起来)。

Experience是被委任到这项行动中的特工能获得的经验。

Outcome_chance是你只能获得基础收益的可能性。这个值的矛盾点在于,如果这个值越低,那意味着玩家越可能会获得额外收益。如果你想让某项行动可以失败,那就把基础成果改小一点,这样Outcome_chance就会是失败几率了。

Outcome_modifiers是用来特别标记出会影响到行动结果的修正项的。这些修正项分散设置在不同地方,比如说情报机构升级、民族精神、理念、顾问等等。受到这些修正项效果的总体修正之后,基础成果就会变得不一样(把额外成果也变得不一样了,因为行动总会有意外结果)。

可能的修正包括:

Outcome_modifiers(调整产出可能性)
Risk_modifiers(调整危机可能性)
Cost_modifiers(调整装备成本)

还有项特别干净利落的内容在于,情报行动可以自己决定全部的修正,使得整个系统特别灵活。在其它地方,你将不得不用代码来定义,但在这里,你只要让它在行动里通过定义修正项给个名字就可以了。之后你还可以通过名字把它转引给顾问、科技或者民族精神。

接下来就是见证奇迹的时刻。Outcome_execute本质上是一个用来执行效果的变量(跟诸如决议或国策之类的没什么大的区别)。Outcome_extra_execute则是另一个效果变量。Outcome_chance是用来决定当情报行动结束后,究竟是执行Outcome_execute还是Outcome_extra_execute(outcome_chance是决定执行outcome_execute而不是outcome_extra_execute的概率)。

在以上的例子里,如果游戏要roll额外奖励的话,简单的 random_list指令就会出场,从而决定额外奖励到底有多大。你可以用这个工具做很多很cooooooool的事——比如说一项能够降低敌国稳定度的情报行动,在某些情况下,有小概率开启一场内战。

如果你想让行动的收益总是一样的,那就让它执行outcome_extra_execute的效果,然后把outcome_chance设成0。

Outcome_potential本质上只是用来生成一个提示框,在执行情报活动之前告诉玩家预期的成果。正如你所见,跟outcome_execute的内容一模一样,用来展示玩家通过执行任务能获得的最低收益。

这一部分告诉你各个阶段是如何选择的。每个阶段都有一个基础可能性值,而你也可以见到,这个可能性值是可以用修正改变的。

一个小彩蛋,上面情报行动的图片里有一个小bug,我直到写这篇文章的时候才发现。看看你能不能发现!

在目标地区选定之前,行动阶段就已经被roll好了,所以在FROM.FROM变量里检查抵抗度基础权重的变量啥!事!也!没!做!


翻译来自牧游社(翻译:酸菜鱼 三等文官猹中堂 一水战阿部熊 子炎 黑夜龙人 北安 格拉摩根 一只走地鸡 西野鱼竿 113322qwe1 校对:斯普特尼克 三等文官猹中堂)