Mods / Starter Kit (by Tulikettu)

Tags: #Utility
Author: Tulikettu
Side: Server
Created: 5 days ago
Last modified: 2 days ago
Downloads: 116
Follow Unfollow 12

Recommended download (for Vintage Story 1.21.0 - 1.21.5):
StarterKit_1.0.4.zip  1-click install


Description

This mod allows to add a starter kit to the server.

Commands

/starterkit or /sk – gives the player a starter kit (requires the chat privilege; must be executed by a player);
/starterkit update – updates the configuration from the /VintagestoryData/ModConfig/StarterKit.json file on a running server (requires the root privilege);
/starterkit resetall – resets the number of starter kits already received for all players (requires the root privilege). This command also currently deletes the information recorded by the mod before its removal from the server;
/starterkit reset player1, player2, ... – does the same as resetall, but for the specified players (requires the root privilege).

Configuration

ResetOnDeath – (System.Boolean) specifies whether the counter for received sets must be reset upon death;
PermittedReceives – (System.Int32) the number of starter kits each player can receive. A value ≤0 disables the ability to receive starter kits;
Items – (StackInfo[]) information about the item stacks included in the starter kit.

Items in the Items array are added according to the rules for JSON documents. The configuration can only be changed via the config file, but the /starterkit update command allows to apply changes without restarting the server.

Configuration example (each player can receive 2 starter kits, each consisting of one temporal gear, 16 horsetail poultices and a crude bow is only for a hunter):

Example
{
"ResetOnDeath": false,
"PermittedReceives": 2,
"Items": [
{
"Code": "game:gear-temporal",
"Amount": 1
},
{
"Code": "game:poultice-linen-horsetail",
"Amount": 16
},
{
"Code": "game:bow-crude",
"Amount": 1,
"ForClass": "hunter"
}
]
}

StackInfo model

Code – (System.String) the item code, for example, "game:gear-temporal";
Amount – (System.Int32) the number of items in the stack to be given. A value ≤0 will be ignored;
ForClass – (System.String) the class the item stack is intended for. If not specified, any class will receive the stack;
Attributes – (StackAttribute[]) attributes of the item stack.

Standard classes
"commoner"
"hunter"
"malefactor"
"clockmaker"
"blackguard"
"tailor"

StackAttribute model

Type – (System.String) attribute value type;
Key – (System.String) attribute key;
Value – (System.String) attribute string value.

I haven't tested all possible attribute value deviations from the norm, but be careful with them.

Valid attribute value types
"bool" – System.Boolean;
"int" – System.Int32;
"long" – System.Int64;
"float" – System.Single, NumberDecimalSeparator must be ".";
"double" – System.Double, NumberDecimalSeparator must be ".";
"byte[]" – System.Byte[], written as a hex string in the configuration file;
"string" – System.String.
Examples of using attributes
Worn steel pickaxe
{
"Code": "game:pickaxe-steel",
"Amount": 1,
"Attributes": [
{ "Type": "int", "Key": "durability", "Value": "347" }
]
}
Signed book
{
"Code": "game:book-normal-brickred",
"Amount": 1,
"Attributes": [
{ "Type": "string", "Key": "title", "Value": "Book title" },
{ "Type": "string", "Key": "text", "Value": "Book text\nLine 2" },
{ "Type": "string", "Key": "signedby", "Value": "Tulikettu" },
{ "Type": "string", "Key": "signedbyuid", "Value": "gC8QxMPxcegHcHCd7dqwhzhf" }
]
}

Mod Version For Game version Downloads Released Changelog Download 1-click mod install*
1.0.4
1.21.0 - 1.21.5
26 2 days ago StarterKit_1.0.4.zip 1-click install

Added the ability to determine which class has access to a stack of items;
Added the ability to give blocks

1.0.3
1.21.0 - 1.21.5
15 3 days ago StarterKit_1.0.3.zip 1-click install

Regardless of culture, the integer and fractional parts of a number must be separated by the "." symbol.

1.0.2
1.21.0 - 1.21.5
19 3 days ago StarterKit_1.0.2.zip 1-click install

Added the ability to reset the counter of received kits after death

1.0.1
1.21.0 - 1.21.5
22 4 days ago StarterKit_1.0.1.zip 1-click install

Added an attribute system for item stacks; and partial localization

1.0.0 34 5 days ago StarterKit_1.0.0.zip 1-click install

The first version of the mod


9 Comments (oldest first | newest first)

💬 Wahazar, 1 day ago

Thank you for this mod. There is already starterkit in th3essentials, but without class definitions, also need to be configured in-game by admin.

Config file is more convenient.

💬 Tulikettu , 2 days ago

Wahazar, for any classes whose types are written in the same place as standard ones

💬 Wahazar, 2 days ago

Great! Does it works for any classes, or only for standard ones?

💬 Tulikettu , 2 days ago

Wahazar, it's done

💬 Tulikettu , 2 days ago

Wahazar, when I find out how to determine a player's class

💬 Wahazar, 2 days ago

Is it possible to add player class specification (so different class would get different starter kit)?

💬 El_Neuman, 3 days ago

Tulikettu you are the best!))

💬 Tulikettu , 3 days ago

El_Neuman, it's done. Just add the "ResetOnDeath" field to the configuration file, as per the example

💬 El_Neuman, 4 days ago

Tulikettu Thank you so much for this mod! I’ve been waiting for someone to finally make a decent starter pack mod.
Would it be possible for you to add a setting that resets the ability to receive the starter pack again after the player dies?
I would be endlessly grateful if you could implement something like that.

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом