AlphaLoot

AlphaLoot 3.1.35



Features
  • Support to switch out loot tables on-the-fly
  • Customizable loot profiles for every loot container type
  • Customizable loot profiles for all NPC types
  • Workshop skin support
  • Customizable item condition on spawn
  • Customizable chance of item spawning as a blueprint
  • Hammer-hit loot preview in game
  • The default generated config is an exact copy of Rusts default loot table
  • A custom Unity based loot table editor
  • A easy to use interface for editing loot tables
  • Create advanced (Rust style) or simple (RNG based) loot profiles for each container
  • Alter container behaviour per container
  • Preview loot generation from within the editor
  • Export individual loot profiles, and profile sub-definitions to use on other containers
  • Perform quick actions such as amount multiplication of selected items, or removal of selected items across the whole loot table
  • The majority of work is done via the editor
  • Individual loot tables for Heli and Bradley crates so you can create multiple profiles and randomly cycle through them


The plugin is responsible for taking your loot table and applying it to the loot containers in the game.

There is not a great deal of customization in the plugin since the majority of work is done in the loot table via the editor, however there are some commands that can be run in game and in console and a few options that can be changed in the config.

The loot table editor can be found here -> https://www.chaoscode.io/resources/alphaloot-profile-editor.183/


Permissions
AlphaLoot uses Oxides permission system
To assign a user permission use oxide.grant user "username|steam id" "permission" in console.
To assign a group permission use oxide.grant group "groupname" "permission" in console.
You can read more about how to use the permission system here : uMod - Permissions
alphaloot.admin - This permission is required to use the chat commands, and the console commands from the in game console. It is also required to use the hammer-hit function

Chat Commands
/aloot repopulate - Repopulate the container you are looking at
/aloot view - List the contents of the container you are looking at
/aloot repopulateall - Repopulate every loot container on the map (this task is spread out over 20 seconds)

Console Commands
al.repopulateall - Repopulate every loot container on the map (this task is spread out over 20 seconds)

al.setloottable <filename> - Change loot table on the fly and repopulate all containers with that profile
al.setheliloottable <filename> - Change heli loot table on the fly
al.setbradleyloottable <filename> - Change bradley loot table on the fly

al.generatetable <filename> <helifilename> <bradleyfilename> - Generate the default loot tables to a new specified file

al.search <shortname> - Lists all containers the specified item is in and how many times it is in it

al.additems <shortname> <opt:shortname> <opt:shortname>... - Copies and calculates weights of the specified items to your loot table, the same way the auto-updater does.
You can add as many item short names as you want to mass add missing items.

al.skins add <shortname> <skinid> <opt:weight> - Add a single skin to the random skin list, with a optional argument to specify the weight of this skin
al.skins remove <shortname> - Remove all skins for the specified item
al.skins remove <shortname> <skinid> - Remove an individual skin

Config
The configuration file can be found in your server directory at .../oxide/config/AlphaLoot.json
The use of an editor and validator is recommended to avoid formatting issues
"Global Loot Multiplier" is another multiplier on top of any multipliers you have set for containers in their loot profiles

"Apply global and individual loot multipliers to un-stackable items" applies all loot multipliers to all items generated. Disabling this will prevent any unstackable/items with condition from being multiplied. Ex. You have a M249 in your loot profile, with this option disabled the M249 will not be subject to the loot multipliers

"Amount of crates to drop (Bradley APC/Patrol Helicopter)" modifies how many containers will drop when either of these vehicles are destroyed

"Override FancyDrop containers with supply drop profile" disables FancyDrops handling of loot in supply drops and populates them with the loot profile specified in AlphaLoot

"Use skins from the SkinBox skin list" uses skins that are available in SkinBox to skin items as they are generated

"Use skins from the approved skin list" uses skins from the approved skin list to skin items as they are generated

"Loot Table Name" is the file name (without the extension) of the loot table you want to use. Loot table .json files should be placed in your /data/AlphaLoot/LootProfiles/ folder

"Auto-update loot tables with new items" automatically updates your loot table with new items as they are added to the game. This is disabled by default
- For advanced definitions, since it is possible that the hierarchy the new item belongs to no longer exists in a customized loot table new items will be added as a individual loot definition containing just that item, however the probability set for that advanced loot definition is a calculated score of the item being chosen from the default loot table. This probability score is calculated using the weight of the item and all its parent subspawn definitions, the probability and number of loops of the loot definition multiplied by the number of times it appears in a loot profile all the way back to the start of the hierarchy chain.
- For simple definitions, the probability score is calculated the same way as an advanced score, however since simple definitions use a weight system the weight of the item is calculated by the sum of the weight of all other items in that loot profile multiplied by the calculated probability score of receiving it in the default loot table.
Each new item added to the loot table will be printed in console with the name of the item, the container it was added to and the probability/weight score assigned to it

JavaScript:
{
  "Auto-update loot tables with new items": false,
  "Global Loot Multiplier (multiplies all loot amounts by the number specified)": 1.0,
  "Apply global and individual loot multipliers to un-stackable items": false,
  "Loot Table Name": "default_loottable",
  "Heli Loot Table Name": "default_heli_loottable",
  "Bradley Loot Table Name": "default_bradley_loottable",
  "Amount of crates to drop (Bradley APC - default 3)": 3,
  "Amount of crates to drop (Patrol Helicopter - default 4)": 4,
  "Override FancyDrop containers with supply drop profile": false,
  "Use skins from the SkinBox skin list": false,
  "Use skins from the approved skin list": false,
  "Version": {
    "Major": 3,
    "Minor": 0,
    "Patch": 9
  }
}

