Forum > Serverside Modding

[HELP] Remove Talent Point Requirement

<< < (2/5) > >>

xzetaxx:

--- Quote from: "Ascathos" ---
--- Quote from: "xzetaxx" ---
--- Quote ---Yes! Finally got it working! I had to remove some checkings from the core and now it works as I intended.

Thank you very much for the help Stoneharry. If you ever need help with anything i'll try to help you as much as I can.
--- End quote ---

What core checkings did he remove?
--- End quote ---
What core do you need ?
--- End quote ---
Trinity

Ascathos:
If you do not want one talent requiring another,

comment this one out:

Player.cpp

--- Code: ---    if (talentInfo->DependsOn > 0)
    {
        if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn))
        {
            bool hasEnoughRank = false;
            for (uint8 rank = talentInfo->DependsOnRank; rank < MAX_TALENT_RANK; rank++)
            {
                if (depTalentInfo->RankID[rank] != 0)
                    if (HasSpell(depTalentInfo->RankID[rank]))
                        hasEnoughRank = true;
            }
            if (!hasEnoughRank)
                return;
        }
    }
--- End code ---

If you do not want to require a certain number of points in a tab;


--- Code: ---    uint32 spentPoints = 0;

    uint32 tTab = talentInfo->TalentTab;
    if (talentInfo->Row > 0)
    {
        uint32 numRows = sTalentStore.GetNumRows();
        for (uint32 i = 0; i < numRows; i++)          // Loop through all talents.
        {
            // Someday, someone needs to revamp
            const TalentEntry* tmpTalent = sTalentStore.LookupEntry(i);
            if (tmpTalent)                                  // the way talents are tracked
            {
                if (tmpTalent->TalentTab == tTab)
                {
                    for (uint8 rank = 0; rank < MAX_TALENT_RANK; rank++)
                    {
                        if (tmpTalent->RankID[rank] != 0)
                        {
                            if (HasSpell(tmpTalent->RankID[rank]))
                            {
                                spentPoints += (rank + 1);
                            }
                        }
                    }
                }
            }
        }
    }
--- End code ---

Not sure what else is requiring, but those are some of the most glaring.

Vortalex:
Bumping this because the full fix was never fully clarified.

Also, if the server-side check is removed, what's stopping someone from just manually removing their own client-side check and placing talent points however they want?

Grymskvll:

--- Quote from: "Vortalex" ---Bumping this because the full fix was never fully clarified.

Also, if the server-side check is removed, what's stopping someone from just manually removing their own client-side check and placing talent points however they want?
--- End quote ---

I'm very new to emulation so apologies if I made a mistake and please correct me.

