模块 · Modules

模块是有效 CD2 JSON 配置文件中的顶层字段名称。以以下出了当前可用的所有模块(按字母顺序排列)。

英文原文

Modules are the top level hierarchy names for a valid CD2 JSON. The following is an alphabetized list of the current modules.

虫量上限 · Caps

控制地图中敌人数量的多少,包含以下字段:

英文原文

Control for the maximum number of enemies in the map, with the following fields:

Field Type
MaxActiveCritters
最大非敌对生物数量
Int
MaxActiveEnemies
最大大型生物数量
Int
MaxActiveSwarmers
最大小型生物数量
Int

示例:

json
"Caps": {
    "MaxActiveCritters": 40,
    "MaxActiveSwarmers": [90, 120, 180, 180],
    "MaxActiveEnemies": [90, 120, 180, 180]
}

当地图中的敌人数量达到上限后,新敌人将无法生成,并且部分已有敌人可能会被移除,具体的机制尚未完全明确

英文原文

When the number of enemies in the map reach their cap, new enemies will be prevented from spawning and some existing enemies will despawn. The exact mechanics behind this behaviour are not completely understood.

光照控制 · Darkness

Darkness 模块用于控制太空站与任务中照明与光照,包含以下字段。(描述来自@noskill)

英文原文

The Darkness module offers controls related to lighting and illumination both in the Space Rig and during a mission. It has the following fields (descriptions provided by @noskill):

Field Type Default Comment
FlashlightStrength
手电筒亮度
Float 1? Headlight light strength, affects both range and strength of the light.
手电筒,影响光照范围与亮度。
PlayerIllumination
玩家自带光源
Float 1? Light strength in a radius around the player. Only affects strength and not radius.
玩家周围半径内的光照强度,仅影响亮度,不影响范围。
FlareMax
最多荧光棒数量
Int 4 Maximum number of flares that the player can keep.
玩家能携带的最大荧光棒数量。
FlareStrength
荧光棒亮度
Float 1? Strength of the flares, affects both radius and strength. Seems no have no effect above 3.
荧光棒的光照强度与范围,超过 3 无明显变化。
FlareDuration
荧光棒持续时间
Float 30 Duration of the player flares.
玩家荧光棒发光的持续时间。
FlareProductionTime
荧光棒冷却时间
Float 12 Recharge time of the player's flares. It has been noted that changing this setting while in-game could cause flares to get stuck and not recharge.
玩家荧光棒的冷却时间,注意:不建议在任务中修改。
EnvironmentalLight
环境光照
Float 1? Environmental (cave) light. Affects both radius and strength.
洞穴环境光亮度,影响光照范围和亮度。
DisableFog
禁用迷雾
Bool False Removes "fog", making the caves look darker. It seems that after disabling it in-mission it can't be enabled again.
禁用迷雾,使洞穴看起来更暗。在任务中禁用后,似乎无法再次启用。
FlareGunStrength
侦察照明弹亮度
Float 1? Strength of Scout's flare gun flares.
侦察照明弹的光照强度
FlareGunDuration
侦察照明弹持续时间
Float Depends on flare gun stats Duration of Scout's flare gun flares.
侦察照明弹的发光持续时间。

描述 · Description

Description 用于简要说明该难度

英文原文

A short explanation of the difficulty.

比如:

json
{
    "Description": "Hazard 6 with double enemies."
}

难度设置 · DifficultySetting

“DifficultySetting”模块主要用于控制敌人抗性、虫潮间隔和敌人数量等核心因素。

英文原文

Main controls for enemy resistance, swarm and wave intervals and enemy counts.

此处说明比较简略,详情请参考《深岩银河自定义难度快速入门》,一份基于 CD1 编写的指南,解释了本模块中的大部分字段的详细信息(因为 CD2 有大部分字段和 CD1 一致)

英文原文

The descriptions here are very summarized, please check A Quick and Dirty Guide to Custom Difficulty for Deep Rock Galactic, a CD1 guide explaining most of the fields inside this module foe details.

若要查看原版难度及其他的一些难度(如 6 级、7 级),请查阅《DRG Hazard Scaling》这个文件[Resource 里面]

