群星
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Portrait modding
”(章节)
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
=== Alternative: Non-intrusive Replacer === This subsection is an innovative new method to add a new portrait into the game as a replacer, but in a non-intrusive way. This method should: * Not change the checksum, thus preserving the allowing of Achievements * Change the portrait of an existing portrait group, and the modded portrait only appears when the species name, or empire flag, matches a certain condition. * Allow both the unmodded portrait and the modded portrait to coexist in the same game. # Perform the above steps, but skip any change in the "common" folder. # Instead, pick a vanilla portrait group to replace, and include a replacement file for that portrait class. In this example, we will use "Humanoid 2". ## Copy <code>\gfx\portraits\portraits\09_portraits_humanoid.txt</code> into your mod folder ## Open the working copy (the one in your mod folder) and look for the <code>portrait_groups</code> block. ## Find <code>humanoid_02</code>, and comment the whole block by adding a "'''#'''" in front of every line. ### If using [[wikipedia:Notepad++|Notepad++]], replace "'''\n'''" with "'''\n#'''" within the selection does the trick. ### Depending on the portrait group you have chosen to replace, choose the corresponding file. Some simple portraits don't have a portrait group, e.g. rep2, then you may skip this step. ## Go to your own Portrait file, which you have defined your own portraits and groups, add several triggers, checking the species name, to the blocks. A working example looks like this: <syntaxhighlight lang="ruby"> portrait_groups = { mol14 = { default = batarian_male game_setup = { # will run with a limited country scope. species and government is set but the country does not actually exist add = { trigger = { ruler = { gender = male } } portraits = { batarian_male mol14 } } # Omitted due to repetitive patterns } # species scope species = { # generic portrait for a species add = { trigger = { is_species = "Batarian" } portraits = { batarian_male batarian_female } } add = { trigger = { NOT = { is_species = "Batarian" } } portraits = { mol14 } } } # pop scope pop = { # for a specific pop # Omitted due to repetitive patterns } # leader scope leader = { # scientists, generals, admirals, governor add = { trigger = { gender = female is_species = "Batarian" } portraits = { batarian_female } } # Omitted due to repetitive patterns add = { trigger = { NOT = { is_species = "Batarian" } } portraits = { mol14 } } } # leader scope ruler = { # Omitted due to repetitive patterns } } } </syntaxhighlight> * <code>game_setup</code> governs which portraits are added to the empire designer where you can choose the portraits for your first ruler. It has no bearing in the game. * <code>species</code> and <code>pop</code> are very similar. ** <code>species</code> is about which portrait to display in the species screen, and which portraits to represent this species. ** <code>pop</code> is about which portraits can be chosen for creating pops of this species. * <code>leader</code> and <code>ruler</code> are scopes for creating leaders and rulers. In the above example, the portrait remains as Molluscoid 14 whenever it is not named "Batarian". When it is named "Batarian", the corresponding batarian portraits will replace the portrait. And in a game, an empire of Batarian and Molluscoid 14 can co-exist without conflicting each other. A similar method can be used to only replace the portrait for a specific empire. Instead of asking for <code>is_species</code>, ask for <code>has_country_flag</code>. A working example is this: <syntaxhighlight lang="Haskell"> trigger = { owner = { has_country_flag = "me_cerberus" } NOT = { is_species = "Husk" } } </syntaxhighlight> This asks first the species name is not "Husk", and then it checks if the empire has the flag "me_cerberus". * Then, you need to make a prescripted empire and include the lines: <syntaxhighlight lang="Haskell"> flags = { "me_cerberus" } </syntaxhighlight> * All subsequent empires saved out of this prescripted empire should inherit the flag, and therefore will trigger the portrait replacement.
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录