- Other Authors
- SpecialEd for Lootly, aquiteone for randomly stolen code, Sic, Knightly
- Software Requirements
- MQ2Dannet
This document is a work in progress.
Even though this is marked as Work in Progress, I have taken 3 separate groups to level 50 in order to squash out any pesky bugs and refine it as much as I can. I've also ran it in a level 120 MQ2Grind group.
There are several example configurations in the
Why YALM?
While Lootly is certainly useful over the other tools available, it is very limited in ability. Each item has to be added individually with a specific setting. This has led to people creating loot file generators and swapping out loot files based off the group or activity.
This is way too limiting. I wanted something where I could create functional rules based off conditions and have them set on a per character basis. I also wanted to be able to create other commands to interact with items and have other item settings. Thus, Yet Another Loot Manager (YALM) was born.
Benefits
There is one limitation and that is due to how the advanced loot window works. The game does not make an item object accessible in this window, so in order for YALM to work, I had to create an SQLite database of the item data dump. This means that the item object passed to a loot condition is not the same as after you loot. So, any command that is ran (sell, destroy, buy, etc.) will have an actual MQ2 Item object while during looting it is a database object.
I've created an Item object where I've tried to emulate MQ2ItemType as much as possible. However, any property that links to another MQ2 type will not be present.
YALM.Lua Configuration
Settings
These can be present in both the main
Default Configuration
Preferences
These determine the actions YALM takes for a file. Lootly was restricted to
Default Configuration
Commands
These are the commands that are made available to YALM. There are several built in ones, but you are able to create your own. Creating a custom command along with a custom item preference would allow you to recreate several different item management scripts using the power of YALM's function-based configurations.
Default Configuration
Even though this is marked as Work in Progress, I have taken 3 separate groups to level 50 in order to squash out any pesky bugs and refine it as much as I can. I've also ran it in a level 120 MQ2Grind group.
There are several example configurations in the
config
directory.Why YALM?
While Lootly is certainly useful over the other tools available, it is very limited in ability. Each item has to be added individually with a specific setting. This has led to people creating loot file generators and swapping out loot files based off the group or activity.
This is way too limiting. I wanted something where I could create functional rules based off conditions and have them set on a per character basis. I also wanted to be able to create other commands to interact with items and have other item settings. Thus, Yet Another Loot Manager (YALM) was born.
Benefits
- YALM is extensible. Almost everything can be changed or added to.
- YALM works off function rules. Whereas Lootly has a setting, quantity, and a class list that is hardcoded, YALM talks it a step further and these things can be functions.
- YALM configuration is based off sets. A set can be made up of several conditions (functions) with preferences which can also be functions. A set can also be made up of specific items and preferences similar to the Lootly_Loot.ini file. A character configuration can have multiple sets.
- Coming soon: A fully featured UI for configuration.
There is one limitation and that is due to how the advanced loot window works. The game does not make an item object accessible in this window, so in order for YALM to work, I had to create an SQLite database of the item data dump. This means that the item object passed to a loot condition is not the same as after you loot. So, any command that is ran (sell, destroy, buy, etc.) will have an actual MQ2 Item object while during looting it is a database object.
I've created an Item object where I've tried to emulate MQ2ItemType as much as possible. However, any property that links to another MQ2 type will not be present.
YALM.Lua Configuration
Settings
These can be present in both the main
YALM.lua
file and in the YALM/yalm-server-character.lua
file. The character file settings take precedence.Setting | Value | Default | Description |
---|---|---|---|
distribute_delay | Time in milliseconds, seconds, or minutes. | "1s" | Time to wait before processing the next item in the loot window. |
frequency | Time in milliseconds, seconds, or minutes. | 250 | Time between processing cycles. You can increase or decrease this number depending on your CPU. |
save_slots | Number | 3 | Number of free inventory slots you want to keep. |
unmatched_item_rule | See Item Preference | Keep | Preference setting for items that do not match any rules. |
dannet_delay | Time in milliseconds, seconds, or minutes | 150 | Time to wait for dannet responses. |
always_loot | Boolean | true | Determines if an item should be looted even if it doesn't pass quantity and list preferences. |
Default Configuration
Settings:
["settings"] = {
["distribute_delay"] = "1s",
["frequency"] = 250,
["save_slots"] = 3,
["unmatched_item_rule"] = {
["setting"] = "Keep",
},
["unmatched_item_delay"] = "10s",
["dannet_delay"] = 150,
["always_loot"] = true,
},
Preferences
These determine the actions YALM takes for a file. Lootly was restricted to
Keep, Class, Sell, Destroy, Ignore
. Yalm takes a slightly different approach. Any preference can do anything as it's up to the commands to determine what they mean. The only thing that does matter is the leave
parameter which tells YALM to leave or loot an item.Setting | Value | Default | Description |
---|---|---|---|
name | String | Must be the same value as the preference key | This is the name of the item preference. |
leave | Boolean | false | Determines if YALM will loot the item for this preference. |
Default Configuration
Settings:
["preferences"] = {
["Keep"] = {
["name"] = "Keep",
},
["Destroy"] = {
["name"] = "Destroy",
["leave"] = true,
},
["Sell"] = {
["name"] = "Sell",
},
["Buy"] = {
["name"] = "Buy",
},
["Guild"] = {
["name"] = "Guild",
},
["Ignore"] = {
["name"] = "Ignore",
["leave"] = true,
},
},
Commands
These are the commands that are made available to YALM. There are several built in ones, but you are able to create your own. Creating a custom command along with a custom item preference would allow you to recreate several different item management scripts using the power of YALM's function-based configurations.
Setting | Value | Default | Description |
---|---|---|---|
name | String | Must be the same value as the preference key | This is the name of the item preference. |
trigger | String | The command to send to /yalm . | |
help | String | The help string that will display in /yalm help . |
Default Configuration
Settings:
["commands"] = {
["Convert"] = {
["trigger"] = "convert",
["help"] = "Convert Lootly loot file to YALM",
["name"] = "Convert",
},
["SetItem"] = {
["trigger"] = "setitem",
["help"] = "Set loot preference for item on cursor or by name",
["name"] = "SetItem",
},
["Sell"] = {
["trigger"] = "sell",
["help"] = "Sells designated items to the targeted merchant",
["name"] = "Sell",
},
["Check"] = {
["trigger"] = "check",
["help"] = "Print loot preference for all items in inventory",
["name"] = "Check",
},
["Buy"] = {
["trigger"] = "buy",
["help"] = "Buys designated items from the targeted merchant",
["name"] = "Buy",
},
["Guild"] = {
["trigger"] = "guild",
["help"] = "Deposits designated items into the guild bank",
["name"] = "Guild",
},
["Destroy"] = {
["trigger"] = "destroy",
["help"] = "Destroy any designated items in your bags",
["name"] = "Destroy",
},
},
- Source Repository
- https://github.com/MrKumaPants/yalm
- [git] Automation options?
- Yes