Skip to content

Implement Seasons Greetings KSNM 30#7453

Merged
zach2good merged 1 commit intoLandSandBoat:basefrom
RaraProjects:seasons-greetings
Apr 21, 2025
Merged

Implement Seasons Greetings KSNM 30#7453
zach2good merged 1 commit intoLandSandBoat:basefrom
RaraProjects:seasons-greetings

Conversation

@RaraProjects
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?

Implements a largely fleshed out (but still experimental) version of the KSNM 30 Seasons Greetings.

Details and capture info can be found here:
https://docs.google.com/spreadsheets/d/1t0BYUAtGJ6mYiEIRNCpNfTz9hC2gJdTX42LNGdeNVM0/edit?usp=sharing

High Level Battle Notes:

  1. There are four tree NMs (WHM, MNK, NIN, DRK).
  2. Each tree represents a season.
  3. The trees start out unaggroed and only aggro when engaged.
  4. When one tree uses its 2HR the next tree will wake up.
  5. The order is always Gilgagoge (Spring) > Goga (Summer) > Ulagohvsdi (Autumn) > Gola (Winter).
  6. If you start with Gola (Winter) then it will wrap around to the Gilagoge (Spring).
Feature Notes
Skills Each tree has a set ability that it uses. It won't use other abilities.
Spells Spells seem to be pretty standard for ~75 NMs
Additional Effects Each tree has a unique additional effect that it can apply on melee.
Spell Resistances Immune to Break and the mages are immune to Silence
EEM After getting a couple EEMs, it seems like each tree might have its own EEM. Needs further verification.
MP I couldn't fully get a tree drained so I don't know how much MP they have. I just have placeholder MP in place now.

Additional Battle Notes:

  1. There is an interesting scenario where the player's damage will suddenly jump by almost two orders of magnitude.
  2. I thought it was originally related to 2HR usage but I saw cases where that wasn't the case.
  3. I thought it could be related to crits, but I saw cases where that wasn't the case.
  4. I wondered if there was some sort of rotation happen where it could be time based or rotating physical damage type.
  5. Needs further testing.

Notable Code Changes:

  1. Implemented en-dispel.
  2. Created a core function (with the help of @0x05010705) that helps with interacting with other mobs in the battlefield that are not the acting entity or its target. This was needed to wake up the next tree in line when the engaged tree used its 2HR.

Steps to test these changes

  1. !additem 1175
  2. Go to Balga's Dais
  3. Enter Seasons Greetings KSNM 30

Comment on lines +67 to +69
balgasID.mob.GILAGOGE_TLUGVI + 1,
balgasID.mob.GILAGOGE_TLUGVI + 6,
balgasID.mob.GILAGOGE_TLUGVI + 11,
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.

If you already have the IDs you want, you can use GetMobByID() to look each one up. This just grabs the mob out of the entity array without any sort of iteration.

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.

The trick with this scenario is that although I know the IDs of the mob I'm looking for, I don't know which version of the mob I need at runtime because the mob lua is battlefield agnostic. For example, if three groups are fighting in Seasons Greetings at the same time, and the WHM (Gilagoge) from group two uses Benediction, I need to make sure that I'm only interacting with battlefield two's version of the MNK (Goga).

The looping ensures that I'm only ever interacting with the appropriate battlefield's version of the mob.

Possible Gogas:

  1. 17375408 (Battlefield 1)
  2. 17375413 (Battlefield 2)
  3. 17375418 (Battlefield 3)

Group Two Mobs: (only this set would be checked in the example above)

  1. 17375412 (Gilagoge)
  2. 17375413 (Goga)
  3. 17375414 (Ulagohvsdi)
  4. 17375415 (Gola)

Let me know if I'm misunderstanding your comment!

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 I understand what you're suggesting now. I think you're recommending that I grab the ID of the mob performing the 2HR and offset (+1) from that to get the next mob (with some special modulo handling to loop back around to the beginning if needed). I think that would work.

Is there value in keeping getSpecificMob for similar cases in other BCNMs like Requiem of Sin, etc.?

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.

If you wanted to work off of a specific base offset for a given battlefield, we have battlefield:getArea(), which give you (I think) 1-3, depending on which version of the battlefield you've been placed in. You can then use that to calculate which mob and offset you need.

There's some useful examples hanging around:

local baseID = ID.mob.ZEID_BCNM_OFFSET + (mob:getBattlefield():getArea() - 1) * 4

...

    local inst = mob:getBattlefield():getArea()
    local instOffset = ID.mob.WARLORD_ROJGNOJ + (14 * (inst - 1))

...


local promathia = ID.mob.PROMATHIA + (mob:getBattlefield():getArea() - 1) * 2


SILENCE_GAS_1 = 314,
DARK_SPORE_1 = 315,
DRILL_BRANCH = 328,
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.

Leave a blank line when between dark spore and drill branch pls

DARK_SPORE_1 = 315,
DRILL_BRANCH = 328,
PINECONE_BOMB = 329,
LEAFSTORM = 331,
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.

And between this 2 aswell. And down bellow theres a few other cases.

If the enums dont follow a direct progression, separate them

@RaraProjects
Copy link
Copy Markdown
Contributor Author

RaraProjects commented Apr 19, 2025

Do you have any preferences for how I handle the cyclomatic complexity in xi.mob.onAddEffect? I was thinking a good starting point would be breaking the Status Effect, Dispel, and Immediate Effect scenarios into their own functions.

Update: I separated each scenario into their own function. They separate pretty cleanly.

@zach2good zach2good merged commit d05d864 into LandSandBoat:base Apr 21, 2025
13 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