Skip to content
← All documentation

/// PIMPMYRUST PLUGIN

Custom Rewards

Settings guide for this version of Custom Rewards. Check the plugin page before using it on your server.

Prepare your file

  1. Check the installed version

    This guide describes Custom Rewards 2.0.4. Use the same version in the configurator.

  2. Import your configuration

    Open the configurator and import your current JSON. For a new installation, you can start from the provided example.

  3. Edit and download

    Adjust the settings, fix reported errors, and download the JSON. Keep a copy of your old file before replacing it.

Your configuration is not saved on the site. Keep the exported file; you can import it again later.

Settings for this version

General 3
Configuration format version
Whole number · required

Internal configuration format marker. Keep the value supplied for this plugin version.

JSON pathData Version
Enable
On / off · required

Enable this reward type. Each file defines an independent type; this does not enable every reward type on the server.

JSON pathEnabled
Commands to open rewards
List · required

Chat commands without the leading / character.

JSON pathCommands for show UI
Reward settings 1
Reward list
Object list · required

Rewards in this type’s milestone order. Configure each item or action and its access rules; moving an entry changes its milestone index.

JSON pathRewards Settings → Rewards List
Interface 10
Rewards per page
Choice

Rewards shown per page. Match the template’s card count to avoid inconsistent slots.

JSON pathUI Settings → Max Reward By Page

Allowed values: 3, 5, 8

Show descriptions
On / off

Show reward descriptions in the interface when the template has a description area.

JSON pathUI Settings → Show Description
Description text size
Whole number

Description text size in the legacy interface. Large sizes may overflow long descriptions.

JSON pathUI Settings → Description Font Size
Title text size
Whole number

Title text size in the legacy interface. Check long names after changing it.

JSON pathUI Settings → Title Font Size
Background image URL
Text

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUI Settings → Background Url
New icon URL
Text

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUI Settings → New Icon Url
Checked icon URL
Text

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUI Settings → Checked Icon Url
Lock icon URL
Text

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUI Settings → Lock Icon Url
Previous-page icon URL
Text

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUI Settings → Prev Icon Url
Next-page icon URL
Text

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUI Settings → Next Icon Url
Rarity colors 4
Common
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Rarity Colors → Common
Rare
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Rarity Colors → Rare
Epic
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Rarity Colors → Epic
Legendary
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Rarity Colors → Legendary
Theme colors 8
Primary color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → Primary
Secondary color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → Secondary
Interface background
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → Background
Element background
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → Surface
Disabled element background
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → SurfaceDisabled
Primary text
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → TextPrimary
Text on secondary color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → TextOnSecondary
Warning color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUI Settings → Theme → Colors → Danger

Plugin instructions

CustomRewards 2.0.4 — user guide

This guide covers the Codefling version 2.0.4. PimpMyCUI editing belongs to the separate 2.2.0 beta, not this version.

CustomRewards is a reusable reward and UI engine for Rust servers running Oxide or Carbon. Version 2.0.4 includes safe player reattachment after an offline wipe preload. The earlier 2.0.3 build passed its approved live reward UI and claim smoke tests on Rust build 2631 with Oxide; 2.0.4 has not received a new live smoke. Carbon remains compile-validated only.

Installation

Install the generated deploy/CustomRewards.cs file in the framework plugin directory. Do not install files from src/ individually. Keep a backup of oxide/data/CustomRewards_* before upgrading.

Reward types

Each JSON file under oxide/data/CustomRewards_rewards/ defines one reward type. The file name is the exact reward type used by API calls and its dynamic use permission is CustomRewards.<Type>.Use. New templates are disabled by default until an administrator reviews item names, commands, permission changes, group changes, eligibility rules, image URLs, and UI commands.

The web configurator exports one reward type. Rename its generic reward-type.json download to the intended type, for example Starter.json, then install it as oxide/data/CustomRewards_rewards/Starter.json. Keep that exact type name in integrations and grant customrewards.starter.use to the appropriate group. Do not put this catalogue in oxide/config/.

Missing theme colors, rarity colors, and UI asset URLs are filled with safe defaults when a reward-type file is loaded. The exact known legacy Postimg URLs are migrated to hosted direct links whose content is verified against the source-controlled project assets; non-empty custom URLs are preserved. The neutral reward frame is tinted by the configured rarity color at runtime and has a transparent center.

