The stats of basic troops are found in defines.lua as LIGHT_INFANTRY_PHASE_SKIRMISH_ATTACK, etc.
For the 3D models used on the map, there's a convention on the name of EMFXActorType or pdxmesh gfx entries, based on the culturegfx of the units:
culturegfx is the first matching unit_graphical_cultures of the culture (if any), otherwise the graphical_cultures, defaulting to westerngfx.
See interface/avatars.gfx for the base game units assets.
To add a special troops the steps are to:
common\special_troops:my_special_unit = {
morale = 4
maintenance = 3
phase_skirmish_attack = 0.5
phase_melee_attack = 5
phase_pursue_attack = 8
phase_skirmish_defense = 4
phase_melee_defense = 4
phase_pursue_defense = 3
base_type = heavy_infantry
}
gfx\interface\unitpanel_specialunits_bigstrip.dds and gfx\interface\unitpanel_specialunits_smallstrip.ddsThe noOfFrames in interface\unitpanel.gfx needs to be increased
spriteType = {
name = "GFX_unitpanel_specialtroops_smallstrip"
texturefile = "gfx\\interface\\unitpanel_specialunits_smallstrip.dds"
noOfFrames = 6
}
spriteType = {
name = "GFX_unitpanel_specialtroops_bigstrip"
texturefile = "gfx\\interface\\unitpanel_specialunits_bigstrip.dds"
noOfFrames = 6
}
common\modifier_definitionsmy_special_unit = {
show_as_percent = no
is_good = yes
is_monthly = no
is_hidden = no
max_decimals = 0
}
my_special_unit_offensive = {
show_as_percent = yes
is_good = yes
is_monthly = no
is_hidden = no
max_decimals = 2
}
my_special_unit_defensive = {
show_as_percent = yes
is_good = yes
is_monthly = no
is_hidden = no
max_decimals = 2
}
my_special_unit_morale = {
show_as_percent = yes
is_good = yes
is_monthly = no
is_hidden = no
max_decimals = 2
}
my_special_unit;Special unit;;;;;;;;;;;;;x my_special_unit_offensive;Special unit Offensive;;;;;;;;;;;;;x my_special_unit_defensive;Special unit Defensive;;;;;;;;;;;;;x my_special_unit_morale;Special unit Morale;;;;;;;;;;;;;x my_special_unit_modifier;Combat Modifier boost to Special unit Troops: $PERC$;;;;;;;;;;;;;x
common\technology in this case, typically associated to technology of its base_type (here TECH_HEAVY_INFANTRY):TECH_HEAVY_INFANTRY = {
modifier = {
(...)
my_special_unit_OFFENSIVE = 0.6
my_special_unit_DEFENSIVE = 0.6
}
}
Tactics are defined in the /common/combat_tactics/ folder. The format is:
<tactic_name> = {
days = 1
sprite = 1
group = <tactic_group_name>
trigger = {
phase = <tactic_phase>
}
mean_time_to_happen = {
days = 3
}
}
Crusader Kings II\gfx\interface\combat_tactic_strip.dds. Inside Crusader Kings II\interface\combat.gfx the properties spritetypes are defined.To illustrate, here is an example of a tactic from the the file 00_combat_tactics.txt in vanilla:
stand_fast_tactic = {
days = 18
sprite = 3
group = stand_fast
trigger = {
phase = melee
pikemen = 0.01
location = {
terrain = forest
}
}
mean_time_to_happen = {
days = 3
modifier = {
factor = 1.5
flank_has_leader = yes
leader = {
martial = 8
}
heavy_troops = {
who = pikemen
value = 0.7
}
}
modifier = {
factor = 1.5
flank_has_leader = yes
leader = {
martial = 12
}
heavy_troops = {
who = pikemen
value = 0.6
}
}
modifier = {
factor = 1.5
flank_has_leader = yes
leader = {
martial = 16
}
heavy_troops = {
who = pikemen
value = 0.5
}
}
}
knights_offensive = -1.5
heavy_infantry_offensive = -1.5
pikemen_offensive = 3
enemy = {
group = charge
factor = 3
}
}
| 这是一篇小作品。你可以通过编辑或修订扩充其内容。 如果可以请尽你所能的去协助完善这篇文章。 |
| 历史 | 角色 • 家族 • 省份 • 头衔 • 剧本 |
| 脚本 | 指令 • 条件 • 作用域 • 修正 • 事件 • 决议 |
| 常规 | 定义 • 游戏规则 • 另类开局 • 宗教 • 文化 • 政体 • 特质 • 血脉 • 科技 • 法律 • 建筑 • 宣战理由 • 朝贡国 • 单位 • 目标 • 疾病 • 死亡 • 荣誉头衔 • 社团 • 宝物 • 地图外政权 • 内阁成员 • 贸易路线 • 继承 • 奇观 • 称号 |
| 图像/音效/本地化 | 地图 • 图形 • 盾徽 • 肖像 • 界面 • 小地图 • 音乐 • 本地化 |
| 其他 | 故障排除 • 验证器 • 控制台指令 • 编辑游戏存档 • Steam创意工坊 • EU4转档器模组制作 |
Defines.luaEU4转档器模组制作Steam创意工坊Tactics事件模组制作作用域修正内阁成员模组制作决议模组制作剧本模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宝物模组制作宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件模组制作死亡模组制作法律模组制作游戏规则模组制作特质模组制作界面模组制作疾病模组制作目标模组制作盾徽模组制作省份模组制作社团模组制作科技模组制作称号模组制作继承模组制作编辑游戏存档肖像模组制作脚本荣誉头衔模组制作血脉模组制作角色模组制作贸易路线模组制作音乐模组制作验证器