英文原文

To see the values of these fields for the vanilla Hazards and some others, please check the DRG Hazard Scaling file.

Field Description
BaseHazard
基础难度
Declares a base vanilla hazard, with values from 1 to 5. When a CD2 JSON doesn't specify a certain field, the value is taken from the BaseHazard specified here.
实测:未写 BaseHazard 时,CD2 实际以玩家在任务里选择的那个官难为基准,而不是固定 Hazard 5。
ExtraLargeEnemyDamageResistance
无畏、看守者抗性
Affects the damage resistance of the three dreadnought variants.
ExtraLargeEnemyDamageResistanceB
王草抗性
Affects the damage resistance of the Korlok Tyrant Weed.
ExtraLargeEnemyDamageResistanceC
除虫器抗性
Affects the damage resistance of the OMEN Tower.
ExtraLargeEnemyDamageResistanceD
精英抗性
Affects the damage resistance of Elite enemies.
EnemyDamageResistance
普通敌人抗性
Damage resistance of most larger enemies in the game: praetorians, oppressors, menaces, goo bombers, bulk detonators, etc.
SmallEnemyDamageResistance
小型敌人抗性
Damage resistance of everything not covered by the other resistance fields: grunts, mactera, swarmers, etc.
EncounterDifficulty
遭遇潮点数
Difficulty of the encounters, waves that appear when the players come within a certain distance of an unexplored cave.
StationaryDifficulty
固定点数
How many stationary enemies will spawn.
EnemyCountModifier
敌人数量
A global multiplier on the number of enemies that will spawn in waves, swarms, constant pressure, extraction, among others.
EnemyWaveInterval
播报潮间隔
Interval in seconds between swarms (announced).
EnemyNormalWaveInterval
自然潮间隔
Interval in seconds between normal (non-announced) waves.
EnemyNormalWaveDifficulty
自然潮点数
How many enemies will spawn in a normal wave.
EnemyDiversity
敌人多样性
Determines how many enemies will spawn in a given spawn event, given an EnemyPool.
StationaryEnemyDiversity
固定敌人多样性
Enemy diversity roll for stationary enemies (everything in the StationaryPool).
VeteranNormal
小型敌人变异率
Percentage of Grunt and Mactera veterans promoting from the non-veteran variants.
VeteranLarge
大型敌人变异率
Percentage of Oppressors promoting to veterans from Praetorians.
EnviromentalDamageModifier
环境伤害
环境伤害倍率。实测:CD2 v0.13 里生效的名字是 EnvironmentalDamageModifier(多一个 n),本页这个拼法反而不生效;CD2 作者以后可能修掉它。
PointExtractionScalar Interval between swarms in Point Extraction, taking effect after the first swarm. The value is capped at 1 and the formula seems to be Interval = 165/ PointExtractionScalar.
FriendlyFireModifier
友伤系数
How much friendly fire players deal to each other.
WaveStartDelayScale
播报潮延迟
Adds (or subtracts) a delay for the first swarm in a mission. The delay in seconds will be 150 · WaveStartDelayScale. The default is zero; if negative (eg. -1), a swarm will spawn directly at mission start.
SpeedModifier
敌人移速
Global modifier affecting the speed of ground enemies. Mactera are unaffected.
AttackCooldownModifier
敌人攻速
Global modifier affecting the speed of enemy attack animations.
ProjectileSpeedModifier
敌人发射物速度
Global modifier affecting the speed of all projectiles.
HealthRegenerationMax
残血后最大回血比例
Maximum health that the dwarves regenerate naturally to.
ReviveHealthRatio
复活后回血比例
Health points after revive.

矮人属性 · Dwarves

提供与玩家有关的一些参数。

英文原文

Offers some controls related to the players.

Field Default Description
FallDamageModifier
摔落伤害
0.175
FallDamageStartVelocity
开始计算摔落伤害的速度
1000 Multiplier for player shield capacity.
RegenHealthPerSecond
每秒回复血量
RegenDelayAfterDamage
受致命伤后回复延迟
Scale
玩家体型比例
Player size.

敌人配置[客户端同步/不同步] · Enemies / EnemiesNoSync

详情见 Enemies/EnemiesNoSync 部分

英文原文

See the Enemies/EnemiesNoSync section.

执勤护送 · EscortMule

控制执勤护送中 朵朵属性 的字段部分

英文原文

Controls for the Drilldozer in Escort missions.

Field Type Default Comments
HealPerTickNormal
每刻回血量
Float 13 Currently unsupported.
HealPerTickUnderAttack
被攻击时每刻回血量
Float 4.5 Currently unsupported.
MaxAttackersOmoranFight
心石阶段最多攻击朵朵虫量?
Float 6 Currently unsupported.
MaxHealth
最大血量
Float 520 Currently unsupported.
FriendlyFireModifier
友伤系数
Float 0.1
NeutralDamageModifier
中立生物伤害系数
Float 0.1
BigHitDamageModifier
减伤系数
Float 0.5
BigHitDamageReductionThreshold
减伤判定阈值
Float 6
PST_PoisonResistance
毒抗
Float 0.25 Currently unsupported.
PST_RadiationResistance
辐射抗性
Float 0.5 Currently unsupported.
PST_ExplosionResistance
爆炸抗性
Float 0.5 Currently unsupported.

最多玩家数 · MaxPlayers

一个整数字段,用于设置房间允许的最大玩家数

英文原文

A field accepting an int specifying the maximum number of players allowed in the lobby.

json
{
    "MaxPlayers": 16
}

信息 · Messages

该模块允许 CD2 在任务期间发生某些事件时,向聊天框发送信息。它包含以下字段:

英文原文

A module that allows CD2 to send messages to chat in response to events happening during the mission. It has The following fields:

Field Type Default Description
Send
发送条件
Boolean False Send chat message when true
SendOnChange Boolean False Send chat message when another value (e.g. message) changes
当另一个值发生变化时发送消息(例如:倒计时性质的消息)
Type
发送人类别
String Game Options: Game, Normal, Delux, Developer, Streamer, Modder
Sender
发送人名称
String CD2 Name of the Sender
Message
发送的消息
String

示例:

英文原文

Examples:

以下代码片段会在下一次补给可用时发送消息:

英文原文

The following snippet sends a message on chat when the next resupply is available.

json
...,
"Messages": [
    {
      "Message": "!!! Resupply Available !!!",
      "Send": {
        "Mutate": "IfFloat",
        "Value": {
          "Mutate": "DepositedResource",
          "Resource": "Nitra"
        },
        ">=": 60,
        "Then": true,
        "Else": false
      }
    }
],
...

以下代码片段会在有玩家死亡时发送消息:

英文原文

The following snippet sends a message on chat when a player dies.

json
...,
"Messages": [
    {
      "Send": {
        "Mutate": "TriggerOnChange",
        "RiseOnly": true,
        "Value": {
          "Mutate": "DwarvesDown"
        }
      },
      "Type": "Delux",
      "Sender": "Karl",
      "Message": {
        "Mutate": "RandomChoice",
        "Choices": [
          "Stop Dying",
          "Skill Issue"
        ]
      }
    }
],
...

名称 · Name

难度名称。此字段为必填项,用于在游戏内 CD2 下拉菜单中识别并保存该配置。例如:

英文原文

The name of the difficulty. This field is necessary to be able to save the file in the in-game CD2 dropdown. Example:

json
{
    "Name": "Hazard 6x2 40 nitra"
}

Next 难度 · NextDifficulty

允许 CD2 在两个特定时刻自动选择另一个难度

英文原文

NextDifficulty allows CD2 to automatically pick another difficulty at two specific moments:

  1. When launching a mission from the space rig.
  2. When a mission is finished.

该字段有很多不同的用途,比较典型的是使用 RandomChoice 的 MUTATOR ,在启动任务时随机选择一个难度

英文原文

There are many different uses for this field but a typical application is, using the RandomChoice mutator, choosing a difficulty at random when launching a mission:

json
{ 
 "Name": "Difficulty Roulette", 
 "NextDifficulty": {
  "Mutate": "RandomChoice",
  "Choices": ["6x2", "6x2-ultra", "7x2", "DIIa8", "ND"]
 }
}

