From 6965d334c77ac3bc4cc84ae3f0d3b4ab694f2416 Mon Sep 17 00:00:00 2001 From: amki Date: Wed, 2 Feb 2022 21:46:56 +0000 Subject: [PATCH] p1s callouts --- README.txt | 8 ++ jobs-example.js | 70 ++++++++++++++ oopsyraidsy-example.js | 53 +++++++++++ p1s-override.txt | 208 +++++++++++++++++++++++++++++++++++++++++ radar-example.js | 36 +++++++ raidboss-example.js | 106 +++++++++++++++++++++ raidboss.js | 165 ++++++++++++++++++++++++++++++++ test-override.txt | 19 ++++ 8 files changed, 665 insertions(+) create mode 100644 README.txt create mode 100644 jobs-example.js create mode 100644 oopsyraidsy-example.js create mode 100644 p1s-override.txt create mode 100644 radar-example.js create mode 100644 raidboss-example.js create mode 100644 raidboss.js create mode 100644 test-override.txt diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..d09344e --- /dev/null +++ b/README.txt @@ -0,0 +1,8 @@ +This directory holds user-defined configuration for UI modules. + +Each file should be named .js for variables and .css for +layout/style settings where is the name of the module that will +load the config. + +Copy and rename the -example.js file to .js for an easy +starting point. \ No newline at end of file diff --git a/jobs-example.js b/jobs-example.js new file mode 100644 index 0000000..e2066cf --- /dev/null +++ b/jobs-example.js @@ -0,0 +1,70 @@ +// Rename this file to `jobs.js` and edit it to change the jobs ui. + +// Zones to show food buff warning, when at max level. +Options.WellFedZoneRegex = + /^(Unknown Zone \([0-9A-Fa-f]+\)|Deltascape.*(Ultimate|Savage).*|.* Coil Of Bahamut.*(Ultimate|Savage).*)|Alexander.*(Ultimate|Savage).*$/; + +// The food buff warning is shown when you're below this level. +// Update this when new expansion happens. +Options.MaxLevel = 80; + +// List of jobs to show an hp value for (defaults to tanks). +Options.ShowHPNumber = ['PLD', 'WAR', 'DRK', 'GNB']; + +// List of jobs to show an mp value for. +Options.ShowMPNumber = ['BLM', 'DRK']; + +// The recast time for Aetherflow. +Options.SmnAetherflowRecast = 60; + +// The distance that offensive spells such as Verareo, Bio, etc are castable. +Options.FarThresholdOffence = 24; +// When MP falls below this, the MP bar is highlighted with the .low CSS class +// on dark knight. +Options.DrkLowMPThreshold = 4800; +// When MP falls below this, the MP bar is highlighted with the .low CSS class +// on paladin. +Options.PldLowMPThreshold = 2880; +// When MP falls below this, the MP bar is highlighted with the .low CSS class +// on black mage. +Options.BlmLowMPThreshold = 2400; + +const kRed = + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVEhL7c0xEQAgDAAxhHSsf2d4QMJPbLnLnnNnvxIkQRIkQRIkQRIkQRIkQfoczD4cGLQ9QOmZGwAAAABJRU5ErkJggg=='; + +// Remove these /* and */ comment lines to enable the example code below. +/* + +// Overrides for all of the "big buffs" that appear to the left or right +// of the hp/mp bars. This is stuff like trick/embolden/devotion/etc. +Options.PerBuffOptions = { + // The name of the buff to override. These available buffs are: + // trick, litany, embolden, balance, chain, hyper, sight, brotherhood, + // devotion, requiem + trick: { + // By default everything is on the right. This puts the icon on the + // left for better visibility. + side: 'left', + + // The border color. See: https://www.google.com/search?q=color+picker + // This example sets trick to use a white border. + borderColor: '#FFFFFF', + + // The icon to use. This is a url or a data url like this. This + // example sets trick to use a bright red icon instead. + icon: kRed, + + // If true (instead of false here), this will hide the buff and + // prevent it from being shown. + hide: false, + + // sortKey controls the order of the buffs when multiple buffs are shown. + // Smaller numbers are higher priority and will be shown closer to + // the middle. The existing buffs are ordered 0-10, but you can use any + // numerical value you want here, including negatives. + // This example sets trick to be a very high priority. + sortKey: 1000, + }, +}; + +*/ diff --git a/oopsyraidsy-example.js b/oopsyraidsy-example.js new file mode 100644 index 0000000..41a322f --- /dev/null +++ b/oopsyraidsy-example.js @@ -0,0 +1,53 @@ +// Rename this file to `oopsyraidsy.js` then edit to change the oopsyraidsy ui. + +// A set of triggers to be ignored. The key is the 'id' of the trigger, and +// the value should be true if the trigger is to be ignored, whereas false +// will have no effect. The trigger ids can be found in the trigger files for +// each fight in the files inside of this directory: +// https://github.com/quisquous/cactbot/tree/main/ui/oopsyraidsy/data/ +Options.DisabledTriggers = { + 'General Rabbit Medium': true, + 'General Early Pull': true, + 'Test Bootshine': true, +}; + +// A set of nicknames to use for players. By default, first names are used to +// make the mistake lines shorter. If a player's name appears in this map, +// their nickname will be used instead of their first name. +Options.PlayerNicks = { + 'Darkest Edgelord': 'Mary', + 'Captain Jimmy': 'Jimmy', + 'Pipira Pira': '🐟', +}; + +// A set of ability ids (in hex) to other ability names. This is primarily +// used for abillity names that ACT doesn't know yet (e.g. Unknown_26B4). +// +// For example: Rename wings of salvation to White Swirly because that's what +// everybody in your raid group calls it. +Options.AbilityIdNameMap['26CA'] = 'White Swirly'; + +// An array of user-defined triggers, in the format defined in the readme: +// https://github.com/quisquous/cactbot/tree/main/docs/OopsyraidsyGuide.md +// +// Here's an example trigger to show a line in the mistake log when +// you crit adlo yourself in Summerford Farms. +Options.Triggers = [ + { + zoneId: ZoneId.MiddleLaNoscea, + triggers: [ + { + id: 'Test Self Crit Adlo', + healRegex: 'B9', // Adloquium ability id + condition: function(e, data, matches) { + return e.targetName === data.me && matches.flags === '10004'; + }, + mistake: function(e, data) { + const text = e.abilityName + ': ' + e.damageStr; + return { type: 'good', blame: e.targetName, text: text }; + }, + }, + ], + }, + // ...more triggers here... +]; diff --git a/p1s-override.txt b/p1s-override.txt new file mode 100644 index 0000000..d1861d0 --- /dev/null +++ b/p1s-override.txt @@ -0,0 +1,208 @@ +### P1S: Asphodelos: The First Circle (Savage) +# +# -it 'Erichthonios' -oc 'Erichthonios' -p "6629:14.1" + +hideall "--Reset--" +hideall "--sync--" +# choose what you want to hide! (add # at the beginning to "hideall" / remove # to hide) + +# SAGE +# hideall "Physis" +# hideall "Kera" +# hideall "Ixo" +# hideall "Holos" +# hideall "Pan" +# hideall "Pneuma" + +# ASTRO +hideall "Macro" +hideall "Neutral" +hideall "Star" +hideall "StarPop" +hideall "Collective" +hideall "Opposition" +hideall "HoroscopeNoGcd" +hideall "HoroscopeWith" +hideall "Strassenkreuzung" +hideall "Exaltation" +hideall "Synastry" + +0.0 "--Reset--" sync / 21:........:40000010:/ window 100000 jump 0 + +# First flail set +0.0 "--sync--" sync /Engage!/ window 0,1 +9.4 "--middle--" sync / 14:[^:]*:Erichthonios:6629:/ window 11,9 +14.1 "Heavy Hand" sync / 1[56]:[^:]*:Erichthonios:6629:/ +18.2 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ +22.8 "Aetherial Shackles" sync / 1[56]:[^:]*:Erichthonios:6625:/ +31.6 "sge_Kera_Physis" +31.9 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +36.0 "ast_Opposition" +36.2 "sge_Ixo" +41.7 "Chain Pain" sync / 1[56]:[^:]*:Erichthonios:662[78]:/ +49.0 "ast_Star" +57.7 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6(5F[6-F]|60[01]):/ +60.8 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ + +# First tank mechanic +72.1 "Pitiless Flail of Grace/Pitiless Flail of Purgation" sync / 1[56]:[^:]*:Erichthonios:660[EF]:/ +74.8 "ast_Collective" +74.8 "sge_Kera" +75.5 "True Flare/True Holy" sync / 1[56]:[^:]*:Erichthonios:661[01]:/ +80.0 "sge_Ixo" + +# Second flail set +91.1 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6(5F[6-F]|60[01]):/ +94.2 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +105.0 "sge_Kera" +105.3 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +109.0 "ast_Star" +109.1 "sge_Ixo" + +# Tiles 1 +118.5 "Intemperance" sync / 1[56]:[^:]*:Erichthonios:661E:/ +122.6 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ +135.3 "First Element" sync / 1[56]:[^:]*:Erichthonios:662[12]:/ +140.5 "ast_Opposition_Macro" +141.0 "sge_Kera_Pan" +141.4 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +145.5 "sge_Physis__Ixo" +146.4 "Second Element" sync / 1[56]:[^:]*:Erichthonios:662[123]:/ +151.5 "sge_Holos" +151.6 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +157.3 "Third Element" sync / 1[56]:[^:]*:Erichthonios:662[12]:/ +161.0 "sge_Pneuma" + +# Second tank mechanic +167.9 "Pitiless Flail of Grace/Pitiless Flail of Purgation" sync / 1[56]:[^:]*:Erichthonios:660[EF]:/ +169.0 "ast_Star" +171.1 "True Flare/True Holy" sync / 1[56]:[^:]*:Erichthonios:661[01]:/ + +# Cells 1 +188.0 "sge_Kera" +188.0 "ast_Collective" +188.2 "Shining Cells" sync / 1[56]:[^:]*:Erichthonios:6616:/ +194.0 "sge_Ixo" +194.5 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ +208.6 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +208.6 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +211.4 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +211.4 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +224.2 "Pitiless Flail of Grace/Pitiless Flail of Purgation" sync / 1[56]:[^:]*:Erichthonios:660[EF]:/ +227.6 "True Flare/True Holy" sync / 1[56]:[^:]*:Erichthonios:661[01]:/ +229.0 "ast_Star" +229.7 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ +243.7 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +243.7 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +246.5 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +246.5 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +255.1 "Shackles of Time" sync / 1[56]:[^:]*:Erichthonios:661C:/ +265.3 "Heavy Hand" sync / 1[56]:[^:]*:Erichthonios:6629:/ +270.0 "Inevitable Flame/Inevitable Light" sync / 1[56]:[^:]*:Erichthonios:6EC[12]:/ +278.2 "sge_Kera" +278.2 "ast_Collective" +278.4 "Slam Shut" sync / 1[56]:[^:]*:Erichthonios:6617:/ +281.0 "sge_Pneuma" +289.0 "ast_Star" +289.6 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ + +# Fourfold Shackles +294.0 "sge_Pan" +294.0 "ast_Opposition" +294.2 "Fourfold Shackles" sync / 1[56]:[^:]*:Erichthonios:6626:/ +303.2 "Chain Pain #1" sync / 1[56]:[^:]*:Erichthonios:662[78]:/ +308.2 "Chain Pain #2" sync / 1[56]:[^:]*:Erichthonios:662[78]:/ +313.2 "Chain Pain #3" sync / 1[56]:[^:]*:Erichthonios:662[78]:/ +318.2 "Chain Pain #4" sync / 1[56]:[^:]*:Erichthonios:662[78]:/ +326.0 "sge_Pneuma" +328.0 "ast_HoroscopeNoGcd" +328.0 "sge_Kera_Physis" +328.4 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +334.0 "sge_Ixo" + +# Tiles 2 +341.6 "Intemperance" sync / 1[56]:[^:]*:Erichthonios:661E:/ +345.7 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ +349.0 "ast_Star" +358.6 "First Element" sync / 1[56]:[^:]*:Erichthonios:662[12]:/ +369.6 "Second Element" sync / 1[56]:[^:]*:Erichthonios:662[12]:/ +373.2 "Gaoler's Flail In/Out" sync / 1[56]:[^:]*:Erichthonios:6(5F[6-F]|60[01]):/ +376.3 "Gaoler's Flail Out/In" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +380.6 "Third Element" sync / 1[56]:[^:]*:Erichthonios:662[12]:/ +389.2 "sge_Kera_Holos" +389.4 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +393.5 "ast_Opposition" + +# Cells 2, Shackles of Time first + +407.4 "ast_Collective" +407.6 "Shining Cells" sync / 1[56]:[^:]*:Erichthonios:6616:/ +408.0 "sge_Ixo" +409.0 "ast_Star" +417.8 "Shackles of Time/Aetherial Shackles" sync / 1[56]:[^:]*:Erichthonios:661C:/ +417.8 "--sync--" sync / 1[56]:[^:]*:Erichthonios:6625:/ jump 1010.8 +419.2 "ast_Pop_Star" +425.1 "Pitiless Flail of Grace/Pitiless Flail of Purgation" sync / 1[56]:[^:]*:Erichthonios:660[EF]:/ +428.4 "True Flare/True Holy" sync / 1[56]:[^:]*:Erichthonios:661[01]:/ +432.8 "Inevitable Flame/Inevitable Light" sync / 1[56]:[^:]*:Erichthonios:6EC[12]:/ +441.8 "sge_Kera" +441.8 "ast_Neutral" +441.9 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +448.8 "sge_Physis_Ixo" + +449.1 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ +453.8 "sge_Holos" +453.9 "Aetherial Shackles" sync / 1[56]:[^:]*:Erichthonios:6625:/ +465.1 "Aetherchain" sync / 1[56]:[^:]*:Erichthonios:6619:/ +466.0 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +472.9 "Chain Pain" sync / 1[56]:[^:]*:Erichthonios:662[78]:/ +474.2 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +485.3 "sge_Kera" +485.3 "ast_Collective" +485.5 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ jump 1077.3 +506.6 "Powerful Fire/Powerful Light + Gaoler's Flail" +509.4 "Powerful Fire/Powerful Light + Gaoler's Flail" + +# Cells 2, Aetherial Shackles first +1010.8 "Aetherial Shackles" sync / 1[56]:[^:]*:Erichthonios:6625:/ +1012.2 "ast_Pop_Star" +1021.9 "Aetherchain" sync / 1[56]:[^:]*:Erichthonios:6619:/ +1022.8 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1029.7 "Chain Pain" sync / 1[56]:[^:]*:Erichthonios:662[78]:/ +1031.0 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1040.1 "sge_Kera" +1040.1 "ast_Neutral" +1040.3 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +1044.3 "sge_Physis_Ixo" +1051.5 "Shackles of Time" sync / 1[56]:[^:]*:Erichthonios:661C:/ +1058.9 "Pitiless Flail of Grace" sync / 1[56]:[^:]*:Erichthonios:660E:/ +1062.1 "True Flare/True Holy" sync / 1[56]:[^:]*:Erichthonios:661[01]:/ +1066.4 "Inevitable Flame/Inevitable Light" sync / 1[56]:[^:]*:Erichthonios:6EC[12]:/ +1077.1 "sge_Kera" +1077.1 "ast_Collective" +1077.3 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +1084.5 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ + +# Seems to be E/W+In/Out for first two, and last one swaps between In/Out +1098.6 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1098.6 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +1101.4 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1101.4 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ + +1115.7 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1115.7 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +1119.5 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1119.5 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ + +1134.2 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1134.2 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ +1137.3 "Powerful Fire/Powerful Light" sync / 1[56]:[^:]*:Erichthonios:661[AB]:/ +1137.3 "Gaoler's Flail" sync / 1[56]:[^:]*:Erichthonios:6DA[2-9A-D]:/ + +# Soft enrage +1152.7 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +1161.9 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ +1171.1 "Warder's Wrath" sync / 1[56]:[^:]*:Erichthonios:662A:/ + +1177.0 "--sync--" sync / 1[56]:[^:]*:Erichthonios:65F5:/ +1190.6 "Lethe (enrage)" sync / 1[56]:[^:]*:Erichthonios:6618:/ diff --git a/radar-example.js b/radar-example.js new file mode 100644 index 0000000..91e11bd --- /dev/null +++ b/radar-example.js @@ -0,0 +1,36 @@ +// Rename this file to `radar.js` and edit it to change the radar ui. +// This file is Javascript. Anything after "//" on a line is a comment. +// If you edit this file, remember to reload ACT or click the "Reload overlay" +// button on the raidboss CactbotOverlay. +// If there are errors in this file, they will appear in the OverlayPlugin.dll +// log window in ACT. + +// You can add your own monster list here. +Options.CustomMonsters = { + // 'Any': { + // 'name': { // monster names + // 'en': 'ya-te-veo', + // 'cn': '食人花', + // 'ja': 'ヤテベオ', + // }, + // 'hp': 1000, // minimum hp of the monster + // 'rank': 'Custom', // rank + // }, +}; + +// You can also add different options to different ranks. +Options.RankOptions = { + // 'S': { + // DetectionRange: 100, + // TTS: true, + // Type: 'mob', // can be 'mob' or 'any' + // Enabled: true, + // }, + // 'Custom': { + // DetectionRange: 500, + // TTS: false, + // PopSoundAlert: true, + // Type: 'any', + // Enabled: true, + // }, +}; diff --git a/raidboss-example.js b/raidboss-example.js new file mode 100644 index 0000000..0350ff4 --- /dev/null +++ b/raidboss-example.js @@ -0,0 +1,106 @@ +// Rename this file to `raidboss.js` and edit it to change the raidboss ui. +// This file is Javascript. Anything after "//" on a line is a comment. +// If you edit this file, remember to reload ACT or click the "Reload overlay" +// button on the raidboss overlay. +// If there are errors in this file, they will appear in the OverlayPlugin.dll +// log window in ACT. +// See: http://github.com/quisquous/cactbot/blob/main/docs/CactbotCustomization.md#check-the-overlayplugin-log-for-errors + +// Path to sound played for info-priority text popups, or when "Info" is +// specified as the sound name. +Options.InfoSound = '../../resources/sounds/freesound/percussion_hit.webm'; + +// Path to sound played for alert-priority text popups, or when "Alert" is +// specified as the sound name. +Options.AlertSound = '../../resources/sounds/BigWigs/Alert.webm'; + +// Path to sound played for alarm-priority text popups, or when "Alarm" is +// specified as the sound name. +Options.AlarmSound = '../../resources/sounds/BigWigs/Alarm.webm'; + +// Path to sound played when "Long" is specified as the sound name. +Options.LongSound = '../../resources/sounds/BigWigs/Long.webm'; + +// Path to sound played when the fight starts, or when "Pull" is +// specified as the sound name. +Options.PullSound = '../../resources/sounds/freesound/sonar.webm'; + +// A set of nicknames to use for players, when trying to shorten names. +// See: https://github.com/quisquous/cactbot/blob/main/docs/CactbotCustomization.md#customizing-behavior +Options.PlayerNicks = { + 'Captain Jimmy': 'Jimmy', + 'Pipira Pira': 'Fish', +}; + +// An array of user-defined triggers, in the format defined in the trigger guide: +// See: https://github.com/quisquous/cactbot/blob/main/docs/CactbotCustomization.md#overriding-raidboss-triggers +// See also: https://github.com/quisquous/cactbot/tree/main/docs/RaidbossGuide.md + +// Here's an example of overriding a trigger. +// This overrides the "Test Poke" trigger from: +// https://github.com/quisquous/cactbot/blob/main/ui/raidboss/data/00-misc/test.js + +Options.Triggers.push({ + zoneId: ZoneId.MiddleLaNoscea, + triggers: [ + { + id: 'Test Poke', + netRegex: NetRegexes.gameNameLog({ line: 'You poke the striking dummy.*?', capture: false }), + netRegexDe: NetRegexes.gameNameLog( + { line: 'Du stupst die Trainingspuppe an.*?', capture: false }, + ), + netRegexFr: NetRegexes.gameNameLog( + { + line: 'Vous touchez légèrement le mannequin d\'entraînement du doigt.*?', + capture: false, + }, + ), + netRegexJa: NetRegexes.gameNameLog({ line: '.*は木人をつついた.*?', capture: false }), + netRegexCn: NetRegexes.gameNameLog({ line: '.*用手指戳向木人.*?', capture: false }), + netRegexKo: NetRegexes.gameNameLog({ line: '.*나무인형을 쿡쿡 찌릅니다.*?', capture: false }), + preRun: function(data) { + data.pokes = (data.pokes || 0) + 1; + }, + // Instead of printing the number of pokes with infoText like the original trigger, + // This overrides the type and text of the output. + alarmText: 'POKE (user file override)', + }, + ], +}); + +// Here's an example of overriding a timeline. +// This overrides the test timeline that you normally play with a `/countdown 5` in Middle La Noscea +// with an updated one from `user/test-override.txt`. +Options.Triggers.push({ + zoneId: ZoneId.MiddleLaNoscea, + // This flag is required to clear any previously specified timelines. + overrideTimelineFile: true, + // This file is in the same directory as this JavaScript file. + timelineFile: 'test-override.txt', +}); + +// Here's an example of a adding a custom regen trigger. +// It reminds you to use regen again when you are in Sastasha (unsynced). +Options.Triggers.push({ + // The zone this should apply to. + // This should match the zoneId in the triggers file. + zoneId: ZoneId.Sastasha, + triggers: [ + // A more complicated regen trigger. + { + // This is a made up id that does not exist in cactbot. + id: 'User Example Regen', + // This will match log lines from ACT that look like this: + // "Nacho Queen gains the effect of Regen from Taco Cat for 21.00 Seconds." + regex: Regexes.gainsEffect({ effect: 'Regen' }), + delaySeconds: function(data, matches) { + // Wait the amount of seconds regen lasts before reminding you to + // reapply it. This is not smart enough to figure out if you + // cast it twice, and is left as an exercise for the reader to + // figure out how to do so via storing variables on `data`. + return data.ParseLocaleFloat(matches.duration); + }, + alertText: 'Regen', + }, + ], +}); diff --git a/raidboss.js b/raidboss.js new file mode 100644 index 0000000..bf02837 --- /dev/null +++ b/raidboss.js @@ -0,0 +1,165 @@ +// Rename this file to `raidboss.js` and edit it to change the raidboss ui. +// This file is Javascript. Anything after "//" on a line is a comment. +// If you edit this file, remember to reload ACT or click the "Reload overlay" +// button on the raidboss overlay. +// If there are errors in this file, they will appear in the OverlayPlugin.dll +// log window in ACT. +// See: http://github.com/quisquous/cactbot/blob/main/docs/CactbotCustomization.md#check-the-overlayplugin-log-for-errors + +// Path to sound played for info-priority text popups, or when "Info" is +// specified as the sound name. +Options.InfoSound = '../../resources/sounds/freesound/percussion_hit.webm'; + +// Path to sound played for alert-priority text popups, or when "Alert" is +// specified as the sound name. +Options.AlertSound = '../../resources/sounds/BigWigs/Alert.webm'; + +// Path to sound played for alarm-priority text popups, or when "Alarm" is +// specified as the sound name. +Options.AlarmSound = '../../resources/sounds/BigWigs/Alarm.webm'; + +// Path to sound played when "Long" is specified as the sound name. +Options.LongSound = '../../resources/sounds/BigWigs/Long.webm'; + +// Path to sound played when the fight starts, or when "Pull" is +// specified as the sound name. +Options.PullSound = '../../resources/sounds/freesound/sonar.webm'; + +// A set of nicknames to use for players, when trying to shorten names. +// See: https://github.com/quisquous/cactbot/blob/main/docs/CactbotCustomization.md#customizing-behavior +Options.PlayerNicks = { + 'Captain Jimmy': 'Jimmy', + 'Pipira Pira': 'Fish', +}; + +// An array of user-defined triggers, in the format defined in the trigger guide: +// See: https://github.com/quisquous/cactbot/blob/main/docs/CactbotCustomization.md#overriding-raidboss-triggers +// See also: https://github.com/quisquous/cactbot/tree/main/docs/RaidbossGuide.md + +// Here's an example of overriding a trigger. +// This overrides the "Test Poke" trigger from: +// https://github.com/quisquous/cactbot/blob/main/ui/raidboss/data/00-misc/test.js + +Options.Triggers.push({ + zoneId: ZoneId.MiddleLaNoscea, + triggers: [ + { + id: 'Test Poke', + netRegex: NetRegexes.gameNameLog({ line: 'You poke the striking dummy.*?', capture: false }), + netRegexDe: NetRegexes.gameNameLog( + { line: 'Du stupst die Trainingspuppe an.*?', capture: false }, + ), + netRegexFr: NetRegexes.gameNameLog( + { + line: 'Vous touchez légèrement le mannequin d\'entraînement du doigt.*?', + capture: false, + }, + ), + netRegexJa: NetRegexes.gameNameLog({ line: '.*は木人をつついた.*?', capture: false }), + netRegexCn: NetRegexes.gameNameLog({ line: '.*用手指戳向木人.*?', capture: false }), + netRegexKo: NetRegexes.gameNameLog({ line: '.*나무인형을 쿡쿡 찌릅니다.*?', capture: false }), + preRun: function(data) { + data.pokes = (data.pokes || 0) + 1; + }, + // Instead of printing the number of pokes with infoText like the original trigger, + // This overrides the type and text of the output. + alarmText: 'POKE (user file override)', + }, + ], +}); + +const healCallout = (data, matches, _output) => { + console.log(data, matches); + const spells = matches[0].split('_'); + let res = 'USE '; + for (let i = 1; i < spells.length; ++i) + res += ' ' + spells[i]; + return res; +}; + +// Astro +Options.Triggers.push({ + zoneId: ZoneId.MatchAll, + timelineTriggers: [ + { + id: 'AST Healer Callouts', + regex: /ast_.*/, + condition: function(data) { + return data.job === 'AST'; + }, + beforeSeconds: 4, + alarmText: healCallout, + }, + { + id: 'SCH Healer Callouts', + regex: /sch_.*/, + condition: function(data) { + return data.job === 'SCH'; + }, + beforeSeconds: 4, + alarmText: healCallout, + }, + { + id: 'SGE Healer Callouts', + regex: /sge_.*/, + condition: function(data) { + return data.job === 'SGE'; + }, + beforeSeconds: 4, + alarmText: healCallout, + }, + { + id: 'WHM Healer Callouts', + regex: /whm_.*/, + condition: function(data) { + return data.job === 'WHM'; + }, + beforeSeconds: 4, + alarmText: healCallout, + }, + ], +}); + +// Here's an example of overriding a timeline. +// This overrides the test timeline that you normally play with a `/countdown 5` in Middle La Noscea +// with an updated one from `user/test-override.txt`. +Options.Triggers.push({ + zoneId: ZoneId.MiddleLaNoscea, + // This flag is required to clear any previously specified timelines. + overrideTimelineFile: true, + // This file is in the same directory as this JavaScript file. + timelineFile: 'test-override.txt', +}); +Options.Triggers.push({ + zoneId: ZoneId.AsphodelosTheFirstCircleSavage, + // This flag is required to clear any previously specified timelines. + overrideTimelineFile: true, + // This file is in the same directory as this JavaScript file. + timelineFile: 'p1s-override.txt', +}); + +// Here's an example of a adding a custom regen trigger. +// It reminds you to use regen again when you are in Sastasha (unsynced). +Options.Triggers.push({ + // The zone this should apply to. + // This should match the zoneId in the triggers file. + zoneId: ZoneId.Sastasha, + triggers: [ + // A more complicated regen trigger. + { + // This is a made up id that does not exist in cactbot. + id: 'User Example Regen', + // This will match log lines from ACT that look like this: + // "Nacho Queen gains the effect of Regen from Taco Cat for 21.00 Seconds." + regex: Regexes.gainsEffect({ effect: 'Regen' }), + delaySeconds: function(data, matches) { + // Wait the amount of seconds regen lasts before reminding you to + // reapply it. This is not smart enough to figure out if you + // cast it twice, and is left as an exercise for the reader to + // figure out how to do so via storing variables on `data`. + return data.ParseLocaleFloat(matches.duration); + }, + alertText: 'Regen', + }, + ], +}); diff --git a/test-override.txt b/test-override.txt new file mode 100644 index 0000000..6e0d1f1 --- /dev/null +++ b/test-override.txt @@ -0,0 +1,19 @@ +# I am but a wee little test timeline override +# +# This is an example of how to override your timeline. +# +# The original file is in: +# https://github.com/quisquous/cactbot/blob/main/ui/raidboss/data/00-misc/test.txt + +0 "--Reset--" sync /You bid farewell to the striking dummy/ window 10000 jump 0 + +0 "Engage" sync /:Engage!/ window 100000,100000 +0 "Start" sync /:You bow courteously to the striking dummy/ window 0,1 +6 "Angry Dummy II" +10 "Long Castbar IV" duration 10 +12 "If you see this" +13 "you have overridden" +14 "the test timeline" +15 "with user/raidboss.js" +25 "Final Sting X" +40 "Death" \ No newline at end of file