You don't have to change the server-side check, you can just change it to whatever you like. Client-side and server-side talent requirements should always be identical, otherwise you get either:
-a bug like in the OP's pic where the player's client says that you can put a point in the next row of talents, but you can't (because the client-side requirement is more relaxed than the server side one)
or:
-the opposite, where at some point the next tier is grayed out but you can still learn talents from it (sort of like the vulnerability you describe, except the player doesn't even need to modify their client to get access to talents that the server thinks you can learn)

To modify the required number of talent points spent to unlock the next tier/row (TrinityCore WotLK):

* in InterfaceFrameXMLTalentFrameBase.lua change PLAYER_TALENTS_PER_TIER to your desired points requirement. This is the client-side (cosmetic) change. Every player needs to have this.
* in gameEntitiesPlayerPlayer.cpp change this part:

--- Code: ---if (spentPoints < (talentInfo->Row * MAX_TALENT_RANK))
--- End code ---
to something like this (note the added parentheses to account for order of operations):

--- Code: ---if (spentPoints < (talentInfo->Row * (MAX_TALENT_RANK - 2) ))
--- End code ---

* Hunter pet talents: if you want to change hunter pet talent requirements per tier, you need to change PET_TALENTS_PER_TIER in TalentFrameBase.lua like you did for player talents, and in Player.cpp, make the same change you did for player talents, except in Player::LearnPetTalent this time, where it reads:

--- Code: ---if (spentPoints < (talentInfo->Row * MAX_PET_TALENT_RANK))
--- End code ---

WoW will crash if you try to start it with modified interface files, so you (and everyone else using the client-side modification) need to use a cracked Wow.exe found here.

In this case, the server-side requirement would be 5 - 2 = 3 per tier (3 points spent required for tier 2, 6 points spent required for tier 3, etc), and you would likewise set PLAYER_TALENTS_PER_TIER to 3 to avoid bugs. MAX_TALENT_RANK is defined as 5 in gameDataStoresDBCStructure.h, but it's used for other things and I don't know what the results would be if you changed it directly. MAX_PET_TALENT_RANK is defined as 3.

In the following image I set the per-tier requirement to 4 points spent:


Edit: see next post to fix mouseover tooltips and preview talents!
Unfortunately this has a minor cosmetic bug. Even though you can change when tiers unlock, if you mouse over a talent that you don't meet the original points requirement for, it puts "Requires X points in Y Talents" in the tooltip, and doesn't have the green "Click to learn" text at the bottom.

Moving a talent to an earlier row client-side affects whether a talent is deemed out of the player's reach or not, as the "Requires" text goes away and the "Click to learn" text appears, so I assume this requires another client-side edit, but I have no idea where.


All this required was changing the row for Soul Siphon in Talent.dbc, so the mouseover tooltip for talents somehow (directly or indirectly) looks at that value, right?

Does anyone know how to fix this? Unfortunately the download for stoneharry's Edge of Chaos client is no longer available at that link, so I can't check how it was done there (if at all).

Grymskvll:
This solution is experimental. I haven't had any issues with it, but I haven't tested it extensively and I barely even understand how this works. For another method that uses a LUA edit, see stoneharry's post on the next page. With LUA edits, at worst you'll get a LUA error (I think?). With this edit, at worst your game will crash (though I haven't had any).

To fix talent mouseover tooltips having or missing the red "Requires [5 * tier] points in Y talents" or the green "Click to learn" text, and to fix preview talents, you need to make another change in Wow.exe (using for example OllyDbg).
This is for 3.3.5a (it should be similar for other versions, but you might have to improvise). This assumes you want players to have a higher per-tier requirement than pets. See note at the bottom if you want pets to require more points than players. Player and hunter pet talents can be changed independently.

Part 1: Fixing tooltips

* fill in the following (value is in hexadecimal, convert numbers here if it's above 9):

* Player requirement per tier (playerreq) =
* Hunter pet requirement per tier (petreq) =
* Difference = playerreq - petreq =
* Open Wow.exe in OllyDbg and go to the below address, or right click -> Search for -> All referenced strings and find "TOOLTIP_TALENT_TIER_POINTS" in the results, then scroll up a little (it's one of the WoW constants described here):

--- Code: ---006226E5      85FF          TEST EDI,EDI
006226E7      0F94C0        SETE AL
006226EA      8D4400 03     LEA EAX,[EAX+EAX+3]

--- End code ---

* Select these lines
* Right click -> Edit -> Fill with NOPs
* With the 9 NOP lines selected, press space to assemble (or right click -> assemble)
* fill each line with the following one by one (swap "petreq" with your value, and only copy the command, not the address or hex value)

--- Code: ---006226E5     /E9 0B010000   JMP 006227F5
006226EA     |8D40 04       LEA EAX,[EAX+petreq]
006226ED     |90            NOP

--- End code ---

* select the lines you edited (they're highlighted in red) and right click -> Edit -> Copy to executable. A popup will appear. Check that your edited lines are present in the popup, then go back to the original window (without closing the popup). You may want to resize the windows. You can recognize the popup by the D icon in the top-left, while the original window has a C icon.

* Now scroll down a little and you'll see this:

--- Code: ---006227F5      CC            INT3
006227F6      CC            INT3
006227F7      CC            INT3
006227F8      CC            INT3
006227F9      CC            INT3
006227FA      CC            INT3
006227FB      CC            INT3
006227FC      CC            INT3
006227FD      CC            INT3
006227FE      CC            INT3
006227FF      CC            INT3

--- End code ---

* Select these 11 lines and again fill with NOPs (right click -> Edit -> FIll with NOPs)
* With the lines selected, press space to Assemble (or right click -> assemble)
* Fill each line with the following one by one (swap "difference" with your value, and again only copy the command)

--- Code: ---006227F5      85FF          TEST EDI,EDI
006227F7      74 02         JNE SHORT 006227FB
006227F9      B0 05         MOV AL,difference
006227FB    ^ E9 EAFEFFFF   JMP 006226EA
--- End code ---

* Select these 4 red lines, right click -> Edit -> Copy to executable again. Check that all 7 total edited lines are in the popup window (D icon in top-left), split into 3 lines above and 4 lines below. Again, don't close the popup, just minimize or move to the side.
Part 2: Fixing preview talents
One more bunch of lines need to be edited to fix talent preview mode.

* Go to the below address (ctrl+G and enter 005C7468, or right click -> Go to -> Expression and enter 005C7468)

--- Code: ---005C7468      0F94C2        SETE DL
005C746B      0358 04       ADD EBX,DWORD PTR DS:[EAX+4]
005C746E      894D EC       MOV DWORD PTR SS:[EBP-14],ECX
005C7471      8D5412 03     LEA EDX,[EDX+EDX+3]
--- End code ---

* Select these 4 lines and fill with NOPs (right click -> Edit -> FIll with NOPs)
* With the NOP lines selected, pres space to Assemble (or right click -> assemble)
* Fill each line with the following one by one (swap "difference" and "petreq" with your values)

--- Code: ---005C7468     /75 02         JNE SHORT 005C746C
005C746A     |B2 02         MOV DL,difference
005C746C     358 04       ADD EBX,DWORD PTR DS:[EAX+4]
005C746F      894D EC       MOV DWORD PTR SS:[EBP-14],ECX
005C7472      8D52 07       LEA EDX,[EDX+petreq]
--- End code ---

* Select these 5 lines and right click -> Edit -> copy to executable
* Right click the popup (D icon) and select "Save file...". Change the name so you're not overwriting your Wow.exe, save and test it.
Note:
This assumes you want players to have a higher requirement per tier of talents than hunter pets. If you want pets to require more points per tier than players, change the following:

* Swap playerreq and petreq around when calculating the difference so you don't get a negative number.
this: Difference = playerreq - petreq =
becomes: Difference = petreq - playerreq =
* In the first block, replace "petreq" with "playerreq"
* In the second block, instead of JNE SHORT 006227FB use JE SHORT 006227FB
* in the third block, replace "petreq" with "playerreq" and change JNE SHORT 005C746C to JE SHORT 005C746C
The general idea is you use the lower of the two as a base requirement for both (MOV AL,difference, AL is a part of EAX so when it checks EAX it finds what you placed in AL), then add the difference to the lower requirement to get the higher requirement (LEA EAX,[EAX+lower of the two requirements]).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version