Building modding

ExponentManx15讨论 | 贡献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,而之前的产能是无限的(只要是整数)。