该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。
最后版本 | 您的文本 | ||
第1行: | 第1行: | ||
{{需要翻译}} | {{需要翻译}} | ||
Modding characters involves changing their appearance, data and behaviour. This can vary from small tweaks like adding gold or piety, to complex changes like scripting new visual effects and more. | |||
== | == Changing appearance through scripts == | ||
Crusader Kings 3 uses a DNA system to define a character's appearance, which has changed from the one used in Crusader Kings 2. These changes allow for more specific and realistic appearances. | |||
You can change a character's DNA through dna_modifiers. Create a file in {{cite file|gfx/portraits/portrait_modifiers}} with any filename and add this: | |||
<pre> | <pre> | ||
第36行: | 第36行: | ||
</pre> | </pre> | ||
This will add the western_imperial headgear and change the hair color of any character with the "dna_change_example_modifier" flag. You can add a flag to a character with the add_character_flag command, like this: | |||
<pre> | <pre> | ||
第44行: | 第44行: | ||
</pre> | </pre> | ||
If you encounter any issues, check the error.log of the game for any specific error messages and correct your script accordingly. | |||
== | == Adding new characters or changing existing == | ||
For some mods, for example total conversions, new characters are needed. In Crusader Kings 3 this kind of character modding is pretty easy. | |||
After creating your mod (which is explained in a corresponding article), you have to edit an existing or create a new txt.-file in the folder {{cite file|example-mod/history/characters}}. | |||
In our example the file will be named {{cite file|example.txt}}. An example character will look like this: | |||
<pre> | <pre> | ||
999001 = { | 999001 = { | ||
第80行: | 第80行: | ||
} | } | ||
</pre> | </pre> | ||
* | * First of all, a character ID is assigned. The ID needs to be unique; going for 900000 and further should be safe. This ID is used to refer to the character within the game files. | ||
* | * The first name of the character can be set via the use of <code>name = "NAME"</code>. Note that in-game names may change based on culture (see [[culture modding]]). | ||
* | * In the dna-line the path for a specific dna can be inserted. An existing dna from the {{cite file|00_dna.txt}} in {{cite file|common/dna_data}} can be used or an new created by using the portrait editor. | ||
* | * To set the character's gender to female, use <code>female = yes</code>. | ||
* | * A character can be added to an existing or a new dynasty. Use <code>dynasty = DYNASTY_ID</code> for dynasties without houses, or <code>dynasty_house = HOUSE_ID</code> otherwise. The dynasty ID and house ID can be found in {{cite file|common/dynasties}} and {{cite file|common\dynasty_houses}}, respectively. See [[dynasties modding]]. | ||
* | * Culture and faith must be assigned with <code>culture = CULTURE_ID</code> and <code>religion = FAITH_ID</code>, respectively. The right names can be found by searching in the corresponding folders {{cite file|common/culture}} and {{cite file|common/religion}}. | ||
* | * Attributes can be set freely. Their value caps at 100. If they are not assigned, the game will generate random values. Note that this only adds to the character's ''base'' attribute values, so the final value may be smaller or larger depending on traits and other factors. The attributes are as follows: | ||
:* <code>martial</code> | :* <code>martial</code> | ||
:* <code>prowess</code> | :* <code>prowess</code> | ||
第93行: | 第93行: | ||
:* <code>stewardship</code> | :* <code>stewardship</code> | ||
:* <code>learning</code> | :* <code>learning</code> | ||
* | * Traits can be added through the use of <code>trait = TRAIT_ID</code>. Replace <code>TRAIT_ID</code> with the appropriate [[trait ID]]. An unlimited amount of traits may be added; unless assigned or specified otherwise, the game will generate random traits. To ensure that traits are not changed at the start of the game, use <code>disallow_random_traits = yes</code>. | ||
* | * Parents may be optionally assigned by using <code>father = CHARACTER_ID</code> and <code>mother = CHARACTER_ID</code>. Ensure that one uses the target character's ID, as opposed to their name. This can be useful in creating families. | ||
* | * Sexuality can be set through <code>sexuality = SEXUALITY_ID</code>. The following can be used: | ||
:* <code>asexual | :* <code>asexual</code> | ||
:* <code>heterosexual | :* <code>heterosexual</code> | ||
:* <code>homosexual | :* <code>homosexual</code> | ||
:* <code>bisexual | :* <code>bisexual</code> | ||
* | * Set the character's base health through <code>health = HEALTH_VALUE</code>, and fertility with <code>fertility = FERTILITY_VALUE</code>. | ||
* | * Finally, birth and death of the character have to be defined. Crusader Kings 3 uses <code>yyyy.mm.dd</code> for date formats. Define a date block using <code>DATE = {...}</code>, replacing <code>...</code> with <code>birth = yes</code> or <code>death = yes</code>. Alternatively, replace <code>yes</code> with the date surrounded by speech marks (<code>"</code>). See [[#Advanced use of date blocks|more uses of date blocks]]. | ||
The same steps work for changing existing characters. Sometimes, like for Charlemagne, there are already most of the possible lines. | |||
=== Advanced use of date blocks === | === Advanced use of date blocks === | ||
第135行: | 第135行: | ||
</pre> | </pre> | ||
== | == References == | ||
<references/> | <references/> | ||
{{Modding navbox}} | {{Modding navbox}} | ||
[[Category:模组制作]] | [[Category:模组制作]] | ||
[[en:Characters modding]] | [[en:Characters modding]] |