创建国家:修订间差异

本页面所适用的版本可能已经过时,最后更新于1.8
→‎旗帜:​ 翻译完成
(汉化了一小部分)
 
(未显示5个用户的17个中间版本)
第1行: 第1行:
{{Version|1.8}}
{{Version|1.8}}
 这个页 你掌握 [[Mod_structure|创建一个模组]]的基本知识 。该页面主要聚焦于帮助模组作者更好地理解如何在某些特定方面编辑一个国家
 这个 包括了 已经 掌握 基础的[[Mod_structure|创建一个模组]]的基本知识 ,就可以学习接下来的进阶内容


== 快速 检查单 ==
== 快速 制作 ==
{{SVersion|1.8}}
{{SVersion|1.8}}
 如果你想在模组中创建一个新国家,可以参考以下快速 检查单
 如果你想在模组中创建一个新国家,可以参考以下快速 制作教程
*定义一个独 的三字符国家tag。
*定义一个独 一无二 的三 英文 字符国家tag。
*在''<yourmod>/common/countries''中新建文件。
*在''< 你的模组>/common/countries''中新建文件。
*在''<yourmod>/history/countries''中新建文件。
*在''< 你的模组>/history/countries''中新建文件。
*在''<yourmod>/localisations''中增加本地化。
*在''< 你的模组>/localisations''中增加本地化。
*在''<yourmod>/gfx/flags''中为每一种意识形态添加一个大,中,小号的旗帜。
*在''< 你的模组>/gfx/flags''中为每一种意识形态添加一个大,中,小号的旗帜。
*可选:在''<yourmod>/history/units''中创建OOB文件。
*可选:在''< 你的模组>/history/units''中创建OOB文件。
*可选:把国家加入到游戏中。
*可选:把国家加入到游戏中。


== 国 家tag ==
== 国 家标签——tag ==
{{SVersion|Timeless}}
{{SVersion|Timeless}}
Countries need a 3-character country tag. This is how a country is referred to in all of the game's script. All country tags must be unique. A country must not share a tag with any other country.
每个国家都要一个三英文字符的tag,这是你在你的模组中唯一指定国家的内容。所有国家的TAG都得是独一无二的并且为三个大写英文字母. 任何国家都不能跟别的国家有一样的TAG


To create a tag, add a new file to ''<yourmod>/common/country_tags'' (or edit an existing file) and add something like the following:
要建立一个新TAG,就往''< 你的模组>/common/country_tags'' ( 或者把原有的文件改了) 添加新信息并且再写上像这样的东西:
  SCO = "countries/Scotland.txt"
  SCO = "countries/Scotland.txt"
where
如上所示。在这里,SCO的地方必须为三大写英文字母,而在后面的txt则可以是任意长度的大写小写,但不能有中文。
  countries/Scotland.txt
 
is address of the country file that will be created/edited, located in ''<yourmod>/common/countries''
  你想创建或者改动国家标签的文件位于''< 你的模组>/common/countries''


== 国家文件 ==
== 国家文件 ==
{{SVersion|1.8}}
{{SVersion|1.8}}


Create a new file in the ''<yourmod>/common/countries'' folder. It is recommended one copies the file of a very similar country, then rename and edit it.
''< 你的模组>/common/countries'' 文件夹中创建一个新的文件. 建议复制一个原版中的国家的文件来再改成你要的。


===  文化 ===
===  单位模型 ===


Defines the set of graphics used for units. For Scotland this would be:
在这里设置设置国家单位模型。比如苏格兰是:


  graphical_culture = commonwealth_gfx
  graphical_culture = commonwealth_gfx
第37行: 第37行:
=== 颜色 ===
=== 颜色 ===


This is the country's colour on the political map mode. It uses the [[Wikipedia:RGB color model|RGB color scale]].
这里设置的是国家在地图上的颜色。 它使用 [[wikipedia:RGB color model|RGB 色阶]]


  color = { 2  10  222 }
  color = { 2  10  222 }
第43行: 第43行:
=== colors.txt ===
=== colors.txt ===


Also, make sure that you add the country's color to ''<yourmod>/common/countries/colors.txt'':
确保国家颜色被写入了''< 你的模组>/common/countries/colors.txt'':


  SCO = {
  SCO = {
第50行: 第50行:
  }
  }


`color_ui` usually is a more intense version of the normal color. It is used to render the borders of the country (If borders look ugly, make sure you have done this right). Colors may also be specified in [[Wikipedia:HSL and HSV|HSV format]].
`color_ui` 通常是比该国家普通颜色更深的色彩,因为这是用于涂边界的 ( 如果边界看起来很丑,那就再看看你文件有没写错). 颜色也能用 [[Wikipedia:HSL and HSV|HSV 形式]] 写指定


==国家历史==
==国家历史==
{{SVersion|1.8}}
{{SVersion|1.8}}


Create a file in the <yourmod>/history/countries folder. Alternatively, copy, rename, and edit a similar file. The file name should be <country tag - country name>, e.g. "SCO - Scotland". This file contains information about the history and various other default attributes of the country.
< 你的模组>/history/countries> 文件夹中创建该文件. 或者复制个原版中国家的文件,重命名并更改为你的。文件名应该是< 该国tag - 该国名字>, 比如"SCO - Scotland". 这个文件包含了该国家的历史以及默认属性


===首都===
===首都===
Defines the capital city. Use the State ID of the state that contains the capital, not the province ID. In this case, 121 is Lothrian State, which contains Edinburgh.
在这写入国家首都. 要用地区ID(state)而非省份(province)ID指定首都. 这样的话,121是洛锡安地区,包含爱丁堡
  capital = 121
  capital = 121


===战斗 顺序===
===战斗 部署===
This line will link to the 'Order of Battle' (OoB) file which will define the amount and location of units, their experience and equipment level, and also Air Wings the country has at the start. Starting production and unit templates are also defined there. All countries need an OoB link, but if the country is to be released one doesn't need to add one later on.
这些文件会被链接到'Order of Battle' (OoB) 记录了部队数量和位置、经验及装备状况, 还有开局国家拥有的空军联队。开始时的生产状况及部队编制也被记录在那儿。每个国家都需要链接到OoB, 不过如果那个国家将在之后被吞并那么就别给他写OoB文件了
  oob = "SCO_1936"
  oob = "SCO_1936"
