Mods / Starter Kit (by Tulikettu)

Tags: #Utility
Author: Tulikettu
Side: Server
Created: Nov 1st at 7:14 PM
Last modified: Nov 4th at 10:15 PM
Downloads: 152
Follow Unfollow 14

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
55 Nov 4th at 10:15 PM 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
18 Nov 4th at 6:38 AM 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
21 Nov 3rd at 9:18 AM 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
23 Nov 2nd at 10:02 PM StarterKit_1.0.1.zip 1-click install

Added an attribute system for item stacks; and partial localization

1.0.0 35 Nov 1st at 7:19 PM StarterKit_1.0.0.zip 1-click install

The first version of the mod


11 Comments (oldest first | newest first)

💬 Tulikettu , 5 days ago

Exxo, send me your mod configuration file. Wrap it in a spoiler to avoid cluttering the comments.

💬 Exxo, 6 days ago

I cannot for the life of me get this mod to actually work. Everytime I do /sk or /starterkit it just gives me an error saying it is empty

💬 Wahazar, Nov 5th at 11:09 AM

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 , Nov 5th at 7:49 AM

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

💬 Wahazar, Nov 5th at 1:04 AM

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

💬 Tulikettu , Nov 4th at 10:16 PM

Wahazar, it's done

💬 Tulikettu , Nov 4th at 8:34 PM

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

💬 Wahazar, Nov 4th at 6:48 PM

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

💬 El_Neuman, Nov 3rd at 12:35 PM

Tulikettu you are the best!))

💬 Tulikettu , Nov 3rd at 9:22 AM

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

💬 El_Neuman, Nov 3rd at 7:56 AM

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)