Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DB/Loot): Near complete loot rework of Vanilla overworld zones #18796

Merged
merged 4 commits into from May 14, 2024

Conversation

Gultask
Copy link
Contributor

@Gultask Gultask commented Apr 23, 2024

What this does is essentially restructuring the many old messy loot system with a more organized one.
Using References Between 1000000 and 2000000 we can add identifiers to reference loot, following these rules

[ 1 ] + [ Expansion ] + [ Item Rarity ] + [ NPC Level Range ]

So for example, 1126869 is [ 1 ] + [ TBC ] + [ Green ] + [ 68-69 ]

Item Rarity is replaced when dealing with consumables, containers, recipes

5: Bags (maybe add something else cause TBC+ doesn't drop containers)
6: Potions
7: Scrolls
8: Non-BoP Recipes and Others, like simple gems (These are not numbered by NPC Level)
9: Reserved

This was first taken from one of @neifion-00000000 's ideas and then modified to fit what we had on hand.

I used mainly Cmangos' database to gather the references, then added to each creature systematically. Checking each to see if nothing horrible would happen, and removing oddities when I found them.

With this the number of rows in creature_loot_template lowers significantly

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

Issues Addressed:

  • Closes

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.

Known Issues and TODO List:

  • [ ]
  • [ ]

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

@Gultask Gultask added the WIP Work in Progress. label Apr 23, 2024
@github-actions github-actions bot added the DB related to the SQL database label Apr 23, 2024
@Gultask
Copy link
Contributor Author

Gultask commented Apr 23, 2024

Some more details:
All modified creatures now have a set of references in their loot tables that look like this
Grey gear
White gear (up to level 25)
Green gear
Blue gear
Purple gear
Bag table
Potion table
Scrolls table
Profession Recipes (non-BoP) table
Gems table

They are not grouped in a GroupID, therefore there can be times where loot from 2 tables will drop. Although I've not seen that happen myself (prove it otherwise, hah!), when looking at comments on rares, particularly Sewer Beast, it was reported to happen.

This is an example from a level 24-25 creature
image

Also, I've modified the vast majority of rares to guarantee at least one gear drop. Mostly green, in the case it doesn't have unique loot.

@heyitsbench
Copy link
Contributor

Sick.

@PkllonG
Copy link
Contributor

PkllonG commented Apr 24, 2024

scared

@Gultask
Copy link
Contributor Author

Gultask commented Apr 24, 2024

Before marking it as done I'll see if I can:

  1. Cleanup unwanted herbs, stones, food and pickpocket loot from c_l_t (Hoop Earring, Pocket Watch, Lockboxes)
  2. Add in all missing unique loot that was previously inside references or missing entirely
  3. Normalize drop chances on food items and cloth harder than expected

This would be done only for creatures I've modified, so there'll be plenty of examples/templates to use later on creatures I've missed

@Gultask Gultask added Waiting to be Tested Ready to be Reviewed Loot Loot related issues and removed WIP Work in Progress. labels Apr 25, 2024
@Gultask
Copy link
Contributor Author

Gultask commented Apr 25, 2024

I decided against changing food & water drops for now. So it's done, I believe.

@Gultask
Copy link
Contributor Author

Gultask commented Apr 25, 2024

Finished wrapping up the worldserver errors, had some issues with GroupIds and Reference loot but it shouldn't affect much. Don't exactly know how to test besides checking if the entire loot system has broken down, which so far hasn't 😬

@Gultask
Copy link
Contributor Author

Gultask commented Apr 25, 2024

In total lowers creature_loot_template by about ~100k rows but adds ~35k to reference_loot_template

@balleny
Copy link
Contributor

balleny commented Apr 26, 2024

how is the schema working for reference groups that contain 2 different rarity types? (e.g. Dire maul bosses)

@Gultask
Copy link
Contributor Author

Gultask commented Apr 26, 2024

I didn't mess with instance creatures for now, only overworld ones, or at least creatures with rank 0 that have at least one spawn in EK and Kalimdor (maps 0, 1)

Instances I imagine can get trickier and have their own peculiarities, as you just pointed out :p

@balleny
Copy link
Contributor

balleny commented Apr 27, 2024

but wouldnt it make sense to consider those upfront before re-inventing a schema that may only be applicable to half the data stack in the end?

@Gultask
Copy link
Contributor Author

Gultask commented Apr 27, 2024

but wouldnt it make sense to consider those upfront before re-inventing a schema that may only be applicable to half the data stack in the end?

A lot of instances may have their own rules and use their own specialized reference templates. If not they can re-use the ones I added here. But regardless, there were several different schema before, probably made by several different people over years, which honestly just made it a bit messy, so this would standardize it. It's not supposed to be a strict rule, either, just something that makes it easier to sort through loot, so if it needs another rework in the future it'll be easier to replace all of these with something newer.

Besides, 100k rows of bloat removed is already an improvement :P

@elthehablo
Copy link
Contributor

How do we plan on making the new schema publicly known? Some kind of wiki update?

@Gultask
Copy link
Contributor Author

Gultask commented May 12, 2024

I was thinking of a section in the creature_loot_template page.
Although, it's an unofficial guideline, not to be taken as a hard rule.

@elthehablo
Copy link
Contributor

Sounds good. I will merge this

@Gultask
Copy link
Contributor Author

Gultask commented May 14, 2024

The worst that can happen is that we rollback any changes 🥴

@elthehablo
Copy link
Contributor

I just forgor

1 similar comment
@elthehablo
Copy link
Contributor

I just forgor

@elthehablo elthehablo merged commit 6594255 into azerothcore:master May 14, 2024
20 of 23 checks passed
@Gultask Gultask deleted the loot_vanilla branch May 15, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB related to the SQL database Loot Loot related issues Ready to be Reviewed Waiting to be Tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants