王国风云2
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问王国风云2百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“角色模组制作”的源代码
←
角色模组制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|2.7}}[[File:Character.jpg|400px|thumb|right|Character data show up on the character screen. Note that character titles are indirectly defined via title history.]] [[File:Dynasty.jpg|thumb|right|500px|Once common ancestors of characters from the same dynasty are setup, it will form a clean dynastic tree.]] [[Characters]] are defined in the files contained within ''/history/characters/'' folder. ==Structure== These files contain blocks of unique character IDs with the following basic structure: <pre> <char_ID> = { #Character attributes name = "John" dynasty = <dynasty_ID> religion = <religion> culture = <culture> father = <char_ID> mother = <char_ID> #Character history <yyyy.mm.dd> = { birth = yes } <yyyy.mm.dd> = { death = yes } } </pre> For instance: <pre> 122 = { name="Harold" # Godwineson, king of England dynasty=756 dna="medjejoencc" properties="ae00e0" martial=8 diplomacy=6 intrigue=5 stewardship=6 religion="catholic" culture="saxon" add_trait="arbitrary" add_trait="proud" add_trait="skilled_tactician" father=120 mother=101534 1025.1.2={ birth=yes } 1048.1.1={ add_spouse=131 #Ealdgyth 'Swanneck' } 1064.1.1={ remove_spouse = 131 } 1065.6.6={ add_spouse=123 #Ealdgyth of Mercia } 1066.9.14 = { raise_levies = { location = 62 # Leicester force_mult = 2.5 } } 1066.10.14={ raise_levies = { dismiss = yes location = 62 # Leicester force_mult = 2.5 } death = { death_reason = death_battle killer = 140 } } } </pre> ==Character attributes== The following attributes can be used to define characters: {| class="wikitable" !Attribute !Type !Description !Example |- |name |string |Name of the character, as it will appear in the game. '''Not a localization key''' |name = "Harold" |- |female |bool |Character's sex |female = yes |- |dynasty |dynastyID |Dynasty of the character, using a numerical ID corresponding to one from the [[Dynasty modding]] file.If you want to create a random dynasty just write dynasty=random,and if you want to change to a new dynasty in an event,you can write dynasty=father_bastard '''Warning''': dynasty=none doesn't work anymore.<ref>[[forum:1016862]]</ref><ref>[https://forum.paradoxplaza.com/forum/index.php?threads/2-7-1-bpah-dynasty-generation.1016862/#post-23086803]</ref> Use the <code>effect={ dynasty=none }</code> in the birth date clause. |dynasty = 756<br />1000.1.1= { birth=yes effect= { dynasty=none } } |- |father |charID |Father of the character, using a unique numerical ID |father = 120 |- |real_father |charID |Not used in vanilla |real_father = 121 |- |mother |charID |Mother of the character, using a unique numerical ID |mother = 101534 |- |dna |string |An 11-digit alphanumerical code, that contributes to the game engine's genetics and inheritance system, defining the appearance of a character. See [[Portrait modding]] |dna = "medjejoencc" |- |properties |string |A 6-digit or 11-digit alphanumerical code defining the character's clothing, headgear ''etc''. See [[Portrait modding]] |properties = "ae00e0" <br/> properties = "aj00bb00000" |- |martial |integer |Base martial skill of the character |martial = 8 |- |diplomacy |integer |Base diplomacy skill of the character |diplomacy = 6 |- |intrigue |integer |Base intrigue skill of the character |intrigue = 5 |- |stewardship |integer |Defines the base stewardship skill of the character |stewardship = 6 |- |learning |integer |Base learning skill of the character | learning = 4 |- |health |integer |Base health of the character | health = 7 |- |fertility |float |Base fertility of the character | fertility = 0.8 |- |religion |religion |Character's religion, using an ID from the [[Religion (Modding)|religion]] files |religion = "catholic" |- |secret_religion |religion |Character's secret religion, using an ID from the [[Religion (Modding)|religion]] files |secret_religion = "bon" |- |culture |culture |Character's culture, using an ID from the [[Culture (Modding)|culture]] files |culture = "saxon" |- |race |culture |Character's "race", using an ID from the [[Culture modding|culture]] files. The character's ''graphical culture and appearance'' will use the <code>culturegfx</code> assigned to that culture. Used for characters of a different ethnicity than the culture they were raised in (e.g. adoption), not used in the Vanilla rendition. |race = "mongol" |- |trait / add_trait |trait |Adds a trait to the character, using an ID from the [[Traits (Modding)|traits]] files. Characters without traits will be randomly assigned several on game start. |trait = "skilled_tactician" |- |disallow_random_traits |bool |Prevents additional traits from being randomly assigned to a character by the game, except through subsequent events |disallow_random_traits = yes |- |occluded |bool |See [[Portrait modding]] |occluded = yes |- |historical |bool |Flags the character as important, so that they will never be pruned from the database<ref>https://forum.paradoxplaza.com/forum/index.php?threads/modding-quick-questions.589686/page-1323#post-20928691</ref> |historical = yes |- |easter_egg |bool |Prevents the character from being assigned to a society at game start |easter_egg = yes |- |} ==Character history== Important events in the character's life - such as birth, marriage and marrying a spouse - are defined as group tags by year and date. CKII uses as ''year.month.day'' format, so a character born on the 3rd January 874 would be defined as such: 874.1.3 = { birth = yes } The group tag defines the date of the event, while flags within the group tag define both what the event is and, for birth and death only, what date will be displayed. Mismatching dates are not fatal, but may be confusing in-game. Each group tag date with a character definition can contain some history commands. ===List of history commands=== Note: in case there is no dedicated history command, it is possible to execute a character scope [[commands|command]] via the general purpose <code>effect</code> clause. {| class="wikitable" !Attribute !Type !Description !Example |- |birth |yes/date |Defines when the character was born |birth = yes |- |death |yes/date/clause |Defines when the character dies. Inside the clause, can specify: *'''death_reason''': the cause of death. Possible values: death_natural (default), death_trait (health trait complication, see [[trait modding]]), death_murder, death_murder_unknown, death_hashshashin, death_battle, death_duel, death_execution, death_dungeon, death_sacrificed, death_accident, death_suicide, death_rabble, death_childbirth. *'''killer''': the killer/executor (charID), ex: killer = 122 |death = yes <br/> death = {death_reason = death_murder killer = 191004} |- |add_claim |title |Adds a strong claim to the character, corresponding to an alphanumerical ID from the landed titles files. Note: to add a weak claim the following can be used: <pre> effect = { add_weak_claim = k_england } </pre> |add_claim = k_england |- |remove_claim |title |Removes a claim |remove_claim = k_england |- |add_spouse |charID |Defines a marriage between the character and another. Uses a character ID |add_spouse = 121 |- |add_matrilineal_spouse |charID | |add_matrilineal_spouse = 121 |- |add_consort |charID |Makes another character this character's consort/concubine. Uses a character ID |<code>add_consort = 121</code> |- |remove_spouse |charID |Defines the end of a marriage between the character and another. Uses a character ID |remove_spouse = 121 |- |add_lover |charID | |add_lover = 122 |- |employer |charID |Will move the character to the court of another character. Uses a character ID |employer = 122 |- |give_job_title |job |Usually used under the same date tag as ''employer'', to give the character a job in another character's court |give_job_title = job_marshal |- |give_nickname |nickname |Gives the character a nickname, corresponding to an alphanumerical ID from the [[Nicknames (Modding)|nicknames]] files |give_nickname = nick_the_great |- |prestige |int | |prestige = -50 |- |piety |int | |piety = -50 |- |decadence |int | |decadence = 50 |- |wealth |int | |wealth = -500 |- |remove_trait |trait | |remove_trait = "crusader" |- |capital |title |Moves the capital |capital = c_toledo |- |dynasty |dynasty |Changes the dynasty |dynasty = 101183 |- |effect |[[commands]] |Commands to apply at that date, in character scope. Note that these commands are only executed once the game starts, which could cause discrepencies on the lobby<ref>[[forum:874495/page-6#post-19819486]]</ref>. Will only execute if the character is not dead. |effect = { give_minor_title = title_despot } <br/> effect = { set_character_flag = is_ragnar_lodbrok } |- |effect_even_if_dead |[[commands]] |As above, but will be executed even after the character's death. | |- |raise_levies |clause |See details below |<pre> raise_levies = { location=340 # Palermo force_mult=1.5 } </pre> |- |immortal_age |int |Sets the physical age at which a character became immortal. Must add a trait with immortal also! Note that without <code>immortal_age</code>, a character that is between 256 and 271 (255+16) years old at any given start date will appear as a child (forever) due to an integer overflow.<ref>[[forum:1157045]]</ref> |<code>immortal_age = 20</code> |- |} ===Raise levies=== The following code is used to make Harold Godwineson raise an army in Leicester, 2.5 times the ordinary levy size, on 14 September 1065: 1066.9.14 = { raise_levies = { location = 62 # Leicester force_mult = 2.5 } } The next month, Harold Godwineson can be made to dismiss his army, having lost the Battle of Hastings: 1066.10.14={ raise_levies = { dismiss = yes location = 62 # Leicester force_mult = 2.5 } } Of course, Harold also died during the battle, so one can add a ''death'' group tag, within which one can specify that he died in battle and was killed by William the Conqueror (ID 140): 1066.10.14={ raise_levies = { dismiss = yes location = 62 # Leicester force_mult = 2.5 } death = { death_reason = death_battle killer = 140 } } ==Wikipedia link== To enable the Wikipedia icon link (opening in out-of-game browser), create a localization key with format <code>W_L_<character_ID></code>: <code>W_L_200600;http://en.wikipedia.org/wiki/Sverker_I_of_Sweden;http://fr.wikipedia.org/wiki/Sverker_Ier_de_Su%C3%A8de ;;;;;;;;;;;;x</code> ==References== <references/> [[Category:模组制作]] {{ModdingNavbox}} [[en:Character modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:ModdingNavbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
角色模组制作
。
×
登录
密码
记住登录
加入王国风云2百科
忘记密码?
其他方式登录