Show / Hide Table of Contents

Class CreatureConfig

Configuration class for adding custom creature spawns.
Use this in a constructor of CustomCreature
Inheritance
object
CreatureConfig
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Jotunn.Configs
Assembly: Jotunn.dll
Syntax
public class CreatureConfig

Fields

Name Description
Consumables String array of items this creature can consume to use in the MonsterAI component.
Jötunn will try to resolve all strings to ItemDrop at runtime.
An existing consumeItems table will be replaced.
DropConfigs Array of DropConfigs to use for this creature's CharacterDrop.
A CharacterDrop component will automatically be added if not present.
The drop table of an existing component will be replaced.
SpawnConfigs Array of SpawnConfigs used for world spawns of your custom creature.
Leave empty if you don't want your creature to spawn in the world automatically.

Properties

Name Description
Faction Character.Faction of this creature.
Group Group tag of this creature.
Creatures in the same group don't attack each other, regardless of faction.
Name The unique name for your custom creature. May be tokenized.
UseCumulativeLevelEffects If set to true, LevelEffects stack the "EnableObject" action for all levels instead of only activating the GameObject of the highest level matched.

Methods

Name Description
AddConsumable(string) Appends a new consumable to the array of existing ones.
AddDropConfig(DropConfig) Appends a new DropConfig to the array of existing ones.
AddSpawnConfig(SpawnConfig) Appends a new SpawnConfig to the array of existing ones.
Apply(GameObject) Apply this config's values to a creature GameObject.
GetConsumeItems() Creates an array of ItemDrop mocks for the consumeItem list of the creature.
GetDrops() Converts the DropConfigs to Valheim style CharacterDrop.Drop array.
GetSpawns() Converts the SpawnConfigs to Valheim style SpawnSystem.SpawnData array.

Extension Methods

PrefabExtension.FixReferences(object)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