小 (→Categories) |
|||
第6行: | 第6行: | ||
*添加本地化 | *添加本地化 | ||
== | == 类别Categories== | ||
创意可以分为三大类,即民族精神、设计产商和部长,每一类通常都扮演着不同的角色。 | |||
你也可以通过在你的mod的common/idea_tags 文件夹中添加一个自定义文件来添加你自己的“类别”(创意类别)。 | |||
所有类别将包含在“idea_categories”顶部元素(文件夹)中,并将包含: | |||
* | * 最多6个插槽;每个插槽将包含一个创意(内阁) | ||
* | * 把创意(内阁)装配到插槽时将支付的费用(通常是PP) | ||
* | * 从插槽中销去已装配的创意时将支付的移除费用 | ||
实例如下 | |||
<pre> | <pre> | ||
第26行: | 第26行: | ||
} | } | ||
} | } | ||
</pre> | </pre> 然后,创意将会通过插槽(若该插槽允许把创意映射到类别)调用类别<pre> | ||
<pre> | |||
ideas = { | ideas = { | ||
$slot= { | $slot= { | ||
第41行: | 第37行: | ||
</pre> | </pre> | ||
小结,在UI(用户界面)中: | |||
* | * 类别将在政治窗口中产生新的一行 | ||
* | * 插槽将成为新的类别之元素内的一个元素 | ||
* | * 创意将可作为可选项中的一个项装配到这个插槽上 | ||
=== | === 隐式创意Hidden Ideas=== | ||
隐藏的思想是一种特殊的民族精神,如果你想给一个国家一个隐藏的修饰语,可以使用它。 | |||
例如,如果您希望由于不可预见的后果而秘密减少某个国家的可招募pop,您可以这样做(在country={} 括号下): | |||
hidden_ideas = { | hidden_ideas = { | ||
XXX_hidden_problem = { | XXX_hidden_problem = { | ||
第56行: | 第54行: | ||
} | } | ||
== | == 绑定Allowed== | ||
“绑定”决定了一个国家是否有这种想法。对于部长和设计产商来说尤其重要,因为不放置绑定标签将意味着游戏中的每个国家都可以访问该设计产商或部长。对于大多数部长和设计产商来说,original_tag=XXX 通常就足够了,因为您希望一个国家(以及可能的内战)能够访问该部长或设计产商。 | |||
allowed = { original_tag = DEN } | allowed = { original_tag = DEN } | ||
== | == 内战绑定Allowed Civil War== | ||
绑定的一种变体,用于确定在内战期间是否可以将一个创意转移到叛乱国家。这主要有助于确保如果一个民主国家发生了共产主义叛乱,那么民主的那一半人不会保留任何给这个国家带来共产主义的思想: | |||
allowed_civil_war = { has_government = communism } | allowed_civil_war = { has_government = communism } | ||
== | == 可用Available== | ||
可用性表示一个国家是否可以选择它。如果某个国家不符合“可用”下详述的要求,则您将无法选择该国家(如果是部长/ 设计产商),或者该创意将被取消(国家精神)。 | |||
例如,若你想要一个创意,你只能在和平的时候选择: | |||
available = { has_war = no } | available = { has_war = no } | ||
== | == 可见Visible== | ||
例如,民主政府要看到这个创意: | |||
visible = { has_government = democratic } | visible = { has_government = democratic } | ||
== | == 取消Cancel== | ||
取消确定在满足某些条件时是否取消某个创意。 | |||
如果你不希望你的国家在获得自由后继续有“添加自治”的创意,这是为你准备的: | |||
cancel = { has_autonomy_level = free } | cancel = { has_autonomy_level = free } | ||
2021年9月27日 (一) 01:43的版本
快速检查单
- 在/Hearts of Iron IV/common/ideas创建一个文件
- 添加本地化
类别Categories
创意可以分为三大类,即民族精神、设计产商和部长,每一类通常都扮演着不同的角色。
你也可以通过在你的mod的common/idea_tags文件夹中添加一个自定义文件来添加你自己的“类别”(创意类别)。
所有类别将包含在“idea_categories”顶部元素(文件夹)中,并将包含:
- 最多6个插槽;每个插槽将包含一个创意(内阁)
- 把创意(内阁)装配到插槽时将支付的费用(通常是PP)
- 从插槽中销去已装配的创意时将支付的移除费用
实例如下
idea_categories = { $category { slot = $slot cost = 30 removal_cost = 10 } }
然后,创意将会通过插槽(若该插槽允许把创意映射到类别)调用类别
ideas = {
$slot= { $idea = { picture = $picture traits = { $trait } } }}
小结,在UI(用户界面)中:
- 类别将在政治窗口中产生新的一行
- 插槽将成为新的类别之元素内的一个元素
- 创意将可作为可选项中的一个项装配到这个插槽上
隐式创意Hidden Ideas
隐藏的思想是一种特殊的民族精神,如果你想给一个国家一个隐藏的修饰语,可以使用它。
例如,如果您希望由于不可预见的后果而秘密减少某个国家的可招募pop,您可以这样做(在country={}括号下):
hidden_ideas = { XXX_hidden_problem = { modifier = { conscription = -0.01 # Reduces recruitable manpower by 1% } } }
绑定Allowed
“绑定”决定了一个国家是否有这种想法。对于部长和设计产商来说尤其重要,因为不放置绑定标签将意味着游戏中的每个国家都可以访问该设计产商或部长。对于大多数部长和设计产商来说,original_tag=XXX通常就足够了,因为您希望一个国家(以及可能的内战)能够访问该部长或设计产商。
allowed = { original_tag = DEN }
内战绑定Allowed Civil War
绑定的一种变体,用于确定在内战期间是否可以将一个创意转移到叛乱国家。这主要有助于确保如果一个民主国家发生了共产主义叛乱,那么民主的那一半人不会保留任何给这个国家带来共产主义的思想:
allowed_civil_war = { has_government = communism }
可用Available
可用性表示一个国家是否可以选择它。如果某个国家不符合“可用”下详述的要求,则您将无法选择该国家(如果是部长/设计产商),或者该创意将被取消(国家精神)。
例如,若你想要一个创意,你只能在和平的时候选择:
available = { has_war = no }
可见Visible
例如,民主政府要看到这个创意:
visible = { has_government = democratic }
取消Cancel
取消确定在满足某些条件时是否取消某个创意。
如果你不希望你的国家在获得自由后继续有“添加自治”的创意,这是为你准备的:
cancel = { has_autonomy_level = free }
Picture
Format
Remember that file format needs to be either TGA or DDS. More details on Image file formats section
About sizes:
- National Spirits should be 60 x 68
- Designers should be 64 x 64
- Ministers should be 65 x 67
Declaration
The 'picture' attribute is used to identify a SpriteType to use. Each spriteType must be declared inside the spriteTypes top element in a .gfx file contained in your mod in the inferface/ root folder.
For this declaration :
- name will be referenced in ideas for usage
- texturefile points to the dds file in your mod
spriteTypes = { spriteType = { name = "GFX_idea_$pictureName" texturefile = "gfx/interface/ideas/$fileName.dds" } }
Note that : pictureName and fileName may be different
Usage
Once declared correctly, you may reference, with the 'picture' attribute, within your idea.
Important note : The GFX_idea prefix is used internally by the game engine. So your reference must be on $pictureName only. For the previous case, that would be '$pictureName' and not 'GFX_idea_$pictureName'
An exemple below
$ideaName = { picture = $pictureName traits = { communist_revolutionary } ai_will_do = { factor = 0 } }
Ledger
This is only needed for theorists and high command ideas so that they appear under the correlating intel ledgers. Options include: army, navy, and air.
ledger = army
Modifiers
Modifiers add modifier's to the country that has them, they can be positive or negative. Modifiers are listed one after another in a modifier's bracket. Here's an example of an idea that would increase a country's Recruitable Population as well as lowering its factory output:
modifier = { conscription = 0.1 #Adds 10% recruitable pop industrial_capacity_factory = -0.05 #Reduces factory output by 5% }
Equipment Bonus
Similar to a modifier, equipment bonuses add or subtract values related to specific equipment. For example, if you wanted to make your subs have more attack at the expense of your capital ships you could do this:
equipment_bonus = { capital_ship = { attack = -0.1 # Reduces capital ship attack by 10% } submarine = { attack = 0.25 # Increases submarine attack by 25% instant = yes } }
With instant=yes the bonus is applied to all equipment immediately, and with "instant=no" (or without this option) only equipments researched after this effect will get the bonus
Research Bonus
Determines if the idea gives you any research bonuses. If I wanted to give land doctrine research time reduction, I could do so like this:
research_bonus = { land_doctrine = 0.1 } #Gives a 10% reduction to land doctrine research time
You can also make it take longer to research something instead by making the number negative instead. (-0.1 would make it take 10% longer instead)
Traits
Generally used for designers and ministers, traits determines what name appears under the minister/designer, (e.g Fast Tank Manufacturer or Fascist Demagogue) and can also give modifiers/equipment bonuses to a country. To check what trait gives, look at the 00_traits file located in common/country_leader, again, make sure to create your own file if you wish to create your own traits. Ideas can have multiple traits, but the names may not fit correctly due to how they are formatted. If I wanted to create a communist revolutionary I would do so like this:
traits = { communist_revolutionary }
On Add
Sometimes you want an effect to occur the instant that you pick an idea. To do this, you use on_add followed by what you want to happen. Be warned, this effect will happen every time that you pick the idea, so if you don't want something to happen each time you pick an idea, be sure to build in a flag, variable or some-such countermeasure to ensure that a player cannot infinitely cause the effect to occur. Below is an example of how an idea can add rubber to synthetic factories when it is picked:
on_add = { if = { limit = { NOT = { has_country_flag = chosen_idea } } modify_building_resources = { building = synthetic_refinery resource = rubber amount = 2 } set_country_flag = chosen_idea } }
Cost
Determines how much an idea costs, default is 150pp. An idea that you can get for free looks like this:
cost = 0
Removal Cost
A rarely used stat that determines how much political power it costs to remove an idea.
removal_cost = 150
Designer
Unlike other ideas, designers need to be designated as such.
XXX_generic_designer = { designer = yes }
AI Will Do
Determines if an AI will pick an idea, the higher the value the more likely they are to do so. A value of 0 means that they will never pick an idea.
ai_will_do = { factor = 0 }
Full Idea Example
An example of an idea that uses as many things as possible:
XXX_example_idea = { designer = no picture = generic_coastal_navy cost = 200 removal_cost = 1000 available = { has_government = fascism } allowed = { has_war = yes } allowed_civil_war = { always = yes } on_add = { if = { limit = { NOT = { has_country_flag = chosen_idea } } modify_building_resources = { building = synthetic_refinery resource = rubber amount = 2 } set_country_flag = chosen_idea } } modifier = { license_armor_purchase_cost = -0.5 } research_bonus = { land_doctrine = -0.05 } equipment_bonus = { capital_ship = { attack = 0.1 } screen_ship = { sub_detection = 0.1 build_cost_ic = -0.1 } submarine = { sub_visibility = -0.1 } } traits = { fascist_demagogue } ai_will_do = { factor = 1 } }
Implementing An Idea
Ideas can be added to a country in different ways, depending on the type of idea and the intent behind adding it. Ministers and designers will be added automatically based upon their "allowed" area. National spirits can be added in the country's history file, which will add it upon loading, through a national focus, or through an event. There are a couple of ways to add or remove ideas from a nation.
Add Idea
You can add an idea to a country by using the following line:
add_ideas = example_idea
Remove Idea
You can remove an idea from a country by using the following line:
remove_ideas = example_idea
Swap Ideas
Sometimes you want to switch out one idea for another. If the swapped ideas have the same localization name, the game will assume that you are modifying that idea rather than replacing one with another. Here's an example of how to swap ideas:
swap_ideas = { remove_idea = example_idea1 add_idea = example_idea2 }
文件 | 效果 • 条件 • 定义 • 修正 • 修正列表 • 作用域 • 本地化 • on action • 数据结构 (标记, 临时标记, 国家别名, 变量, 数组) |
脚本 | 成就修改 • AI修改 • AI focuses • 自治领修改 • 权力平衡修改 • 剧本/标签 (游戏规则)• 建筑修改 • 人物修改 • 修饰性TAG修改 • 国家创建 • 军队修改 • 决议制作 • 装备修改 • 事件修改 • Idea修改 • 意识形态修改 • 军工商修改 • 国策制作 • 资源修改 • Scripted GUI • 科技制作 • 单位修改 |
地图 | 地图 • 省份 • 补给区域 • 战略区域 |
图形图像 | 界面 • 图形资产 • 实体模型 • 后期特效 • 离子效果 • 字体 |
装饰性 | 肖像 • 命名列表 • 音乐 • 音效 |
其他 | 控制台指令 • 故障排除 • 模组结构 • 成就代码分析 • Mod相关 • Nudger修改 |