Modding:Collectible Behaviors
From Vintage Story Wiki
Using Collectible Behaviors
Collectible behaviors can be added to items and blocks through the behaviors array in the block json file at the top level (same level as code). Note that for blocks, this array also lists block behaviors. The properties dictionary is optional if the behavior does not have any properties. Example:
{
code: "wrench",
...
behaviors: [{
name: "GroundStorable",
properties: {
layout: 'WallHalves',
wallOffY: 1,
sprintKey: true,
selectionBox: { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.1, z2: 1 },
collisionBox: { x1: 0, y1: 0, z1: 0, x2: 0, y2: 0, z2: 0 },
}
}],
...
}
All Behaviors
Here is a table containing all the collectible behaviors of the base game as of 1.19.8. Block behaviors are listed separately, even though they are technically collectible behaviors too.
Behavior Name | Properties | Used by Blocks & Items |
---|---|---|
GroundStorable |
|
Most tools and ingots |
ArtPigment |
|
|
AnimationAuthoritative |
|
|
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Entity Behaviors • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • Collectible Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |