Skip to content

[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
Alphiez:add/era-tp-formula
Open

[lua][module] add feature tp_gain_adjustment Module that handles tp gain logic for Player, Pet and Mob (mob Unchanged)#9515
Alphiez wants to merge 4 commits intoLandSandBoat:basefrom
Alphiez:add/era-tp-formula

Conversation

@Alphiez
Copy link
Contributor

@Alphiez Alphiez commented Feb 22, 2026

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

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 = true

Log 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

alright i looked into it, technically this is "not a bug" because the C++ end is calculating TP return with a different function, so I need to hook it up to lua
if you set ENABLE_AUTO_ATTACK_LUA = true, in map.lua settings it will probably work

Skold Shared on Discord.

Until then, the two-handed sword with a gap of 444 was 111 (=11.1%) with one hit and 999 (=99.9%) with 9 shots, but now it accumulates 100% with 9 shots.

Formula
image

Historical References:

JP Wiki (Studio Gobli Testing)
https://w.atwiki.jp/studiogobli/pages/21.html

  • Example: Claymore (Delay 444) = 11.3 TP/hit
    (113 base × 9 hits ≈ 1017 TP total)

BGWiki (Store TP Discussion)
https://www.bg-wiki.com/ffxi/Talk%3AStore_TP

  • Community-tested formulas
  • Article revision dated April 4, 2021

FFXIclopedia (Tactical Points)
https://ffxiclopedia.fandom.com/wiki/Tactical_Points

  • Documents older TP formulas
  • Notes June 2014 adjustment

Square Enix Official Forum Post
https://forum.square-enix.com/ffxi/threads/42614#post511262

  • Confirms TP generation for players was increased (June 2014)

@Alphiez Alphiez changed the title add feature era_TP_gain [lua][module] add feature era_TP_gain Module that handles tp gain logic for Player, Pet and Mob (mob Unchanged) Feb 22, 2026
@Alphiez Alphiez changed the title [lua][module] add feature era_TP_gain Module that handles tp gain logic for Player, Pet and Mob (mob Unchanged) [lua][module] add feature tp_gain_adjustment Module that handles tp gain logic for Player, Pet and Mob (mob Unchanged) Feb 23, 2026
@Xaver-DaRed Xaver-DaRed added the squash Reminder to squash commits before/on merge (you can do this, or maintainers will do this for you) label Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squash Reminder to squash commits before/on merge (you can do this, or maintainers will do this for you)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants