project-topaz / topaz

Server emulator for FFXI
Other
159 stars 224 forks source link

General combat calculation improvements for Avatars #1407

Closed NassirAlawar closed 3 years ago

NassirAlawar commented 3 years ago

Too much changed to go into detail here. I have summarized changes in each commit and my code is packed full of comments and links to references and research.

Super short summary: Updated battleutils and summon.lua with equations for pDIF, fSTR, Hit Rate, Level Correction. I have updated the base weapon computation for avatars. I have updated how crit rate from dex works. Level correction is not computed for newer zones/content since the release of SoA. Some minor bug fixes.

Note: I have not updated the BP damage equations and plan to tackle those in the future, likely one avatar per PR or maybe even one BP per PR.

Note: I have not added the Damage Limit+ trait or "Physical Damage +%" to the computations as I do not believe the project supports them yet. I have noted how they were and where they need to be added once they are implemented.

I affirm:

TeoTwawki commented 3 years ago

And maybe an excuse to introduce a new rule: In lua you're leaving a space after starting a comment: -- Comment Can you do the same with C++: // Comment instead of //Comment

new? that was always a rule. I know coz it was my rule before topaz happened. :stuck_out_tongue:

NassirAlawar commented 3 years ago

Sure, I'll fix these today πŸ‘ Just to be clear on the thread name: "General combat calculation improvements for Avatars" This will impact players as well, I started with the summon.lua but then that drifted into the general combat equations for the melee hits.

NassirAlawar commented 3 years ago

I believe all the noted issues have been fixed and I have merged and retested

NassirAlawar commented 3 years ago

Just realized I forgot to implement the request to give avatars crit att bonus from db and get rid of the hard coding. Will try to get that done in a day or two

NassirAlawar commented 3 years ago

Changed the crit bonus to a modifier and added the modifier logic to summon.lua as well

I have retested and confirmed I see no issues. As always, let me know if there's anything else πŸ‘

zach2good commented 3 years ago

We were talking about this PR yesterday; Avatars will eventually need a full rewrite, but this lays out a well-researched framework for when that happens πŸ‘

NassirAlawar commented 3 years ago

Let me know if there's anything I can do to help regarding avatars or if there's anything you'd prefer to have prioritized. My next plan was to move onto blood pact equations including modifiers. I have been collecting some Pet: DEX+/STR+ gear for math stuff on retail.

zach2good commented 3 years ago

I honestly know nothing about combat balancing and rely on the others for sanity checking, but if you continue testing things and documenting your sources, we'll have all of that available when someone "fixes" avatars πŸ‘