荣誉头衔模组制作

本页面所适用的版本可能已经过时,最后更新于2.7


获得荣誉头衔时会得到威望和其他角色的好感度修正,这定义在 /common/minor_titles/ 文件夹。

注意:荣誉头衔一顶会领主的主要头衔所审查。因此,不可能把荣誉头衔赐给一个居住在不同宫廷的角色。(应该是指内阁的荣誉头衔)

基础的荣誉头衔

制作一个荣誉头衔的方法很简单。在你mod文件夹下的 /common/minor_titles/ 文件夹下面创建一个新的txt文件。一旦这个新的荣誉头衔没有在游戏本体中的 /common/minor_titles/ 文件夹下面找到,则该荣誉头衔会被添加到游戏里。

title_houndmaster = {
    dignity = 0.10
    grant_limit = 1
    opinion_effect = 5

    monthly_salary = 0.1
    monthly_prestige = 0.15

    is_unique = yes

    allowed_to_hold = {
        is_adult = yes
        NOT = { trait = incapable }
    }
    allowed_to_grant = {
        AND = {
            is_feudal = yes
            OR = {
                has_landed_title = k_lalaland
                has_landed_title = k_timbuktu
            }
        }
    }
}

上面的例子将添加一个荣誉头衔,可以授予任何没有能力的成年人。这可以让你赐予lalaland王爵timbuktu和王爵头衔,但是被赐予者要是封建类型政府的角色才行。

Properties

变量名称 变量类型 变量说明 代码示例
is_high_prio bool 当标题为空时显示警报。 is_high_prio = yes
show_as_title bool 这个荣誉头衔将会变成持有者的主要头衔,并且覆盖其他的伯爵、公国等等头衔。 show_as_title = yes
realm_in_name bool 在头衔后附加国家名称(Queen [of Sweden]) realm_in_name = yes
is_voter bool 持有人是否在内阁中拥有席位。详见Councillor modding. is_voter = yes
dignity number 为持有者增加指定的尊严。 dignity = 0.10
attribute attribute 可选的主要属性,将提高持有人的某个属性值。打开UI时,默认情况下将使用此属性对候选人进行排序。 attribute = martial
grant_limit integer 该头衔的最大持有者。 grant_limit = 1
opinion_effect integer 持有该头衔角色的领主对该角色的好感度修正,5代表+5好感。 opinion_effect = 5
monthly_salary number 这个荣誉的持有者每月获得的钱。 monthly_salary = 0.1
monthly_prestige number 这个荣誉的持有者每月获得的声望。 monthly_prestige = 0.15
is_unique bool 这个头衔是否可以与另一个荣誉头衔累积。 is_unique = yes
allowed_to_hold conditions (character scope) 决定哪些角色有资格持有该荣誉头衔。 ROOT代表检查该角色,FROM代表授予头衔的领主。
allowed_to_hold = {
    is_adult = yes
    NOT = { trait = incapable }
}
allowed_to_grant conditions (character scope) 决定谁可以赐予该头衔给别人。可能受到宗教、特质、领主头衔的限制。
allowed_to_grant = {
    has_landed_title = k_lalaland
}
gain_effect commands (character scope) 当领主赐予该头衔给别人时,会Fires
revoke_trigger conditions (character scope)
revoke_trigger = {
  FROM = {
    primary_title = {
      NOT = { 
        AND = {
          has_law = succession_voting_power_1
          ROOT = { is_powerful_vassal = yes }
        }
      }
    }
  }
}
lose_effect commands (character scope) 当一个头衔的变量allowed_to_hold值为false时,会Fires
lose_effect = {
  opinion = { 
    who = FROM
    modifier = opinion_fired_from_council
  }
}
retire_effect commands (character scope)
death_effect commands (character scope) 当一个拥有该头衔的角色死亡时会Fires
message bool 设置后向其所有者发送消息
patrician_heir bool 确定贵族继承人的特殊头衔 patrician_heir = yes
counts_as_purple_born bool 拥有这一头衔的人被视为拜占庭帝国继承的出生于紫室之人。 counts_as_purple_born = yes
<other fields> character modifiers 应用于头衔持有人的修正。

本地化

如果希望在游戏中正确显示和描述荣誉头衔,我们需要添加一些本地化。在你的mod文件夹下的/localisation/文件夹下面一定要有一个CSV文件,这个文件的名字可以是00_Minor_titles.csv.

#CODE;ENGLISH;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
title_houndmaster;Houndmaster;;;;;;;;;;;;;x
title_houndmaster_desc;An honorary title granted to the finest master of canines in the land.;;;;;;;;;;;;;x

请注意,描述的代码只是末尾带有_desc的荣誉头衔的代码。