Difference between revisions of "User:Epictaru/Sandbox/Treasure Hunter Demystified"

From HomepointXI Wiki
Jump to: navigation, search
m (Additional comment from TeoTwawki)
m
Line 1: Line 1:
 
This was originally posted on the LegionDark forums by Atom0s on Wednesday, Oct 26, 2016 3:50 am
 
This was originally posted on the LegionDark forums by Atom0s on Wednesday, Oct 26, 2016 3:50 am
  
This has been modified by EpicTaru to increase clarify, to change any mentions of the LegionDark name with HomepointXI and to add the link to the Q&A that SE did recently to further explain some specifics of Treasure Hunter on retail.
+
This has been modified by EpicTaru to reformt it into a wiki article, to increase clarify, to change any mentions of the LegionDark name with HomepointXI and to add the link to the Q&A that SE did recently to further explain some specifics of Treasure Hunter on retail.
  
 
== Treasure Hunter Demystified ==
 
== Treasure Hunter Demystified ==

Revision as of 13:44, 21 July 2022

This was originally posted on the LegionDark forums by Atom0s on Wednesday, Oct 26, 2016 3:50 am

This has been modified by EpicTaru to reformt it into a wiki article, to increase clarify, to change any mentions of the LegionDark name with HomepointXI and to add the link to the Q&A that SE did recently to further explain some specifics of Treasure Hunter on retail.

Treasure Hunter Demystified

This post is meant to cover how Treasure Hunter (TH) works on HomepointXI (and the DarkStar private server code base in general). Please note that Treasure Hunter on private servers using the stock Dark Star Project (DSP) core does not work like retail. There are very major differences in the way that TH functions here (and on other DSP private servers) than on retail. This post is going to help clear up those differences and explain how TH is actually working for you here.

At the time of making this post, HomepointXI DOES NOT have any custom code effecting how Treasure Hunter works. This may change in the future, but for now this information is valid on HomepointXI and DSP stock private servers.

Intro To Treasure Hunter

Before I begin, I want to point people to information pertaining to Treasure Hunter on retail so you can get a jist of what it is, what it does and how it is supposed to work. A lot of information surrounding Treasure Hunter is assumptions and guess work, along with user-based testing and theory crafting. Square Enix has never come out and said how every part of TH works, instead they have only given us tid-bits of information throughout the years. Some of the more recent updates to retail have also given some more clues as to how it is supposed to work.

https://www.bg-wiki.com/bg/Treasure_Hunter
http://forum.square-enix.com/ffxi/threads/56550
http://forum.square-enix.com/ffxi/threads/40657-Mar-18-2014-%28JST%29-Version-Update?p=498469&viewfull=1#post498469
http://forum.square-enix.com/ffxi/threads/27974-TH-Procing?p=377001&viewfull=1#post377001
https://www.bluegartr.com/threads/112776-Dev-Tracker-Findings-Posts-(NO-DISCUSSION)?p=5469894&viewfull=1#post5469894
https://www.reddit.com/r/ffxi/comments/4ulgh1/official_ffxi_developer_ama_with_producer_akihiko/d5qsvi2/

For those interested in seeing how DSP handles Treasure Hunter, you can find that information here:

Where treasure hunter is applied to a monster:
https://github.com/DarkstarProject/darkstar/src/map/enmity_container.cpp#L150
Where treasure hunter is handled for drops:
https://github.com/DarkstarProject/darkstar/src/map/entities/mobentity.cpp#L779

Treasure Hunter - Retail vs. DSP

While I am not going to get into too many specifics about this, I do want to point out some major differences between Treasure Hunter on retail and Treasure Hunter on DSP servers. They work differently and should not be assumed to work alike unless the server you play on has modified it otherwise.

While on retail, treasure hunters effectiveness is applied as a debuff to the target you are attacking. Your effective treasure hunter amount is based on your TH level compared to the current TH level debuff applied to the target. On retail, you will see an animation and receive a message when your treasure hunter procs on a monster. However, on DSP, this is not the case. Instead, Treasure Hunter is applied, in full, each time you hit a target.

