Rustoholics
A GUI skin shop to allow players to buy custom skins

Supported Games
GameServerKingsGameServerKings

This plugin is currently in beta version. So updates will be frequent and you may need to redo your config after an update if config file format has changed

The skin shop allows players to buy skin packs or individual skins usings Economics or ServerRewards. It also lets them sell back the skins.

Players can "equip" skins which they own and any time they craft or pickup at item the skin will be switched to their equipped skin.

Download Database

You will need a database of skins in order to use this plugin.

You can download the database in 3 different ways:

Automatically Download

Easiest Run the skinshop.download command. This will automatically download my database.json file and put it in the right place.

Manually Download

Manually download the database from https://www.dropbox.com/s/vyrq104kzxxomo1/database.json?dl=1 and move it to /oxide/data/SkinShop/database.json (must do this while the plugin is unloaded)

Build Your Own Database

Slowest build your own database by running the skinshop.builddatabase command. This will crawl every single steam workshop webpage and download all the skin data.

If you want to build the database for only one specific category then enter the category shortname after the command, for example:

skinshop.builddatabase hoodie

Notes

My database was built in November 2021, so skins added to the steam workshop after that will not be in the database.

Database will automatically be pruned of missing skins; when ImageLibrary fails to download a skin image (this will happen if the author has deleted the skin) then it will automatically be removed from the database.

Permissions

skinshop.use permission will allow players to open the skinshop. If you want to give this access to all players run the command oxide.grant group default skinshop.use

skinshop.admin permission will allow you to run the skinshop.builddatabase, skinshop.download and skinshop.givepack commands

skinshop.blacklist permission will allow you to blacklist skins in game.

There is an internal skinshop.welcomepack permission, but this is used internally only to determine if a user has already received a welcome skin pack.

VIP Discount

You can give players discounts by giving them permissions: skinshop.vip1 and skinshop.vip2The discounts are set under the VipDiscounts in the config file.

Note that you can add more VIP tiers by adding more discounts in the VipDiscounts array. So if you added a 3rd value to the array then permission skinshop.vip3 would automatically be created.

Commands

  • skinshop opens the GUI skin shop
  • skinshop.download will download the database.json file contain all the workshop skins.
  • skinshop.builddatabase will crawl the entire steam workshop and cache all skins. It is suggested you do this if you want to offer skin packs because the skin pack will only give skins from the cache.
  • skinshop.givepack {steamid} gives a user a skin pack using their steam ID
  • skinshop.getskin while looking at an item (in game) will give you a message with the Skin ID
  • skinshop.blacklist.id {skinid} will add the skin to blacklist (requires skinshop.blacklist permission)
  • skinshop.blacklist.this will blacklist the skin of any item you are looking at and also change the skin of the item back to default (requires skinshop.blacklist permission)

Configuration

