Hello, it’s been a while since I’ve last written either of these, so I’m excited to share some dev insight into what I’ve been doing.
In the last two weeks, I’ve mostly been working on rewriting the Loot system. If you’ve spent some time on private servers, you might have noticed various issues related to it – from guaranteed quest items not dropping or being able to loot mobs/chests you shouldn’t be able to (or the opposite), to having bosses not drop anything at all for various reasons or getting your loot „stolen”. Obviously it’s not all doom and gloom – people are getting their epic loot and having fun after all, but there are certain issues which are either annoying or outright frustrating, and if you ask any GM they’ll tell you just how many problems they have to help the players with on a daily basis.
On publically available cores (and by extension, pretty much on every server) everything is crammed into one Loot class full of exceptions and conditions to accomodate different loot types, which creates a bit of an overcomplicated mess, annoying to read or modify:
Packet handling of lootPlayerNonQuestNonFFAConditionalItems – self explanatory of course.
As some of you might know, i very much dislike fixing stock systems and scripts, and prefer to build them from scratch whenever possible (that’s why all of our TBC raids and almost all dungeons are made completely from zero) and the new Loot System is not an exception. Ultimately i achieved a structure like this:
As you can see, the loot now is split into two basic categories: Object and Personal. The former is based on the dependence of loot persistence – its tied to a specific object like a chest, mob or an item and will not disappear if you close the loot. Personal Loot on the other hand is simply tied to the player who receives it – once you prospect some ore, disenchant an item or catch a fish you only get one chance to loot it and nobody else but you has access to that loot at any point.
With that in mind, let’s go over the specific loot types:
The most important type of loot is obviously the one tied to mobs. Creatures not only have their normal loot, but also potentially pickpocket and skinning. I originally planned to create three specific classes for all of them, but ultimately the differences between them regarding how the loot is generated and distributed were pretty minor, so I just decided to consider them as different states of creature’s loot, with a clear transition process (Pickpocket -> Normal Loot -> Skinning).
The key part of the loot rework was to define which players are eligible to loot a mob. Each creature has its own loot recipient (the first person to damage it), so to get loot you need either need to be that person or be in group with him (as well as close enough to the actual mob when it dies or be on its threat list). There were quite a few issues and exploits allowing players who didn’t meet those requirements to receive loot, as well as preventing actual participants from getting it. After a small adjustment of the Group system, the issue of not getting loot because the recipient DC’d mid-fight has also been resolved and in general the loot eligibility should be a bit more consistent.
I’m sure not everyone’s aware, but currently on public cores the loot distribution is tied to the group. This means that if you leave the group (or are kicked) after a mob dies but before (or during) loot rolls you will not be able to receive any items or participate in the rolls themselves, sometimes leading to unfortunate „ninja incidents”. I completely remade the roll system and tied it to loot (instead of groups), so now everyone eligible will be able to get loot even if they’re no longer in a party/raid (as long as they don’t teleport out).
The party loot settings needed some corrections as well. Previously changing either the master looter, loot threshold or loot method would not be saved to the database and would be reset after a server crash/restart. Additionally the extremely popular Need for Greed system would not function as it’s supposed to, and allowed pretty much everyone to roll on everything, rather than not letting you steal a plate as a Mage or a crossbow as a Paladin. The Round Robin functionality did not work correctly either, as players who were not the round robin person for a specific creature corpse would be able to peek into it regardless and get confused by a not really related error message. The rework changes that quite significantly, as only the chosen person will get to do that until they close the loot window. After that, everyone will be allowed to loot it, as long as there are any quest items they need. The only exception from that is when Group Loot or Need for Greed is selected and an item above the group loot threshold (green+ by default) has dropped, although players who were not the designated looter will only see that item or quest items and not anything else. Additionally, players who won a roll but could not receive the item due to a full inventory will now be able to pick it up from the corpse without worrying that someone else will take it, as only they will be able to do that. Master Loot method got a few additional validity checks and displayed errors as well, so the person responsible for distributing the loot will get notified when the chosen person cannot receive some item and why.
Rogues will be especially happy to know, that Pickpocket got patched up as well. Currently if you pickpocket a mob and close the window before you loot everything, you will not be able to reopen it until the loot is regenerated several minutes later. With the new loot system that issue no longer exists. I also corrected the amount of money acquired, as it should now be significantly higher (based on a percentage of what the creature normally drops). The last change affecting specifically Pickpocket was related to quest items. There are a few Rogue-only quests which involve pickpocketing a quest item from a creature. Some of them are flagged as „party loot”, which means every member of the group will be able to loot one. But what if you are not in the group with the rogue who pickpocketed the mob first? I had to change the way quest item eligibility and generation works in regards to pickpocket specifically, but now even if you’re not the first person to pickpocket such quest item from a mob, you will be able to receive it without waiting several minutes for the loot to restock.
Skinning didn’t require as many detailed corrections, but I did add a few additional checks as to who gets to see the „Skinnable” flag as well as whether the creature’s normal loot was fully emptied. I’m also not sure if it already worked before, but now once you skin the mob, the loot will be tied to you and you’ll get to see a bag icon and reopen it even if you closed the window without grabbing all the skins/hides. Only after taking all of them will the corpse disappear.
Thankfully the Global Loot was already in place since our beta, so all I had to do was adjust it to the new loot system. If you’re not aware, Global Loot is responsible for handling items that can drop from many different mobs/chests and usually depend on your location. To give you an explanation why it’s needed – on publically available cores if you want an item to drop, you need to assign it to specific creature. This works fine if an item drops from only a handful of mobs, but becomes a big issue otherwise. Consider epic world drops like Staff of Jordan – to make it a proper world drop, it would have to be needed to EVERY CREATURE’S loot template. That’s hundreds of entries at the very least. Additionally it has to be bound to a certain level range only (so it doesn’t drop in either Elwynn Forest or Netherstorm) and only to creatures that actually can drop any loot at all. As you might imagine this leads to many mobs incorrectly dropping it, many incorrectly NOT dropping it and the drop chance all over the place and varying from mob to mob. That’s why on many servers there are farming spots with higher than usual drop rates and issues with either abundance of green/blue/purple drops or a complete lack thereof. On Netherwing we have a Global Loot system which allows us to easily bind such items to special templates which are considered automatically by all creatures capable of dropping anything. Each template has a specific drop chance (so every mob will have the exact same chance of dropping a random item from it) and the item’s level range itself determines whether a mob will be able to drop it or not. If we were to change a mob’s level from 70 to 15 and place it in the middle of The Barrens, it would no longer drop level 70 items, but around level 15 instead. Thanks to this system we can adjust drop rates on the fly without worrying whether we missed any mobs, as well as limit the drops to specific maps, zones, instances, creature types or to elites only. For example Green Hills of Stranglethorn are bound to drop only from humanoidals (humanoids, demons, undead), only in Stranglethorn and all mobs who meet those requirements will have the exact same drop chance for every possible page.
In WoW, every GameObject has a type – a door, a button, a trap, a guild bank, a questgiver, etc. Whatever you can click (and it’s not a mob or another player) is most likely a GameObject, and the most common one is a Chest type. Every GameObject you can loot is of that type – chests (obviously), mining veins, herbs or various quest pickups on the ground. On public cores all of those different types are just handled by one big GameObject class, so all the various parameters, variables and functions affecting just one type create unnecessary bloat and demand additional checks every time you want to access them. To simplify it, I created separate classes like Trap, Chest or FishingHole to be responsible for their specific types but inherit the default GameObject behaviour as well.
With that being done, as well as having roll system and packet handling from Creature Loot, implementing Chest Loot became a lot simpler. However, there are a few quirks only applicable to chests. For example, not every chest will trigger a loot roll, even when green+ items are in them. Some chests such as Mining Veins also have multiple restocks, which means you can loot them multiple times. Some chests (mainly quest related) do not disappear but rather become inaccessible for a few or several seconds and are restocked and lootable again after that. All of that needed to be either remade for the new system or implemented for the first time. On private servers often times players would loot ores from mining veins and leave the stones untouched, which made the next miner quite disappointed. With the new loot system those situations should be a lot more rare, as once opened chests will now either restock or despawn when left untouched for a few minutes. Quest items found in chests also got a similar treatment as Pickpocket – if a quest item is treated as „party loot”, every member of the party will be able to pick it up. It’s important to note, that when the loot system is live, only one person will be able to view a chest’s loot at a time and others will receive an error. This means that if you want the Master Looter to distribute the items, nobody else should be opening the object.
This type of loot is related to player insignias lootable in Battlegrounds. While it already sort of worked previously, I made a few fixes as now you will get a lootable bag if you don’t take all the loot and close the window and only the first person will get to grab the loot from a corpse. Additionally I made a database table specifically for battleground loot (as it was previously crammed into creature table) and added a few missing junk items you should be able to get from looting player corpses in Alterac Valley (as opposed to just the Foror picture).
There are a few items which can contain loot – various supply packages, lockboxes, etc. They were working fine for the most part, but i modified the way the loot is saved/loaded from the database to be a bit more safe and performance friendly. Additionally I fixed a weird bug where if you clicked on a locked lockbox you would not be able to disenchant/prospect anything until relog.
This one is rather obvious and works pretty much the same for all of its subtypes. The generated loot will persist for as long as you keep the loot window opened and once you close it you will lose the item you disenchanted, 5 pieces of ore you prospected and your fishing bobber will disappear.
Other than what’s listed above, I also changed the way Groups are stored in the database, added new loot logs and fixed an issue with not being able to reset a non-heroic dungeon (you previously had to disband and recreate the group). Overall it was a massive rework (all previous code has been entirely scrapped) and it’s impossible for me to test all of it alone. That’s why the new loot system will first be available for testing on the Public Test Realm for a week or two (and is there currently) before being applied to the live realm and hopefully some of you will find a bit of time to run a dungeon or two to catch any potential issues.