/// 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
- Check the installed version
This guide describes Custom Rewards 2.0.4. Use the same version in the configurator.
- Import your configuration
Open the configurator and import your current JSON. For a new installation, you can start from the provided example.
- 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 path
Data 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 path
Enabled - Commands to open rewards
- List · required
Chat commands without the leading / character.
JSON path
Commands 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 path
Rewards Settings → Rewards List
Interface 10
- Rewards per page
- Choice
Rewards shown per page. Match the template’s card count to avoid inconsistent slots.
JSON path
UI Settings → Max Reward By PageAllowed values: 3, 5, 8
- Show descriptions
- On / off
Show reward descriptions in the interface when the template has a description area.
JSON path
UI Settings → Show Description - Description text size
- Whole number
Description text size in the legacy interface. Large sizes may overflow long descriptions.
JSON path
UI Settings → Description Font Size - Title text size
- Whole number
Title text size in the legacy interface. Check long names after changing it.
JSON path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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 path
UI 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>requiresCustomRewards.Admin.customrewards_wipe_owner <type> <owner>requiresCustomRewards.Admin.customrewards_wipe_all <type>requiresCustomRewards.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), returningenabled,disabled, orunknown;TryShowUI_API(string rewardType, ulong playerId, string parent), returning a dictionary withsuccess,code,rewardType,known, andenabled.
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
- Back up
oxide/data/CustomRewards_*. - Install only
CustomRewards.cs. - Create one disabled reward type with a single low-value item.
- Reload and correct every startup validation error.
- Grant
customrewards.<type>.useto a test group. - Enable the type and test its show command, paging, insufficient-points state, successful claim, and reconnect behavior.
- 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.jsonFollow the plugin instructions above for dependencies and reloading. Exporting does not connect the site to your server.