Targeting custom items
Many servers hand out custom items: a currency, a token another plugin reads, special gear. Under the hood a custom item is almost always a normal Rust item with a workshop skin on it, and usually a custom name. Loot tables, shops and kits all create it that way.
Item lists match on the short name by default, so "items": ["paper"] counts plain paper and your Cash skin alike. To match only the custom item, add the skin’s workshop ID after a colon (:).
Writing a skinned entry
Section titled “Writing a skinned entry”Every field that takes an item list accepts three forms:
| Entry | Matches |
|---|---|
paper |
Paper with any skin, including none. |
paper:3731371060 |
Only paper carrying exactly that skin. |
paper:0 |
Only plain paper with no skin. |
You can list the same item more than once. ["rhib", "rhib:123"] is the same as rhib alone, and ["rhib:123", "rhib:456"] matches either custom item. A preset can hold plain and skinned values.
This works on most objectives and conditions that take an item list, on the Lite edition too. Presets take it in their values. The only exception is a reward’s or cost’s item field, which names one item to give or take and has its own skinId field instead.
Example: loot a custom currency
Section titled “Example: loot a custom currency”Say your loot tables put Cash in crates: a paper item (paper) with skin 3731371060. Define a preset with one skinned value, so the requirement chip in the menu reads the preset’s name:
{ "Cash": { "displayName": "Cash", "displayNameTranslations": null, "values": ["paper:3731371060"], "icon": null, "iconColor": null, "iconRaw": false }}Then reference it from the objective:
{ "type": "Loot", "title": "Loot 100 Cash", "description": "", "amountRequired": 100, "conditions": {}, "rewards": {}, "items": ["@Cash"], "containers": []}Finding the skin’s workshop ID
Section titled “Finding the skin’s workshop ID”The workshop ID is the number in the skin’s Steam Workshop URL. For steamcommunity.com/sharedfiles/filedetails/?id=3731371060 the ID is 3731371060.
A DLC or Twitch item that the game turns into its own item (the ice AK is rifle.ak.ice) is not a skin on the base item. Use its own short name as a plain entry.
Limitations
Section titled “Limitations”The following list shows cases where the plugin cannot see a skin. Some of the things the plugin counts never reach it as an item, so it cannot read a skin there and treats them as unskinned:
- Loot and Harvest: picking a wild plant, wood, ore, mushroom or berry off the ground (internally referred to as “collectibles”).
- Mix, Cloning, the
fishlist on Fishing, and Recycle output. - Weapon condition: hits from rockets, thrown explosives, arrows and fire. A held gun or melee weapon is fine.
On those, hemp:123 never counts and hemp:0 always does. Mix, Cloning, the fish list and Recycle output cannot see a skin at all, so the editor warns on a skinned entry there and the plugin prints a warning at load, but keeps the entry.
Gather counts what the tree or node itself hands out. A custom item another plugin adds to your inventory as a gather bonus never passes through the gather event, so no objective counts it.
Paying the same item out
Section titled “Paying the same item out”To reward the custom item, define it once as an Item custom reward definition. Rewards name the item and skin in separate fields, not with the colon.
