群星
ParaWikis
Notice
: Undefined index: HTTP_ACCEPT_LANGUAGE in
/data/wwwroot/www.parawikis.com/skins/Liberty/LibertyTemplate.php
on line
185
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Anomalies modding
”(章节)
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
=== Example === Consider, for instance, you wish to create an anomaly that only occurs on asteroids (i.e., it can only spawn when surveying an asteroid). Your first step will be making a new anomaly category file in your mod at <code>common\anomalies\</code>. You can name the file whatever you want, but let's call this one <code>my_asteroid_anomaly_category.txt</code>. Your initial skeleton would look like this: <syntaxhighlight lang="PHP"> an_anomaly_category = { should_ai_use = desc = picture = level = null_spawn_chance = max_once = max_once_global = spawn_chance = { base = 1 } on_success = { } } </syntaxhighlight> First you want to define the name of the anomaly category. This must be unique, and the best practice is to use a common prefix across all files and objects you create for any mods you make. In this case we'll go with <code>my_asteroid</code>, which makes the name of your anomaly category <code>my_asteroid_category</code>. Next, set the <code>should_ai_use</code> field to <code>no</code>, as we don't want the pesky AI stealing your narrative masterpiece from the player! The <code>desc</code> field is where you reference a [[Localisation_modding|localization key]] for the description that appears in the situation log; let's call it <code>"my_asteroid_category_desc"</code>. Similarly, the <code>picture</code> field is where you reference a [[Event_pictures|event image]] that will appear in the situation log; let's use <code>GFX_evt_asteroid_field</code>, since this is an asteroid event. Finally, pick an appropriate difficulty level for the anomaly and fill in the <code>level</code> field. This is just a simple asteroid anomaly, so let's go with <code>3</code>. The next set of fields relate to when your anomaly can spawn. The first one, <code>null_spawn_chance</code>, is used to create a chance the anomaly won't spawn even if the anomaly spawn system picks it. This is meant more for making anomalies rarer, so let's just set it to <code>0</code> to disable it. The next two fields, <code>max_once</code> and <code>max_once_global</code>, specify whether or not your anomaly can spawn more than once. Normally you would want to set <code>max_once</code> to <code>yes</code> for more generic anomalies with a single outcome, and <code>max_once_global</code> to <code>yes</code> for narratively unique anomalies that have ramifications extending beyond the empire discovering it. In this case, you want to have several outcomes of this same event, so let's set both to <code>no</code>. Finally, the <code>spawn_chance</code> block determines the weighted chance your anomaly will spawn. This is where we can ensure your anomaly only spawns on asteroids by changing the base chance to <code>0</code> and adding a <code>modifer</code> block to add <code>1</code> when the body is an asteroid. Finally, you can use the <code>on_success</code> block to define the possible events you want to be able to fire when the anomaly is investigated. In this case, you want to define three events, with the first having twice the chance of happening compared to the other two. This is achieved by setting a base chance of <code>2</code> for the first event and <code>1</code> for the other two events. You also don't want the same player to see these events multiple times, so you set the <code>max_once</code> field of each event to <code>yes</code>. These events aren't so unique it wouldn't make sense for other empires to encounter them though, so you set <code>max_once_global</code> to <code>no</code>. Your anomaly category code now looks like the following: <syntaxhighlight lang="PHP"> my_asteroid_category = { should_ai_use = no desc = "my_asteroid_category_desc" picture = GFX_evt_asteroid_field level = 3 null_spawn_chance = 0 max_once = no max_once_global = no spawn_chance = { base = 0 modifier = { add = 1 is_asteroid = yes } } on_success = { 2 = { max_once = yes max_once_global = no anomaly_event = my_asteroid_event.1 } 1 = { max_once = yes max_once_global = no anomaly_event = my_asteroid_event.2 } 1 = { max_once = yes max_once_global = no anomaly_event = my_asteroid_event.3 } } } </syntaxhighlight> <code>my_asteroid_event.1</code>, <code>my_asteroid_event.2</code>, and <code>my_asteroid_event.3</code> are the event IDs of your three anomaly events, one of which will be shown in the continuiation of this example in the next section.
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录