Choices 字段中列出的名称,必须是 CD2 难度列表中已存在的其他难度。相同的配置片段也可用于 深潜阶段,以实现随机切换难度。

英文原文

Where it is understood that all the names in the Choices field are other difficulties existing in your CD2 list. The same snippet can be used to change the difficulty at random in deep dive stages.

如果你不希望从太空站启动任务时难度发生变化,可使用 IfOnSpaceRig Mutator,示例如下:

英文原文

If you don't want the difficulty to change when launching a mission from the Space Rig, the IfOnSpaceRig mutator can be used as follows:

json
{
  "NextDifficulty": {
    "Mutate": "IfOnSpaceRig",
    "Then": "",
    "Else": "My Next Difficulty"
  }
}

这是 NextDifficulty 的一个常见应用,通过使用你选择的三个难度,来模仿原版深潜中逐渐增加的难度。设置方法如下:假想你想在第一阶段玩 5*2,第二阶段玩 6*2,第三阶段玩 ND(一个国外社区的难度)。我们需要将这三个文件保存在 CD2 中,然后分别为每个文件添加以下内容:

英文原文

This is a common application of NextDifficulty allowing to mimic the increasing difficulty of the vanilla Deep Dive with whatever set of three difficulties you choose. The way to set it up is as follows: let's say that we want to play Hazard 5x2 on Stage 1, Hazard 6x2 on Stage 2 and ND on Stage 3. We will need the three files saved in Custom Difficulty, and then we would add the following to each:

json
{
    "Name": "Hazard 5x2",
    ...
    "NextDifficulty": "Hazard 6x2",
    ...
}
json
{
    "Name": "Hazard 6x2",
    ...
    "NextDifficulty": "ND",
    ...
}

"ND"这个文件(国外社区的一个难度,即第三阶段所使用的难度)不需要任何修改。除了编辑第一阶段和第二阶段的文件外,你还需要一个“起始文件”。

英文原文

The ND file, being the one played in stage 3, doesn't need any modifications. In addition to editing the files for stage 1 and 2, you will need a "starter" file:

json
{
    "Name": "Dive Starter",
    "NextDifficulty": "Hazard 5x2"
}

这个 Dive Starter 文件是你在太空平台上开始深潜之前选择的文件,它应该是你想在第一阶段玩的难度。

英文原文

This Dive Starter will be the file you will select while on the Space Rig before starting the dive, and it should point to the difficulty you want to play on the first stage.

NitraMultiplier

一个特殊模块,可以通过修改浮点数值来控制地图中生成的硝石数量,默认为 1,以下代码片段会让地图生成 2 倍硝石:

英文原文

A special module that accepts a float and controls the amount of nitra generated in the map. It has a default of 1. The following snippet would generate twice the amount of nitra in a certain mission:

json
{
    "NitraMultiplier": 2
}

怪池 · Pools

Pools 模块是用于从游戏中的不同怪池中添加或移除敌人的地方。更多的信息请参阅文件中对怪池系统的解释,以及决定任务中出现哪些敌人的原理。其接受的字段有以下内容:

英文原文

Pools is where enemies can be added or removed from the different pools in the game. For more information, this document is a detailed explanation about the pools system and how are they used when deciding which enemies are present in a mission. The accepted fields in Pools are:

Field Type
MinPoolSize Int
DisruptiveEnemyPoolCount Int (min, max)
StationaryEnemycount Int (min, max)
CommonEnemies *
SpecialEnemies
特殊敌人池
*
DisruptiveEnemies
破坏性敌人池
*
StationaryPool
固定敌人池
*
EnemyPool *

带有✳标记的字段可接受 Add、Remove 和 Clear,用于按需添加或移除敌人。EnemyPool 在任务过程中可以通过 Mutator 自由编辑,允许根据游戏条件动态添减敌人。其它池子不推荐使用 Mutator 实时更改

英文原文

The fields marked with * accept the Add (list), Remove (list) and Clear (bool) fields for adding and removing enemies at will. The EnemyPool can be freely manipulated with mutators during the mission, opening the possibility of adding and removing enemies based on gameplay conditions. It is not recommended to mutate the other pools.

比如:

json
{
    "Pools": {
    "MinPoolSize": 30,
    "DisruptiveEnemyPoolCount": {
      "min": 8,
      "max": 8
    },
    "StationaryEnemyCount": {
      "Min": 6,
      "Max": 6
    },
    "CommonEnemies": {
      "Add": [
        "ED_JellyBreeder_Swarm",
        "ED_PatrolBot",
        "ED_Sentinel",
        "ED_Bomber_Explosive"
      ]
    },
    "StationaryPool": {
      "Add": ["ED_ShootingPlant_NukeSingle"],
      "Remove": []
    }
  }
}

搜救行动 · Salvage

英文原文

A special module offering customization options for Salvage missions. It contains three submodules: MiniMules, Uplink and Refuel with the following fields:

Submodule Field Type Default Description
MiniMules ScanUsable
可否扫描骡腿
Usable Settings for e holding to scan for legs
MiniMules RepairUsable
可否修骡子
Usable Settings for e holding to repair the minimule
MiniMules LegsRequired
每个骡子需要的骡腿数量
Int 3 Number of legs that must be attached before allowing repair
MiniMules LegsPerMule
每个骡子周围生成的骡腿
Int 4 Number of legs to spawn per minimule
MiniMules LegDistance
每个骡腿距离骡子的距离
Float 1500 Untested, should be distance legs spawn from the minimules
MiniMules Count
骡子总量
Int 2 Number of minimules to spawn (or 1.5x on long Salvage)
MiniMules NitraToGive
修完骡子给的硝石量
Int 50 Nitra given by the mules after repairing them
--------- ---------------------- ------ ------- --------------------------------------------------------------------------------
Uplink RepairUsable
可否激活上传
Usable Settings for holding e to activate the uplink
Uplink Scale
区域大小
Float 1 Size of the triangulation zone
Uplink Duration
守点持续时间
Float 80 Defense duration in seconds
Uplink ExtraDefenderBonus
额外抗性
Float 0.25
Uplink DisableLeaveShout
禁用出圈警告
Bool false Disables mission control messages when there are no players in the defense area.
Uplink LeavePenaltyMultiplier
离开上传区域掉进度的速度
Float 1 1 means vanilla penalty (2x the speed progress normally increases)
--------- ---------------------- ------ ------- --------------------------------------------------------------------------------
Refuel RepairUsable
可否交互
Usable
Refuel Scale
区域大小
Float 1 Size of the triangulation zone
Refuel Duration
守点持续时间
Float 100 Defense duration in seconds
Refuel ExtraDefenderBonus
额外抗性
Float 0.25
Refuel DisableLeaveShout Bool false
Refuel LeavePenaltyMultiplier
离开上传区域掉进度的速度
Float 1 0 means no lost progress if leaving the defense area

示例:一次搜救行动,每个骡子生成 20 条腿,各自需要 15 条腿才能修好,且上传区域大小是正常的 1.5 倍

英文原文

Example: a salvage where each mule spawns 20 legs and requires 15 to be repaired, and the area of the uplink bubble is 1.5x the normal.

json
{
    "Salvage": {
       "MiniMules": {
            "LegsPerMule": 20,
            "LegsRequired": 15
        },
        "Uplink": {
            "Scale": 1.5
        }
    }
}

另一个示例:让每个任务中修骡需要的腿数量从数组中随机抽取。

英文原文

Another example: the number of legs is randomized every mission.

json
{
    "Salvage": {
        "MiniMules": {
            "LegsRequired": {
                "Mutate": "RandomChoice",
                "Choices": [3, 4, 5, 6, 7]
            },
            "LegsPerMule": 12
        }
    }
}

对于需要根据处于任务不同阶段而改变的数值,请查阅 BySalvagePhase mutator。

英文原文

Please see the BySalvagePhase mutator for values that need to change during different phases of the mission.

Usable fields

上述表格中被标记为 Usable 的字段,会影响某些情况下 E 键交互的方式,例如修理骡子。它们接受以下字段:

英文原文

Some of the fields in the table above are marked as Usable. These affect how the E key interactions work in some instances such as mule repairing. They accept the following fields:

