Resources
这部分内容可能已不适合当前版本,最后更新于1.9。 |
游戏中用到的资源可以在/Hearts of Iron IV/common/resources/00_resources.txt中找到。
资源文件遵循以下格式:
resources = { <resource> = { icon_frame = <frame> cic = <float> convoys = <float> } }
Icon frame
这部分内容可能已不适合当前版本,最后更新于1.7。 |
Icon frame controls which frame from the resource image strip is used for the resource icon. A 'frame' is the 27 by 27 pixel square the icon occupies in the image.
The resource image strip is defined by the GFX_resources_strip spritetype, which points to /Hearts of Iron IV/gfx/interface/resources_strip.dds by default. By default 1 will refer to the Oil icon, 2 to Aluminium, etc.
For the resources to have their own icons you must make a .gfx
file and place it in the /Hearts of Iron IV/gfx/interface/. After this is made in the .gfx
file you must define a sprite and number of icons. For example:
spriteType = { name = "GFX_resources_strip" texturefile = "gfx/interface/resources_strip.dds" noOfFrames = X #X being the number of resources you have, } spriteType = { name = "GFX_missing_resources_strip" texturefile = "gfx/interface/missing_resources_strip.dds" noOfFrames = X } }
CIC
这部分内容可能已不适合当前版本,最后更新于1.5。 |
CIC defines the amount of resources needed to trade for 1 Civilian Factory. By default, this is 0.125, meaning 8 units of that resource are traded for 1 factory.
Convoys
这部分内容可能已不适合当前版本,最后更新于1.5。 |
Convoys controls the maximum amount of this resource a single convoy carries. By default, this is 0.1, meaning a convoy can carry 10 of the resource.
Localization
这部分内容可能已不适合当前版本,最后更新于1.9。 |
Resources use the following localization keys:
PRODUCTION_MATERIAL_<RESOURCE>:0 "Name of resource" <resource>_desc:0 "Description of resource"
Interface
这部分内容可能已不适合当前版本,最后更新于1.5。 |
If implementing different resources, you will need to edit the interface so the game understands how to display the new resource. /Hearts of Iron IV/interface/countryproductionlineview.gui is the relevant file here.
Each resource is utilised two GUI elements: <resource>_icon and <resource>_value, which are found under the resources windowtype.
buttonType = { name = "<resource>_icon" position = { x=0 y=2 } spriteType = "GFX_resources_strip" frame = 1 # Which icon is used from the spriteType image referred to above. } instantTextboxType = { name = "<resource>_value" position = { x = 31 y = 5 } textureFile = "" font = "hoi_18mbs" borderSize = {x = 0 y = 0} text = "999" maxWidth = 50 maxHeight = 20 format = left }
文档 | 效果 • 条件 • 定义 • 修正 • 修正列表 • 作用域 • 本地化 • 行动 • Data structures (Flags, Event targets, Country tag aliases, Variables, Arrays) |
编写脚本 | AI • AI focuses • Autonomous states • Balances of power • 剧本 • 建筑 • Characters and traits • Cosmetic tags • 国家 • 师 • 决议 • 装备 • 事件 • 内阁/民族精神 • 意识形态 • 国策 • 资源 • Scripted GUI • 科技 • 单位 |
地图 | 地图 • 地区 • 补给区域 • 战略区域 |
图形图像 | 界面 • 图形资产 • 实体 • 后特效 • 离子效果 • 字体 |
装饰性 | 肖像 • 命名列表 • 音乐 • 音效 |
其他 | 控制台指令 • 故障排除 • 模组结构 • 成就代码分析 |