Building modding:修订间差异

(文本替换 - 替换“[[Category:”为“[[分类:”)
(汉化)
第1行: 第1行:
{{Version|1.8}}
建筑物是使用省份的民用工厂建造的结构。
A building is a structure built using Civilian factories in states or provinces.


== Buildings ==
== 建筑物 ==
{{SVersion|1.8}}
{{SVersion|1.8}}
Here is a generic building example:
以下是一个通用建筑示例:


<pre>
<pre>
<building> = {
<building> = {
    base_cost = <int>        # Cost in CIC to build.
    base_cost = <int>        # 建设成本。
    base_cost_conversion = <int>   # Cost in CIC to convert to.
    base_cost_conversion = <int>   # 要转换为该建筑的成本
    per_level_extra_cost = <int>   # Added cost per building level.
    per_level_extra_cost = <int>   # 每次升级建筑的成本。
    
    
    max_level = <int>        # The maximum level that can be built.
    max_level = <int>        # 建筑的最大等级
    value = <int>          # The base health of the building. Is multiplied by the level of the building built.
    value = <int>          # 建筑物的基本完好状态。根据所建建筑的等级。
    
    
    icon_frame = <int>        # Which icon frame in GFX_buildings_strip to use for the building.
    icon_frame = <int>        # GFX_buildings_strip 中的建筑图标。
    show_on_map = <int>       # The amount of <building> models to display on the map when one instance is built.
    show_on_map = <int>       # 当建造了一个建筑时要在地图上显示的<building>模型数量
    show_on_map_meshes = <int>    # Number of models to display.
    show_on_map_meshes = <int>    # 要显示的型号数。
    always_shown = yes        # Whether to always show the <building> model.
    always_shown = yes        # 是否始终显示<building>模型。
    has_destroyed_mesh = yes     # Whether to show destroyed mesh for building.
    has_destroyed_mesh = yes     # 是否显示建筑的破坏
    
    
    shares_slots = yes              # Determines if this building uses building slots.
    shares_slots = yes              # 确定此建筑是否使用建筑槽。
    infrastructure_construction_effect = yes   # Determines if this building benefits from infrastructure boosting construction speed.
    infrastructure_construction_effect = yes   # 确定此建筑是否受益于提高施工速度的基础设施。
    provincial = yes               # Determines if this building is a province building.
    provincial = yes               # 确定此建筑是否为省级建筑。
    damage_factor = <float>           # Modifies damage taken from bombing.
    damage_factor = <float>           # 修改轰炸造成的伤害。
    
    
    only_costal = yes        # Limits this building to only coastal provinces/states.
    only_costal = yes        # 将此建筑仅限于沿海省份/ 州。
    disabled_in_dmz = yes      # Limits this building, disabling in a DMZ state.
    disabled_in_dmz = yes      # 限制此建筑,在DMZ省份下禁用。
    
    
    infrastructure = yes       # Determines if this building is considered infrastructure.
    infrastructure = yes       # 确定是否将此建筑视为基础设施。
    air_base = yes          # Determines if this building is considered an air base.
    air_base = yes          # 确定此建筑是否被视为空军基地
    is_port = yes          # Determines if this building is considered a port.
    is_port = yes          # 确定是否将此建筑视为港口。
    anti_air = yes          # Determines if this building is considered an anti-air installation.
    anti_air = yes          # 确定是否将此建筑视为防空装置。
    refinery = yes          # Determines if this building is considered a refinery.
    refinery = yes          # 确定此建筑是否被视为炼油厂。
    radar = yes           # Determines if this building is considered a radar station.
    radar = yes           # 确定此建筑是否被视为雷达站。
    nuclear_reactor = yes      # Determines if this building is considered a nuclear reactor.
    nuclear_reactor = yes      # 确定该建筑是否被视为核反应堆。
    military_production = <float>  # Adds X amount of MIC production.
    military_production = <float>  # Adds X amount of MIC production.
    general_production = <float>   # Adds X amount of CIC production.
    general_production = <float>   # Adds X amount of CIC production.
第50行: 第49行:
</pre>
</pre>


See [[Construction]] for gameplay details regarding buildings.
有关游戏内[[Construction|建筑]]请参阅[[Construction|建筑]]


== Localization ==
== 本地化 ==
{{SVersion|1.8}}
{{SVersion|1.8}}
Buildings have the following localization:
建筑遵循以下本地化


<pre>
<pre>
第66行: 第65行:
</pre>
</pre>


== Interface ==
== 界面 ==
{{SVersion|1.8}}
{{SVersion|1.8}}
If a new building is added, the building icon strip needs to be updated to include an icon for the building. This file is found at {{path|gfx/interface/buildings/building_icon_strip.dds}}.
如果添加了新建筑,则需要更新建筑图标栏以包含该建筑的图标。此文件位于{{path|gfx/interface/buildings/building_icon_strip.dds}}.


The icon itself needs to be 46 pixels wide and high. It should be appended to the building icon strip and the '''noOfFrames''' should be changed to match the new number of icons.
图标本身需要46像素宽和高。它应该被附加到建筑图标条上,并且'''noOfFrames''' 应该被更改以匹配新的图标数量。


Here is the GFX definition for the building icon strip {{path|interface/countrystateview.gfx}}:
以下是建筑图标的GFX定义文件 {{path|interface/countrystateview.gfx}}:


<pre>
<pre>
第78行: 第77行:
    name = "GFX_buildings_strip"
    name = "GFX_buildings_strip"
    textureFile = "gfx/interface/buildings/building_icon_strip.dds"
    textureFile = "gfx/interface/buildings/building_icon_strip.dds"
    noOfFrames = 14 #increse by 1 for every modded building
    noOfFrames = 14 # 每改造一栋建筑增加1
}
}
</pre>
</pre>


== Types ==
== 建筑类型 ==
{{SVersion|1.9}}
{{SVersion|1.9}} 以下是自1.9.0 起游戏中不同类型的建筑(可以在{{path|common/buildings/00_buildings.txt}} 找到):<pre>
Here are different types of buildings in the game as of 1.9.0 (Can also be found inside {{path|common/buildings/00_buildings.txt}}): 
<pre>
buildings = {
buildings = {
    # STATE BUILDINGS
    # STATE BUILDINGS
第110行: 第107行:
}
}
</pre>
</pre>
Note that currently, factories seem to now have a capacity of 20, versus the previous unlimited capacity (as long as it was an integer).
请注意,目前,工厂的产能似乎为20,而之前的产能是无限的(只要是整数)。
{{Modding navbox}}
{{Modding navbox}}
[[分类:Modding]]
[[分类:Modding]]

2023年11月5日 (日) 11:31的版本

建筑物是使用省份的民用工厂建造的结构。

建筑物

以下是一个通用建筑示例:

<building> = {
    base_cost = <int>               # 建设成本。
    base_cost_conversion = <int>    # 要转换为该建筑的成本
    per_level_extra_cost = <int>    # 每次升级建筑的成本。
    
    max_level = <int>               # 建筑的最大等级
    value = <int>                   # 建筑物的基本完好状态。根据所建建筑的等级。
   
    icon_frame = <int>              # GFX_buildings_strip中的建筑图标。
    show_on_map = <int>             # 当建造了一个建筑时要在地图上显示的<building>模型数量 
    show_on_map_meshes = <int>      # 要显示的型号数。
    always_shown = yes              # 是否始终显示<building>模型。
    has_destroyed_mesh = yes         # 是否显示建筑的破坏
    
    shares_slots = yes                          # 确定此建筑是否使用建筑槽。
    infrastructure_construction_effect = yes    # 确定此建筑是否受益于提高施工速度的基础设施。
    provincial = yes                            # 确定此建筑是否为省级建筑。
    damage_factor = <float>                     # 修改轰炸造成的伤害。
    
    only_costal = yes               # 将此建筑仅限于沿海省份/州。
    disabled_in_dmz = yes           # 限制此建筑,在DMZ省份下禁用。
    
    infrastructure = yes            # 确定是否将此建筑视为基础设施。
    air_base = yes                  # 确定此建筑是否被视为空军基地
    is_port = yes                   # 确定是否将此建筑视为港口。
    anti_air = yes                  # 确定是否将此建筑视为防空装置。
    refinery = yes                  # 确定此建筑是否被视为炼油厂。
    radar = yes                     # 确定此建筑是否被视为雷达站。
    nuclear_reactor = yes           # 确定该建筑是否被视为核反应堆。
    military_production = <float>   # Adds X amount of MIC production.
    general_production = <float>    # Adds X amount of CIC production.
    naval_production = <float>      # Adds X amount of NIC production.
    land_fort = <int>               # Adds X amount of land fort.
    naval_fort = <int>              # Adds X amount of naval fort.
    rocket_production = <int>       # Adds X amount of rocket production.
    rocket_launch_capacity = <int>  # Adds X amount of rocket capacity.
 
    local_resources_<resource> = <int>  # Adds resources to state.
    air_defence = <float>               # Adds air defence to the state.
    nuclear_production_factor = <float> # Adds Nuke production factor to owner of state.
}

有关游戏内建筑请参阅建筑

本地化

建筑遵循以下本地化

<building>: ""
<building>_desc: ""
<building>_plural: ""
modifier_production_speed_<building>: ""
modifier_production_speed_<building>_desc: ""
modifier_production_speed_<building>_factor: ""
modifier_production_speed_<building>_factor_desc: ""

界面

如果添加了新建筑,则需要更新建筑图标栏以包含该建筑的图标。此文件位于/Hearts of Iron IV/gfx/interface/buildings/building_icon_strip.dds.

图标本身需要46像素宽和高。它应该被附加到建筑图标条上,并且noOfFrames应该被更改以匹配新的图标数量。

以下是建筑图标的GFX定义文件 /Hearts of Iron IV/interface/countrystateview.gfx:

spriteType = {
    name = "GFX_buildings_strip"
    textureFile = "gfx/interface/buildings/building_icon_strip.dds"
    noOfFrames = 14 #每改造一栋建筑增加1
}

建筑类型

以下是自1.9.0起游戏中不同类型的建筑(可以在/Hearts of Iron IV/common/buildings/00_buildings.txt找到):

buildings = {
    # STATE BUILDINGS
    infrastructure     = <int> # 0 to 10 | Sets the Infrastructure level.          (STATE)
    air_base           = <int> # 0 to 10 | Sets the Air Base level.                (STATE)
    anti_air_building  = <int> # 0 to 5  | Sets the Anti-Air level.                (STATE)
    radar_station      = <int> # 0 to 5  | Sets the Radar Station level.           (STATE)

    # SHARED BUILDINGS
    arms_factory       = <int> # 0 to 20 | Sets the Military Factory level.        (STATE)
    industrial_complex = <int> # 0 to 20 | Sets the Civilian Factory level.        (STATE)
    dockyard           = <int> # 0 to 20 | Sets the Naval Dockyard level.          (STATE)
    synthetic_refinery = <int> # 0 to 3  | Sets the Synthetic Refinery level.      (STATE)
    fuel_silo          = <int> # 0 to ∞  | Sets the Fuel Silo level.               (STATE)
    rocket_site        = <int> # 0 to 5  | Sets the Rocket Site level.             (STATE)
    nuclear_reactor    = <int> # 0 to 1  | Sets the Nuclear Reactor level.         (STATE)    

    # PROVINCE BUILDINGS
    <province id> = {
        naval_base     = <int> # 0 to 10 | Sets the Naval Base level.              (PROVINCE)
        bunker         = <int> # 0 to 10 | Sets the Land Fort level.               (PROVINCE)
        coastal_bunker = <int> # 0 to 10 | Sets the Coastal Fort level.            (PROVINCE)
    }
}

请注意,目前,工厂的产能似乎为20,而之前的产能是无限的(只要是整数)。