Main
Vintage Story Mods

Drafts

Drafts are pieces used to create blueprints on the drafting table.

The draft consists of an image, a shape, and a list of input and output ports.

The draft shape consists of cells, and each cell can have inputs and outputs. A draft can have a shape of any complexity, but shapes that are too large may not fit on some canvases.

Drafts are individual for each player, and are added to the player using triggers.

Adding draft

Drafts can be added by implementing the IDraftsDescriptor interface in CollectibleBehavior.

The mod implements the "pomdrafts:draft" behavior, which adds a way to describe a draft.


{
	"code": "...",
	"behaviors": [
		{
			"name": "pomdrafts:draft",
			"properties": {
				"shape": [ "..." ],
				"cells": {
					"...": {
						"outputs": {
							"up": "CONNECTION_TYPE",
							"left": "CONNECTION_TYPE",
							"right": "CONNECTION_TYPE"
							"down": "CONNECTION_TYPE"
						},
						"inputs": {
							"up": "CONNECTION_TYPE"
							"left": "CONNECTION_TYPE"
							"right": "CONNECTION_TYPE"
							"down": "CONNECTION_TYPE"
						}
					}
				},
				"texture": "...",
				"color": "#RRGGBB",
				"groups": [ "..." ]
			}
		}
	],
	...
}

Properties: