About Random Items
Overview
Every online player gets a random item on a timer, or each time they jump. You choose the list, the amount, and how often it happens.
Oxide and Carbon are both supported.
Warning
Reload once after installing 2.3. That first load keeps the item list you already have and saves it to oxide/data/RandomItems.json.
Items you delete after that stay deleted. A brand new config still builds the full list on its own.
The console command runs from the server console only.
Features
-
Timed drops. Every online player gets one random item from your list.
Interval Secondsis the gap between drops. The default is 300. -
Jump loot. Turn on
Give Item On Jumpand the timer stops. Each jump gives an item, including a short jump on a box or under a roof. -
Jump cooldown.
Jump Cooldown Secondsis how long a player waits between jump rewards. The default is 1.2. Set2to slow spam, or0to reward every jump. -
Your own amounts. Set
minAmountandmaxAmounton an item and each drop rolls inside that range. Wood from 3 to 10 is one item entry. - Category percent. A category can give a percent of that item's current stack. 5.56 and rockets stay in scale, and a stack-size plugin is already counted.
- A list you control. The plugin fills the list from the game. Remove a line and it stays gone. Items added in a future Rust update are still appended.
- Happy Hour. Timed drops run only between the start and end time, using the server clock. Players get a start message, a one-minute warning, and an end message. Jump loot ignores this window.
- Hardcore mode. Players cannot gather from trees, ore nodes, and other resource dispensers.
-
Quiet chat.
Show Item Messagesturns off theItem givenline. The item is still given.
Commands
Server console only.
updatestacksize
Lists every category in the config and the percent rule on it, if one is set.
updatestacksize Ammunition 25 75
Ammunition then gives 25% to 75% of each item's current stack. ammo is accepted and maps to Ammunition.
updatestacksize Resources 10
One number sets the minimum and the maximum to that percent.
Run it with a category and no numbers to see that category's current rule. Numbers must be from 1 to 100.
Tip
An item with minAmount or maxAmount above 0 keeps that range. The category percent is used only when both are 0.
Leave both at 0 and skip the category rule to keep using stackSize.
Configuration
Config file: oxide/config/RandomItems.json
Reload with o.reload RandomItems after you save it.
-
Interval Seconds. Seconds between timed drops. Lower it for faster drops. -
Hardcore Mode.trueblocks dispenser gathering. -
Debug Mode (Leave false unless asked to turn it to true). Extra console logs. Leave this false. -
Happy Hour Enabled.truelimits timed drops to the daily window. -
Happy Hour StartTime. Window open, inHH:mm, server local time. -
Happy Hour EndTime. Window close, inHH:mm, server local time. -
Give Item On Jump.trueturns off the timer and rewards jumps. -
Jump Cooldown Seconds. Wait between jump rewards.0rewards every jump. -
Show Item Messages.falsehides the item chat line. -
Category Amounts. Percent range for a whole category. -
items. The drop list. Each entry is one item.
Example
{
"Interval Seconds": 300.0,
"Hardcore Mode": false,
"Debug Mode (Leave false unless asked to turn it to true)": false,
"Happy Hour Enabled": false,
"Happy Hour StartTime": "06:00",
"Happy Hour EndTime": "08:00",
"Give Item On Jump": false,
"Jump Cooldown Seconds": 1.2,
"Show Item Messages": true,
"Category Amounts": [
{
"category": "Ammunition",
"minPercent": 25.0,
"maxPercent": 75.0
}
],
"items": [
{
"shortName": "wood",
"category": "Resources",
"stackSize": 1000,
"minAmount": 3,
"maxAmount": 10
}
]
}
How the amount is picked
-
minAmountormaxAmountabove 0. The plugin rolls between them. One number on its own is a fixed amount. The roll never goes above that item's current stack. - A matching
Category Amountsrule. The plugin rolls that percent of the item's current stack. -
stackSize, when the two options above are not set.
Every configured item has the same chance to be picked. Remove a line to take it out of the draw.
The item list
- A new install builds the list from game items, then remembers it.
- An upgrade keeps the list you already edited.
- Deleting an entry and reloading does not bring that item back.
- Items added by a later Rust update are appended on the next load.
- Minicopters, boats, RHIBs, tricycles, and hot air balloons are left off the list.
Tip
To build the full list again, empty the items array, delete oxide/data/RandomItems.json, and reload.