Equipment
File:Ambox outdated info.png | 这部分内容可能已不适合当前版本,最后更新于1.4。 |
Equipment is found in /Hearts of Iron IV/common/units/equipment/*.txt. Equipment is split into two types, archetype and regular. Archetype equipment is used to assign more general attributes that regular equipment then inherits via the archetype attribute.
Archetype equipment follows the following format:
equipments = { <equipment> = { year = <int> # Limits the equipment from appearing before the specified year. Optional picture = <name> # GFX reference used to define equipment picture in land-lease is_archetype = yes # Specifies an entry as an archetype entry. All non-archetype entries inherit is_buildable = no # Prevents this equipment from being built. active = yes # Determines if this equipment is available without unlocking from a technology. type = <type> # Internal type: what kind of unit can use this equipment group_by = <group> # How the equipment is grouped in the production screen interface_category = <type> # Which category the equipment appears in the production screen # Resources used to build this equipment resources = { <resource> = <amount> } # Modifiers the equipment uses <modifiers> } }
Regular equipment follows the following format:
equipments = { <equipment> = { year = <int> # Limits the equipment from appearing before the specified year. Optional active = yes # Determines if this equipment is available without unlocking from a technology. archetype = <equipment> # Which archetype equipment this equipment inherits from. parent = <equipment> # Which equipment is parent to this equipment (i.e. which does it supercede) priority = <int> # Priority for usage over other equipment. visual_level = <int> # Image priority in production screen # Resources used to build this equipment resources = { <resource> = <amount> } # Modifiers the equipment uses <modifiers> } }
Internal Types
- infantry
- support
- artillery
- anti_tank
- anti_air
- motorized
- mechanized
- armor
- fighter
- cas
- naval_bomber
- interceptor
- suicide
- tactical_bomber
- strategic_bomber
- air_transport
- missile
- submarine
- screen_ship
- capital_ship
- carrier
Group By types
- archetype
- type
Interface Categories
- interface_category_land
- interface_category_armor
- interface_category_capital_ships
- interface_category_screen_ships
- interface_category_other_ships
- interface_category_air
Stats
Equipment uses modifiers to determine which stats it confers to its assigned unit.
Typically an equipment will include the following:
build_cost_ic = <float> lend_lease_cost = <float> reliability = <float> maximum_speed = <float> defense = <float> breakthrough = <float> hardness = <float> armor_value = <float> soft_attack = <float> hard_attack = <float> ap_attack = <float> air_attack = <float>
Note that the default maximum_speed is 4, so you don't need to include it when you want equipment to confer the default maximum_speed.
Modifiers
The following list is all the valid modifiers for use in equipment (and units):
Base
max_organisation = 20 # Organization - Organization indicates combat readiness and how organized a unit is. A unit with no organisation can't fight or move effectively. reliability = 0.9 # Reliability - The lower the reliability, the more likely the equipment will suffer random failure weight = 0.1 # Weight - How much the unit will weigh. Heavier units will require more transports to ship and perform invasions effectively. maximum_speed = 4 # Max Speed - How quickly this unit can traverse terrain under optimal circumtances, in kilometres per hour supply_consumption = 0.02 # Supply use - How much supply a unit consumes per day default_morale = 0.3 # Recovery Rate - How much extra organisation can be regained hourly when not in combat combat_width = 0.5
Costs
lend_lease_cost = 1 # Space taken up in convoy build_cost_ic = 0.4 # Production Cost - How much factory output this piece of equipment needs manpower = 300 # Manpower - Cost in manpower to produce training_time = 120 # Training time - Time in days to train this unit
Offensive
# Offensive attack = 0.1 # Firepower - Amount of damage done per attack soft_attack = -0.1 # Soft Attack - How many attacks the unit can make versus enemies with low hardness hard_attack = -0.5 # Hard Attack - How many attacks the unit can make versus enemies with high hardness air_attack = 1 # Air Attack - How much damage we can do against airplanes. High Air Attack also helps to counter enemy Air Superiority effects ap_attack = 1 # Piercing - Having equal or greater Piercing to the targets Armor value allows you to do more damage. breakthrough = 0.5 # Breakthrough - How many enemy attacks a unit can attempt to avoid while on the offensive, effectively allowing it to stay on the offense longer.
Defensive
# Defensive defense = 0.1 # Defense - How many enemy attacks a unit can avoid whilst on the defensive, effectively allowing it to stay on the defensive longer. max_strength = 2 # HP - Strength represents how much damage this unit can suffer before it is destroyed armor_value = 0 # Armor - Armor that is higher than the opponents Piercing value reduces damage taken and allows more attacks to occur hardness = 0.5 # Hardness - Represents how much of your divsion is made up of armoured vehicles. High Hardness = High Hard Attacks, Low Soft Attack entrenchment = 5 # Entrenchment - The ability to make proper defensive entrenchments before a hostile attack
Unique
movement = 0.1 # Movement - Changes the unit's speed experience_loss_factor = 0.1 # Exp. Loss - How much experience is lost in a division when they take casualities and have to replace them casualty_trickleback = 0.2 # Trickleback - The proportion of losses in combat that can be saved and returned to the manpower pool suppression_factor = 0.1 # Suppression bonus - Ability to supress local resistance equipment_capture_factor = 0.1 # Ratio of equipment to be captured from an enemy division after battle win reliability_factor = 0.05 # Reliability - Applies to an equipment type's reliability and reduces the chance of breakdowns and accidents recon = 1 # Reconnaissance - Increases the chance that this unit can pick better tactics in battle initiative = 0.2 # Initiative - The higher the initiative, the quicker it can reinforce into battle, and the quick is completes its planning
Boolean
can_be_parachuted = yes # May be parachuted into battle can_license = no # Can be licesed is_convertable = yes # Can be converted carrier_capable = yes # Is usable in carriers (air only)
naval_speed = 28 # Max Speed - maximum speed in kilometres per hour of the ship, higher means faster in combat too fire_range = 32 # Fire Range - The range of the ship's main guns torpedo_attack = 1 # Torpedo attack - How much damage we can do when using the ship's torpedos anti_air_attack = 5 # Anti-air - How much anti-air firepower the ship carries for shooting down enemy planes shore_bombardment = 8 # Shore Bombard - A unit's ability to do shore bombardment to help out in land battles neighbouring its sea province when on Hold mission evasion = 15 # Evasion - Ability for ships to evade enemy fire through maneuvering. Evasion is checked against enemy evasion, so high evasion improves hits against high evasion targets surface_detection = 12 # Surface detection - Ability to detect surface vessels sub_detection = 5 # Sub detection - Ability to detect submarines surface_visibility = 25 # Surface Visibility - How hard to find this ship is sub_visibility = 20 # Sub Visibility - How easy it is to detect this submarine naval_range = 3000 # Naval Range - max distance in kilometres the ship can travel from it's nearest Naval Base port_capacity_usage = 1 # Port capacity usage - How much room the ship requires in port search_and_destroy_coordination = 0.1 convoy_raiding_coordination = 0.1
Air-specific
air_attack = 50 # Air Attack - amount of damage done against other planes air_defence = 50 # Air Defence - how many hits a plane takes before being shot down air_range = 500 # Range - How far away missions the plane can perform air_agility = 10 # Agility - How agile a plane is. Agility effects how easy it is to hit another plane, and avoid being hit air_bombing = 300 # Strategic Bombing - how good the plane is at bombing air_superiority = 1 # Air Superiority - How much the plane helps the overall air superiority of a strategic area naval_strike_attack = 1.5 # Naval Attack - how much damage the plane does against ships naval_strike_targetting = 0.5 # Naval Targeting - how likely the plane is to hit a ship carrier_size = 0.05 default_carrier_composition_weight = 1
Localization
Each equipment must be localized in a .yml file in the localisation folder within your mod.
<equipment>: "" <equipment>_desc: "" <equipment>_short: ""
For country-specific localization, prefix with the tag:
<tag>_<equipment>: "" <tag>_<equipment>_desc: "" <tag>_<equipment>_short: ""
文件 | 效果 • 条件 • 定义 • 修正 • 修正列表 • 作用域 • 本地化 • on action • 数据结构 (标记, 临时标记, 国家别名, 变量, 数组) |
脚本 | 成就修改 • AI修改 • AI focuses • 自治领修改 • 权力平衡修改 • 剧本/标签 (游戏规则)• 建筑修改 • 人物修改 • 修饰性TAG修改 • 国家创建 • 军队修改 • 决议制作 • 装备修改 • 事件修改 • Idea修改 • 意识形态修改 • 军工商修改 • 国策制作 • 资源修改 • Scripted GUI • 科技制作 • 单位修改 |
地图 | 地图 • 省份 • 补给区域 • 战略区域 |
图形图像 | 界面 • 图形资产 • 实体模型 • 后期特效 • 离子效果 • 字体 |
装饰性 | 肖像 • 命名列表 • 音乐 • 音效 |
其他 | 控制台指令 • 故障排除 • 模组结构 • 成就代码分析 • Mod相关 • Nudger修改 |