Skip to content

raidboss: DMU P2 Initial Triggers#1076

Merged
Legends0 merged 59 commits into
mainfrom
p2-initial-triggers
Jun 23, 2026
Merged

raidboss: DMU P2 Initial Triggers#1076
Legends0 merged 59 commits into
mainfrom
p2-initial-triggers

Conversation

@Legends0

@Legends0 Legends0 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

This is separated out from the P1 branch and timeline drafts I have. Figured I would share what I have been working on.

There's probably a simpler way to resolve Forsaken than what I have so far. I'm still testing this out though as I don't have a full network log to compare against and there are many ways to do this phase which makes it trickier to figure out how to form a generic output.

@Legends0

Legends0 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Oh and the tower locations appear to be available with MapEffects I think.

Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts Outdated
Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts Outdated
Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts Outdated
Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts Outdated
Legends0 added 8 commits June 8, 2026 21:27
roles missing in tower 6, remove groupbtowers (this was just me trying to commit something that had output before stopping for the day), refactor the rest of the towers with even/odd code. Some of the baits still needed separate triggers due to overlaps within current checks between groups. Also to note, this would not work all the way if it is not AAABBBBA.
At least for standard comps, assuming tanks are not ever baiting cones and having melee downtime... This just makes it so you would not have to alter the output.
@Legends0

Legends0 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

Planning to add trines and fixup the last past/future before marking ready.

@Legends0

Legends0 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

I'm going to simplify the tower triggers, assume first 4 tower soaks (via received headmarkers) are 1 group, and the others that didn't soak group 2. The mechanic appears to require splitting into two groups (unless there is some strange way you could swap people between groups?).

Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts Outdated
Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts
@Bing-su

Bing-su commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

I tried emulating it using logs up to P3, and it appears to work fine with Kroxy-Rinon. 👍🏻

Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts Outdated
Co-authored-by: Dowon <ks2515@naver.com>
@MetalKoola

MetalKoola commented Jun 20, 2026

Copy link
Copy Markdown

I was working with these earlier with Kroxy-Rinon, and a question came to mind, on all the other things it figured out which tower you needed to go to, except for stack marker players in 3/5/7, where it seems to just call out the two people with stack.
The stack should have the same priority system as in the rest, where Group A or Group B will have the same HTMR Left-to-Right priority (for a standard comp). Is this a intended or something that will be looked into in a future PR?

@Legends0

Copy link
Copy Markdown
Collaborator Author

I was working with these earlier with Kroxy-Rinon, and a question came to mind, on all the other things it figured out which tower you needed to go to, except for stack marker players in 3/5/7, where it seems to just call out the two people with stack. The stack should have the same priority system as in the rest, where Group A or Group B will have the same HTMR Left-to-Right priority (for a standard comp). Is this a intended or something that will be looked into in a future PR?

I had not implemented priority for the stack, but something I can look into adding tomorrow.

@Legends0

Legends0 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

@valarnin could you check over some of this from a typescript perspective?

Mostly just need to know about the function I wrote. I ran into some issues with data.party.isHealer due to this and not knowing how to handle the eslint of a possible unbound method, so I just switched to using the Util version of it:

// Get Partner's HeadMarker following HTMR Priority
// Requires data and Forsaken Group
// Will return the forsaken headmarker of partner
const getHTMRPartnerMarker = (
  data: Data,
  group: string[],
): forsakenHeadmarker => {
  // Avoiding use of unbound method with `this` in data.party.isHealer
  const isHealer = (
    x: string,
  ): boolean => {
    const jobName = data.party.jobName(x);
    if (jobName === undefined)
      return false;
    return Util.isHealerJob(jobName);
  };
  // Functions for determining party member DPS subroles
  const isRangedDPS = (
    x: string,
  ): boolean => {
    const jobName = data.party.jobName(x);
    if (jobName === undefined)
      return false;
    return Util.isRangedDpsJob(jobName) || Util.isCasterDpsJob(jobName);
  };
  const isMeleeDPS = (
    x: string,
  ): boolean => {
    const jobName = data.party.jobName(x);
    if (jobName === undefined)
      return false;
    return Util.isMeleeDpsJob(jobName);
  };
  // Function to dynamically determine which role to check
  const getRoleFunction = (
    role: string,
  ): (name: string) => boolean => {
    // Only a healer will supercede the tank
    if (role === 'tank')
      return isHealer;
    if (Util.isMeleeDpsJob(data.job))
      return isRangedDPS;
    // If we find a melee in our group we are the ranged priority
    // Partner should be a melee dps, for optimal comp
    return isMeleeDPS;
  };
  const playerHeadmarkers = data.forsakenPlayerHeadmarkers;
  // Need to look at what healer has in relation to us
  // Partner is whoever has the same marker
  const isMyRoleSameAs = getRoleFunction(data.role);
  const member1 = group[0] ?? '';
  const member2 = group[1] ?? '';
  const member3 = group[2] ?? '';
  const partner = isMyRoleSameAs(member1)
    ? member1
    : isMyRoleSameAs(member2)
    ? member2
    : isMyRoleSameAs(member3)
    ? member3
    : 'unknown';
  // Return partner's marker
  return playerHeadmarkers[partner ?? 0] ?? 'unknown';
};

