Strategic region modding

本页面所适用的版本可能已经过时,最后更新于1.5
Katty von Keksburg讨论 | 贡献2022年12月5日 (一) 15:25的版本 (文本替换 - 替换“[[Category:”为“[[分类:”)

战略区域/Hearts of Iron IV/map/strategicregions/*.txt中定义。

一般来说每一个战略区域定义在自己的文件中,尽管你也可以在同一个文件中定义多个战略区域,因为战略区域id是在文件内,而不是用文件名定义的。

这是一个通用的战略区域的代码样例:

strategic region = {
    id = <int>
    name = <localization key>
    
    provinces = {
        <province ids>
    }
    
    weather = {
        period = {
            between = { <min> <max> }
            temperature = { <min> <max> }
            temperature_day_night = { <day> <night> }
            no_phenomenon = <weight>
            rain_light = <weight>
            rain_heavy = <weight>
            snow = <weight>
            blizzard = <weight>
            mud = <weight>
            sandstorm = <weight>
            min_snow_level = <amount>
        }
    }
}
  • id定义了战略区域的数字id。数字必须连续,否则游戏会崩溃。
  • name定义了战略区域使用的本地化键值。你也可以使用一个不本地化的字符串(例如"Paris"),但是最好还是使用本地化字符串。
  • provinces定义了战略地区包括的省份。
  • weather定义了战略区域包括的省份的天气数据。

天气

Each strategic region has a weather scope that determines how the weather changes for provinces within it.

Each weather system is defined within a period scope within the weather scope.

  • between scope determines when the weather system occurs, the notation is day.month day.month, i.e. 0.0 30.0 means the weather system occurs between the 1st of January and the 31st, including these days. Note that the first day and the first month are marked as 0, not as 1.
  • temperature scope determines the minimum and maximum temperature for the weather system.
  • temperature_day_night scope determines the minimum and maximum temperature variability during day and night for the weather system.
  • min_snow_level scope determines the minimum amount of snow that is always present in the weather system. Typically only used for areas with year-round snow.

Each of the weather states are given a weight, determining how likely the state will occur within the weather system. The weather states can be found in /Hearts of Iron IV/common/weather.txt.

建议

  • 在放置战略区域时,省份通常都是相邻的。这就意味着岛屿一般属于海洋战略区域。