Hooks
C#:
(object) CanPopulateLoot(LootContainer) // Returning a non-null value will prevent AlphaLoot from populating the specified container


API
C#:
// Populate a container with its designated profile
bool PopulateLoot(LootContainer container)

// Populate a container with the specified profile
bool PopulateLoot(LootContainer container, string profileName)
bool PopulateLoot(ItemContainer container, string profileName)

// Check if a profile exists
bool ProfileExists(string name)


Bradley and Helicopter Loot Tables
The bradley and helicopter crates have their own loot tables. This way you can create multiple loot profiles for both crate types. These loot table files can be edited the same way as the base loot table by opening the file in the editor.
When selecting loot for these containers the plugin will randomly cycle through the list of available profiles, each time a profile is used it is temporarily removed until it has run out of profiles to select from, then it will start over.
Say you have 4 loot profiles, and the helicopter dropped 4 crates, each one of those crates would be using a different profile.
This is optional, if you dont want to create additional profiles it will default to the profile that already exists


Loot Generation Preview
While the editor itself has its own loot preview system, you can also preview loot in game by hitting any loot container with a hammer. The container will open and loot will cycle through it in 3 second intervals.
The functionality requires the "alphaloot.admin" permission


Adding Workshop Skins to your loot
AlphaLoot has support to add skinned items to your loot containers. This is done on a global scale, as in you setup skin ID's in the plugin and they are applied to applicable items as they are spawned.

For a container to spawn items with skins the container must have the "Allow skinned items" toggle activated in the loot profile for that container.
If a container has that option enabled, any items spawned in to that container will choose a random skin ID set in the plugin.

When adding skins for items you have a option to specify a 'weight'. The higher the weight the more likely that skin is going to be chosen. This is a optional feature, if you do not want to set skin weights you can just leave the weight default.

To add a skin for a item you can use the provided console command al.skins add <shortname> <skinid> <opt:weight>.
ex. "al.skins add rifle.ak 1252554814"
- Set a skin without a weight value
ex. "al.skins add rifle.ak 1252554814 100" - Set a skin with a weight value

If I was to add another skin with a weight of 1 that would make the first skin 100x more likely to be chosen.

Skin ID's and weight are saved to the /data/AlphaLoot/item_skin_ids.json file if you feel so inclined to edit it manually


--------------------------------------------------------------------------------------------------------------------------

The Editor
ec5b0063289062a12ee34812878f0063.png
The loot table editor, with a full write up of usage instructions and dedicated support forum can be found here -> https://www.chaoscode.io/resources/alphaloot-profile-editor.183/
  • ex.png
    ex.png
    158.2 KB · Views: 14,351

Information

Author
k1lly0u
First release
Last update
Rating
4.81 star(s) 90 ratings

Latest Release v3.1.35

Released
Oct 6, 2024 at 11:08 PM
Rating
0.00 star(s) 0 ratings


More resources from k1lly0u

  • PilotEject
    PilotEject
    A mini event where a helicopter malfunctions and the pilot has to eject
  • HeliRefuel
    HeliRefuel
    A mini-event where a helicopter populated with NPCs needs to land to refuel
  • ZombieHorde
    ZombieHorde
    Create hordes of zombies that roam around your server looking for brains
  • Admin Menu
    Admin Menu
    Manage groups, permissions, commands and convars from a GUI menu
  • TeleportGUI
    TeleportGUI
    Teleport, home and warp with a easy to use UI

AlphaLoot by k1lly0u
© chaoscode.io Jan 8, 2017

Latest reviews

Great plugin, tho the pricce is a bit higher than I would prefer there is still no alternative for it in my eyes.
For Loot control, this is a easy way to see/edit what is randomly chanced to fall in.
Love the control for all the items.
Its minor but have found no way to control the Train carriage loot control. would love to see that added to this.

With the editor, bliss.
A literal dream come true for me. What a great way to edit loot tables! My only complaint is that for whatever reason the editor lags sometimes. But damn I love it!!!
this is pretty awesome to use and the editor makes it easy to config what i need
This is the most advanced and easy-to-use loot management system anywhere. There is no other looting system that is capable of doing what Alpha Loot does.
It was great 2-3 days. And now dont work (
Extremely straightforward and very useable editor! Love the way the weight system works, and love how similar to vanilla this plugin generates by default.

Only complaint I have is the inability to specify a minimum amount of items per container, tho I may be wrong.
The best loot table plugin for Rust servers. Comprehensive and easy to use. Satisfying to use and create new tables.
Very cool, working fine. Pretty much like the option to use accepted skins in loot tables :) Can finetune really everything! Thank you!
While it looks complicated on the first glance, it realy is super simple.
You realy outdid your self here "K1lly0u". Many of your Plugins are no-brainers for me to install on every server but this one is probably the most amazing one i ever saw for Rust when it come to management tools.

Thank u a lot for your amazing work