On retail, swapping out of TH gear can hinder your effective treasure hunter against the target preventing it from increasing anymore. On DSP, this is not the case and the max TH of the gear you have equipped is applied and used, regardless of if you switch gear afterward. This means that, for example, say you are fighting Fafnir with Treasure Hunter+10. If you hit Fafnir at the start of the fight with your TH+10 gear then kill it in TH+0 gear, you will still be granted with TH+10 on the drops. You do not need to keep your gear on. I will go into these better below.

Treasure Hunter - Understanding How It Works On DSP

Since DSP implements Treasure Hunter "incorrectly" to how retail does, some people are left to assume how it works here. This often leads to speculations that are incorrect and misinformation spreads around on how it works. I'm making this post to help clear up that misinformation and to assist players in understanding how Treasure Hunter works, and how to best and effectively utilize it.

Treasure Hunter is only applied on aggressive actions. This means that when your enmity is updated, you must be doing something that aggressively pisses off the target. Casting Cure on someone WILL NOT apply Treasure Hunter. Meaning that if you are THF/WHM, you cannot apply Treasure Hunter by simply curing someone that has hate. Even if you pull hate from curing, it will not apply your Treasure Hunter.

Treasure Hunter is applied, in full, when an aggressive action is taken. This means that if you are a Thief with TH+15, when you hit a mob, steal from it, mug it, etc. your full TH+15 is applied immediately. There is no ramp up of effectiveness, no "proccing", like on retail.

Treasure Hunter will remain on the mob if the thief drops party. The thief does not have to be in the party after they have hit the target for their treasure hunter to work. As long as they do not die and remain in range of the target when it dies, their treasure hunter will still be applied. This means you can kick that useless Thief from party after they have hit the mob!

Treasure Hunter gear does not have to remain equipped after being applied. Once you have hit a monster once with your full treasure hunter gear, you can swap out of it and use whatever you want. You do not have to be wearing your treasure hunter gear while the monster dies. You also do not have to keep it on to remain the highest treasure hunter level on the mob. One and done boys, hit it and quit it.

Treasure Hunter uses the highest overall Treasure Hunter applied during the fight. When the monster dies, it will use the highest treasure hunter that hit it to do the drop calculations. This means that if you have, for example, two Thiefs with different treasure hunters, it does not matter which one has the last hit, which one has their max TH on when the mob dies etc. The highest overall TH between the two will be used for the calculation (keep in mind the player with the highest treasure hunter does have to be alive, on the hate list, and in range for it to work!)

Treasure Hunter is not removed if you go out of range and come back. If you leave range of the fight (far enough that you will not receive exp etc. when it dies) your treasure hunter is not erased from the monsters list. But, you MUST be within range when the monster dies for your TH to be used. This means you can move away from the mob to stay safe and come back just before it dies to ensure your treasure hunter is applied.

Treasure Hunter - Drop Calculations

Now that we have the methods of how treasure hunter is applied and handled, lets discuss how it affects drops. Item drops have a two-stage system in how they are handled. The first stage is determining if the the drop can happen at all, the second stage is if the item should drop. The first stage is referred to a "roll". And the second is the rate.

When an enemy dies, the following steps are taken for how drops are handled:

The max treasure hunter value is pulled from the enemies' enmity list at the time of death.

The treasure hunter value is pulled from this enmity container and is only valid if the player is alive and within enmity range of the dying monster.

The enemies' drop list is loaded.

Each item in the drop list is looped through.

An amount of "rolls" are applied to let the item drop.

If a roll is successful, the item drops to the treasure pool.

On stock DSP servers, these calculations are done like this:

https://github.com/DarkstarProject/src/map/entities/mobentity.cpp#L795-L796
also
https://github.com/DarkstarProject/src/map/entities/mobentity.cpp#L824-L835

