Flyff V15: Max Party Exp & Link for 2 Players

03/07/2021 03:32 jarovart#1
Hello guys,

Summary
I need to know:
-where I can find the damagecalculation with party link and
-where I can find the exp- calculation with a party after killing a monster?

Detail information
The damage via party link and exp-rate of a player is depending on partymembersize. I am playing this server for me alone and do not want to use 8 flyff clients open.
That is why I want to know, how to get with only 2 partymembers the same amount of damage (with Party Link) and exp in a party like 8 partymembers in total. I do not want to manipulate exp rate via event.lua.

I have found out that DPClient.cpp->OnSetPartyMode(...) or party.cpp->DoUsePartySkilly(...) are sending "PARTY_LINKATTACK_MODE" or "ST_LINKATTACK" away, but whereto? Where are exp-rate of partymember is calulated?


I hope you can help me out.
Best regards
03/07/2021 13:19 VirusAtwar#2
#1
Search for "link" in your resource folder, that leads to the propTroupeSkill.txt on the entry "ST_LINKATTACK".
Searching for it in the Source leads us to "PARTY_LINKATTACK_MODE" in the party.cpp.
And that one will lead us to our destination, MoverAttack.cpp, on the function "CalcLinkAttackDamage", that has something like this "nAdd = ( nDamage * nJoinMember / 10 );"
You can even make it so, everyone has the benefit of Link attack in this function, simply remove the "Party->IsLeader( m_idPlayer )" part.

#2
What does happen if you change a Party from Level to Contribution? That's right, it does change who receives the most exp within a Party.
Search for "Contribution" and it leads us to the reddata.txt.txt.
That will also lead us to the Definition of the Source part "WIDC_EXP_SHARE" & "WIDC_RADIO6".
We will take the first entry, since it's specifically what we're looking for.

In the WndParty.cpp we stumble across multiple "m_nTroupsShareExp", that leads us after searching for it, to this file Mover.cpp, on the line "AddExperienceParty".
Within that we can find "AddExperiencePartyContribution", that leads us to where we want to be.
Now do some magic and get the result you want.


It's really not that hard, just think about it and the process around it. Even if you have no clue on what the code really does, with steps like those you will eventually find what you're looking for, also you will learn from it until you fully understand the code.
03/07/2021 18:17 jarovart#3
Quote:
Originally Posted by VirusAtwar View Post
#1

And that one will lead us to our destination, MoverAttack.cpp, on the function "CalcLinkAttackDamage", that has something like this "nAdd = ( nDamage * nJoinMember / 10 );"
You explain it very well and I get your point, but how did Visual Studio leads you to MoverAttack.cpp? Did u just use Strg+F "party" in every file of the source code or is there a smarter way to find the references?

I used e.g. "find all references" or "call hierarchy" in visual studio without success...

Nevertheless you helps me a lot. Thank you.
03/07/2021 19:08 VirusAtwar#4
Quote:
Originally Posted by jarovart View Post
You explain it very well and I get your point, but how did Visual Studio leads you to MoverAttack.cpp? Did u just use Strg+F "party" in every file of the source code or is there a smarter way to find the references?

I used e.g. "find all references" or "call hierarchy" in visual studio without success...

Nevertheless you helps me a lot. Thank you.
Yeah, CTRL + F (Find and Replace), then select the whole solution.
The "PARTY_LINKATTACK_MODE" was within the function of "CalcLinkAttackDamage", that's what we're looking for.

Even if you don't know whats going on fully, you could guess on what it could be. There's some checks for Player stuff and a party, something with members and down below damage, then there's a formula - that could be it.

You want to know more of what's happening? You search for key words and gather as many pieces, to form a whole picture. You probably won't be able to code anything fancy with that picture, but you will understand some things of the whole process you're looking at.