Articles on: Rust

RUST plugin guide for kits by Jacob- WIP

As an admin for a Rust Server and you're looking to understand how the Kits Plugin system works then look no more as this guide is for you it has Everything you need to know from Kits' Admin Commands to Kits' Config options these are covered below (please note this is a basic overview)

* Features include:
* Being able to set a limit for number of a type of kit is usage
* Creating kits for Admins, Mods, and VIP's
* Creating an AutoKit for easy on-login kit giving ( new players)
* This Plugin supports adding kits to Graphics User Interface menus and a GUI menu for chating and much more!

Before we get started there will be a couple of things you'll need to do:

First, install Oxide on your server. It's very easy, just requires one click! Read our guide on how to install Rust Oxide.
Next, you will need a umod.org account. UMod is a free site, we recommend making an account on the following. https://umod.org/

Finally we recommend using our One Click Plugin Installer to download the Kits plugin from umod this can be located here.
Guide for How to install and update uMod/Oxide
Once you've installed Kits, manually start your server to generate plugin configuration files.

Kits configuration



Command Description
/kit By typing /kit, the chatbox will display the full list of kits available to you.
/kit "KitName" To select a kit, tpe /kit followed by the KitName.


###Admin Command List
Command Description
/kit list Displays the list of all kits
/kit add "KitName" Add a new kit
/kit remove "KitName" Remove a kit
/kit edit "KitName" Edit a kit
/kit resetkits Deletes all kits and playerdata
/kit resetdata
Resets all playerdata
Kit options

You can edit options of a kit you are currently editing by typing:


/kit edit "KitName" Then: /kit [option1 value1] [option2 value2]

Option Value Description


max "number"/false Sets the maximum uses of a kit by changing the "number" field. False deactivates this option.
cooldown "time"/false Sets the cooldown between uses in seconds by changing the "time"value. False deactivates this option.
Building "ID" Sets a building to paste. Bad idea to use in user kits unless they're paid and one time use.
authlevel "number" Authorization level required to redeem the kit. Set it to 2 for this command to be admin only, otherwise use permissions.
npconly "true/false" This sets the kit to be NPC accessible only.
permission CustomPermissionName/false Only players with the "custom permission" oxide permission will be able to redeem these kits.
description "description text" Sets a description for the kit
image 'URL' Sets an image for a kit
hide true/false Hides a kit from the user kit list, but not admin kit list.
xp "xp value" Gives the user this much XP when redeeming the kit
items NO VALUE Copies the items in your inventory to set it in the kit

In-Game Kit Building Scenario

In the following example we are going to use Christmas, and you want to reward your users with a kit of free Christmas items You may think to yourself, "hmm, will this be too hard to achive?," The anwser is no all you'd have to do is the following:

Step1: Clear your inventory of items
Step2: Open up the console by pressing F1
Step3: Give yourself the items using inventory.give "Item name" command
Step4: Make the kit.

It's that easy But We'll run you through this scenario.

Firstly Log into the rust server Press F1 to open your console In the following scenario I'll be giving my users 6 large christmas presents, So following the steps above i cleared my inventory and then typed in inventory.give xmas.present.large 6 and that gave me 6 Large Christmas presents.

In the console i then typed in /kid add ChristmasKit the command was confrimed with the following message You've created a new kit : ChristmasKit

After i created my new kit. Next, I wanted to edit the kit to only allow users to claim their kit once a day to keep players from abusing gift box mechanics. Then, I'll also wanted to provide my command with a description.

In the in-game text box i typed the following:
/kit edit ChristmasKit - this commands allows the editing of the kit
/kit cooldown 86400 description "Merry Christmas! Contains 6 large gift boxes. - this is set in secounds

cooldown 86400 Sets the cooldown to 24 hours, because 24 hours 60minutes 60seconds = 86400 seconds.
My Description is now set to Merry Christmas! Contains 6 large gift boxes.
After I hit enter I'm returned with a verification that the changes were made.

Cooldown is now set to 86400
Description is set to Merry Christmas! Contains 6 large gift boxes.

Now to test the new Kit we have Just made firstly we make sure the inventory is clear then we type in the following /kit ChristmasKit it will redeem the 6 boxes. after entering the command now press [TAB] and check for any inventory for changes If everything is there, we know the kit is working and was set correctly.

Now make sure your users understand that the kit system works by replacing your inventory with the kit. Applying a kit will remove all items in your inventory. Make sure you give them a notice to secure their items in a container before using a kit.

Advanced Kit Configuration


Now that you understand how to offer a kit to your users, here we'll show you a couple more ways you can configure this plugin to be a little more unique to your server.

Permissions
/kit permission "permission name" applies a permission value to your kit. Using permissions you can give certain users certain kits over others. To make a new permission you can type /kit permission "NewPermissionName" or, more reliably, use oxide groups to make permissions.

