Strategic region modding

本頁面所適用的版本可能已經過時,最後更新於1.5

戰略區域/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.

建議

  • 在放置戰略區域時,省份通常都是相鄰的。這就意味著島嶼一般屬於海洋戰略區域。