Only %steamid% is accepted in server commands. Unknown placeholders and control characters are rejected. Reward configuration is privileged code and must remain administrator-controlled.

An enabled reward type must contain at least one fully valid, executable reward. Empty catalogues, malformed actions, permission grants without a plugin owner, and actions that revoke a required eligibility gate or grant a forbidden gate are rejected once at startup before commands or UI are registered.

Commands and permissions

  • Reward-type show commands are configured per template and require CustomRewards.<Type>.Use, unless the player is an administrator.
  • customrewards_give <type> <player> <quantity> requires CustomRewards.Admin.
  • customrewards_wipe_owner <type> <owner> requires CustomRewards.Admin.
  • customrewards_wipe_all <type> requires CustomRewards.Admin.
  • Player console commands for paging and claims validate every argument and recheck eligibility on the server.

Upgrade and recovery

Legacy unversioned player files are migrated forward to data version 2 only after validation. Invalid JSON, unsupported versions, negative points, duplicate reward IDs, out-of-range IDs, or overlap between claimed and unclaimed rewards fail closed and require administrator repair from backup.

A claim writes intent before privileged delivery and records action progress durably. Completed actions are not replayed. An action with uncertain external outcome is held for manual reconciliation; the plugin does not claim cross-API transactional delivery.

A definite partial failure resumes the immutable plan authorized on the first attempt, even if an earlier completed action changed a permission or group. Completed journal records are compacted only after the matching entitlement removal is durably saved; retryable, in-flight, reconciliation, active-entitlement, and replay-protection evidence remains fail-closed.

API and CUI composition

Contract version 2, the existing capabilities, and ShowUI_API remain compatible. Capability reward-type-ui-open-v1 adds:

  • GetRewardTypeStatus_API(string rewardType), returning enabled, disabled, or unknown;
  • TryShowUI_API(string rewardType, ulong playerId, string parent), returning a dictionary with success, code, rewardType, known, and enabled.

parent is a parent layer, never an element ID. The accepted always-present layers are Overall, Overlay, OverlayNonScaled, Hud.Menu, Hud, Under, and UnderNonScaled; null selects Overlay. Each UI root is uniquely scoped to the reward type and player. Invalid parents fail closed without destroying unrelated CUI.

Limitations

Approved-assembly compilation is not a live-server test. UI layout, inventory delivery behavior, command effects, dynamic plugin lookup for permission grants, reload behavior, and Oxide/Carbon runtime parity still require the deferred in-game smoke matrix.

First-run checklist

  1. Back up oxide/data/CustomRewards_*.
  2. Install only CustomRewards.cs.
  3. Create one disabled reward type with a single low-value item.
  4. Reload and correct every startup validation error.
  5. Grant customrewards.<type>.use to a test group.
  6. Enable the type and test its show command, paging, insufficient-points state, successful claim, and reconnect behavior.
  7. Add privileged commands, permission changes, or group changes only after the item-only path succeeds.

Configuration example

{
  "Enabled": false,
  "Commands for show UI": ["starter_rewards"],
  "UI Settings": {
    "Max Reward By Page": 5,
    "Show Description": true
  },
  "Rewards Settings": {
    "Rewards List": [
      {
        "Rarity (Common - Rare - Epic - Legendary)": "Common",
        "Quantity": 100,
        "Item Shortname (optional)": "wood",
        "Server command (optional)": [],
        "Grant Permissions :": [],
        "Grant Groups :": {},
        "Needed Permissions :": {},
        "Needed Groups :": {}
      }
    ]
  }
}

Keep the type disabled while reviewing it. Reward files are privileged configuration because they can execute server commands and change access.

Troubleshooting and FAQ

  • If a show command is missing, confirm the type loaded successfully, is enabled, and does not reuse another registered command.
  • If the UI denies access, grant customrewards.<type>.use; the historical mixed-case permission remains accepted for existing installations.
  • If a catalogue is rejected, fix the first reported invalid reward or contradictory eligibility action rather than editing player state.
  • If a claim requires reconciliation, inspect the administrator diagnostic and the external action before retrying.
  • Custom Rewards does not require Vote System. It can be used by any integration that follows the documented compatibility contract.

Install the file

After keeping a copy of the previous file, place the exported JSON at this location on your server:

oxide/data/CustomRewards_rewards/reward-type.json

Follow the plugin instructions above for dependencies and reloading. Exporting does not connect the site to your server.