As of Release v2019.05.05 you can now create groups of random options that may be assigned to items dropped by monsters.
In order to use it you must first create an Option drop group in db/option_drop_groups.conf, one group will set how each option slot is filled, the chance of it getting filled, etc. Each group has the following structure:
<Group Name Constant>: (
{ // Option Slot 1
Rate: (int) chance of filling option slot 1 (100 = 1%)
// Possible options for slot 1
// min/max value : int, defaults to 0
// chance : int, 100 = 1% if not set, will be 100%/number of possibiltiies
OptionName: value
// or
OptionName: [min value, max value]
// or
OptionName: [min value, max value, chance]
// ... (as many as you want)
},
// ... (up to MAX_ITEM_OPTION)
),
Details about this file may be found on Hercules' docs (doc/option_drop_group.md). This is an example group called MYGROUP:
MYGROUP: (
{ /* Option Slot 1 */
Rate: 10000 /* It has 100% of chance of being filled */
/* This slot may have one of the following options: */
WEAPON_ATTR_WIND: 5 /* WEAPON_ATTR_WIND Lv5 (33.33%) */
WEAPON_ATTR_GROUND: [2, 4] /* WEAPON_ATTR_GROUND Lv 2~4 (33.33%) */
WEAPON_ATTR_POISON: [1, 4, 8000] /* WEAPON_ATTR_POISON Lv 1~4 (80%) */
},
{ /* Option Slot 2 */
Rate: 5000 /* It has 50% of chance of being filled */
/* If filled, may have one of the following options: */
WEAPON_ATTR_WATER: 4 /* WEAPON_ATTR_WATER Lv4 (100%) */
}
)
Once a group is defined, you can them assign it to monster drops in mob database by using a new syntax that works for both Drops and MvpDrops:
AegisName: (chance, "GROUP_NAME")
This will set that the item AegisName has chance chance of drop (like we already know from the format already in use), and, when dropped it will get random options as specified by the group GROUP_NAME.
For example:
Knife: (5000, "MYGROUP")
Will make "Knife" be dropped with a chance of 50%, and when dropped it will get options as defined by MYGROUP option group, in other words, the first slot will be filled with Wind, Ground or Poison option, and the second slot may or may not be filled with Water option.
This feature should work on any client that supports item random options.