地區模改

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

地區(和地區歷史)定義在/Hearts of Iron IV/history/states/*.txt

一般來說每一個地區都定義在自己的文件中,儘管你也可以在一個文件中定義多個地區,因為地區id是在文件內的代碼中定義的,而不是文件名(與歐陸風雲4一樣)。

這是一個地區定義代碼的通用樣例:

state = {
    id = <id>
    name = <localization key>
    manpower = <int>
    state_category = <category>
   
    provinces = {
        <province ids>
    }
    
    resources = {
        <resource> = <int>
    }
    
    history = {
        <effects>
        
        victory_points = {
            <province id> <points>
        }
        
        buildings = {
            <building> = <amount>
            

            <province id> = {
                <building> = <amount>
            }
        }
    }
}
  • id定義了地區使用的數字id。地區id必須連續添加,否則會導致遊戲崩潰。
  • name定義了地區使用的本地化鍵值。你可以使用非本地化的字符串(例如"Paris"),但最好還是使用本地化字符串。
  • manpower定義了地區提供的人力。一般來說在荒地地區會低至10,000,在人口密集的地區會高至2,000,000。
  • state_category定義了地區類型。地區類型可以在/Hearts of Iron IV/common/state_category/*.txt中找到。
  • provinces定義了屬於這一地區的省份。
  • resources定義了地區擁有的資源類型和數量。資源可以在/Hearts of Iron IV/common/resources/*.txt中找到。
  • history定義了加載歷史文件時在地區實施的效果。一般來說,這裏使用owner = <tag>add_core_of = <tag>來添加擁有者。
  • victory_points嵌套在history中,定義地區的勝利點。多個勝利點需要多條該語句。
  • buildings嵌套在history中,定義加載歷史文件時在地區設定的建築。建築可以在/Hearts of Iron IV/common/buildings/*.txt找到。省份建築要在添加時加上屬於哪一個省份。

建築類型

See building types for different building types in the base game.

地區類型

這是原版遊戲中的地區類型及其所對應的建築槽數。

  • wasteland: 0
  • enclave: 0
  • tiny_island: 0
  • small_island: 1
  • pastoral: 1
  • rural: 2
  • town: 4
  • large_town: 5
  • city: 6
  • large_city: 8
  • metropolis: 10
  • megalopolis: 12