Skip to content

[trust, sql, lua, core] Trust Tank audit and cleanup#10002

Merged
zach2good merged 8 commits into
LandSandBoat:basefrom
Omnione:trust_stuff
May 16, 2026
Merged

[trust, sql, lua, core] Trust Tank audit and cleanup#10002
zach2good merged 8 commits into
LandSandBoat:basefrom
Omnione:trust_stuff

Conversation

@Omnione
Copy link
Copy Markdown
Contributor

@Omnione Omnione commented May 10, 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?

Trust scripts:

  • Cleaned up and adusted a few values to match retail as close as possible with current code.
  • Added level checks for Abilities for most Tank trust where required, a few trust have some abilites from level 1 i.e Mnejing.
  • Added LULLABY checks for waking party members with cure on trust tanks that have this function.

mob_skill.lua

  • Renamed a few trust skills with _TRUST as these are only used for trust.

mob_skills.sql

  • savage_blade's ready time reduced for trion.
  • royal_bash for trion had incorrect values set for animation time.

Mob Mods

  • Addition of MOBMOD_SHIELD_SIZE_TRUST (c++) and SHIELD_SIZE_TRUST (lua) for setting shield size if required.

lua_baseentity: getShieldSize()

  • Took away the check for pets, no idea why that was there.
  • Defualts to 0 as before.
  • New check for trust and the new mob mod SHIELD_SIZE_TRUST, if set in script it will override the defualt size 3 set in the function, this was mainly done to stop warning but is a good addition for when we want to tweek shield sizes later down the line.

Notes:

  • As before, some skills will need auditing as DMG may be off compared to retail, but functional.

Steps to test these changes

  • Call out each trust, either on thier own or as a party.
  • Test at different levels to see that most trust tanks now can only use job abilities appropriate for their current level.
  • Observe that all abilities and spells can be used at correct levels and behaviors should be close to retail as we can get currently.

Comment thread src/map/mob_modifier.h Outdated
MOBMOD_RANGED_ATTACK_RANGE = 93, // Max range for ranged auto attacks. Mob will move closer if target is beyond this range.
MOBMOD_FOLLOW_LEASH_RANGE = 94, // Distance the leader can walk before their followers start moving. Applied to followers.
MOBMOD_FOLLOW_STOP_RANGE = 95, // Distance the followers attempt to stop at once their leader stops moving. Applied to followers.
MOBMOD_SHIELD_SIZE_TRUST = 96, // Set the size of the mob's shield. 3 = Default size, only used for trusts that use shields.
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.

While you're here, you could make the 3 mobmods that affect trusts all styled the same:

    MOBMOD_TRUST_DISTANCE         = 77, // TRUSTS ONLY: Set movement type/distance. See trust.lua for details.


MOBMOD_TRUST_X ... // TRUSTS ONLY. ...

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.

i think the prefix MOBMOD_TRUST is better, so i will stick to that and amend the shield size mob mod

Comment thread src/map/lua/lua_baseentity.cpp Outdated
case TYPE_TRUST:
{
constexpr int8 defaultTrustShieldSize = 3;
const int16 shieldMobModValue = static_cast<CMobEntity*>(m_PBaseEntity)->getMobMod(MOBMOD_SHIELD_SIZE_TRUST);
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.

You've checked that it's a trust, so cast it into a trust. Then, you can move constexpr int8 defaultTrustShieldSize = 3; to be a private member of trusts with an accessor - in case we need this information outside of just this binding

Comment thread scripts/enum/mob_mod.lua Outdated
RANGED_ATTACK_RANGE = 93, -- Max range for ranged auto attacks. Mob will move closer if target is beyond this range.
FOLLOW_LEASH_RANGE = 94, -- Distance the leader can walk before their followers start moving. Applied to followers.
FOLLOW_STOP_RANGE = 95, -- Distance the followers attempt to stop at once their leader stops moving. Applied to followers.
SHIELD_SIZE_TRUST = 96, -- Set the size of the mob's shield. 3 = Default size, only used for trusts that use shields.
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.

This would then need to align with the C++ naming, etc.

@zach2good zach2good added the squash Reminder to squash commits before/on merge (you can do this, or maintainers will do this for you) label May 10, 2026
@zach2good
Copy link
Copy Markdown
Contributor

You could split up your commits into the mobmod/C++ changes, and then the trust script changes. Commits like this aren't valuable to future readers:


accidental space in mob_skills.sql

Sanity check fixes for gambit spaces in trust scripts

Comment thread scripts/actions/spells/trust/aahm.lua Outdated
mob:addMod(xi.mod.ENMITY, 15) -- Enmity+
mob:addMod(xi.mod.DUAL_WIELD, 10) -- Dual Wield +10
mob:addMod(xi.mod.DMG, -500) -- Damage Taken -5%
mob:addMod(xi.mod.HPP, 20) -- HP+20%
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.

These comments are redundant

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.

This pattern is true across all these trust files

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.

ok, ill remove them

Comment thread scripts/actions/spells/trust/rahal.lua Outdated
mob:addGambit(ai.t.SELF, { ai.c.HPP_LT, 33 }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.SENTINEL })
-- Dragon Killer handled in mob_pool_mods
mob:addMod(xi.mod.ENMITY, 10) -- Enmity+
mob:addMod(xi.mod.DMG, -500) -- Damage Taken -5%
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.

Comments like this one are fair, since DMG is poorly names given it represents DMG_TAKEN_BASE_10K, etc.

Comment thread scripts/actions/spells/trust/aaev.lua Outdated
@zach2good zach2good removed the squash Reminder to squash commits before/on merge (you can do this, or maintainers will do this for you) label May 16, 2026
@zach2good zach2good merged commit 22913d0 into LandSandBoat:base May 16, 2026
26 of 29 checks passed
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.

3 participants