コンテンツにスキップ
Stellaris v2.7 対応 翻訳

惑星生成のMOD制作

旧バージョンの資料

原文はゲームバージョン2.7向けです。現行版ではキーや生成処理が変わっている可能性があります。

本ページでは惑星特性(鉱床・障害物)と惑星補正のMOD制作を解説します。

鉱床

鉱床は惑星上のオブジェクトで、独自の資源生産・維持費と惑星補正を持てます。入植可能惑星でプレイヤーが確認できる惑星特性と、通常は確認できない非入植惑星の軌道鉱床があります。

惑星特性には、通常は有益で除去不能なものと、有害で資源を費やして除去できる障害物があります。一部の障害物は背後に別の惑星特性を持ちますが、障害物を除去するまではその特性自体が惑星へ追加されず、効果もありません。バニラでは未使用ですが、障害物の背後へ別の障害物を置くこともできます。定義場所はcommon/deposits/xxx.txtです。

データ構造

プロパティ 惑星特性 障害物 軌道鉱床
is_for_colonizable = <yes/no> 入植可能惑星用なのでyes。既定はno。 同左。 採掘・研究ステーション用なのでno。
station = <shipclass> 使用不可。 使用不可。 採掘に必要な軌道ステーション。shipclass_mining_stationまたはshipclass_research_station。
icon = <deposit_key> 別鉱床のアイコンを使用。省略時はgfx/interface/icons/deposits/<deposit_key>.dds。 同左。 通常は確認できないため有用性が低い。
use_for_min_max_adjustments = <yes/no> yesなら惑星画面の区域上限を再計算します。バニラでは特定区域の上限を増やす全鉱床がyes。 同左。 使用不可。
category = <deposit_category> blocker = yesでないカテゴリ。バニラはdeposit_cat_food、deposit_cat_energy、deposit_cat_minerals、deposit_cat_rare。 blocker = yesのカテゴリ。バニラはdeposit_cat_blockers、deposit_cat_rare_blocker。 使用不可。
planet_modifier / triggered_planet_modifier 惑星へ適用する補正。特定建造物・区域の最大数を増やす補正など。障害物の背後にある間は適用されません。 同左。 交易価値補正だけが有効で、ステーションなしでも回収できます。他の補正は適用されません。
country_modifier 惑星所有帝国へ適用する補正。 同左。 使用不可。
blocked_modifier バニラ未使用。障害物の背後にある間だけ惑星へ適用する補正と思われます。 同左。 使用不可。
should_swap_deposit_on_terraforming / terraforming_swap_types / all_terraforming_swap_types / use_weights_for_terraforming_swap_types テラフォーミング後にpotentialを満たさなくなった場合、候補リストから条件を満たす鉱床へランダム置換します。allなら条件を満たす全非障害物鉱床を候補にし、use_weightsならdrop_weightで重み付けします。 使用不可。 使用不可。
blocker_swap_types / all_blocker_swap_types / use_weights_for_blocker_swap_types 使用不可。 配置時、条件を満たす候補から背後にあるように見せる鉱床を選びます。除去までは実体も効果もありません。allなら全非障害物鉱床、use_weightsならdrop_weightで重み付けします。 使用不可。
resources = { <economy_unit> } 生産・維持費を定めます。バニラのカテゴリはplanet_depositsですが、通常特性が直接資源を生産する例はまれです。 除去費用も定め、カテゴリはdeposit_blockers。 カテゴリはorbital_mining_depositsまたはorbital_research_deposits。
can_be_cleared = { <conditions> } 使用不可。 除去可能条件。惑星スコープ。 使用不可。
on_cleared = { <effects> } 使用不可。 除去後に実行する効果。惑星スコープ。 使用不可。
time = <int> 使用不可。 除去に必要な日数。 使用不可。
prerequisites = { <tech_keys> } 使用不可。 除去前に必要な技術。 使用不可。
potential = { <conditions> } 惑星へ生成可能な条件。スクリプトで直接追加した場合は無視。惑星スコープ。 同左。 同左。
drop_weight = { ... } 惑星へ生成される相対的な重み。0倍なら生成不能。惑星スコープ。 同左。 同左。

鉱床カテゴリ

