SkinBox

SkinBox 2.2.15

This plugin require the Chaos extension -> https://chaoscode.io/resources/chaos.321/


SkinBox allows players to change the skin of any skinnable item they place in the box.
When a item has been placed in the box it will be populated with the available skins.
The user can then drag out the skin they want.



Old video

UI changes in v2.2.0+
275886529de26da06aaa1066c148767e.jpg

00fd5b1e2d1c303b36c9848a0bb56f55.jpg


Features
SkinBox allows you to;
  • Import specific skins from the Steam Workshop that players can claim in the SkinBox
  • Easily import entire skin collections from the Steam Workshop
  • Supports redirected item skins such as the industrial door -> sheet metal door
  • Ability to reskin deployed items
  • Applies workshop skin names to items
  • Apply usage costs to use the SkinBox
  • Apply usage cooldowns to use the SkinBox
  • Give VIP's access to specific skins
  • Search for skins by name in the container
  • Use a favourite system to prioritize commonly used skins
  • Option to use to specially skinned spray cans instead of command
  • Ability to store sets of skinned items and apply them to your inventory

This plugin requires a Steam API key to access workshop skin lists.
You can obtain your Steam API key by following this link -> https://steamcommunity.com/dev/apikey
Once you have your Steam API key enter it into your config as depicted below
Code:
"Steam API key for workshop skins (https://steamcommunity.com/dev/apikey)": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
** Note ** This plugin will not function without a valid Steam API key!


Regarding client skin downloads
Neither the server or the plugin are responsible for actually loading skins on the client. This is purely between the client and Steam. The plugin merely tells the client the skin ID and the client asks Steam to download it.

Any issues regarding skin icons not loading on the client are entirely client side.

If users are having issues with skin icons not loading, tell them to open Steam, go to the downloads tabs, and force start the queued up workshop requests


Permissions
SkinBox uses Oxides permission system
To assign a user permission use oxide.grant user "username|steam id" "permission" in console.
To assign a group permission use oxide.grant group "groupname" "permission" in console.
You can read more about how to use the permission system here : uMod - Permissions
The permissions are all in the config and can be customized to your liking.
By default they are;

"skinbox.use" - Required to open the SkinBox
"skinbox.admin" - Required to use the admin commands
"skinbox.ignorecost" - Ignores usage cost for players with this permission
"skinbox.ignorecooldown" - Ignores cooldowns for players with this permission

Allowing re-skinning by item category
You can assign permissions to the various item categories that restrict skinning those items to players with the permission.
By default these all use the "skinbox.use" permission which allows anyone with that permission to skin those item types.
If you want to restrict these item types to specific players you need to change the permission to something other than the default and give it to those players
Code:
    "Permission required to skin weapons": "skinbox.use",
    "Permission required to skin deployables": "skinbox.use",
    "Permission required to skin attire": "skinbox.use",

Restricting approved skins to specific players
You can restrict the usage of Rust approved skins to specific players the same way
Code:
"Permission required to view approved skins": "skinbox.use",

Custom permissions per skin
You can also assign custom permissions per skin ID in the "Custom permissions per skin" section of the config. You specify your permission and then add skins to that list.
The default config contains examples of how this is done
C#:
"Custom permissions per skin": {
      "skinbox.example1": [
        9990,
        9991,
        9992
      ],
      "skinbox.example2": [
        9993,
        9994,
        9995
      ],
      "skinbox.example3": [
        9996,
        9997,
        9998
      ]
    }


Chat Commands
/skinbox | /sb - Opens the skin box
/skinbox <skinID> | /sb <skinID> - Apply the specified skin to the item currently in your hands without opening the box
This command and aliases of this command can be changed in the config in the section titled "Commands to open the SkinBox"

/skindeployed | /sd - Opens the skin box to reskin deployed items
/skindeployed <skinID> | /sd <skinID> - Apply the specified skin to the target entity without opening the box
This command and aliases of this command can be changed in the config in the section titled "Commands to open the deployed item SkinBox"

