Automatic Random Option Assignment by Equipment Type v1.0.1
This source modification automatically applies a Random Option Group to equipment when it is added to the player's inventory. Instead of assigning random options individually through drops or…
by Hyllok · listed Oct 29, 2026
This source modification automatically applies a Random Option Group to equipment when it is added to the player's inventory.
Instead of assigning random options individually through drops or scripts, this approach centralizes the logic in the source and resolves the group based on equipment category:
- Weapons (by weapon subtype)
- Armors (by equip location: headgear, armor, shield, garment, shoes, accessories)
When pc_additem is executed, the system:
- Resolves a Random Option Group ID based on the item’s type
- Applies the group automatically if a valid ID is returned
The group resolution is handled by a custom function:
static int pc_resolve_random_group(struct item_data* id)The actual random options remain configured normally in:
/db/(pre)re/item_randomopt_group.yml Known issues
No known issues yet.
Having trouble with Automatic Random Option Assignment by Equipment Type? Ask about it →