[lua][module] add feature tp_gain_adjustment Module that handles tp gain logic for Player, Pet and Mob (mob Unchanged)#9515
Open
Alphiez wants to merge 4 commits intoLandSandBoat:basefrom
Open
Conversation
sruon
reviewed
Feb 22, 2026
9db87b5 to
f01691c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I affirm:
What does this pull request do?
Adds an Era TP gain override module so that players and pets (also mobs no changes for mob) use an era-style TP-per-hit calculation based on modified delay. They are all combined under one logic.
This is intended to restore classic TP gain behavior for playable && Pet entities.
Steps to test these changes
You would have to enable TRUE if not done on map.lua in
Here.
server\settings\map.lua
ENABLE_AUTO_ATTACK_LUA = trueLog in and simply just run an exec command
!exec print(xi.combat.tp.calculateTPReturn(player,444))You will see in the map log that it will return 113 which is expected from the formula given.
At the moment, the gameplay mechanic does not match the tp gain of the module. The cpp is calculating the tp gain instead of the lua. A quote from WinterSolstice8 below.
Sources
Phoenix bug-board
Stated from WinterSolstice8
Skold Shared on Discord.
Formula

Historical References:
JP Wiki (Studio Gobli Testing)
https://w.atwiki.jp/studiogobli/pages/21.html
(113 base × 9 hits ≈ 1017 TP total)
BGWiki (Store TP Discussion)
https://www.bg-wiki.com/ffxi/Talk%3AStore_TP
FFXIclopedia (Tactical Points)
https://ffxiclopedia.fandom.com/wiki/Tactical_Points
Square Enix Official Forum Post
https://forum.square-enix.com/ffxi/threads/42614#post511262