称号模组制作:修订间差异

本页面所适用的版本可能已经过时,最后更新于3.2
无编辑摘要
(16:42, 30 November 2019‎ Pjoelj)
第1行: 第1行:
{{version|3.2}}
{{version|3.2}}


[[Nickname]]s are epithets defined in files in the <code>common/nicknames</code> folder.
[[ 称号]] are epithets defined in files in the <code>common/nicknames</code> folder.


Any nickname defined in one of these files can be added using the <code>give_nickname</code> [[commands|command]]. They can also be granted at random based on conditions defined on the nicknames.
Any nickname defined in one of these files can be added using the <code>give_nickname</code> [[commands|command]]. They can also be granted at random based on conditions defined on the nicknames.

2020年12月25日 (五) 22:40的版本


称号 are epithets defined in files in the common/nicknames folder.

Any nickname defined in one of these files can be added using the give_nickname command. They can also be granted at random based on conditions defined on the nicknames.

Definition

Name Type Description Example
allow Conditions Optional. The conditions a character must fulfill to be eligible to receive the nickname randomly. If missing, nickname can only be obtained with the give_nickname command.
allow = {
    age = 16
}
chance MTTH Optional. The odds of an eligible character receiving the given nickname (presumably in percent per year). If missing, nickname can only be obtained with the give_nickname command.
chance = {
    factor = 5

    modifier = {
        factor = 2
        stewardship >= 8
    }
}

Localisation

Nicknames take their localization from a key with the same name as the nickname. For example, the nickname nick_the_swift would look for the localization key also called nick_the_swift. Nicknames typically begin with nick_, but this is not enforced. For nicknames which use localization commands, those commands are only evaluated when the nickname is handed out - a nickname will not change after it's been obtained.