EDIT: I need to fixup the comment / function name.

@Legends0 Legends0 requested a review from valarnin June 22, 2026 01:11

@valarnin valarnin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Aside from the bind question, this looks good in general from a TS standpoint for me.

Though there's a lot of intertwined logic depending on config values, wish there was a better way to separate out the logic by e.g. having DMU P2 Path of Light Towers 2 Default, DMU P2 Path of Light Towers 2 Bowtie, etc.

Comment thread ui/raidboss/data/07-dt/ultimate/dancing_mad.ts Outdated
@Legends0

Copy link
Copy Markdown
Collaborator Author

Aside from the bind question, this looks good in general from a TS standpoint for me.

Though there's a lot of intertwined logic depending on config values, wish there was a better way to separate out the logic by e.g. having DMU P2 Path of Light Towers 2 Default, DMU P2 Path of Light Towers 2 Bowtie, etc.

Yea. This mechanic might also be able to reduce the trigger count by simply having a Tower 1 (due to it assigning groups), then Odds vs Even towers instead of each tower.

@Legends0

Legends0 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

I'll give it another day to test after the recent changes to the stacks. The raidemulator still looks good to me, but I won't be able to test further until tomorrow.

@valarnin

Copy link
Copy Markdown
Collaborator

For future reference, the other way to fix that problem would be to return an inner anonymous function that retains a reference to data, something like this (didn't check syntax here):

  const getRoleFunction = (
    role: string,
  ): (name: string) => boolean => {
    return (name: string) => {
      // Only a healer will supercede the tank
      if (role === 'tank')
        return data.party.isHealer(name);
      if (Util.isMeleeDpsJob(data.job))
        return isRangedDPS(name);
      // If we find a melee in our group we are the ranged priority
      // Partner should be a melee dps, for optimal comp
      return isMeleeDPS(name);
    }
  };

@Legends0 Legends0 merged commit 8a7dc57 into main Jun 23, 2026
10 checks passed
@Legends0 Legends0 deleted the p2-initial-triggers branch June 23, 2026 05:59
github-actions Bot pushed a commit that referenced this pull request Jun 23, 2026
For use with Forsaken, be sure to select one of the configurable options as the default of none is limited:
 - Kroxy-Rinon
 - Modified ABBA
 - AAAABBBB
You will still need to get the first tower correct to have Group A or Group B assignment for which the stack players will be listed.

Kroxy-Rinon and Modified ABBA use same HTMR priority.

Trine directions are sorted in clockwise order starting from North. Recommend to modify the output to the directions you care about. Example: Party may want `${dir1}`, but tanks want `${dir3}`.

---------

Co-authored-by: Dowon <ks2515@naver.com> 8a7dc57
github-actions Bot pushed a commit that referenced this pull request Jun 23, 2026
For use with Forsaken, be sure to select one of the configurable options as the default of none is limited:
 - Kroxy-Rinon
 - Modified ABBA
 - AAAABBBB
You will still need to get the first tower correct to have Group A or Group B assignment for which the stack players will be listed.

Kroxy-Rinon and Modified ABBA use same HTMR priority.

Trine directions are sorted in clockwise order starting from North. Recommend to modify the output to the directions you care about. Example: Party may want `${dir1}`, but tanks want `${dir3}`.

---------

Co-authored-by: Dowon <ks2515@naver.com> 8a7dc57
github-actions Bot pushed a commit to ShadyWhite/cactbot that referenced this pull request Jun 23, 2026
For use with Forsaken, be sure to select one of the configurable options as the default of none is limited:
 - Kroxy-Rinon
 - Modified ABBA
 - AAAABBBB
You will still need to get the first tower correct to have Group A or Group B assignment for which the stack players will be listed.

Kroxy-Rinon and Modified ABBA use same HTMR priority.

Trine directions are sorted in clockwise order starting from North. Recommend to modify the output to the directions you care about. Example: Party may want `${dir1}`, but tanks want `${dir3}`.

---------

Co-authored-by: Dowon <ks2515@naver.com> 8a7dc57
github-actions Bot pushed a commit to ShadyWhite/cactbot that referenced this pull request Jun 23, 2026
For use with Forsaken, be sure to select one of the configurable options as the default of none is limited:
 - Kroxy-Rinon
 - Modified ABBA
 - AAAABBBB
You will still need to get the first tower correct to have Group A or Group B assignment for which the stack players will be listed.

Kroxy-Rinon and Modified ABBA use same HTMR priority.

Trine directions are sorted in clockwise order starting from North. Recommend to modify the output to the directions you care about. Example: Party may want `${dir1}`, but tanks want `${dir3}`.

---------

Co-authored-by: Dowon <ks2515@naver.com> 8a7dc57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants