FixItFelix-SpawnerCloner icon

SpawnerCloner

A mod to simply clone and configure existing Spawner objects like the Greydwarf nest.

Last updated 2 years ago
Total downloads 4321
Total rating 1 
Categories Mods
Dependency string FixItFelix-SpawnerCloner-0.2.1
Dependants 10 other packages depend on this package

This mod requires the following mods to function

ValheimModding-Jotunn-2.4.5 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.4.5
denikson-BepInExPack_Valheim-5.4.1502 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.1502

README

SpawnerCloner

A mod to simply clone existing Spawner objects like the Greydwarf nest and configure it with your ideas.

Features

This mod includes mainly the features to:

  1. Write all currently available spawners from inside the game into a YAML config file
  2. Load and clone game spawners with your own settings using the YAML output

WARNING to all people that gonna ask the question why the spawner is not appearing in the game: you will still need to use other mods like SpawnThat to actually make the game spawn this spawner.

Generate config from game

To generate a YAML config file from all prefabs Spawners (must comply to SpawnArea component), you can simply use the custom console command that this mod adds to the game:

spawner_cloner_write_defaults_to_file

This will create a file containing the defaults that are loaded from inside the game with all its currently added spawners. The file can be found inside the BepInEx config folder with name: org.bepinex.plugins.spawner.cloner.defaults.yaml

Example Yaml content

(taken from vanilla game)

Spawner_GreydwarfNest:
  originalPrefabName: Spawner_GreydwarfNest
  hoverText: $enemy_greydwarfspawner
  spawnRadius: 4
  nearRadius: 20
  farRadius: 1000
  triggerDistance: 60
  levelUpChance: 15
  maxNear: 3
  maxTotal: 100
  spawnTimer: 0
  spawnIntervalSeconds: 10
  spawnOnGroundOnly: true
  setPatrolSpawnPoint: true
  sizeScaleFactor: 1
  spawns:
    - prefabName: Greydwarf
      minLevel: 1
      maxLevel: 3
      weight: 5
    - prefabName: Greydwarf_Elite
      minLevel: 1
      maxLevel: 3
      weight: 1
    - prefabName: Greydwarf_Shaman
      minLevel: 1
      maxLevel: 3
      weight: 1
  spawnerHealth: 100
  damageModifiers:
    mBlunt: Resistant
    mSlash: Normal
    mPierce: Resistant
    mChop: Normal
    mPickaxe: Ignore
    mFire: Weak
    mFrost: Immune
    mLightning: Normal
    mPoison: Immune
    mSpirit: Ignore

Load customized config

To load your own clone config, you will need to provide a Yaml file that follows the given structure of the generated config file. Most of the Yaml config should be rather self explaining for people being used to the game and being configuring other mods.

The file to load the config from has to match to the given file name pattern:

org.bepinex.plugins.spawner.cloner.custom.*.yaml

Config explained

On top most level you can separate multiple entries inside one file with any custom name you like.

Drunken_Greydwarfs_Nest:
  originalPrefabName: Spawner_GreydwarfNest
  hoverText: 'The drunken bastards strolling around the forest'
  • 'Spawner_GreydwarfNest' is the original prefab from game that will be used as a base for cloning
  • 'Drunken_Greydwarfs_Nest' is the new name that you can use with any other mod like SpawnThat to make it spawn in game.
  • Note for 'hoverText' field: if you want to use more 1 word, you will need to put the text phrase into ''

This section will contain a list of creature that this spawner will emit.

  spawns:
    - prefabName: Greydwarf
      minLevel: 1
      maxLevel: 3
      weight: 5
  • 'prefabName: Greydwarf' -> like with other mods you can enter the game's internal prefab name that it shall spawn
  • each other creature to also maybe spawn will need to be added with the same 4 elements with an introducing '-'
  • all creatures you add there will be rolled to get spawned, the weight will decide how often a creature gets spawned

The damage modifiers set the strengths and weaknesses of this spawner, it always needs to have all the values set like

  damageModifiers:
    mBlunt: Resistant
    mSlash: Normal
    mPierce: Resistant
    mChop: Normal
    mPickaxe: Ignore
    mFire: Weak
    mFrost: Immune
    mLightning: Normal
    mPoison: Immune
    mSpirit: Ignore

The game does use these values to identify how resistant the spawner will be against the specific damage type:

  • VeryWeak -> highest damage
  • Weak -> high damage
  • Normal -> normal
  • Resistant -> low damage
  • VeryResistant -> very low damage
  • Immune -> no damage (will show 0 damage on hit)
  • Ignore -> not even affected by this type (not showing 0s)

Not included yet

  • use own (custom) prefabs, can only use Spawners that are already properly added to the game
  • server sync (maybe later, feel free to help ;) )
  • localization

Changelog

  • 0.2.1 now also uploaded the correct readme version
  • 0.2.0 smaller changes, but breaking config file field names and usage
    • renamed 'newSpawnerHoverText' field into 'hoverText' and doing export for this field also properly
    • replaced 'newSpawnerName' field by using the separating identifier as new prefab name
  • 0.1.0 -> initial version

Contact