Planet Generation modding

本页面部分全部内容上次核对于2.7版本

This page is about modding Deposits and Planet Modifiers.

Deposits[编辑 | 编辑源代码]

Deposits are objects on Planets that can have its own resource production and upkeep and Modifiers to the planet.

There are two types of Deposits, one being the planetary features for the colonizable planets that can be inspected by the player, and another being the orbital deposits for the uncolonizable planets that usually can't be inspected by the player.

There are two types of planetary features, one being normally pure-benifitial and unremovable and another being normally pure-harmful and can be removed by spending resources, called blockers. Some blockers spawn with an additional planetary feature behind it, but the seemingly "blocked" planetary feature isn't actually added to the planet before the blocker to be cleared. Although vanilla unused, a blocker can also block a blocker behind it.

They are defined at "common/deposits/xxx.txt".

Data Structure[编辑 | 编辑源代码]

Property Planetary Features Planetary Blockers 折叠Orbital Deposits
is_for_colonizable = <yes/no> For habitable planets, is_for_colonizable = yes. Default is = no. For mining station or research station collection, is_for_colonizable = no.
station No.png Determines the type of orbital station required to mine this deposit. One of the following is allowed.
  • shipclass_mining_station
  • shipclass_research_station
icon = <deposit key> This deposit will use the icon of another deposit instead.

The default icon path is gfx/interface/icons/deposits/<deposit key>.dds.

Since orbital deposits can't be normally inspected, this property will normally not be useful.
use_for_min_max_adjustments = <yes/no> If yes, this deposit is used to refresh the maximum districts on planet view. Vanilla have this toggled yes for each deposit that increases maximum number of a certain type of district. No.png
category = <deposit category> For obvious reason the deposit category must NOT specify blocker = yes.

Vanilla use one of the following.

  • deposit_cat_food
  • deposit_cat_energy
  • deposit_cat_minerals
  • deposit_cat_rare
For obvious reason the deposit category must specify blocker = yes.

Vanilla use one of the folliwing.

  • deposit_cat_blockers
  • deposit_cat_rare_blocker
planet_modifier
triggered_planet_modifier
Blocks of Modifiers to be applied to the Planet. Modifiers that add maximum number of buildings / disctricts of a certain type go here. If this deposit is blocked behind a blocker, none of these effects apply. Modifiers that affect Trade value.png Trade Value go here. The Trade Value can be collected without building any stations on the Planet. Other Modifiers don't apply.
country_modifier A block of Modifiers to be applied to the Empire that owns this Planet. No.png
blocked_modifier Vanilla unused but mentioned it in the comments. Presumably Modifiers to be applied to the Planet for as long as this deposit remains blocked behind a blocker.
should_swap_deposit_on_terraforming = <yes/no>
terraforming_swap_types = { _key_of_deposit_ ...}
all_terraforming_swap_types = <yes/no>
use_weights_for_terraforming_swap_types = <yes/no>
Some vanilla planetary features will swap into another of exactly same effect after terraforming. This is implemented through these properties.

If this deposit should swap on terraforming and it no longer mets its potential after a terraforming, it will swap to a random one from the list that meets its potential.

If "all terraforming swap types" is allowed, then ALL non-blocker deposits that meet their potential on this planet can be chosen.

If "use weights for terraforming swap types", the swap is furtherly weighted by their drop_weight.

No.png
blocker_swap_types = { _key_of_deposit_ ... }
all_blocker_swap_types = <yes/no>
use_weights_for_blocker_swap_types = <yes/no>
No.png When this blocker is placed on a Planet, if it has any blocker swap type, a random deposit that meets its potential on this planet is chosen to be visibly "blocked" behind this blocker. Before this blocker to be cleared, the deposit isn't actually added to the planet and none of its effects will apply.

if "all blocker swap types" is allowed, then ALL non-blocker deposits that meet their potential on this planet can be chosen.

If "use weights for blocker swap types", the swap is furtherly weighted by their drop_weight.

resources An Economy Unit of this deposit to determine its resource production, upkeep and blocker removal cost.
Vanilla use planet_deposits for the economy category, although it's quite rare for a normal deposit to directly produce resources itself. Vanilla use deposit_blockers for the economy category. Vanilla use orbital_mining_deposits and orbital_research_deposits for the economy category.
can_be_cleared No.png A block of Conditions to check can this blocker be cleared. (Planet scope) No.png
on_cleared A block of Effects to be executed after this blocker is cleared. (Planet scope)
time = <int> Days it takes to clear this blocker.
prerequisites = { <tech key> ...} A list of Technologies to be researched before this blocker can be cleared.
potential A block of Conditions to check can this deposit be spawned on a Planet. This block is neglected if the deposit is added via script. (Planet scope)
drop_weight Determines how likely this deposit is spawned on a Planet. If drop weight is multiplied by 0 this deposit can't be spawned on this Planet. (Planet scope)

Deposit Categories[编辑 | 编辑源代码]

Planetary features are grouped by Deposit Categories defined at "common/deposit_categories/xxx.txt". They are so simple that they have only two properties. This is used to diverse planetary features to make the planet have relatively less "extreme" maximum district distribution.0

The Null Orbital Deposit[编辑 | 编辑源代码]

There is a null orbital deposit present. It generates no resources and doesn't support any kind of orbital stations, functioanlly play as a placeholder for the uncolonizable planets devoid of deposits. An uncolonizable planet that doesn't meet the potential of the null deposit will always have an orbital deposit.0

Examples[编辑 | 编辑源代码]

Planetary Feature: Hot Springs (+1 Max Generator Districts)0
Blocker: Dangerous Wildlife0
Orbital Deposit: 1 Society Research0

Planet Modifiers[编辑 | 编辑源代码]

Planet Modifiers are additional modifiers given to planets upon planet generation. They are linked to Static Modifiers but not equivalent to them. They are defined at "common/planet_modifiers/xxx.txt".

Data Structure[编辑 | 编辑源代码]

Property 折叠Description
modifier = <static modifier> Relative Static Modifier to be added to the planet.
spawn_chance
  • modifier
    • add = <int>
    • factor = <float>
    • Conditions (Planet Scope)
Modifies the weights of this Planet Modifier to spawn.

The Null Planet Modifier[编辑 | 编辑源代码]

Similarly, there is a null planet modifier present that has no linked Static Modifier just serve as a placeholder.0


帝国 帝国思潮政府 • 国民理念 • 起源承诺议程传统 • 飞升天赋法令政策遗珍科技自定义帝国
人口 岗位派系
领袖 领袖领袖特质
物种 物种物种特质
行星 行星行星特征 • 轨道矿藏建筑 • 区划行星决议
星系 星系恒星基地巨型结构虫洞 • 星门地图
舰队 舰队舰船 • 部件
地面战 陆军轰炸姿态
外交 外交 • 联邦 • 星海共同体评价修正宣战理由 • 战争目标
事件 事件异常现象特殊项目考古遗址
游玩 游玩定义研究 • 经济游戏开局
动态修改 动态指令效果触发条件作用域修正变量AI
媒体/本地化 Maya 导出器图形肖像旗帜事件图片界面图标音乐本地化
Other 控制台命令存档编辑Steam 创意工坊模组制作教程