/skinset | /ss - Opens the skin set box
/skinset <ID> | /ss <ID> - Apply the skin set with the specified ID to your inventory without opening the box
This command and aliases of this command can be changed in the config in the section titled "Commands to open the skin set"


Console Commands
Adding/removing individual skin IDs
skinbox.addskin - Adds one or more skins using their individual ID numbers
(Ex. skinbox.addskin 820574348 (one only) -OR- skinbox.addskin 820574348 820610731 (two at once, you can add up to 16 skin IDs in the same command))

skinbox.removeskin
(Ex.
skinbox.removeskin 820574348 (one only) -OR- skinbox.removeskin 820574348 820610731 (two at once, you can add up to 16 skin IDs in the same command))

skinbox.addvipskin <permission> <skinID> - Adds the skin(s) using their individual ID numbers and assigns it the specified permission.
This permission must already exist in the custom permission section of the config

skinbox.removevipskin <permission> <skinID> - Removes the skin and removes it from that permissions skin list.
This permission must already exist in the custom permission section of the config


skinbox.validatevipskins - Compares the VIP skin lists with the actual skin list and queries any missing skins from the workshop.

Adding/removing skin collections
skinbox.addcollection - Adds all the skins in the collection
(Ex:
skinbox.addcollection 659627304)

skinbox.removecollection - Removes all the skins in the collection
(Ex: skinbox.addcollection 659627304)

skinbox.addvipcollection <permission> <collectionID> - Adds all the skins in the collection and assigns them the specified permission.
This permission must already exist in the custom permission section of the config

skinbox.removecollection - Removes all the skins in the collection and removes them from that permissions skin list.
This permission must already exist in the custom permission section of the config

Blacklisting skin IDs
skinbox.addexcluded - Prevent players from using this skin unless they have the appropriate auth level
(Ex:
skinbox.addexcluded 820574348 (one only) -OR- skinbox.addexcluded 820574348 820610731)

skinbox.removeexcluded - Remove a skin ID from the excluded list
(Ex:
skinbox.removeskin 820574348 -OR- skinbox.removeskin 820574348 820610731)

skinbox.addcollectionexclusion - Add an entire skin collection to the skin blacklist

skinbox.removecollectionexclusion - Remove an entire skin collection from the skin blacklist


How to find these skin and collection ID numbers
Open the Steam Workshop by your preferred browser and click on any skin.
In the URL you will see a ID number tacked on the end. This is the skin ID that you will need to use to add this skin.
Use the same process for adding skin collections

Example, the end of the URL contains ?id=2373483517. This number is the skin ID
9c9d8768700287c3c778f293c1f3a052.png



Applying usage costs to the SkinBox
You can specify costs to use the SkinBox and reskin items in the config section titled "Usage Cost Options"
In here you can change the costs, and which currency to use when applying costs.
If you want VIP's to incur no charge for using the SkinBox, simply grant them the permission "skinbox.ignorecost"
C#:
"Usage Cost Options": {
    "Enable usage costs": false,
    "Currency used for usage costs (Scrap, Economics, ServerRewards)": "Scrap",
    "Cost to open the SkinBox": 5,
    "Cost to skin deployables": 10,
    "Cost to skin attire": 20,
    "Cost to skin weapons": 30
  },


Applying cooldowns after using the SkinBox
You can apply cooldown periods to players after using the SkinBox. You can modify the settings for this in the config section titled "Cooldown Options"
If you want prevent cooldowns from being applied to VIP's simply grant them the permission "skinbox.ignorecooldown"
C#:
"Cooldown Options": {
    "Enable cooldowns": false,
    "Cooldown time start's when a item is removed from the box": true,
    "Length of cooldown time (seconds)": 60
  },


Favourites System
The favourites system works by recording which skins a player uses and prioritizes those that are used the most.
It also incorporates a data purge system to remove old player data
This system can be toggled in the config, and the purge time can be adjusted

Players can also clear their favourites for each item using the provided button


Skin Set System
The skin set system allows players with permission to store specific skins in a set and easily apply it to their inventory
Players can access the skin set box by pressing the "Set" button in the skin box, or by typing one of the skin set chat commands
The player will have 12 slots which they can drag skinned items in to. The skin set box will save these skins for the player.

