Dinorush-ForcedConsumableSpawns icon

ForcedConsumableSpawns

Allows rundown developers to guarantee specific consumable spawns.

Last updated a month ago
Total downloads 254
Total rating 0 
Categories Rundown Mods Dev Tools
Dependency string Dinorush-ForcedConsumableSpawns-1.0.1
Dependants 2 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_GTFO-3.2.1 icon
BepInEx-BepInExPack_GTFO

BepInEx pack for GTFO. Preconfigured and includes Unity Base DLLs.

Preferred version: 3.2.1
GTFOModding-InjectLib-1.1.0 icon
GTFOModding-InjectLib

Dauda wants to inject things

Preferred version: 1.1.0

README

Allows rundown developers to guarantee specific consumable spawns by adding the "ForceSpawnData" field to ConsumableDistributionDataBlock. These spawns do not detract from "SpawnsPerZone" and always appear in containers.

ForceSpawnData

The "ForceSpawnData" field takes a list of objects that each contain the fields:

  • "ItemID": The ID to spawn.
  • "Count": The number of items to spawn.
  • "PlacementWeights": Start/Middle/End weights on which area the item spawns in, same as other placement weights.

Example

This spawns 4 consumables that are either Lock Melters or Fog Repellers (50/50 chance), and guarantees that a C-Foam Tripmine spawns as well as 2 Explosive Tripmines in the last area.

// ConsumableDistributionDataBlock entry
{
  "SpawnsPerZone": 4,
  "ChanceToSpawnInResourceContainer": 1.0,
  "SpawnData": [ // Standard logic, random chance of fog repeller or lock melter (SpawnsPerZone count).
    {
      "ItemID": 116, // Lock melter
      "Weight": 1.0
    },
    {
      "ItemID": 116, // Fog repeller
      "Weight": 1.0
    }
  ],
  "ForceSpawnData": [ // The new field! Each of these always spawns (and always in containers).
    {
      "ItemID": 139,  // Explosive Tripmine
      "Count": 2,     // Spawn 2
      "PlacementWeights": { // Spawn towards the end
        "Start": 0.0,
        "Middle": 0.0,
        "End": 1.0
      }
    },
    {
      "ItemID": 144   // C-Foam Tripmine. Uses default Count (1) and PlacementWeights (0/0/0).
    }
  ],
  "name": "A Custom Entry",
  "internalEnabled": true,
  "persistentID": 100
},