Show / Hide Table of Contents

Tutorials

This section covers the main interfaces we provide with the library, enabling developers to easily interact with items, recipes, pieces, skills, UI, entities, and much more. If you don't already have a development environment setup, start with our Step-by-Step Guide before proceeding with the tutorials.

Note

All custom data that is registered (prefabs, items, recipes) will automatically be saved and loaded by the game on logout/reload, and will persist across game sessions as long as the mods are still installed.

Warning

If either modded characters or worlds are loaded without the mods installed, you may lose your modded items on that character/world, or it may produce undefined behaviour. I wouldn't recommend trying this on a character/world you care deeply about.

Each section will have examples showing how this is done. All of the examples shown are published in the Example Mod, available in our GitHub repo.

Sections

Creating Assets

  • Asset Creation: Create new Assets with Unity and prepare them to be imported into Valheim using Jötunn.
  • Asset Loading: Load Assets into your plugin using Jötunn.
  • Asset Mocking: Duplicate and modify Assets without the need to include copyrighted content in your plugin.
  • Kitbashing: Use individual parts of vanilla prefabs to assemble your custom assets.
  • Reordering Bones: Reoder and preserve bone order so player attached objects preserve their position.

Adding Content

  • Items: Create equipment and resources.
  • Item Conversions: Add custom item conversions like the cooking of meat or the smelting of ores.
  • Item Variants: Create multiple variants of the same items.
  • Recipes: Add requirements for items and tie them to crafting stations.
  • Pieces and Piece Tables: Create building pieces and use custom categories.
  • Status Effects: Add custom Status Effects.
  • Skills: Add custom trainable Skills.
  • Zones / Locations / Vegetation: Add to or change Valheim's world generation using your custom assets.
  • Console Commands: Add custom commands to the Console that can execute your methods.
  • Inputs: Register custom inputs and add key hints to your custom items.
  • UI Elements: Add custom windows and UI elements.
  • Map Overlays & Drawings: Add custom overlays to the game's Map/Minimap or draw directly on the Map's different layers.
  • Localizations: Create language tokens that are replaced at runtime by their specified localization.

Utilities

  • Config and Synchronization: Ensures the synchronization of plugin config files between server and client as well as admin states on dedicated servers.
  • Network Compatibility: Make sure that clients are running compatible versions of the plugin and it's assets.
  • RPCs: Add Client/Server process communications and transfer data with automatic slicing and compression.
  • Rendering Queue: Create rendered Sprites from GameObjects with visual components at runtime.
  • JSON: JVL integrates the MIT licensed SimpleJSON, accessible via its namespace.
  • Improve this Doc
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