Skin Packs: You can create up to 6 different skin pack types. Make sure you give them each a unique key (the config starts with pack "0" and "1" as examples. If you want to limit the skins available in a pack you can add the specific Skin IDs to the PossibleSkinIds. And you can limit skins to specific categories by adding the item type shortname to the PossibleSkinCategories (such as ["hoodie","shirt"] would allow only hoodie and shirt skins in that pack)

Welcome Packs: If you want new players to automatically get a skin pack when they join the server the first time, then add the key of the skin packs to the Give Welcome Skin Pack... config.

Blacklist: You add skins that you do not want people to buy to the list of blacklisted Skin IDs

Hide Categories Enter the shortname of any categories that you want hidden into the HideCategories config array. For example "HideCategories":["hoodie","pants"] would mean these categories would not appear in the category selection page.

HumanNPC Add your NPC Ids (found using /npc_list command) to the skinshop config under HumanNpcIds. Whenever a player "uses" the NPC (presses "e" on them) the skinshop GUI will open.

Below is the full json of configuration options:

{
  "SkinPacks": {
    "0": {
      "SkinId": 2631235609,
      "ImageUrl": "https://steamuserimages-a.akamaihd.net/ugc/1765966378913384293/506A7A4ADA3C8C6B9729700BB21E0AB6F156E9B4/",
      "NumberOfSkins": 3,
      "PackName": "Bronze Skin Pack",
      "Price": 1000.0,
      "PossibleSkinIds": [],
      "PossibleSkinCategories": []
    },
    "1": {
      "SkinId": 2631961805,
      "ImageUrl": "https://steamuserimages-a.akamaihd.net/ugc/1765966378917593382/7E8B5C1F34440329A4C993B6E751609A148045B3/",
      "NumberOfSkins": 6,
      "PackName": "Gold Skin Pack",
      "Price": 1500.0
    }
  },
  "BlackListedSkins": [
    0,
    124124924
  ],
  "Give Welcome Skin Pack index to new players ([0,0] would give 2 of the first packs, empty [] for disable)": [
    0
  ],
  "DefaultSkinPrice": 1000.0,
  "DefaultInstantPricePrice": 50.0,
  "HideCategories": [],
  "Currency Plugin (can be 'Economics' or 'ServerRewards')": "Economics",
  "HumanNpcIds": [0],
  "SkinPackImageUrl": "https://rustoholics.com/img/skinpackopen4.png",
  "SearchIconUrl": "https://www.iconsdb.com/icons/preview/white/search-3-xxl.png",
  "DiscordApiKey": "kjfsdf09sd8f0sd9f8()*f09184019241294",
  "DiscordChannelId": "48120091590259",
  "Color": {
    "Red": "0.85 0.33 0.25",
    "Green": "0.42 0.55 0.22",
    "Yellow": "0.82 0.53 0.13",
    "Blue": "0.22 0.35 0.55",
    "Grey": "0.2 0.2 0.2",
    "White": "1.0 1.0 1.0"
  },
  "EnableCaching": true
}

Localization

{
                ["DiscordOpenPackMessage"] = ":gift: ({0:HH:mm}) **{1}** has opened a {2}",
                ["GuiCloseButton"] = "(X) Close",
                ["GuiTitleOpenSkinPack"] = "Open Skin Pack",
                ["GuiButtonViewAllMySkins"] = "View All My Skins",
                ["WithdrawCoinsFailed"] = "We could not collect enough coins to buy this item",
                ["NotEnoughCoinsToBuy"] = "You need {0} to buy this item!",
                ["NoRoomInInventory"] = "You do not have any room in your inventory to buy this pack",
                ["GuiButtonSkinEquipped"] = "√ Equipped",
                ["GuiButtonSkinUnequipped"] = "Unequipped",
                ["GuiButtonBuyNow"] = "Buy Now: {0} coins",
                ["GuiButtonBuyNowShort"] = "Buy Now: {0}",
                ["GuiTitleSkinShop"] = "Skin Shop",
                ["GuiButtonSelectCategory"] = "Select Category",
                ["GuiButtonSkinPacks"] = "Skin Packs",
                ["GuiButtonMySkins"] = "My Skins",
                ["CommandDatabaseBuilding"] = "Starting database building, but it could take a while",
                ["AccessDenied"] = "Access Denied",
                ["InstantSellDescription"] = "You can sell  this \n skin instantly for {0} coins",
                ["InvalidPlayer"] = "Invalid Player",
                ["ItemNotFound"] = "Item Not Found",
                ["ItemSold"] = "Skin has been sold for {0} coins",
                ["PluginNotInstalled"] = "The {0} plugin is not installed",
                ["SavingDataMessage"] = "Saving Skin Data: {0} players",
                ["ButtonSell"] = "Sell",
                ["ButtonSellNow"] = "Sell Now",
                ["SkinDatabaseLoaded"] = "Skin database loaded with {0} skins",
                ["FilesNotFound"] = "Files not found (probably directory not created yet",
                ["UserIDMatchNotFound"] = "No UID match found in filename",
                ["SkinsLoadedForUser"] = "Loading skins for user {0}",
                ["DownloadFailed"] = "Download of JSON database failed: {0}",
                ["DownloadEmpty"] = "Downloaded Database JSON was empty",
                ["MissingImage"] = "There was a missing image {0}",
                ["ItemDeleted"] = "Item {0} has been deleted from the skin database",
                ["IconsLoaded"] = "{0} category icons loaded",
                ["DatabaseBuildCompleted"] = "Database build has been completed",
                ["DatabaseCategoryCompleted"] = "{0} single category build has been completed!",
                ["DatabasePageDone"] = "{0} ({1}): Page {2}",
                ["DatabaseCategoryPageDone"] = "{0}: Page {1}",
                ["InstantSell"] = "Instant Sell",
                ["ButtonApply"] = "Apply"
            }
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.