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

本页面所适用的版本可能已经过时,最后更新于1.5
(merge from offical wiki)
 
(文本替换 - 替换“[[Category:”为“[[分类:”)
 
(未显示1个用户的2个中间版本)
第1行: 第1行:
{{Version|1.5}}
{{Version|1.5}}
Supply area are defined in {{path|map/supplyareas/*.txt}}.
补给区域在{{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.
一般来说每一个补给区域定义在自己的文件中,尽管你也可以在同一个文件中定义多个补给区域,因为补给区域id是在文件内,而不是用文件名定义的。


Here is a generic example of a supply area:
这是一个通用的补给区域的代码样例:
<pre>
<pre>
supply_area = {
supply_area = {
第16行: 第16行:
</pre>
</pre>


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


* '''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.
*'''name''' 定义了补给区域使用的本地化键值。你也可以使用一个不本地化的字符串(例如"Paris" ),但是最好还是使用本地化字符串。


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


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


== 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.
* 当编辑补给区域时,其中包含的地区应该是相邻的。这意味着岛屿应该有自己的补给区。
* The average supply value in vanilla is 10.
* 原版游戏中补给的平均值是10。




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

2022年12月5日 (一) 16:42的最新版本

补给区域在/Hearts of Iron IV/map/supplyareas/*.txt中定义。

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

这是一个通用的补给区域的代码样例:

supply_area = {
    id = <int>
    name = <localization key>
    value = <amount>
    states = {
        <state id>
    }
}
  • id定义了补给区域的数字id。数字必须连续,否则游戏会崩溃。
  • name定义了补给区域使用的本地化键值。你也可以使用一个不本地化的字符串(例如"Paris"),但是最好还是使用本地化字符串。
  • value定义了补给区域的基础补给数量。在原版游戏中,这个值在0到16之间。
  • states定义了补给区域包含的地区。注意,一般来说补给区域包括多于一个地区。

提示

  • 当编辑补给区域时,其中包含的地区应该是相邻的。这意味着岛屿应该有自己的补给区。
  • 原版游戏中补给的平均值是10。