王国风云2
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问王国风云2百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“单位模组制作”的源代码
←
单位模组制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|2.6}} ==Basic troops== 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 <code>EMFXActorType</code> or <code>pdxmesh</code> gfx entries, based on the culturegfx of the units: * culturegfx_<unit_type> * culturegfx_<unit_type>_rider (for mounted units) * culturegfx_<unit_type>_weapon * culturegfx_<unit_type>_helmet * culturegfx_<unit_type>_shield culturegfx is the first matching <code>unit_graphical_cultures</code> of the culture (if any), otherwise the <code>graphical_cultures</code>, defaulting to westerngfx. See <code>interface/avatars.gfx</code> for the base game units assets. ==Special troops== To add a special troops the steps are to: *Add a unit in <code>common\special_troops</code>: <pre> 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 } </pre> *Add the unit sprite into <code>gfx\interface\unitpanel_specialunits_bigstrip.dds</code> and <code>gfx\interface\unitpanel_specialunits_smallstrip.dds</code> The noOfFrames in <code>interface\unitpanel.gfx</code> needs to be increased <pre> 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 } </pre> * Add a modifier definition in <code>common\modifier_definitions</code> <pre> my_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 } </pre> * Add the localization: <pre> 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 </pre> * Add the new unit in <code>common\technology</code> in this case, typically associated to technology of its base_type (here TECH_HEAVY_INFANTRY): <pre> TECH_HEAVY_INFANTRY = { modifier = { (...) my_special_unit_OFFENSIVE = 0.6 my_special_unit_DEFENSIVE = 0.6 } } </pre> ==Tactics== [[Tactics]] are defined in the <code>/common/combat_tactics/</code> folder. The format is: <pre> <tactic_name> = { days = 1 sprite = 1 group = <tactic_group_name> trigger = { phase = <tactic_phase> } mean_time_to_happen = { days = 3 } } </pre> * "days" refers to the amounts of days a tactic will last. If it is set as "1" the tactic will last for one day, if it is set as "2" it will last for two days etc. * "sprite" defines the sprite the tactic will have. The number corresponds with the index of a tactics icon, which are defined inside <code>Crusader Kings II\gfx\interface\combat_tactic_strip.dds</code>. Inside <code>Crusader Kings II\interface\combat.gfx</code> the properties spritetypes are defined. * "group" is the tactic group that the tactic belongs to. In vanilla, the groups skirmish, harass, swarm, volley, defensive, swarm, charge, stand_fast and advance are used. To illustrate, here is an example of a tactic from the the file <code>00_combat_tactics.txt</code> in vanilla: <pre> 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 } } </pre> {{stub}} [[Category:模组制作]] {{ModdingNavbox}}
本页使用的模板:
Template:Ambox
(
查看源代码
)
Template:Ambox/core
(
查看源代码
)
Template:Clear
(
查看源代码
)
Template:ModdingNavbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Stub
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
单位模组制作
。
×
登录
密码
记住登录
加入王国风云2百科
忘记密码?
其他方式登录