补给区域模改:修订间差异

本页面所适用的版本可能已经过时,最后更新于1.11
(文本替换 - 替换“[[Category:”为“[[分类:”)
无编辑摘要
第1行: 第1行:
{{Version|1.5}}
{{Version|1.11}}
补给区域在{{path|map/supplyareas/*.txt}}中定义。
'''NOTE: Supply areas are deprecated as of patch 1.11 Barbarossa/No Step Back. The following only applies to version 1.10 and before.'''


一般来说每一个补给区域定义在自己的文件中,尽管你也可以在同一个文件中定义多个补给区域,因为补给区域id是在文件内,而不是用文件名定义的。
Supply areas are defined in {{path|map/supplyareas/*.txt}}.


这是一个通用的补给区域的代码样例:
Each supply area is typically stored in it's own file, although you can store multiple supply area definitions within the same file, as the ID is defined within the supply area definition, rather than the file title.
 
Here is a generic example of a supply area:
<pre>
<pre>
supply_area = {
supply_area = {
第16行: 第18行:
</pre>
</pre>


*'''id''' 定义了补给区域的数字id。数字必须连续,否则游戏会崩溃。
* '''id''' defines the numerical id used by the supply area. The supply area IDs must be added sequentially, skipping numbers will cause crashes.


*'''name''' 定义了补给区域使用的本地化键值。你也可以使用一个不本地化的字符串(例如"Paris" ),但是最好还是使用本地化字符串。
* '''name''' defines the localization key the supply area uses. You can use a non-localized string (i.e. "Paris"), but it is best practice to use localized strings.


*'''value''' 定义了补给区域的基础补给数量。在原版游戏中,这个值在0到16之间。
* '''value''' defines the amount of base supply the supply area grants. In vanilla, the supply varies from 0 to 16.


*'''states''' 定义了补给区域包含的地区。注意,一般来说补给区域包括多于一个地区。
* '''states''' scope defines which states the supply area covers. Note that supply areas should normally cover more than one state.


== 提示 ==
== Tips ==
{{SVersion|1.5}}
{{SVersion|1.5}}
* 当编辑补给区域时,其中包含的地区应该是相邻的。这意味着岛屿应该有自己的补给区。
* When placing supply areas, the states they are compose of should be contiguous. This means islands should have their own supply areas.
* 原版游戏中补给的平均值是10。
* The average supply value in vanilla is 10.




{{Modding navbox}}
{{Modding navbox}}
[[ 分类:Modding]]
[[Category:Modding]]

2024年8月5日 (一) 23:55的版本

NOTE: Supply areas are deprecated as of patch 1.11 Barbarossa/No Step Back. The following only applies to version 1.10 and before.

Supply areas are defined in /Hearts of Iron IV/map/supplyareas/*.txt.

Each supply area is typically stored in it's own file, although you can store multiple supply area definitions within the same file, as the ID is defined within the supply area definition, rather than the file title.

Here is a generic example of a supply area:

supply_area = {
    id = <int>
    name = <localization key>
    value = <amount>
    states = {
        <state id>
    }
}
  • id defines the numerical id used by the supply area. The supply area IDs must be added sequentially, skipping numbers will cause crashes.
  • name defines the localization key the supply area uses. You can use a non-localized string (i.e. "Paris"), but it is best practice to use localized strings.
  • value defines the amount of base supply the supply area grants. In vanilla, the supply varies from 0 to 16.
  • states scope defines which states the supply area covers. Note that supply areas should normally cover more than one state.

Tips

  • When placing supply areas, the states they are compose of should be contiguous. This means islands should have their own supply areas.
  • The average supply value in vanilla is 10.