- Skins will be applied to non-skinned items in the inventory first, before overriding items that are already skinned
- The skin will only apply to the first item of the same type found in the inventory
- You can only have unique items in the skin set (so 1 assault rifle, 1 pair of pants, etc)
- To add a item to the skin set you just drag a skinned item in to the skin set box
- To remove a item from the skin set, right click the item or hover loot over it
- You can clear an entire set by pressing the 'Clear' button
- You can apply a skin set by pressing the 'Apply' button
- You can edit the number of skin sets a player can have in the config file
- Skin sets use cost rules set up in the config. The cost to apply shown in the skin set UI reflects the cost to apply that set to the users current inventory


Spray Can Support
You can optionally provides players with specially skinned spraycans that can be used to reskin both items that are on the floor, and deployed items such as doors and boxes.

This option is disabled by default, to enable it set "Allow skinning via SkinBox spray can" to true in the config.

This option has a console command that can be used to give/create SkinBox spray cans.
The command can only be run by players with the admin permission, via RCON, or it can be added to a store that supports purchasing commands.

Running the command "skinbox.spraycan" with no arguments via the ingame console will give yourself a spray can
Running the command "skinbox.spraycan <playerNameOrID>" in RCON or via a ingame store will give the target player a spray can

If you want to include these items in your loot table the shortname is 'spraycan' and the skin ID is '2937962221'

Other config options
"Maximum number of pages viewable" - Sets the limit of pages a user can access in the SkinBox
"Include approved skins" - Automatically import all approved skins
"Include manually imported workshop skins" - Imports all workshop skins you have added via command, or directly in to the config
"Remove approved skin ID's from config workshop skin list" - Removes any approved skin ID's from the workshop list in the config when the plugin loads
"Include redirected skins" - Allows usage of redirected skins such as industrial door -> sheet metal door
"Auth-level required to view blacklisted skins" - Players with this auth-level will be able to view blacklisted skins


Config
The configuration file can be found in your server directory at .../oxide/config/SkinBox.json
The use of an editor and validator is recommended to avoid formatting issues
JSON:
{
  "Skin Options": {
    "Maximum number of approved skins allowed for each item (-1 is unlimited)": -1,
    "Maximum number of pages viewable": 3,
    "Include approved skins": true,
    "Include manually imported workshop skins": true,
    "Remove approved skin ID's from config workshop skin list": false,
    "Include redirected skins": true,
    "Steam API key for workshop skins (https://steamcommunity.com/dev/apikey)": ""
  },
  "Cooldown Options": {
    "Enable cooldowns": false,
    "Cooldown time start's when a item is removed from the box": true,
    "Length of cooldown time (seconds)": 60
  },
  "Command Options": {
    "Commands to open the SkinBox": [
      "skinbox",
      "sb"
    ],
    "Commands to open the deployed item SkinBox": [
      "skindeployed",
      "sd"
    ][/FONT],
    "Commands to open the set set box": [
      "skinset",
      "ss"
    ],
    "Allow skinning via Skinbox spray can": true
[FONT=Tahoma]  },
  "Permission Options": {
    "Permission required to use SkinBox": "skinbox.use",
    "Permission required to reskin deployed items": "skinbox.use",
    "Permission required to use admin functions": "skinbox.admin",
    "Permission that bypasses usage costs": "skinbox.ignorecost",
    "Permission that bypasses usage cooldown": "skinbox.ignorecooldown",
    "Permission required to skin weapons": "skinbox.use",
    "Permission required to skin deployables": "skinbox.use",
    "Permission required to skin attire": "skinbox.use",
    "Permission required to view approved skins": "skinbox.use",[/FONT]
    "Permission required to use skin sets": "skinbox.use",
[FONT=Tahoma]    "Custom permissions per skin": {
      "skinbox.example1": [
        9990,
        9991,
        9992
      ],
      "skinbox.example2": [
        9993,
        9994,
        9995
      ],
      "skinbox.example3": [
        9996,
        9997,
        9998
      ]
    }
  },
  "Usage Cost Options": {
    "Enable usage costs": false,
    "Currency used for usage costs (Scrap, Economics, ServerRewards)": "Scrap",
    "Cost to open the SkinBox": 5,
    "Cost to skin deployables": 10,
    "Cost to skin attire": 20,
    "Cost to skin weapons": 30
  },
  "Other Options": {
    "Allow stacked items": false,
    "Auth-level required to view blacklisted skins": 2
  }[/FONT],
  "Favourites Options": {
    "Enable favourites system": true,
    "Enable purging of favourites data": true,
    "Purge user favourites that haven't been online for x amount of days": 7
  },
  "Set Options": {
    "Enable set system": true,
    "Number of skin sets allowed": 3
  },
[FONT=Tahoma]  "Imported Workshop Skins": {},
  "Blacklisted Skin ID's": [],
  "Version": {
    "Major": 2,
    "Minor": 2,
    "Patch": 0
  }
}