Field Type Description
CoopUse
是否允许多玩家协作交互
Boolean TODO
CoopUseMultiplier
多玩家交互时的速度加成倍率
Float Increases or decreases the speed boost granted when multiple players are interacting. Defaults to 1.
Priority
交互优先级
Int Sets up the priority of the E actions.
ResetOnFail
交互失败时是否重置进度
Boolean TODO
UseText
交互时显示的文本
String TODO
UseCooldown
再次交互前的冷却时间
Float Cooldown before interaction can happen again.
UseDuration
交互所需时间
Float Duration of the E interaction.

使用示例:以下代码片段可在多个玩家参与交互时,让 Uplink 的修复速度更快:

英文原文

Some examples of use. The following snippet makes the uplink repair faster than normal when more than 1 player is interacting:

以下代码片段根据参与修骡的玩家数动态调整改变修理骡子的时间,并增强多人交互时加速修理速度:

英文原文

The following snippet changes the duration of the mule repair based on how many players are interacting, and buffs the speed boost of multiple players:

json
{
    "Salvage": {
        "MiniMules": {
            "RepairUsable": {
                "UseDuration": {
                    "Mutate": "ByPlayerCount",
                    "Values": [10, 20, 30, 40]
                },
                "CoopUseMultiplier": 5
            }
        }
    }
}

声音提示 · SoundCues

该模块允许 CD2 在任务中发生某些事件时播放音效。它包含两个字段,Play(true/false 决定是否播放,可用 Mutators 动态调整);Cue(音效文件路径)。示例:以下代码片段会在玩家死亡的时候播放笑声

英文原文

A module that allows CD2 to play a sound in response to events happening during the mission. It has two fields: a boolean Play which accepts mutators and a Cue which accepts the path to the sound you want to play. As an example, the following snippet plays a laughing sound when a player dies:

json
...,
 "SoundCues": [
    {
      "Play": {
        "Mutate": "TriggerOnChange",
        "RiseOnly": true,
        "Value": {
          "Mutate": "DwarvesDown"
        }
      },
      "Cue": "/Game/Audio/SFX/Environment/Pumpkin/Pumpkin_EvilLaughter_01_Cue.Pumpkin_EvilLaughter_01_Cue"
    }
  ],
...

游戏内有大量可用音效,但如果想在游戏外播放,则需要提取游戏文件,并使用 Unreal 4.27 或 FModel 工具。

英文原文

The game has a lot of available sounds, but to play them outside the game you will need the game files and either Unreal Engine 4.27 or FModel.

特殊遭遇事件 · SpecialEncounters

该模块用于控制一些随机特殊遭遇事件(如 Korlok、Bet-C 等)的出现概率。请注意,该模块不能 100%正常运行,因为某些遭遇依赖于 CD2 目前无法控制的赛季系统。每个 SpecialEncounter 接受以下字段:

英文原文

This module controls the chance of some random events such as the Korlok, Bet-C, etc. Please note that this module is not 100% functional as some of the encounters depend on the seasons system which CD2 cannot control for now. Each SpecialEncounter accepts the following fields:

Field Type
BaseChance
基础概率
Float
Enemy
敌人描述符
Descriptor
CanSpawnInDeepDive
是否能在深潜中生成
Bool

原版 SpecialEncounters 配置如下所示:

英文原文

The vanilla SpecialEncounters would look like:

json
{
    "SpecialEncounters": [
    {
      "Enemy": "ED_InfectedMule",
      "BaseChance": 0.05,
      "CanSpawnInDeepDive": true
    },
    {
      "Enemy": "ED_Spider_ExploderTank_King",
      "BaseChance": 0.03,
      "CanSpawnInDeepDive": false
    },
    {
      "Enemy": "ED_HydraWeed",
      "BaseChance": 0.05,
      "CanSpawnInDeepDive": false
    },
    {
      "Enemy": "ED_Terminator",
      "BaseChance": 0.03,
      "CanSpawnInDeepDive": true
    }
  ]
}

示例:禁用所有特殊遭遇

英文原文

Example: set all special encounters to zero.

json
{
    "SpecialEncounters": []
}

