群星
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Leader modding
”
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
高级
特殊字符
帮助
标题
2级
3级
4级
5级
格式
插入
拉丁字母
扩展拉丁字母
国际音标
符号
希腊字母
希腊字母扩展
西里尔字母
阿拉伯字母
扩展阿拉伯字母
希伯来字母
孟加拉语字符集
泰米尔数字和符号
泰卢固语字符集
僧伽罗语字符集
梵文字符集
古吉拉特语字符集
泰语字符集
老挝语
高棉语字母
加拿大原住民音节文字
卢恩
Á
á
À
à
Â
â
Ä
ä
Ã
ã
Ǎ
ǎ
Ā
ā
Ă
ă
Ą
ą
Å
å
Ć
ć
Ĉ
ĉ
Ç
ç
Č
č
Ċ
ċ
Đ
đ
Ď
ď
É
é
È
è
Ê
ê
Ë
ë
Ě
ě
Ē
ē
Ĕ
ĕ
Ė
ė
Ę
ę
Ĝ
ĝ
Ģ
ģ
Ğ
ğ
Ġ
ġ
Ĥ
ĥ
Ħ
ħ
Í
í
Ì
ì
Î
î
Ï
ï
Ĩ
ĩ
Ǐ
ǐ
Ī
ī
Ĭ
ĭ
İ
ı
Į
į
Ĵ
ĵ
Ķ
ķ
Ĺ
ĺ
Ļ
ļ
Ľ
ľ
Ł
ł
Ń
ń
Ñ
ñ
Ņ
ņ
Ň
ň
Ó
ó
Ò
ò
Ô
ô
Ö
ö
Õ
õ
Ǒ
ǒ
Ō
ō
Ŏ
ŏ
Ǫ
ǫ
Ő
ő
Ŕ
ŕ
Ŗ
ŗ
Ř
ř
Ś
ś
Ŝ
ŝ
Ş
ş
Š
š
Ș
ș
Ț
ț
Ť
ť
Ú
ú
Ù
ù
Û
û
Ü
ü
Ũ
ũ
Ů
ů
Ǔ
ǔ
Ū
ū
ǖ
ǘ
ǚ
ǜ
Ŭ
ŭ
Ų
ų
Ű
ű
Ŵ
ŵ
Ý
ý
Ŷ
ŷ
Ÿ
ÿ
Ȳ
ȳ
Ź
ź
Ž
ž
Ż
ż
Æ
æ
Ǣ
ǣ
Ø
ø
Œ
œ
ß
Ð
ð
Þ
þ
Ə
ə
格式
链接
标题
列表
文件
参考
讨论
说明
输入内容
输出结果
斜体
''斜体文字''
斜体文字
粗体
'''粗体文字'''
粗体文字
粗斜体
'''''粗斜体文字'''''
粗斜体文字
{{version|3.0}} This page is about modding the [[Leaders]]. == Overview == Leader Classes are defined at "common/leader_classes/xxx.txt". Actually, a leader can have separated set of traits for each leader class and will switch between them if their leader class is changed. A leader that becomes the empire ruler receives a new set of ruler traits, overwritting its previous traits and not even traits that increase the leader lifespan can affect the leader for now, before it's elected out from the seat and return to its previous class. You must understand that: * There are 6 kinds of {{yellow|hard-code classes}}, namely Ruler, Governor, Scientist, Admiral, General and Envoy, and 6 kinds of {{green|shell classes}} to define some moddable characteristics. * Everywhere else that referencing to a leader class are referencing to {{yellow|hard-code classes}}, not the {{green|shell classes}}. * Adding more {{green|shell classes}} doesn't make sense because they are never called by the game engine. * Removing the {{green|shell classes}} doesn't crash the game but this kind of leaders can't be generated. This article is talking about the modding of {{green|shell classes}}. There is no way to mod {{yellow|hard-code classes}}. == Data Structure == {| class="wikitable mw-collapsible" |- ! width="30%" | Property ! width="70%" | Description |- | '''max_trait_points = <int>''' | The number of trait points. Leader traits have "costs" that a newly generated leader can't have more trait points than the number specified here. All vanilla leader traits that can be given to a newly generated leader have trait cost 1. Rulers have 2 trait points, making them to be generated with 2 traits. Envoys have 0, making them to have no traits upon generation. Other leader classes have 1. |- | '''resources''' | An [[Economy_modding#Economy_Units|Economy Unit]] to define the hiring cost and upkeep of this leader. Though vanilla unused, leaders can also produce resourced. |- | '''default_category''' | A newly generated leader of this {{green|shell class}} will fall into the specified {{yellow|hard-code class}} by default. |- | '''can_govern_planet = <yes/no>'''<br>'''can_research = <yes/no>'''<br>'''can_lead_navy = <yes/no>'''<br>'''can_lead_army = <yes/no>'''<br>'''can_rule_empire = <yes/no>'''<br>'''can_be_envoy = <yes/no>''' | Defines what kind of tasks can this leader be assigned to. Making a leader to do something that's usually not its job will switch its {{yellow|hard-code class}} and it receives a new set of traits for that class if it doesn't have yet. |} There is a few practical we can do with leader classes, for example: * Modify the trait points of leaders to make them spawn with more traits. * Add "produces" with "potential" to the economy units to implement something that make leaders to produce resources. == Dynamic Modding == === How to scope to a leader === Use scopes like <code>leader</code> and <code>ruler</code> to scope to the leader that's leading something. Use scopes like <code>every_owned_leader</code> and <code>every_pool_leader</code> to evaluate some Effects through all leaders in an Empire that meet some conditions. Envoys can't be scoped this way. Since Stellaris v2.7.1, a few more statements have been implemented for Envoys. * <code>any/every/random/count_envoy</code> can be used to scope to Envoys. * <code>has_envoy_task = { task = harm_relations/improve_relations/galactic_community/federation (optional: who = country) }</code> to check Envoy assignment. * <code>envoy_location_country</code> can be used on Envoys to scope to the Empire this Envoy is harming / improving relation with. * <code>has_envoy_cooldown = yes/no</code> to check if an Envoy is at cooldown, === How to make leaders spawn with a trait, like Psychic === Use the On-Actions <code>on_leader_spawned</code>, <code>on_ruler_set</code> and <code>on_ruler_back_to_pre_ruler_class</code> to manually add and remove traits of Leaders. See [[Event modding]] for details. === How to modify leader starting age === These can be modified through species classes and species traits. See [[Species modding]] and [[Traits modding]] for details. {{ModdingNavbox}} [[Category:模组制作]]
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
Template:Clear
(
编辑
)
Template:Color
(
编辑
)
Template:Green
(
编辑
)
Template:ModdingNavbox
(
编辑
)
Template:Navbox
(
编辑
)
Template:Navboxgroup
(
编辑
)
Template:Version
(
编辑
)
Template:Yellow
(
编辑
)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录