Skip to content

[lua] Implement Trial of the Magians job torque trials - #11138

Open
Davraena wants to merge 3 commits into
LandSandBoat:basefrom
Davraena:feature/magian-job-torque-trials
Open

[lua] Implement Trial of the Magians job torque trials#11138
Davraena wants to merge 3 commits into
LandSandBoat:basefrom
Davraena:feature/magian-job-torque-trials

Conversation

@Davraena

Copy link
Copy Markdown
Contributor

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?

Closes #8991.
Adds all 20 job torque trials (4424-4443) and wires it into the existing magian system.

  • magianMoogleInfo gains a minimum level and a trial-log key item, so those are no longer hardcoded to 75
  • moogle can accept a MAGIAN_TRIAL_LOG but gives MAGIAN_LEARNERS_LOG only to players holding neither log
  • trials can declare a requiredJob. The main menu's sixth parameter masks out trials for jobs below that level
  • update and finish type 15, and finish type 5, are handled. Green uses different codes to the other moogles
  • taking a trial with a full inventory used to register it without giving the item, leaving it active and uncompletable

textOffsets are from a retail capture by Wiggo: 1137 for trial 4424 through 1156 for 4443.
https://drive.google.com/open?id=1BYy6tzKepCQ_9oo2AFmbWi8jhYk8-qAI

Tested each torque end to end including the crate step, plus the level gating and list filtering, and the Orange moogle still works.

Also fixes the zone in this NPC's !pos header, which said 64 not 243.

Steps to test these changes

  • Talk to Magian Moogle (Green) on a job 30+, accept a trial and it gives you the base neck piece inscribed with trial number
  • Trade that plus the job's item to the Delivery Crate
  • Trade the piece back to the moogle for the augmented version
  • Abandoning a trial also works, but on trading an inscribed item, it will list all available trials to abandon (might need retail capture to verify behavior)

Also checked:

  • jobs below level 30 don't appear in the trial list
  • a full inventory doesn't consume the trial without granting the item
  • holding a Trial Log but not a Learner's Log still lets you take a trial,
    without granting a Learner's Log
  • the Orange moogle still works unaffected

The Green Magian Moogle was a stub with no trial data behind it. Adds
all 20 job trials (4424-4443) and wires it into the existing magian
system.

Take a trial at the moogle and it gives you the base neck piece
inscribed with trial number; trade that plus the job's item to the
Delivery Crate, then the piece back to the moogle for the augmented
version. Only the first step needed new code, the rest already existed.

Other changes:

- magianMoogleInfo gains a minimum level and a trial-log key item, so
  those are no longer hardcoded to 75
- moogle can accept a MAGIAN_TRIAL_LOG but gives
  MAGIAN_LEARNERS_LOG only to players holding neither log
- trials can declare a requiredJob. The main menu's sixth parameter
  masks out trials for jobs below that level
- update and finish type 15, and finish type 5, are handled. Green uses
  different codes to the other moogles
- taking a trial with a full inventory used to register it without
  giving the item, leaving it active and uncompletable

textOffsets are from a retail capture by Wiggo: 1137 for trial 4424
through 1156 for 4443.
https://drive.google.com/open?id=1BYy6tzKepCQ_9oo2AFmbWi8jhYk8-qAI

Tested each torque end to end including the crate step, plus the level
gating and list filtering, and the Orange moogle still works.

Also fixes the zone in this NPC's !pos header, which said 64 not 243.
Comment thread scripts/globals/magian.lua Outdated
local function hasMagianLog(player, moogleData)
return player:hasKeyItem(moogleData[9]) or
(moogleData[10] ~= nil and player:hasKeyItem(moogleData[10]))
end

@Xaver-DaRed Xaver-DaRed Aug 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no 1-liner functions. AI loves to use this, because it has infinite memory and doesnt care, but us humans dont have it, and abstracting a simple check only adds time to understand the logic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted. Retested after changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔨 Trial of the Magians Job Emotes

2 participants