SpecialEncounters 可在其 Enemy 字段中接受任何敌人描述符,并可用于确保任务中固定生成一个这样的敌人。示例,某些难度每局固定生成一个小王草:

英文原文

SpecialEncounters can accept any enemy descriptor in its Enemy field and it can be used to make sure there's exactly 1 such enemy for the whole mission. As an example, some difficulties have exactly 1 Vartok Scalebramble per mission:

json
{
    "SpecialEncounters": [
        {
          "BaseChance": 1.0,
          "CanSpawnInDeepDive": true,
          "Enemy": "ED_TentaclePlant"
        }
      ]
}

补给 · Resupply

该模块包含补给消耗的设置,它仅接受一个名为 Cost 的浮点数字段(注:该字段可被 Mutator 动态调整):

英文原文

This module contains information about the resupply cost. It accepts a single float field Cost that can be mutated.

示例:只需要 40n 的补给

英文原文

Example: a fixed resupply cost of 40 nitra.

json
{
    "Resupply": {
        "Cost": 40
    }
}

CD1 中的 StartingNitra 字段在 CD2 中已不存在,但可通过 Mutator 实现相同功能。示例如下:第一次补给免费,后续每次消耗 40n。

英文原文

The StartingNitra field from CD1 does not exist in CD2: the same functionality is done with mutators. Example: the first resupply is free, 40 nitra for all others:

json
{
    "Resupply": {
        "Cost": {
            "Mutate": "ByResuppliesCalled",
            "Values": [0, 40]
        }
    }
}
json
{
    "Resupply": {
      "Cost": {
        "Mutate": "IfFloat",
        "Value": {
          "Mutate": "ResuppliesCalled"
        },
        "==": 0,
        "Then": 0,
        "Else": 40
      }
    }
}

虽然两个代码片段功能相同,但 ByResuppliesCalled 在指定前几次补给的不同费用时更简洁。

英文原文

While both snippets do the same thing, ByResuppliesCalled is usually more compact when specifying a different cost for the first few supplies.

示例:补给消耗 45 硝石,但第 6 次之后降为 40。

英文原文

Example: the cost is 45, but after the 6th resupply it drops to 40.

json
{ 
  "Resupply": {
    "Cost": {
      "Mutate": "IfFloat",
      "Value": {
        "Mutate": "ResuppliesCalled"
      },
      ">": 6,
      "Then": 40,
      "Else": 45
    }
  }
}

全局变量池 · Vars

该模块用于储存全局变量,同时支持模块间通信。它采用字典结构,每个变量包含以下字段

英文原文

A module to store global variables, which allow communication between modules. Vars is structured as a dictionary of names and values with the following fields:

在 Vars 中定义的变量,可在任何需要对应类型值的地方通过{"Var": "MyVariable"}引用。所有变量会在同一时刻统一更新,因此模块间状态始终保持一致,但这种实现方式可能导致变量实际状态与真实游戏状态之间存在 500ms 的延迟

英文原文

A variable defined in Vars can be later used in any place which accepts a value of the same type by using {"Var": "MyVariable"}. Variables are all updated at once so they will always be consistent across modules, but the implementation can cause up to 500 ms of delay between the variable state and the true game state.

json
...,
"Vars": {
    "Debug": {
      "Type": "Boolean",
      "Value": false
    },
    "MuleDistanceToDroppod": {
      "Type": "Float",
      "Value": { "Mutate": "MuleDistanceToDroppod" },
      "Watch": { "Var": "Debug" }
    },
    "PressureDifficulty": {
      "Type": "String",
      "Value": "Medium"
    },
    "EaseOffOnDowns": {
      "Type": "Boolean",
      "Value": true
    },
    "EDs": {
      "Type": "Strings",
      "Value": ["ED_1", "ED_2", "ED_3"]
    },
    "SecondaryUnfinishedPunishment": {
      "Type": "Float",
      "Value": {
        "Mutate": "LockFloat",
        "Lock": { "Mutate": "SecondaryFinished" },
        "Value": { "Mutate": "ByTime", "RateOfChange": 0.01 }
      }
    }
},
...,

以下代码片段允许用户通过 "Stingtails"这个变量的值 来决定是否在难度配置中添加蛭尾异虫:

英文原文

The following snippet allows the user to have a toggle for adding or removing stingtails in a difficulty:

json
...,
"Vars": {
    "Stingtails": {
        "Type": "Boolean",
        "Value": true 
    }
},
"Pools": {
    "EnemyPool": {
        "Remove": [
            {
                "Mutate": "If",
                "Condition": {"Var": "Stingtails"},
                "Then": [],
                "Else": "ED_Spider_Stinger"
            }
        ]
    }
}
...

以下代码片段允许用户通过 "Pressure"这个变量的值 选择难度的“简单”或“困难”版本,方法是将该变量用于 EnemyCountModifier 并配合 Select Mutator:

英文原文

The following snippet allows the user to select an easy or a hard version of the difficulty by using a variable for the EnemyCountModifier and the Select mutator:

json
...,
"Vars": {
    "Pressure": {
        "Type": "String",
        "Value": "Easy"
    }
},
"DifficultySetting": {
    "EnemyCountModifier": {
        "Mutate": "Multiply",
        "BaseValues": {
            "Mutate": "ByPlayerCount",
            "Values": [1.9, 2.1, 2.7, 3.3]
        },
        "Multiplier": {
            "Mutate": "Select",
            "Select": {"Var": "Pressure"}
            "Default": 1,
            "Easy": 1, 
            "Hard": 1.3 
        }
    }
},
...

禁用任务词条 · Warnings

Warnings 模块可用于禁止任务词条。它接受一个 Banned 字段,其值可为下表中的一个或多个。请注意,禁用影响资源产出的词条(如矿石天堂/淘金热潮)会导致未安装 CD2 的客户端矿物数据不同步,并且无法获得硝石。

英文原文

The Warnings module can be used to ban mission anomalies. It accepts a single Banned field which is one or more from the table below. Please note that banning anomalies that affect resource generation such as Mineral Mania or Gold Rush will cause clients without CD2 to have mineral desync and they will not be able to get nitra.

CD2 name In-game name
"MMUT_BloodSugar" Blood Sugar
凝血化糖
"MMUT_ExplosiveEnemies" Volatile Guts
易爆内脏
"MMUT_ExterminationContract" Golden Bugs
黄金虫群
"MMUT_GoldRush" Gold Rush
淘金热潮
"MMUT_LowGravity" Low Gravity
低倍重力
"MMUT_OxygenRich" Rich Atmosphere
氧气充裕
"MMUT_RichInMinerals" Mineral Mania
矿石天堂
"MMUT_SecretSecondary" Secret Secondary
神秘次要
"MMUT_Weakspot" Critical Weakness
致命弱点
"MMUT_XXXP" Double XP
双倍经验
"WRN_BulletHell" Duck and Cover
远程狂潮
"WRN_CaveLeechDen" Cave Leech Cluster
水蛭丛生
"WRN_ExploderInfestation" Exploder Infestation
自爆群袭
"WRN_Ghost" Haunted Cave
幽魂不散
"WRN_HeroEnemies" Elite Enemies
精英敌人
"WRN_InfestedEnemies" Parasites
寄生感染
"WRN_LethalEnemies" Lethal Enemies
致命虫群
"WRN_MacteraCave" Mactera Plague
异虫蝇瘟疫
"WRN_NoOxygen" Low O2
氧气稀薄
"WRN_NoShields" Shield Disruption
护盾瓦解
"WRN_Plague" Lithophage Outbreak
噬岩体爆发
"WRN_RegenerativeEnemies" Regenerative Enemies
虫群再生
"WRN_RivalIncursion" Rival Presence
强敌环伺
"WRN_RockInfestation" Ebonite Outbreak
矿化爆发
"WRN_Swarmagedon Swarmageddon
蜂拥群袭

示例:在难度中禁止蜂拥群袭与氧气稀薄词条。

英文原文

Example: ban Swarmageddon and Low O2 from a difficulty.

json
{
    "Warnings": {
        "Banned": [
            "WRN_Swarmagedon",
            "WRN_NoOxygen"
        ]
    }
}

WaveSpawners

请查看波次生成器部分

英文原文

See the WaveSpawners section.