惑星特性はcommon/deposit_categories/xxx.txtのカテゴリにまとめます。プロパティはblockerとimportantだけで、区域上限が極端に偏りにくくする分類にも使われます。

deposit_cat_food = { }
deposit_cat_energy = { }
deposit_cat_minerals = { }
deposit_cat_blockers = {
    blocker = yes
}
deposit_cat_rare = {
    important = yes
}
deposit_cat_rare_blocker = {
    blocker = yes
    important = yes
}

空の軌道鉱床

資源を生産せず軌道ステーションも建てられない、非入植惑星用のプレースホルダーです。空鉱床のpotentialを満たさない非入植惑星には、必ず何らかの軌道鉱床が付きます。

d_null_deposit = {
    is_null = yes
    potential = {
        is_primary_star = no
        NOR = {
            is_planet_class = pc_ringworld_habitable_damaged
            is_planet_class = pc_ringworld_tech_damaged
        }
    }
    drop_weight = { weight = 100 }
}

例

惑星特性: 温泉(発電区域上限+1)

d_hot_springs = {
    is_for_colonizable = yes
    use_for_min_max_adjustments = yes
    category = deposit_cat_energy
    use_weights_for_terraforming_swap_types = yes
    should_swap_deposit_on_terraforming = yes
    terraforming_swap_types = { d_arid_highlands d_buzzing_plains }
    planet_modifier = { district_generator_max = 1 }
    potential = {
        OR = { is_cold = yes is_wet = yes is_planet_class = pc_nuked }
    }
    drop_weight = {
        weight = @high
        modifier = { factor = @planet_type_bonus is_dry = yes }
    }
}

障害物: 危険な野生生物

d_dangerous_wildlife_blocker = {
    time = 270
    is_for_colonizable = yes
    category = deposit_cat_blockers
    resources = {
        category = deposit_blockers
        cost = { energy = 500 }
    }
    potential = { planet_size >= 10 }
    planet_modifier = { planet_max_districts_add = -2 }
    on_cleared = {
        hidden_effect = {
            if = {
                limit = {
                    exists = owner
                    owner = { has_civic = civic_hive_devouring_swarm }
                }
                owner = { add_resource = { food = 200 } }
            }
        }
    }
    drop_weight = {
        weight = @blocker_low
        modifier = { factor = 0.5 planet_size < 15 }
        modifier = {
            factor = 0
            num_free_districts = { type = district_city value < 2 }
        }
    }
    prerequisites = { "tech_dangerous_wildlife" }
}

軌道鉱床: 社会学研究1

d_society_1 = {
    resources = {
        category = orbital_research_deposits
        produces = { society_research = 1 }
    }
    station = shipclass_research_station
    is_for_colonizable = no
    potential = { is_planet_class = pc_toxic }
    drop_weight = { weight = 0 }
}

惑星補正

惑星生成時に惑星オブジェクトへ与える追加補正です。静的補正と結び付きますが同一ではありません。common/planet_modifiersに定義します。効果やアノマリーから惑星へ直接追加する静的補正には、ここで惑星補正を定義する必要はありません。

プロパティ 説明
spawn_chance = { base modifier } 他のランダム惑星補正に対する生成重み。modifier内でaddまたはfactorと条件を使えます。空補正以外のバニラ惑星補正は基礎値を既定の0のままにします。
modifier = "<static_modifier>" 惑星へ追加する静的補正のキー。

空の惑星補正

common/planet_modifiers/00_planet_modifiers.txtに、静的補正と結び付かないpm_nullがあります。他の補正の出現頻度を制御し、基礎重み275(多くのバニラ補正は条件補正前に10)です。既に持つ補正1つごとに段階的に3倍され、複数補正を持つ惑星を次第に希少にします。

pm_null = {
    is_null = yes
    spawn_chance = {
        base = 275
        modifier = { factor = 3 num_modifiers > 2 }
        modifier = { factor = 3 num_modifiers > 1 }
        modifier = { factor = 3 num_modifiers > 0 }
    }
}

出典: Stellaris Wiki — Planet Generation modding(原文更新日: 2024年4月13日、版ID 81710)
翻訳日: 2026年8月31日 / 対応バージョン: 2.7
本ページは原文Wiki(CC BY-SA 3.0)の内容を翻訳した非公式ファン翻訳です。