Hooks
Return a reason in a string to cancel any of the following hooks
C#:
string SB_CanUseSkinBox(BasePlayer player)
string SB_CanAcceptItem(BasePlayer player, Item item)
string SB_CanReskinItem(BasePlayer player, Item item, ulong newSkinID)
string SB_CanReskinDeployable(BasePlayer player, BaseEntity targetEntity, ItemDefinition targetItemDefintion)
string SB_CanReskinDeployableWith(BasePlayer player, BaseEntity targetEntity, ItemDefinition targetItemDefintion, ulong newSkinID)

Return a List<ulong> of skin ID's for the specified item shortname to override what is shown in the SkinBox. Return null for default behaviour
C#:
List<ulong> SB_GetSkinOverrides(BasePlayer player, string shortname)

//Example usage
private object SB_GetSkinOverrides(BasePlayer player, string shortname)
{
    if (shortname == "tshirt")
    {
         Debug.Log($"Overriding skins for {player.displayName}");
         return new List<ulong>
         {
             2828965156,
             2828949212,
             2828923429,
             2828843252,
             2828375164,
             2828348837,
             2827794893
         };
    }
    return null;
}

Information

Author
k1lly0u
First release
Last update
Rating
4.85 star(s) 133 ratings

Latest Release v2.2.15

Released
Oct 3, 2024 at 9:56 AM
Rating
0.00 star(s) 0 ratings


More resources from k1lly0u

  • TeleportGUI
    TeleportGUI
    Teleport, home and warp with a easy to use UI
  • DiscordRewards
    DiscordRewards
    Reward players with items, kits and commands for being a member of your Discord
  • Discord Clans
    Discord Clans
    Log events and team chat from Clans Reborn to Discord
  • NPC Taxi
    NPC Taxi
    Allow players to call NPC driven taxi's to drive them around
  • BuildingRestrictor
    BuildingRestrictor
    Limit the amount of building blocks allowed per base

SkinBox by k1lly0u
© chaoscode.io Jan 29, 2017

Latest reviews

k1lly0u has created the ultimate way to add a beautiful plugin for your players to enjoy any & all workshop skins to your hearts content! This plugin is easily one of the best mods you can put in Rust!
BEST AND ONLY SKINNER YOULL NEED! Easy to use!
Love it!
One of the best Skin addons out there. Easy to install and use, I've loved it both as a player and as a server owner.
best skin box ever
fantastic mod works great i had a spray can mod that skinned items but the skinbox is Definity better by a mile i wish i known about this mod as it is well worth the money
Works well, great set of skins already in there, adds a whole new element of enjoyment to the game.
I'm giving it 4 starts because I have used it on other servers; however I can't seem to add it to mine.

I have an API key, and the mod still says I haven't entered one.
And the URL that gets me the API key, isn't specific on the URL I need to enter to get it.

Do I add my own steam profile?, this website?, what?.
first plugin that i purchased. still hasnt given me any issues. everyone knows its commands, its the standard.
worth every penny. easy to use. easy to add workshop items if wanted. be 5 star if there was a command to download the current list of approved mods.