Coder Social home page Coder Social logo

valheim.spawnthat's Introduction

Spawn That!

This is an advanced tool for configuring all world spawners.

With this, it is possible to change almost all of the default settings for the way spawners work in Valheim. Want to have a world without trolls? Possible! (probably) Want to have a world with ONLY trolls? Possible! (almost) Want to have a world where greydwarves only spawn at night? Possible! Just want to have more/less of a mob type? Simple modifiers exist!

Features

  • Change spawning rates of specific mobs
  • Replace existing spawn configurations throughout the world
  • Set almost any of the default parameters the game uses
  • Add your own spawn configuration to the world
  • Modify the localized spawners by mob type and location
  • Dump existing game templates as files using the same format as the mod configs.
    • Easy to copy-paste and change the parts you want.
    • Investigate what the world throws at you.
  • Server-side configs
  • Modify the spawners in camps, villages and dungeons
  • Conditions and settings specific to integrated mods:

Documentation

Documentation can be found on the Spawn That github page.

Example

[WorldSpawner.321]
Name = Angry Test Boars
PrefabName = Boar
Biomes = Meadows
Enabled = true
HuntPlayer=true
MaxSpawned = 30
SpawnInterval = 1
SpawnChance = 100
SpawnDuringDay = true
SpawnDuringNight = true
ConditionLocation = Runestone_Boars
ConditionDistanceToCenterMin = 500
ConditionAreaSpawnChance = 50

[WorldSpawner.321.CreatureLevelAndLootControl]
SetInfusion=Fire

[WorldSpawner.321.EpicLoot]
ConditionNearbyPlayerCarryLegendaryItem = HeimdallLegs

v1.0.0 Details

Config changes

Enabled now toggles the actual spawner on/off. This can be used to both disable local spawners and world spawner entries.

TemplateEnabled added, which behaves like the old Enabled by disabling the configuration entry itself.

API support

Spawn That now supports configurations by code. Configurations are merged with configs from file. File configurations will be applied last, ensuring that users can still override the settings made by mods.

A nuget release has also been made available.

Configurations are applied once pr world entered, and synced from server-side.

API is more feature-rich than the config files though.

Example:

public class Plugin : BaseUnityPlugin
{
	public void Awake()
	{
		// Register for configuration event.
		SpawnThat.Spawners.SpawnerConfigurationManager.OnConfigure += MySpawnerConfigurations;
	}

	public void MySpawnerConfigurations(ISpawnerConfigurationCollection spawnerConfig)
	{
		// Add a new world spawner
		spawnerConfig
			.ConfigureWorldSpawner(123)
			.SetPrefabName("Skeleton")
			.SetMinLevel(2)
			.SetMaxLevel(3);

		// Modify an existing vanilla spawner
		spawnerConfig
			.ConfigureWorldSpawner(1)
			.SetSpawnInterval(TimeSpan.FromSeconds(30))
			.SetPackSizeMin(3)
			.SetPackSizeMax(10);

		// Modify a local spawner
		spawnerConfig
			.ConfigureLocalSpawnerByLocationAndCreature("Runestone_Boars", "Boar")
			.SetPrefabName("Skeleton");
	}
}

Support

If you feel like it

valheim.spawnthat's People

Contributors

asharppen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.