For ease of use, naval units are normally put into separate OOB. Also, due to significant changes made to naval units in the 'Man the Guns' DLC, countries normally use 2 separate naval OOBs, one for owners of the mentioned DLC, and one for those who don't own it, and have to use the old ship system (OOB usually distinquished by a _legacy suffix)
为了方便调用, 海军通常被编入单独的OoB. 另外,因为' 炮手就位' DLC 对海军改动很大, 一个国家通常都有两个独立的海军OoB, 一个就是为了给那个DLC的, 另一个就是给没买那个DLC的人, 使用旧的海军系统(OOB 通常以a _legacy 为后缀区分)
<pre>
<pre>
if = {
if = {
第75行: 第75行:
</pre>
</pre>
===科研槽===
===科研槽===
Defines the amount of research slots a country has access to at the start. Normally, major powers have 4 slots, minor countries in North America and Europe have 3 and minor countries in the rest of the world have 2. Defaults to 2 slots, if not specified.
写入开局时国家的科研槽数量。一般大国有4个,北美和欧洲的小国有两个,其他地方的小国也是两个。如果不写就默认是两个
  set_research_slots = 3
  set_research_slots = 3


===稳定度===
===稳定度===
Defines the stability percentage that a country will have at the start of the game. The number that is put here will be multiplied by 100 when applied to the country, so the max is 1 (100) and the minimum is 0 (0).
写入国家开局时的稳定度百分比。在游戏中会把文件中的数值×100,所以最大是1(游戏中为100)最小是0(游戏中为0),如下所示,现在在游戏中显示的稳定度为70%
  set_stability = 0.7
  set_stability = 0.7


===战争支持度===
===战争支持度===
Defines the war support percentage that a country will have at the start of the game. Like stability, the number will be multiplied by 100 when applied to the country, with the max being 1 (100) and minimum being 0 (0).
写入国家开局时的战争支持度百分比。在游戏中会把文件中的数值×100,所以最大是1(游戏中为100)最小是0(游戏中为0)。如下所示,现在游戏中显示的战争支持度为50%
  set_war_support = 0.5
  set_war_support = 0.5


===民族精神和内阁===
===民族精神和内阁===
Sets Ideas country starts with (National Spirits, as well as advisors, companies & laws). A list of ideas can be found in {{path|common/ideas}}<br>
设置国家开局时的内阁 ( 民族精神 顾问 制造商和法案). 这些东西的清单在 {{path|common/ideas}}<br>


Note that you don't have to add any ideas. Country will then start with no advisors, Civilian Economy and Volunteer Only conscription
不过注意,如果你不添加任何内阁. 国家开局时就是没有顾问,民用经济和志愿制兵役
This is an example:
这是个例子:
<pre>
<pre>
add_ideas = {
add_ideas = {
第101行: 第101行:
</pre>
</pre>
===科技===
===科技===
Here the technology a country has from the start is declared. A list of technologies can be found in {{path|common/technologies}}.
这里写入国家开局时的科技等级。科技列表在 {{path|common/technologies}}.
<pre>
<pre>
set_technology = {
set_technology = {
第123行: 第123行:
}
}
</pre>
</pre>
Keep in mind that those who own 'Man the Guns' DLC will need to use a different set of technologies for ships, therefore you have to set technologies for ships '''twice''', like this:
记住,有炮手就位DLC的玩家需要一份不同的科技文件给海军~所以你得给海军科技设置两次,就像这样:
<pre>
<pre>
if = {
if = {
第149行: 第149行:
</pre>
</pre>
===其他(可选)===
===其他(可选)===
Add starting political power:
'''写入初始政治点数'''
<pre>
<pre>
add_political_power = 500
add_political_power = 500
</pre>
</pre>
Adds this amount of trade convoys. Note: If present multiple times in the same file, these stack
'''写入初始运输船数量'''
 
注意如果这在同一文件出现了数次会被叠加
<pre>
<pre>
set_convoys = 100
set_convoys = 100
</pre>
</pre>
Add starting research bonus. Useful for example if you had to manually complete a complex National Focus that adds research bonus, and effects had to be applied individually. For example this is used in the Soviet history file.
'''写入初始科研加成'''
 
有了这一行代码,可以让国家在开局时就默认有一个科研加成。 比如苏联的历史文件中就用了这:
<pre>
<pre>
add_tech_bonus = {
add_tech_bonus = {
第165行: 第169行:
}
}
</pre>
</pre>
Add wargoal:
'''战争化借口:'''
 
有了这行代码可以让当前国家在开局就有一个对某国的战争借口。
<pre>
<pre>
create_wargoal = {
create_wargoal = {
第173行: 第179行:
}
}
</pre>
</pre>
Country and global flags:
'''[[Cosmetic tag modding|国家标志]]及其其它''':
<pre>
set_global_flag = earhart_disappeared #Global flags can be placed in any country's file
set_country_flag = sudetenland_acquired #For Germany in 1939
</pre>


用于更加进阶的模组制作。可以用于在一开始就创建一个标志
<pre>
<pre>
USA = { #country to which the event will happen
set_global_flag = earhart_disappeared
country_event = { id = usa.50 days = 2 } #triggers this event, 2 days from the start
set_country_flag = sudetenland_acquired
</pre>让一个国家毫无条件的触发新闻。<pre>
USA = {
country_event = { id = usa.50 days = 2 } #id为事件的id,days是多少天后触发
country_event = { id = usa.51 days = 2 }
country_event = { id = usa.51 days = 2 }
}
}
第191行: 第197行:
Modifiers have their effects defined in {{path|common/opinion_modifiers}}
Modifiers have their effects defined in {{path|common/opinion_modifiers}}
===外交===
===外交===
If the new country has any diplomatic relations, these can be declared here. It is recommended that one adds relations only in one file (not in both the faction leader's file and the minor ally's for instance).
如果一个国家在开局时就与别的国家有交流,那么在这里定义。建议一个定义内容只写在一个文件中。(比如阵营领导人只写在阵营领导人的文件里,阵营中的次要国家就不必要写了)


====阵营====
====阵营====
Factions are defined by adding the following line:
在国家文件中写下这行代码,将会让游戏一开始就有这个阵营,在其中一个国家文件中写上,则代表当前国家是阵营的领导者。
  create_faction = Clanintern
  create_faction = Clanintern 修改:Clanintern即可
The country that belongs to the file this line is in will take the role of faction leader.
在上一行的基础上再当前国家文档中写下面这行即代表一个国家在这个阵营中。
Other countries may be added to the faction:
  add_to_faction = IRE 修改IRE即可
  add_to_faction = IRE
如果阵营中的某个国家有傀儡国,那也应该加入到阵营中,以防止不必要的bug。
Puppets of members should always be added to the faction as well, to prevent bugs.


====傀儡国====
====傀儡国====
Puppets are defined as follows if the player has the 'Together for Victory' Expansion:
如果玩家有“共同胜利”DLC,那么傀儡国的定义如下:
  set_autonomy = {
  set_autonomy = {
  target = ENG
  target = ENG
  autonomous_state = autonomy_integrated_puppet
  autonomous_state = autonomy_integrated_puppet
  }
  }
and as follows if they don't:
如果没有,则是如下:
  puppet = ENG
  puppet = ENG
In order to make the mod useable for both types of players an if-statement should be used:
为了使有DLC和没有DLC的玩家都可以正常使用,因此你可以使用if语句:
  if = {
  if = {
  limit = {
  limit = {
第222行: 第227行:
  }
  }
  }
  }
If the player has 'Together for Victory', Great Britain will be an integrated puppet, if not, they will be a regular (the only type of) puppet.
注意:puppet = ENG指的是当前国家的傀儡是ENG而并非是当前国家被ENG傀儡。
 
====其他外交行动====
====其他外交行动====
'''Guarantee Independence:'''<br>
''' 保证独立:'''<br> 这行代码可以让当前国家保证另一个国家的独立:
The country this file belongs to will guarantee the following TAG
<pre>
<pre>
give_guarantee = FRA
give_guarantee = FRA
</pre>
</pre>
'''Non-aggression Pact:'''
在这里你只需要修改FRA为任意国家TAG即可
 
''' 互不侵犯条约:'''
<pre>
<pre>
diplomatic_relation = { country = USA relation = non_aggression_pact }
diplomatic_relation = { country = USA relation = non_aggression_pact }
</pre>
</pre>
'''Starting trade:'''<br>
在这里你只需要修改USA为任意国家TAG即可。
The country this file belongs to will import preset amount of resource
 
''' 初始贸易:'''<br> 这行代码可以让国家开局就和任意国家进行贸易并添加资源。
<pre>
<pre>
create_import = {
create_import = {
第242行: 第250行:
}
}
</pre>
</pre>
'''Military access:'''
改变文件中的SWE可以改变贸易国家,改变factories后面的数字可以该表交易物品的数量(前提是那个国家要有这么多),改变resource后面的内容可以修改交易的物品。
 
''' 军事通行权:'''
 
这行代码可以让当前国家在开局就给目标国家军事通行权。
<pre>
<pre>
give_military_access = IRE
give_military_access = IRE
</pre>
</pre> 改变IRE就可以了。
 
====科技共享====
====科技共享====
If the player has 'Together for Victory' one can add the country to a tech sharing group:
If the player has 'Together for Victory' one can add the country to a tech sharing group:
  add_to_tech_sharing_group = haggis_investigators
  add_to_tech_sharing_group = haggis_investigators
An if-statement as shown above will be required to limit it to 'Together for Victory' owners and to prevent bugs with those that don't own it.
An if-statement as shown above will be required to limit it to 'Together for Victory' owners and to prevent bugs with those that don't own it.
<nowiki>#</nowiki>目前这行代码并不完整,不推荐使用。


===设定党派支持度===
===设定党派支持度===
Defines the popularity of different parties in the country:
定义当前国家不同意识形态党派的支持率:
<pre>
<pre>
set_popularities = {
set_popularities = {
第260行: 第275行:
neutrality = 5
neutrality = 5
}
}
</pre>
</pre> 你可以添加或删减任何意识形态,但是其所有政党总支持率必须要等于100.
 
===设定政治===
===设定政治===
Defines the ruling party and how elections work in a country:
定义当前国家的执政党和大选。
<pre>
<pre>
set_politics = {
set_politics = {
ruling_party = communism
ruling_party = communism #执政党的意识形态
last_election = "1932.11.8"
last_election = "1932.11.8" #上次大选时间
election_frequency = 48
election_frequency = 48 #大选间隔时间,单位:月
elections_allowed = no
elections_allowed = no #是否有下次大选,no为没有,yes为有
}
}
</pre>
</pre>
Note: Frequency is in months
===国家领导人===
===国家领导人===
Defines the leaders a country has. In theory adding a leader for only the starting ideology would be enough, as the other ones will be randomly generated, it is possible however, to define the leaders of all parties.
指定一个国家的领导人。正常来说,你只需要制作一个国家开局时的意识形态领导人就足够了。因为别的领导人可以随机产生。不过如果你制作了别的意识形态党派的领导人,那么在非执政党状态下,他们是党派领导人。为执政党时为领导人。
  create_country_leader = {
  create_country_leader = {
  name = "Ronald McDonald"
  name = "Ronald McDonald" #领导人名字
  desc = "POLITICS_RONALD_MCDONALD_DESC"
  desc = "POLITICS_RONALD_MCDONALD_DESC" #领导人介绍
  picture = "gfx/leaders/Europe/Portrait_Europe_Generic_land_3.dds"
  picture = "gfx/leaders/Europe/Portrait_Europe_Generic_land_3.dds" #领导人图片
  expire = "1965.1.1"
  expire = "1965.1.1" #领导人退休时间
  ideology = fascism_ideology
  ideology = fascism_ideology #领导人子意识形态
  traits = {
  traits = { #领导人特质
  scary_clown
  scary_clown
  }
  }
  }
  }
One can add a custom portrait by adding it in in [[Wikipedia:DirectDraw Surface|DDS-format]], which may require [https://www.gimp.org/ Gimp] or [http://www.getpaint.net/index.html Paint.net] to edit.
你在制作领导人图片时,导出的格式推荐为dds格式(当然也可以是png), 这可能需要用到[https://www.gimp.org/ Gimp] 或者 [http://www.getpaint.net/index.html Paint.net] 来制作。


A list of traits can be found in {{path|common/country_leader}}. It is possible to add more there as well.
领导人特质可以在 {{path|common/country_leader}} 找到。


===将军===
===将军===
Custom army leaders may be defined here:
在当前国家文件中写下这些,就可以让国家拥有一个陆军将军:
<pre>
<pre>
create_corps_commander = {
create_corps_commander = {
  name = "Sean McHaggis"
  name = "Sean McHaggis" #名字
  portrait_path = "gfx/leaders/Europe/Portrait_Europe_Generic_land_4.dds"
  portrait_path = "gfx/leaders/Europe/Portrait_Europe_Generic_land_4.dds" #图片
  traits = { panzer_leader fortress_buster }
  traits = { panzer_leader fortress_buster } #特质
  attack_skill = 4
  attack_skill = 4 #攻击能力
defense_skill = 2
defense_skill = 2 #防御能力
planning_skill = 1
planning_skill = 1 #计划速度
logistics_skill = 2
logistics_skill = 2 #后勤速度
}
}
</pre>
</pre>
As well as naval leaders:
这一些则是海军将领:
<pre>
<pre>
create_navy_leader = {
create_navy_leader = {
第315行: 第329行:
</pre>
</pre>
===变种型号(可选)===
===变种型号(可选)===
Special variants on equipment available for this country from the start can be defined as well:
从一开始就可以定义该国家或地区可用装备的变种型号:
  create_equipment_variant = {
  create_equipment_variant = {
  name = "Haggis Class"
  name = "Haggis Class"
第351行: 第365行:
== 本地化 ==
== 本地化 ==
{{SVersion|Timeless}}
{{SVersion|Timeless}}
Add the localisation for your new country to the following file (it is generally recommended to always create a new, separate file, to avoid overwrites of vanilla files)
通过在下面的介绍路径来添加本地化文件(最好去原版复制一个文件过来然后改成别的名字)
<pre>
<pre>
<yourmod>/localisation/mynewscotland_l_<language>.yml
< 你的模组>/localisation/< 任意名字>_l_english.yml
</pre>
</pre>
where <language> can be either English, German, Spanish, French, Polish, Russian or Brazilian Portuguese. A file can be created for each language for better coverage across the supported languages.
如果你希望翻译成别的语言,比如说变成修改成法语,你只需要修改english为French就可以了


Define the localisation for the country's name and its adjective as follows for every ideology:
对于国家来说有许多种不同的意识形态党派会上台,因此你最好为国家的每一种意识形态都取上名字:<pre>
 
l_english:
  SCO_communism: "People's Republic of Scotland"
  SCO_communism:0 " 苏格兰人民共和国
  SCO_communism_DEF: "The People's Republic of Scotland" #For events
  SCO_communism_DEF:0 " 苏格兰人民共和国" # 这一行的意思是国家在新闻中是怎么称呼的
  SCO_ADJ: "Scottish"
SCO_fascism:0 "苏格兰帝国"
'''Note:''' Do not mistake the correct letter _l_ ( L ) with a letter i ( I ), or number 1 ( One ), it's a common mistake, causing localisations to not show up, without any evident cause.
SCO_fascism_DEF:0 "苏格兰帝国"
  SCO_ADJ:0 " 苏格兰" #国家在宣战条中显示的名称
</pre>
''' 注意:''' 不要把文中的l认错了,这是一个小写的L,很多人会误认为i(I) 或者1,这是一个很常见的错误,如果你的本地化一直不显示,这很有可能是一个原因,当然最好还是从原版中复制一个文件过来修改名称。
==旗帜==
==旗帜==
{{SVersion|Timeless}}
{{SVersion|Timeless}}
 每个国家 需要12 旗帜:四 种意识形态, 包括中立主义在内, 每种一个旗帜,并且每种需要三个尺寸:标准、中(Medium)、小(Small)。所有旗帜需要 以TGA 格式保存,文件名包括国家的tag和旗帜所用于的意识形态。(例如:ABC_neutrality.tga)文件格式应该是32位、无压缩的。
 每个国家 都至少要有一面意识形态国旗,如果你不制作任何国旗,那么游戏中将会显示一 黑面。我们推荐你最好为每一 种意识形态 都添加上国旗 这样可以使你的模组更加完整。 每种 意识形态 一个旗帜,并且每种需要三个尺寸:标准、中(Medium)、小(Small)。所有旗帜需要 以[[wikipedia:Truevision TGA|TGA 格式]] 保存,文件名包括国家的tag和旗帜所用于的意识形态。(例如:ABC_neutrality.tga)文件格式应该是32位、无压缩的。


 然而,如果你不想为每个意识形态制作单独的旗帜,也可以创建一个各种尺寸的单独旗帜,并且将其单纯以国家tag命名而不包括意识形态。例如:ABC.tga将会在该国家没有此时意识形态特定的旗帜时,作为该国家的旗帜使用。
 然而,如果你不想为每个意识形态制作单独的旗帜,也可以创建一个各种尺寸的单独旗帜,并且将其单纯以国家tag命名而不包括意识形态。例如:ABC.tga将会在该国家没有此时意识形态特定的旗帜时,作为该国家的旗帜使用。
第379行: 第396行:
| 小 || 10x7 pixel
| 小 || 10x7 pixel
|}
|}
 所有旗帜位于{{path|gfx/flags}}。用于模组制作目的时,将旗帜放置于''<yourmod>/gfx/flag''下,并且将各尺寸的旗帜放置于相应的子文件夹下。
 所有旗帜位于{{path|gfx/flags}}。用于模组制作目的时,将旗帜放置于''< 你的模组>/gfx/flag''下,并且将各尺寸的旗帜放置于相应的子文件夹下。


== 战斗顺序 (可选)==
== 军队—OOB (可选)==
{{SVersion|1.8}}
{{SVersion|1.8}}
If the country will exist at the start, an order of battle is necessary for the country to have an army.
如果一个国家是开始就存在的,那么拥有一支军队可以说是必要的,在{{path|history/units}} 建立一个新的txt文件,或者从原版复制一个国家的过来。它的命名必须与你在国家文件中所写的一模一样,否则将无法正常读取。比如你在国家文件中写<oob = "SCO_1936">,那么在units中,这个文件也要叫SCO_1936。
Create a new file in {{path|history/units}} or copy one from a similar country. It must be named exactly the way it's linked in the country's history file.
Specific names of different types of units and their support companies can be found in {{path|common/units}}.


===师模板===
===师模板===
First the default division template will be defined, simply set up what regiments will fill the country's divisions:
首先制作一个国家所拥有的师编制,编制中的营你可以在{{path|common/units}}找到。
  division_template = {
  division_template = {
  name = "Blueskirt Division"
  name = "Blueskirt Division" #师的名字
  
  
  regiments = {
  regiments = {
  infantry = { x = 0 y = 0 }
  infantry = { x = 0 y = 0 } #步兵师 x是横排的位置,y是竖排的位置。从0开始,最高都是4.
  infantry = { x = 0 y = 1 }
  infantry = { x = 0 y = 1 }
  infantry = { x = 0 y = 2 }
  infantry = { x = 0 y = 2 }
第406行: 第421行:
  }
  }
  }
  }
As can be seen, this division exists solely out of infantry.
我们可以看到,上面那个师完全由步兵所组成,并且没有名字。而下面的内容,则加上了来自德国的更高级单位,比如支援营。有了师的名字下面那行内容之后,师的名字也有了以德国名字组为基础:
Example of more advanced unit template from Germany, which will use german infantry names:
<pre>
<pre>
division_template = {
division_template = {
name = "Infanterie-Division"
name = "Infanterie-Division" #师的名字
division_names_group = GER_Inf_01
division_names_group = GER_Inf_01 #师的名字组合


regiments = {
regiments = { #进攻营
infantry = { x = 0 y = 0 }
infantry = { x = 0 y = 0 }
infantry = { x = 0 y = 1 }
infantry = { x = 0 y = 1 }
第424行: 第438行:
infantry = { x = 2 y = 2 }
infantry = { x = 2 y = 2 }
}
}
support = {
support = { #支援营
engineer = { x = 0 y = 0 }
engineer = { x = 0 y = 0 }
artillery = { x = 0 y = 1 }
artillery = { x = 0 y = 1 }
}
}
}
}
</pre>
</pre> 师名字组合可以在{{path|common/units/names_divisicons}}找到。
 
===师位置===
===师位置===
Division can be placed as follows:
division可以让我们的部队直接在地图上出现,即开局就部署好了的部队。
  units = {
  units = {
  division= {
  division= {
  name = "1st Blueskirt Division"
  name = "1st Blueskirt Division" #师编号
  location = 9392 # Edinburgh
  location = 9392 # 师的位置(小地块)
  division_template = "Blueskirt Division"
  division_template = "Blueskirt Division" #师的编制(也就是上面写的那个)
  start_experience_factor = 0.2  #optional, otherwise starts with 0 expereince
  start_experience_factor = 0.2  # 经验等级,不写就是没有
  start_equipment_factor = 0.3   #optional, otherwise starts with equipment factor of 1 (maximum)
  start_equipment_factor = 0.3   # 装备后勤,不写就是完整
  
  
  }
  }
  }
  }
The name is simply the name the game shows for the division, the location is where the division is on the map, the template links to the template defined above and start_experience_ and _equipment_factors define how much experience and equipment the division has.
这里的name和上面师模板的的name不一样,这里的name是部队在地图上被选中显示的名称,而师模板那里的name是指编制的名称。下面所使用的的division_name是原版中使用的命名方法,相对来说比较麻烦,比较推荐上面的手动命名。
Alternatevely you can use the automatic naming using a predefined list of names.
<pre>
<pre>
      division= {
      division= {
第457行: 第471行:
</pre>
</pre>
===空军联队===
===空军联队===
Air wings are not placed into a specific province, but rather a State.
开局就部署在各机场的空军。
<pre>
<pre>
air_wings = {
air_wings = {
第468行: 第482行:
}
}
</pre>
</pre>
''version_name'' defines a specific variant of that type of equipment to be used. It first needs to be defined in the same file.
Version _ name 定义了要使用的设备类型的特定变体。使用之前需要在同一个文件中定义它。


== 添加其他剧本的历史(可选) ==
== 添加其他剧本的历史(可选) ==
If you want to edit something about your country, but only want it applied after a specific date (as in 1939 bookmark for example), you have to add these lines to the history file:
如果你想编辑一个国家在一个特定的日期,你只需要在文件中写上那个时间,如下所示:
<pre>
<pre>
1939.1.1 = {
1939.1.1 = { # 特定的时间
#There you can add anything, in the same format as described earlier
oob = "SCO_1939" # 这样会使这个国家在1939年1月1日时重新加载oob文件。
oob = "SCO_1939" #Usually another oob is used for later bookmarks, only the latest one will be loaded
set_technology = { #这些已经完成的科技
set_technology = {
atomic_research = 1 
atomic_research = 1 
nuclear_reactor = 1 
nuclear_reactor = 1 
第484行: 第497行:
</pre>
</pre>
=== 国策 ===
=== 国策 ===
National Focuses can be completed in two ways:
国策可以通过两种方式制作:如果你想完成国策,那么使用:
If you want the effects to apply, then use:
<pre>
<pre>
complete_national_focus = army_effort
complete_national_focus = army_effort
</pre>
</pre>
If you want to just bypass the focus (often used for more complex focuses, like 'Demand Sudetenland', and apply effect manually, without triggering all the associated events), use:
如果您只想跳过国策(通常用于更复杂的国策,如“索取苏台德”,并手动跳过国策,而不触发所有相关事件),请使用:
<pre>
<pre>
unlock_national_focus = GER_demand_sudetenland
unlock_national_focus = GER_demand_sudetenland
</pre>
</pre>
=== 具体案例 ===
=== 具体案例 ===
Cancelling a relation that is activated earlier (like a guarantee to FRA used earlier):
取消先前的关系 ( 比如先前对法国的保障独立):
<pre>
<pre>
diplomatic_relation = {
diplomatic_relation = {
第502行: 第514行:
}
}
</pre>
</pre>
Removing previously used idea:
移除以前的民族精神:
<pre>
<pre>
remove_ideas = {
remove_ideas = {
第509行: 第521行:
</pre>
</pre>
=== 要记住的事情 ===
=== 要记住的事情 ===
*The date used must be at least 1 day before the actual bookmark start date, multiple dates can be used
* 使用的日期必须至少比实际剧本的开始日期早1天,可以使用多个日期。
*Ideas are added, Laws are replaced by the latest loaded
* 添加了特质,替换了政策,需要重新加载。
*Technologies only have to be applied once, add only extra technologies to the later bookmarks
* 科技只需应用一次,只需在以后的剧本中添加额外的科技
*If a National Focus triggers an event, or adds effect, completing it by history file does not apply these, they have to be triggered separately
* 如果国策触发了一个事件,或者增加了效果,通过历史文件完成它不适用,它们必须单独触发
*Country leader is chosen based on corresponding ideology, if multiple are present, the one located lower in the file is chosen
* 根据相应的意识形态选择国家领导人,如果存在多个,则选择文件中较低的一个


== 在游戏中增加国家 ==
== 在游戏中增加国家 ==


There are three ways to implement the new country into the game.
有三种方法可以将新国家添加进游戏。


*Using events
* 通过事件添加
*By national focus
* 通过国策添加
*Editing state history
* 编辑省份文件


=== 通过事件或国策增加国家 ===
=== 通过事件或国策增加国家 ===
{{main|Event Modding}}
{{main|Event Modding}}


There are multiple ways to add a country's presence by event or national focus. Here are two:
有多种方式可以通过事件或国策来增加添加一个国家。这里有两个:


  set_state_owner = 119
  set_state_owner = 119


Using this script in an event option or national focus reward, when scoped to the new country, will cause the province to be owned by the new country. If it is occupied by a third power and the new country is at war with them however, the region will remain occupied.
在事件或国策中使用此脚本,当范围为新国家/地区时,将导致该省为新国家所有。然而,如果它被第三国占领,且新国家与他们开战,该地区将继续被占领。


  transfer_state = 119
  transfer_state = 119


This script will change both the ownership and control to the scoped state. If a third country occupies it it will go to the new country regardless of the state of relations between it and the occupying power.
此脚本将所有权和控制权更改为作用域状态。如果第三国占领它,它将成为新的国家,而不管它与占领国之间的关系如何。


=== 通过地区历史添加国家 ===
=== 通过地区历史添加国家 ===


Change the owner and cores in province history files so that they include the new country either by default or in defined bookmarks (for instance only in 1939)
更改历史文件中的所有者和核心,以便在默认情况下或在自定义的剧本中包含新的国家/地区(例如,仅在1939年存在)


{{Modding navbox}}
{{Modding navbox}}
[[Category:Modding]]
[[ 分类:Modding]]

2023年11月4日 (六) 23:11的最新版本

这个网页包括了假如你已经掌握基础的创建一个模组的基本知识,就可以学习接下来的进阶内容。

快速制作

如果你想在模组中创建一个新国家,可以参考以下快速制作教程:

  • 定义一个独一无二的三英文字符国家tag。
  • <你的模组>/common/countries中新建文件。
  • <你的模组>/history/countries中新建文件。
  • <你的模组>/localisations中增加本地化。
  • <你的模组>/gfx/flags中为每一种意识形态添加一个大,中,小号的旗帜。
  • 可选:在<你的模组>/history/units中创建OOB文件。
  • 可选:把国家加入到游戏中。

国家标签——tag

每个国家都要一个三英文字符的tag,这是你在你的模组中唯一指定国家的内容。所有国家的TAG都得是独一无二的并且为三个大写英文字母. 任何国家都不能跟别的国家有一样的TAG

要建立一个新TAG,就往<你的模组>/common/country_tags (或者把原有的文件改了)添加新信息并且再写上像这样的东西:

SCO = "countries/Scotland.txt"

如上所示。在这里,SCO的地方必须为三大写英文字母,而在后面的txt则可以是任意长度的大写小写,但不能有中文。

你想创建或者改动国家标签的文件位于<你的模组>/common/countries

国家文件

<你的模组>/common/countries 文件夹中创建一个新的文件.建议复制一个原版中的国家的文件来再改成你要的。

单位模型

在这里设置设置国家单位模型。比如苏格兰是:

graphical_culture = commonwealth_gfx
graphical_culture_2d = commonwealth_2d

颜色

这里设置的是国家在地图上的颜色。 它使用 RGB色阶

color = { 2  10  222 }

colors.txt

确保国家颜色被写入了<你的模组>/common/countries/colors.txt:

SCO = {
  color = rgb { 2  10  222 }
  color_ui = rgb { 255 255 155}
}

`color_ui` 通常是比该国家普通颜色更深的色彩,因为这是用于涂边界的 (如果边界看起来很丑,那就再看看你文件有没写错).颜色也能用 HSV形式写指定

国家历史

在 <你的模组>/history/countries> 文件夹中创建该文件. 或者复制个原版中国家的文件,重命名并更改为你的。文件名应该是<该国tag - 该国名字>, 比如"SCO - Scotland".这个文件包含了该国家的历史以及默认属性

首都

在这写入国家首都. 要用地区ID(state)而非省份(province)ID指定首都.这样的话,121是洛锡安地区,包含爱丁堡

capital = 121

战斗部署

这些文件会被链接到'Order of Battle' (OoB)记录了部队数量和位置、经验及装备状况, 还有开局国家拥有的空军联队。开始时的生产状况及部队编制也被记录在那儿。每个国家都需要链接到OoB, 不过如果那个国家将在之后被吞并那么就别给他写OoB文件了

oob = "SCO_1936"

为了方便调用,海军通常被编入单独的OoB.另外,因为'炮手就位' DLC对海军改动很大,一个国家通常都有两个独立的海军OoB, 一个就是为了给那个DLC的, 另一个就是给没买那个DLC的人, 使用旧的海军系统(OOB通常以a _legacy为后缀区分)

if = {
	limit= { has_dlc = "Man the Guns" }
		set_naval_oob = "SCO_1936_naval_mtg"
	else = {
		set_naval_oob = "SCO_1936_naval_legacy"
	}
}

科研槽

写入开局时国家的科研槽数量。一般大国有4个,北美和欧洲的小国有两个,其他地方的小国也是两个。如果不写就默认是两个

set_research_slots = 3

稳定度

写入国家开局时的稳定度百分比。在游戏中会把文件中的数值×100,所以最大是1(游戏中为100)最小是0(游戏中为0),如下所示,现在在游戏中显示的稳定度为70%

set_stability = 0.7

战争支持度

写入国家开局时的战争支持度百分比。在游戏中会把文件中的数值×100,所以最大是1(游戏中为100)最小是0(游戏中为0)。如下所示,现在游戏中显示的战争支持度为50%

set_war_support = 0.5

民族精神和内阁

设置国家开局时的内阁 (民族精神 顾问 制造商和法案).这些东西的清单在 /Hearts of Iron IV/common/ideas

不过注意,如果你不添加任何内阁. 国家开局时就是没有顾问,民用经济和志愿制兵役 这是个例子:

add_ideas = {
		henschel
		GER_autarky_idea
		#laws
		war_economy
		extensive_conscription
}

科技

这里写入国家开局时的科技等级。科技列表在 /Hearts of Iron IV/common/technologies.

set_technology = {
 	infantry_weapons = 1
	infantry_weapons1 = 1	
	tech_engineers = 1
	tech_mountaineers = 1
	motorised_infantry = 1
	gw_artillery = 1
	interwar_antiair = 1
	gwtank = 1
	basic_light_tank = 1
	basic_heavy_tank = 1
	early_fighter = 1
	fighter1 = 1
	early_bomber = 1
	tactical_bomber1 = 1
	strategic_bomber1 = 1
	CAS1 = 1
	naval_bomber1 = 1
}

记住,有炮手就位DLC的玩家需要一份不同的科技文件给海军~所以你得给海军科技设置两次,就像这样:

if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
		early_destroyer = 1
	}
	set_naval_oob = "SCO_1936_naval_legacy"
}
if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_naval_mines = 1
		submarine_mine_laying = 1
		early_ship_hull_light = 1
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		basic_battery = 1
		basic_torpedo = 1
		basic_depth_charges = 1
	}
	set_naval_oob = "SCO_1936_naval_mtg"
}

其他(可选)

写入初始政治点数

add_political_power = 500

写入初始运输船数量.

注意: 如果这在同一文件出现了数次会被叠加

set_convoys = 100

写入初始科研加成.

有了这一行代码,可以让国家在开局时就默认有一个科研加成。 比如苏联的历史文件中就用了这:

add_tech_bonus = {
		bonus = 1.0
		uses = 2
		category = armor
}

战争化借口:

有了这行代码可以让当前国家在开局就有一个对某国的战争借口。

create_wargoal = {
		type = take_state_focus
		target = POL
		generator = { 72 88 90 87 86 } # Zaolzie Krakow Kielce Lodz Poznan
}

国家标志及其其它:

用于更加进阶的模组制作。可以用于在一开始就创建一个标志

set_global_flag = earhart_disappeared		
set_country_flag = sudetenland_acquired		

让一个国家毫无条件的触发新闻。

USA = { country_event = { id = usa.50 days = 2 } #id为事件的id,days是多少天后触发 country_event = { id = usa.51 days = 2 } }

Opinion modifiers:

add_opinion_modifier = { target = POL modifier = refused_anti_comintern_pact_opinion }		

Modifiers have their effects defined in /Hearts of Iron IV/common/opinion_modifiers

外交

如果一个国家在开局时就与别的国家有交流,那么在这里定义。建议一个定义内容只写在一个文件中。(比如阵营领导人只写在阵营领导人的文件里,阵营中的次要国家就不必要写了)

阵营

在国家文件中写下这行代码,将会让游戏一开始就有这个阵营,在其中一个国家文件中写上,则代表当前国家是阵营的领导者。

create_faction = Clanintern 修改:Clanintern即可

在上一行的基础上再当前国家文档中写下面这行即代表一个国家在这个阵营中。

add_to_faction = IRE 修改IRE即可

如果阵营中的某个国家有傀儡国,那也应该加入到阵营中,以防止不必要的bug。

傀儡国

如果玩家有“共同胜利”DLC,那么傀儡国的定义如下:

set_autonomy = {
	target = ENG
	autonomous_state = autonomy_integrated_puppet
}

如果没有,则是如下:

puppet = ENG

为了使有DLC和没有DLC的玩家都可以正常使用,因此你可以使用if语句:

if = {
	limit = {
		has_dlc = "Together for Victory"
	}
	set_autonomy = {
		target = ENG
		autonomous_state = autonomy_integrated_puppet
	}
	else = {
		puppet = ENG
	}
}

注意:puppet = ENG指的是当前国家的傀儡是ENG而并非是当前国家被ENG傀儡。

其他外交行动

保证独立:
这行代码可以让当前国家保证另一个国家的独立:

give_guarantee = FRA

在这里你只需要修改FRA为任意国家TAG即可

互不侵犯条约:

diplomatic_relation = { country = USA relation = non_aggression_pact }

在这里你只需要修改USA为任意国家TAG即可。

初始贸易:
这行代码可以让国家开局就和任意国家进行贸易并添加资源。

create_import = {
		resource = tungsten
		factories = 1
		exporter = SWE
}

改变文件中的SWE可以改变贸易国家,改变factories后面的数字可以该表交易物品的数量(前提是那个国家要有这么多),改变resource后面的内容可以修改交易的物品。

军事通行权:

这行代码可以让当前国家在开局就给目标国家军事通行权。

give_military_access = IRE

改变IRE就可以了。

科技共享

If the player has 'Together for Victory' one can add the country to a tech sharing group:

add_to_tech_sharing_group = haggis_investigators

An if-statement as shown above will be required to limit it to 'Together for Victory' owners and to prevent bugs with those that don't own it.

#目前这行代码并不完整,不推荐使用。

设定党派支持度

定义当前国家不同意识形态党派的支持率:

set_popularities = {
	democratic = 5
	communism = 80
	fascism = 10
	neutrality = 5
}

你可以添加或删减任何意识形态,但是其所有政党总支持率必须要等于100.

设定政治

定义当前国家的执政党和大选。

set_politics = {
	ruling_party = communism #执政党的意识形态
	last_election = "1932.11.8" #上次大选时间
	election_frequency = 48 #大选间隔时间,单位:月
	elections_allowed = no #是否有下次大选,no为没有,yes为有
}

国家领导人

指定一个国家的领导人。正常来说,你只需要制作一个国家开局时的意识形态领导人就足够了。因为别的领导人可以随机产生。不过如果你制作了别的意识形态党派的领导人,那么在非执政党状态下,他们是党派领导人。为执政党时为领导人。

create_country_leader = {
	name = "Ronald McDonald" #领导人名字
	desc = "POLITICS_RONALD_MCDONALD_DESC" #领导人介绍
	picture = "gfx/leaders/Europe/Portrait_Europe_Generic_land_3.dds" #领导人图片
	expire = "1965.1.1" #领导人退休时间
	ideology = fascism_ideology #领导人子意识形态
	traits = { #领导人特质
		scary_clown
	}
}

你在制作领导人图片时,导出的格式推荐为dds格式(当然也可以是png), 这可能需要用到Gimp或者 Paint.net来制作。

领导人特质可以在 /Hearts of Iron IV/common/country_leader找到。

将军

在当前国家文件中写下这些,就可以让国家拥有一个陆军将军:

create_corps_commander = {
 	name = "Sean McHaggis" #名字
 	portrait_path = "gfx/leaders/Europe/Portrait_Europe_Generic_land_4.dds" #图片
 	traits = { panzer_leader fortress_buster } #特质
 	attack_skill = 4 #攻击能力
	defense_skill = 2 #防御能力
	planning_skill = 1 #计划速度
	logistics_skill = 2 #后勤速度
}

这一些则是海军将领:

create_navy_leader = {
 	name = "James McSeafarer"
 	portrait_path = "gfx/leaders/Europe/Portrait_Europe_Generic_navy_1.dds"
 	traits = { blockade_runner superior_tactician }
 	attack_skill = 3
	defense_skill = 3
	maneuvering_skill = 5
	coordination_skill = 2
}

变种型号(可选)

从一开始就可以定义该国家或地区可用装备的变种型号:

create_equipment_variant = {
	name = "Haggis Class"
	type = submarine_1
	upgrades = {
		sub_engine_upgrade = 3
		sub_stealth_upgrade = 2
		sub_torpedo_upgrade = 2
	}
}
create_equipment_variant = {
		name = "Scotfire"
		type = fighter_equipment_1
		upgrades = {
			plane_gun_upgrade = 3
			plane_range_upgrade = 0  
			plane_engine_upgrade = 3
			plane_reliability_upgrade = 3
		}
}
create_equipment_variant = {
		name = "Tanktoon 2"
		type = light_tank_equipment_2
		upgrades = {
			tank_gun_upgrade = 5
			tank_armor_upgrade = 1  
			tank_engine_upgrade = 2
			tank_reliability_upgrade = 0
		}
		obsolete = yes	#optional, marks the unit as obsolete and hides the unit from the UI
}

本地化

通过在下面的介绍路径来添加本地化文件(最好去原版复制一个文件过来然后改成别的名字)

<你的模组>/localisation/<任意名字>_l_english.yml

如果你希望翻译成别的语言,比如说变成修改成法语,你只需要修改english为French就可以了

对于国家来说有许多种不同的意识形态党派会上台,因此你最好为国家的每一种意识形态都取上名字:

l_english:
 SCO_communism:0 "苏格兰人民共和国" 
 SCO_communism_DEF:0 "苏格兰人民共和国" #这一行的意思是国家在新闻中是怎么称呼的
 SCO_fascism:0 "苏格兰帝国"
 SCO_fascism_DEF:0 "苏格兰帝国"
 SCO_ADJ:0 "苏格兰" #国家在宣战条中显示的名称

注意:不要把文中的l认错了,这是一个小写的L,很多人会误认为i(I)或者1,这是一个很常见的错误,如果你的本地化一直不显示,这很有可能是一个原因,当然最好还是从原版中复制一个文件过来修改名称。

旗帜

每个国家都至少要有一面意识形态国旗,如果你不制作任何国旗,那么游戏中将会显示一个黑面。我们推荐你最好为每一种意识形态都添加上国旗,这样可以使你的模组更加完整。每种意识形态一个旗帜,并且每种需要三个尺寸:标准、中(Medium)、小(Small)。所有旗帜需要以TGA格式保存,文件名包括国家的tag和旗帜所用于的意识形态。(例如:ABC_neutrality.tga)文件格式应该是32位、无压缩的。

然而,如果你不想为每个意识形态制作单独的旗帜,也可以创建一个各种尺寸的单独旗帜,并且将其单纯以国家tag命名而不包括意识形态。例如:ABC.tga将会在该国家没有此时意识形态特定的旗帜时,作为该国家的旗帜使用。

要求尺寸
标准 82x52 pixel
41x26 pixel
10x7 pixel

所有旗帜位于/Hearts of Iron IV/gfx/flags。用于模组制作目的时,将旗帜放置于<你的模组>/gfx/flag下,并且将各尺寸的旗帜放置于相应的子文件夹下。

军队—OOB(可选)

如果一个国家是开始就存在的,那么拥有一支军队可以说是必要的,在/Hearts of Iron IV/history/units 建立一个新的txt文件,或者从原版复制一个国家的过来。它的命名必须与你在国家文件中所写的一模一样,否则将无法正常读取。比如你在国家文件中写<oob = "SCO_1936">,那么在units中,这个文件也要叫SCO_1936。

师模板

首先制作一个国家所拥有的师编制,编制中的营你可以在/Hearts of Iron IV/common/units找到。

division_template = {
	name = "Blueskirt Division" #师的名字

	regiments = {
		infantry = { x = 0 y = 0 } #步兵师 x是横排的位置,y是竖排的位置。从0开始,最高都是4.
		infantry = { x = 0 y = 1 }
		infantry = { x = 0 y = 2 }
		infantry = { x = 1 y = 0 }
		infantry = { x = 1 y = 1 }
		infantry = { x = 1 y = 2 }
		infantry = { x = 2 y = 0 }
		infantry = { x = 2 y = 1 }
		infantry = { x = 2 y = 2 }
		infantry = { x = 3 y = 0 }
		infantry = { x = 3 y = 1 }
	}
}

我们可以看到,上面那个师完全由步兵所组成,并且没有名字。而下面的内容,则加上了来自德国的更高级单位,比如支援营。有了师的名字下面那行内容之后,师的名字也有了以德国名字组为基础:

division_template = {
	name = "Infanterie-Division" #师的名字
	division_names_group = GER_Inf_01 #师的名字组合

	regiments = { #进攻营
		infantry = { x = 0 y = 0 }
		infantry = { x = 0 y = 1 }
		infantry = { x = 0 y = 2 }
   		infantry = { x = 1 y = 0 }
		infantry = { x = 1 y = 1 }
		infantry = { x = 1 y = 2 }
  		infantry = { x = 2 y = 0 }
		infantry = { x = 2 y = 1 }
		infantry = { x = 2 y = 2 }
	}
	support = { #支援营
		engineer = { x = 0 y = 0 }
		artillery = { x = 0 y = 1 }
	}
}

师名字组合可以在/Hearts of Iron IV/common/units/names_divisicons找到。

师位置

division可以让我们的部队直接在地图上出现,即开局就部署好了的部队。

units = {
	division= {	
		name = "1st Blueskirt Division" #师编号
		location = 9392 #师的位置(小地块)
		division_template = "Blueskirt Division" #师的编制(也就是上面写的那个)
		start_experience_factor = 0.2   #经验等级,不写就是没有
		start_equipment_factor = 0.3    #装备后勤,不写就是完整

	}
}

这里的name和上面师模板的的name不一样,这里的name是部队在地图上被选中显示的名称,而师模板那里的name是指编制的名称。下面所使用的的division_name是原版中使用的命名方法,相对来说比较麻烦,比较推荐上面的手动命名。

         division= {
		division_name = {
				is_name_ordered = yes
				name_order = 35
		}
		location = 6488
		division_template = "Infanterie-Division"
		start_experience_factor = 0.1                                                 #optional, otherwise starts with 0 expereince
		force_equipment_variants = { infantry_equipment_0 = { owner = "GER" } }       #optional, replaces equipment with a specific variant (for example to give obsolete equipment to garrison units)
	}

空军联队

开局就部署在各机场的空军。

air_wings = {
	121 = { 	# Edinburgh
		tac_bomber_equipment_0 = { owner = "SCO" amount = 72 }
			start_experience_factor = 0.2	#optional, otherwise starts with 0 expereince
		fighter_equipment_1 = { owner = "SCO"  version_name = "Scotfire" amount = 150 }		#version_name is optional
			start_experience_factor = 0.5			
	}
}

Version _ name 定义了要使用的设备类型的特定变体。使用之前需要在同一个文件中定义它。

添加其他剧本的历史(可选)

如果你想编辑一个国家在一个特定的日期,你只需要在文件中写上那个时间,如下所示:

1939.1.1 = { #特定的时间
	oob = "SCO_1939" #这样会使这个国家在1939年1月1日时重新加载oob文件。
	set_technology = { #这些已经完成的科技
		atomic_research = 1 
		nuclear_reactor = 1 
		nukes = 1
	}	
}

国策

国策可以通过两种方式制作:如果你想完成国策,那么使用:

complete_national_focus = army_effort

如果您只想跳过国策(通常用于更复杂的国策,如“索取苏台德”,并手动跳过国策,而不触发所有相关事件),请使用:

unlock_national_focus = GER_demand_sudetenland

具体案例

取消先前的关系 (比如先前对法国的保障独立):

diplomatic_relation = {
	country = FRA
	relation = guarantee
	active = no
}

移除以前的民族精神:

remove_ideas = {
	great_depression	
}

要记住的事情

  • 使用的日期必须至少比实际剧本的开始日期早1天,可以使用多个日期。
  • 添加了特质,替换了政策,需要重新加载。
  • 科技只需应用一次,只需在以后的剧本中添加额外的科技
  • 如果国策触发了一个事件,或者增加了效果,通过历史文件完成它不适用,它们必须单独触发
  • 根据相应的意识形态选择国家领导人,如果存在多个,则选择文件中较低的一个

在游戏中增加国家

有三种方法可以将新国家添加进游戏。

  • 通过事件添加
  • 通过国策添加
  • 编辑省份文件

通过事件或国策增加国家

主条目:Event Modding

有多种方式可以通过事件或国策来增加添加一个国家。这里有两个:

set_state_owner = 119

在事件或国策中使用此脚本,当范围为新国家/地区时,将导致该省为新国家所有。然而,如果它被第三国占领,且新国家与他们开战,该地区将继续被占领。

transfer_state = 119

此脚本将所有权和控制权更改为作用域状态。如果第三国占领它,它将成为新的国家,而不管它与占领国之间的关系如何。

通过地区历史添加国家

更改历史文件中的所有者和核心,以便在默认情况下或在自定义的剧本中包含新的国家/地区(例如,仅在1939年存在)