Skip to content

Commit

Permalink
raidboss: update more GameLog to ActorControl (OverlayPlugin#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
wexxlee authored Apr 4, 2024
1 parent 37cc0a7 commit ee25f91
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
8 changes: 8 additions & 0 deletions resources/netregexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ export const gameLogCodes = {
message: '0839',
} as const;

// See docs/LogGuide.md for more info about these categories
export const actorControlType = {
setAnimState: '003E',
publicContentText: '0834',
logMsg: '020F',
logMsgParams: '0210',
} as const;

const defaultParams = <
T extends LogDefinitionTypes,
V extends LogDefinitionVersions,
Expand Down
3 changes: 2 additions & 1 deletion resources/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Job, Role } from '../types/job';
import { NetMatches } from '../types/net_matches';
import { OutputStrings } from '../types/trigger';

import { gameLogCodes } from './netregexes';
import { actorControlType, gameLogCodes } from './netregexes';
import Outputs from './outputs';
import { callOverlayHandler } from './overlay_plugin_api';

Expand Down Expand Up @@ -472,6 +472,7 @@ const Util = {
clearCombatantsOverride = clearFunc;
},
gameLogCodes: gameLogCodes,
actorControlType: actorControlType,
shortName: (
name: string | undefined,
playerNicks: { [name: string]: string },
Expand Down
22 changes: 8 additions & 14 deletions ui/raidboss/data/04-sb/eureka/eureka_hydatos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,10 @@ const triggerSet: TriggerSet<Data> = {
},
// https://xivapi.com/LogMessage/9069
// en: The memories of heroes past live on again!
// TODO: Update to ActorControlSelf (category=0x020F, param1=0x236D) when available
// See OverlayPlugin/cactbot#99 and OverlayPlugin/OverlayPlugin#329 for further info
{
id: 'BA Saved By Remembrance',
type: 'GameLog',
netRegex: { line: 'The memories of heroes past live on again.*?', capture: false },
type: 'ActorControlSelfExtra',
netRegex: { category: Util.actorControlType.logMsg, param1: '236D', capture: false },
sound: 'Long',
},
{
Expand Down Expand Up @@ -258,14 +256,12 @@ const triggerSet: TriggerSet<Data> = {
},
// https://xivapi.com/PublicContentTextData/2122
// en: Munderg, turn flesh to ash!
// TODO: Update to ActorControl (category=0x0834, param1=0x84A) when available
// See OverlayPlugin/cactbot#99 and OverlayPlugin/OverlayPlugin#329 for further info
{
id: 'BA Owain Fire Element',
type: 'GameLog',
type: 'ActorControlExtra',
netRegex: {
line: '[^:]*:Munderg, turn flesh to ash.*?',
code: Util.gameLogCodes.dialog,
category: Util.actorControlType.publicContentText,
param2: '84A',
capture: false,
},
condition: (data) => data.side === 'east',
Expand All @@ -292,14 +288,12 @@ const triggerSet: TriggerSet<Data> = {
},
// https://xivapi.com/PublicContentTextData/2123
// en: Munderg, turn blood to ice!
// TODO: Update to ActorControl (category=0x0834, param1=0x84B) when available
// See OverlayPlugin/cactbot#99 and OverlayPlugin/OverlayPlugin#329 for further info
{
id: 'BA Owain Ice Element',
type: 'GameLog',
type: 'ActorControlExtra',
netRegex: {
line: '[^:]*:Munderg, turn blood to ice.*?',
code: Util.gameLogCodes.dialog,
category: Util.actorControlType.publicContentText,
param2: '84B',
capture: false,
},
condition: (data) => data.side === 'east',
Expand Down
11 changes: 4 additions & 7 deletions ui/raidboss/data/05-shb/eureka/bozjan_southern_front.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Conditions from '../../../../../resources/conditions';
import Outputs from '../../../../../resources/outputs';
import Regexes from '../../../../../resources/regexes';
import { Responses } from '../../../../../resources/responses';
import Util from '../../../../../resources/util';
import ZoneId from '../../../../../resources/zone_id';
import { RaidbossData } from '../../../../../types/data';
import { NetMatches } from '../../../../../types/net_matches';
Expand Down Expand Up @@ -659,15 +660,11 @@ const triggerSet: TriggerSet<Data> = {
},
},
// https://xivapi.com/LogMessage/9644
// No 0x29 log line for this, so we have to use GameLog.
// TODO: Check whether this could be ActorControlSelfExtra (category: 0x020F) when available.
// en: Lyon the Beast King would do battle at Majesty's Place...
{
id: 'Bozja South Castrum Lyon Passage',
type: 'GameLog',
netRegex: {
line: 'Lyon the Beast King would do battle at Majesty\'s Place.*?',
capture: false,
},
type: 'ActorControlSelfExtra',
netRegex: { category: Util.actorControlType.logMsg, param1: '25AC', capture: false },
alertText: (_data, _matches, output) => output.text!(),
outputStrings: {
text: {
Expand Down
4 changes: 1 addition & 3 deletions ui/raidboss/data/05-shb/eureka/delubrum_reginae_savage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,7 @@ hideall "--sync--"

# https://xivapi.com/PublicContentTextData/2477
# en: Why...won't...you...
# TODO: Update to ActorControlExtra (category: 0x0834, param1: 0x9AD) when available.
# See OverlayPlugin/cactbot#99 and OverlayPlugin/OverlayPlugin#329 for further info
8000.0 "--Reset--" GameLog { code: "0044", name: "Stygimoloch Warrior", line: "Why\.\.\.won't\.\.\.you\.\.\..*?" } window 0,2000 jump 0
8000.0 "--Reset--" ActorControlExtra { category: "0834", param2: "9AD" } window 0,2000 jump 0
# TODO: is there a reset dialog line for losing?
# Alternatively, we could always insert " 19:${data.me} was defeated by" from script.

Expand Down

0 comments on commit ee25f91

Please sign in to comment.