As for this plugin, you can use some basic oxide group commands within your F1 console as seen below.

Command Description
oxide.grant user <username> <permission> Grants a user permissions
oxide.group add <groupname> Creates a group
oxide.grant group <groupname> <permission> Grants a group a permission level.
oxide.usergroup add <username><groupname> Adds a user to a group of users.
oxide.revoke <userid or username><group><permission> Revokes a member from a group

Example:

To apply a permission to a kit, say, "VIP", we'd need to first edit the VIP kit and then give it the permission. We'd do so by entering these commands in the in-game text box:

/kit edit VIP
/kit permission VIPPerms

You can give permissions to individuals or groups. If you give a permission set to a group, all users within the group will have the permission. For example: John buys VIP on our Rust server's website, to give him VIP permissions and access to VIP Kits we'd type in the console:

oxide.group add VIP
oxide.grant group VIP VIPPerms
oxide.usergroup add John VIP

Now John is a member of the VIP group and can use the VIP Kit.

AutoKits
Autokits are useful, if you die, you can start again with a default kit, similar to how when you spawn in a new vanilla server, you spawn with a rock and a torch. There are two ways of configuring auto kits. The easy way gives one auto kit to all members on spawn or respawn. This kit is the same for everyone despite their permission levels. To set this up, it only takes three steps:

/kit add "autokit"
/kit authlevel 2 hide true
/kit itmes

Time to break this down. /kit add "autokit" creates a new kit named autokit. /kit authlevel 2 hide true makes the "autokit" kit only manually useable by those with authlevel 2 (server administrators) and hides it from the /kits command. /kit items changes the items in the kit to what is currently in your inventory.

Following this method, you can create an autokit which is given to all users.

Custom AutoKits
But say for example, you wanted to change your autokits depending on what permission status your users are. That can be done as well. To give kits to a specific user group, it will require some .json editing. To do this you must create your auto kit for your group first. To keep it easy, we'll do two. Normal and VIP.

Start by filling your inventory with the items you want in the Normal AutoKit. Type:

/kit add Normal
/kit authlevel 2 hide true
... Any other kit settings ...
/kit items

Then, remove everything from your inventory, and fill your inventory with the VIP Auto Kit Items.

/kit add VIP
/kit permission VipSpawn
/kit hide true
/kit authlevel 2
... Any other kit settings ...
/kit items

Now you have created two custom Auto Kits. Apply the permissions added to the oxide permissions groups 'default' which is the default group already made by oxide, and "VIP" the group we made earlier.

oxide.grant group default Kits.Normal
oxide.grant group VIP Kits.VIP

Now's the time to create all the custom kits you want to make. Now that you're done, it's time to configure them. Open your Server Management panel, and click on file manager. Then navigate to oxide/config/Kits.json and edit Kits.json by clicking on the edit next to the file. Navigate to the Custom AutoKits section, which should look like this:

"Custom AutoKits": {
},

Between the Curly Brackets, you will be adding your Kits. The way oxide will read this file, it will dispense the autokits in numerical order. So, if you are VIP, you have access to VIP kits as well as the default kit. For example, if you have a time restriction on kits of 5 minutes, and a VIP member dies twice within those 5 minutes, they will first receive the VIP kit, and then the kit for default users. Because of this, it's very important to list your Kits in numerical order, with your default at level 0, and increasing as you increase rank. So, in this scenario, we would change the Custom AutoKits section to look like this.

"Custom AutoKits": {
"0": "Normal"
"1": "VIP"
}

Save this file by clicking the save icon in the top left corner of the editor. Then, reset your server using your Game Server Manager panel. Your custom AutoKits will now be set up.

GUI Menus


NPC GUI
When you create an NPC kit, you may choose to give it the option npconly true which makes the kit only accessible through NPCs. To allow NPC kits, create an npc and type /npc_list to get the NPC ID. Then, go to your Kits.json file located at oxide/config/Kits.json and edit it by clicking on the pencil next to the file. You will be greeted by something like this:

"NPC - GUI Kits": {
NPC data

}

Then modify it to look something like this:

"NPC - GUI Kits": {
"NPC ID":{
"description" : "Edit this string to what you want the description for your NPC Kit GUI to be."
"kits: :[
"kit1",
"kit2",
"... and so on"
]
}
}

Once you fill out this information hit save in the upper left-hand corner of your text editor. Now your NPC will have a GUI where they can apply Kits to users.


Chat GUI
By default, there are no chat GUIs. But you may replace the default /kit chat command by a gui. In the code above, just type a zero for your NPC ID. This way instead of the kit selection being text-based, it will have it's own GUI, and the user will just have to click.

Updated on: 28/10/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!