Note that: m_THLvl = the highest treasure hunter pulled from the monsters enmity container at the time of death.

        maxRolls = 1 + (m_THLvl > 2 ? 2 : m_THLvl);
        bonus = (m_THLvl > 2 ? (m_THLvl - 2) * 10 : 0);

If we look at how this is applied, we see:

        for (const DropItem_t& item : DropList->Items)
        {
                for (int16 roll = 0; roll < maxRolls; ++roll)
            {
                if (item.DropRate > 0 && dsprand::GetRandomNumber(1000) < item.DropRate * map_config.drop_rate_multiplier + bonus)
                {
                    if (AddItemToPool(item.ItemID, ++dropCount))
                        return;
                    break;
                }
            }
        }

This means that an item has a maximum of 3 tries to drop depending on the amount of treasure hunter that is being used in the calculation.

For example, this is how drops would be up to Treasure Hunter +5:

  • Treasure Hunter 0: 1 drop chance.
  • Treasure Hunter 1: 2 drop chances.
  • Treasure Hunter 2: 3 drop chances.
  • Treasure Hunter 3: 3 drop chances.
  • Treasure Hunter 4: 3 drop chances.
  • Treasure Hunter 5: 3 drop chances.

As you can see, after treasure hunter 2, you do not affect how many times an item has a chance to drop. But it does effect the "bonus" applied to the actual drop rate.

The drop "bonus" is applied to the actual items drop rate. For example, let's look at the Ridill. Fafnir drops this at a rate of 6%.

http://homepointxi.com/db/items/16555/ridill

So this means that at Treasure Hunter 0, you have 1 chance for this to drop at the stock 6%.

Each treasure hunter level after that will add a bonus to the roll being done. This would look like this:

  • Treasure Hunter 0 Bonus: 0
  • Treasure Hunter 1 Bonus: 0
  • Treasure Hunter 2 Bonus: 0
  • Treasure Hunter 3 Bonus: 10
  • Treasure Hunter 4 Bonus: 20
  • Treasure Hunter 5 Bonus: 30

And so on, incrementing at 10 per level of Treasure Hunter.

DSP handles the drop rate and attempt via this line:

https://github.com/DarkstarProject/darkstar/src/map/entities/mobentity.cpp#L828

if (item.DropRate > 0 && dsprand::GetRandomNumber(1000) < item.DropRate * map_config.drop_rate_multiplier + bonus)

This says that if the drop rate is greater than 0, meaning it can actually drop the item, roll a random number between 0 and 1000. If that number is less than our calculated drop rate, the item will drop. The calculated item drop rate is done via:

item.DropRate * map_config.drop_rate_multiplier + bonus)

item.DropRate is the item's set drop rate from the database. The Ridill is set to 60 in the database, ie. 6% drop rate. map_config.drop_rate_multiplier is a server based configuration that can multiply the drop rate. HomepointXI has this set to 1.0, which means the drop rates are not multiplied or affected as a whole. (So 6% means 6%.) bonus is our calculated bonus added to the drop during its calculation.

Let's say for example you have TreasureHunter +13. This means that the following would happen:

  • You would have 3 tries for the Ridill to drop.
  • Each try would have 6% + 110 bonus to drop.

So this means that a random number between 0 and 1000 will be rolled 3 times. Each time the server will compare that rolled number to: (60 * 1.0 + 110)

This means that with Treasure Hunter +13, you change the drop rate of Ridill from 6% to 17%.

If you have any questions regarding this, let me know. I will gladly answer them.

Additional comment from TeoTwawki

TeoTwawki

Re: Treasure Hunter Demystified

Thu Oct 27, 2016 11:25 am

atom0s touched on this and I want to emphasize it: anything that fully removes the THF from the monsters hatelist, will remove that THFs TH. So while you can be out of range for most of the battle and not lose TH, zoning will normally remove you form mobs hatelist resulting in lost TH. So your THF friend can't come hit it once then zone out, barring unintended bugs.

@atom0s: if I remember right retail caps TH and DSP is missing that cap too, isn't it?