版本 Diff 差异对比

条目:顾问修改 · 对比历史版本与当前版本间的真实 Wikitext 差异

+20 行新增-19 行移除
历史基准版本Rev #67104
(未填写修改说明)
Pokewiz2020-05-10 09:32:38
当前最新版本Rev #79954
当前线上生效正文
Pokewiz2021-01-29 11:26:59
Wikitext 语法逐行变动
当前版本新增历史版本移除
- {{version|1.23}}
+ {{Version|1.30}}
== 快速检查单 ==
如何添加新的顾问类型:
* 在 common/advisortypes 文件夹新建一个.txt文件。
* 在这个文件给新的顾问类型创建一条记录。
* 在本地化文件中添加名字和描述。
* 为新的顾问添加男性和女性的图标。
== 添加一个顾问 ==
- {{SVersion|1.23}}
-
+ {{SVersion|Timeless}}
如果是要修改已存在的顾问类型,从原游戏中复制 {{path|common/advisortypes/00_advisortypes.txt}} 到我们的模组文件夹中。
- 如果要添加新的顾问类型,则在同一地址 <code>common/advisortypes/</code> 下新建一个新文件。
+ 如果要添加新的顾问类型,则在同一地址 <code>common/advisortypes/</code> 下新建一个新文件(例如:XX_advisortyeps.txt,其中XX为数字)。
顾问的代码如下图:
<source>
philosopher = {
monarch_power = ADM
# Bonus
prestige = 1
skill_scaled_modifier = { meritocracy = 0.5 }
# allow_only_male = yes
# allow_only_female = yes
chance = {
factor = 1
}
ai_will_do = {
factor = 1
}
}
</source>
<code>Bonus</code> #决定顾问给予的修正类型
<code>monarch_power</code> #决定顾问给予的点数类型和他们出现在哪个顾问槽位
<code>skill_scaled_modifier</code> #此处是按顾问级别提高而修正数值倍增的修正。原版用于有贤能值系统的天朝政体,尽管你可以在这里添加任何修正
<code>allow_only_male</code> #设定该顾问类型是否只出现男性
<code>allow_only_female</code>#设定该顾问类型是否只出现女性
=== 顾问出现的可能性 ===
<code>chance = { }</code> 用于确定顾问是否出现在一个国家的宫廷。所有顾问基本设定为有1的权重,你可以在<code>factor</code>中用<code>modifier</code>来限制顾问出现的权重,就像这样:
<source>
chance = {
factor = 1
modifier = {
factor = 0
tag = FRA
}
}
</source>
这将使这位顾问不会出现在法兰西。任何国家作用域触发器都会工作。
=== AI意愿 ===
<code>ai_will_do = { }</code> 控制ai雇佣顾问的可能性。这个类似于 <code>chance = { }</code> 作用域。
<source>
ai_will_do = {
factor = 1
modifier = {
factor = 0
tag = FRA
}
}
</source>
这将使法兰西的ai不会雇佣这位顾问。任何国家作用域触发器都会工作。
== 本地化 ==
- {{SVersion|1.23}}
+ {{SVersion|Timeless}}
{{main|本地化}}
新顾问应该有本地化的名称和描述,顾问的本地化应该按照以下的格式进行:
<source>
- philosopher:0 \"Philosopher\"
- philosopher_desc:0 \"An advisor dedicated to the study of the fundamental nature of knowledge, reality and existence.\"
+ philosopher:0 "Philosopher"
+ philosopher_desc:0 "An advisor dedicated to the study of the fundamental nature of knowledge, reality and existence."
</source>
== 肖像 ==
- {{SVersion|1.23}}
+ {{SVersion|Timeless}}
+ 图形化资产(assets)例如顾问肖像必须登记在一个 <code>.gfx</code> 文件里。 为此, 你需要创建一个 <code>.gfx</code>文件在你的mod里(例如:XX_advisor.gfx,其中XX为数字), 并按照以下格式为每个新顾问登记:
- 图形化资产(assets)例如顾问肖像必须登记在一个 <code>.gfx</code> 文件里。 为此, 你需要创建一个 <code>.gfx</code>文件在你的mod里, 并按照以下格式为每个新顾问登记:
-
<source>
spriteType = {
- name = \"GFX_advisor_<advisor>\"
- texturefile = \"gfx//interface//advisors//<advisor_icon_name>.dds\"
+ name = "GFX_advisor_<advisor>"
+ texturefile = "gfx//interface//advisors//<advisor_icon_name>.dds"
noOfFrames = 1
norefcount = yes
- effectFile = \"gfx/FX/buttonstate.lua\"
- loadType = \"INGAME\"
+ effectFile = "gfx/FX/buttonstate.lua"
+ loadType = "INGAME"
}
</source>
你还可以通过在顾问名称部分前加上图形化区域前缀来添加特定于某种图形化文化的肖像版本。例如:
<source>
spriteType = {
- name = \"GFX_advisor_asiangfx_philosopher\"
- texturefile = \"gfx//interface//advisors//asian_philosopher.dds\"
+ name = "GFX_advisor_asiangfx_philosopher"
+ texturefile = "gfx//interface//advisors//asian_philosopher.dds"
# ...
}
</source>
此外,你还可以通过在顾问名称部分前加上文化组前缀来创建特定于某种文化组的版本。例如:
<source>
spriteType = {
- name = \"GFX_advisor_iranian_philosopher\"
- texturefile = \"gfx//interface//advisors//persian_philosopher.dds\"
+ name = "GFX_advisor_iranian_philosopher"
+ texturefile = "gfx//interface//advisors//persian_philosopher.dds"
# ...
+ }
</source>
所有顾问也可以有女性肖像,定义如下:
<source>
spriteType = {
- name = \"GFX_advisor_asiangfx_philosopher_female\"
- texturefile = \"gfx//interface//advisors//asian_philosopher_female.dds\"
+ name = "GFX_advisor_asiangfx_philosopher_female"
+ texturefile = "gfx//interface//advisors//asian_philosopher_female.dds"
# ...
}
</source>
== 肖像图标 ==
- 肖像图标资产本身应该被放在 <code>mod_name/gfx/interface/advisors/</code> 以保持一致性。 图标是77*77像素的 [[wikipedia:DirectDraw Surface|.dds 格式]]。
+ 肖像图标资产(assets)本身应该被放在 <code>mod_name/gfx/interface/advisors/</code> 以保持一致性。 图标是77*77像素的 [[wikipedia:DirectDraw Surface|.dds 格式]]。
可以在百科的[[:Category:顾问画像]]查看。
{{Modding navbox}}
[[Category:模组制作]]
[[en:Advisor modding]]