Skip to content

Commit

Permalink
Added PCT support
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekcbyrne committed Jul 9, 2024
1 parent ef373f1 commit f10de64
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 0 deletions.
13 changes: 13 additions & 0 deletions XIVComboPlugin/Configuration/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,19 @@ public enum CustomComboPreset : long

[CustomComboInfo("Arcane Circle Combo", "Replace Arcane Circle with Plentiful Harvest while you have Immortal Sacrifice.", 39)]
ReaperArcaneFeature = 1L << 30,

//PICTOMANCER
[CustomComboInfo("Red to Blue combo","Replace Fire combo with Blizzard combo when Subtractive Pallet is active.",42)]
PictoSubtractivePallet = 1L << 31,

[CustomComboInfo("Motifs and Muses", "Replace Motifs with their relevant Muses.", 42)]
PictoMotifMuseFeature = 1L << 34,

[CustomComboInfo("Starry Sky to Star Prism", "Replace Starry Sky with Star Prism.", 42)]
PictoStarrySkyCombo = 1L << 38,

[CustomComboInfo("Holy white to Comet Black", "Replace Holy in White with Comet in black when Monochrome Tones is active.", 42)]
PictoHolyWhiteCombo = 1L << 43,
}

public class CustomComboInfoAttribute : Attribute
Expand Down
87 changes: 87 additions & 0 deletions XIVComboPlugin/IconReplacer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,93 @@ private ulong GetIconDetour(byte self, uint actionID)
}
}

//Pictomancer
if (Configuration.ComboPresets.HasFlag(CustomComboPreset.PictoSubtractivePallet))
{
if (actionID == PCT.Fire1)
{
bool isSubPallet = SearchBuffArray(PCT.SubPallet);

if (SearchBuffArray(PCT.Aether1))
return isSubPallet ? PCT.Stone1 : PCT.Aero1;

if (SearchBuffArray(PCT.Aether2))
return isSubPallet ? PCT.Thunder1 : PCT.Water1;

return isSubPallet ? PCT.Bliz1 : PCT.Fire1;
}

if (actionID == PCT.Fire2)
{
bool isSubPallet = SearchBuffArray(PCT.SubPallet);

if (SearchBuffArray(PCT.Aether1))
return isSubPallet ? PCT.Stone2 : PCT.Aero2;

if (SearchBuffArray(PCT.Aether2))
return isSubPallet ? PCT.Thunder2 : PCT.Water2;

return isSubPallet ? PCT.Bliz2 : PCT.Fire2;
}
}

if (Configuration.ComboPresets.HasFlag(CustomComboPreset.PictoHolyWhiteCombo))
{
if (actionID == PCT.HolyWhite)
{
if (SearchBuffArray(PCT.Monochrome))
return PCT.CometBlack;
return PCT.HolyWhite;
}
}

if (Configuration.ComboPresets.HasFlag(CustomComboPreset.PictoMotifMuseFeature))
{
var PCTGauge = JobGauges.Get<PCTGauge>();
if (actionID == PCT.CreatureMotif)
{
if ((PCTGauge.CanvasFlags & CanvasFlags.Pom) != 0)
return PCT.PomMuse;

if ((PCTGauge.CanvasFlags & CanvasFlags.Wing) != 0)
return PCT.WingMuse;

if ((PCTGauge.CanvasFlags & CanvasFlags.Claw) != 0)
return PCT.ClawMuse;

if ((PCTGauge.CanvasFlags & CanvasFlags.Maw) != 0)
return PCT.FangMuse;
}

if (actionID == PCT.WeaponMotif)
{
if (PCTGauge.WeaponMotifDrawn)
return PCT.StrikingMuse;

if (lastMove == PCT.HammerStamp)
return PCT.HammerBrush;

if (lastMove == PCT.HammerBrush)
return PCT.HammerPolish;

if (SearchBuffArray(PCT.HammerReady))
return PCT.HammerStamp;
}
}

if (Configuration.ComboPresets.HasFlag(CustomComboPreset.PictoStarrySkyCombo))
{
var PCTGauge = JobGauges.Get<PCTGauge>();
if (actionID == PCT.LandscapeMotif)
{
if (PCTGauge.LandscapeMotifDrawn)
return PCT.StarryMuse;
if (SearchBuffArray(PCT.StarStruck))
return PCT.StarPrism;
return PCT.StarryMotif;
}
}

return iconHook.Original(self, actionID);
}

Expand Down
54 changes: 54 additions & 0 deletions XIVComboPlugin/JobActions/PCT.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
namespace XIVComboPlugin.JobActions
{
public static class PCT
{
public const uint

Fire1 = 34650,
Aero1 = 34651,
Water1 = 34652,
Fire2 = 34656,
Aero2 = 34657,
Water2 = 34658,

Bliz1 = 34653,
Stone1 = 34654,
Thunder1 = 34655,
Bliz2 = 34659,
Stone2 = 34660,
Thunder2 = 34661,

CreatureMotif = 34689,
PomMotif = 34664,
WingMotif = 34665,
ClawMotif = 34666,
MawMotif = 34667,
PomMuse = 34670,
WingMuse = 34671,
ClawMuse = 34672,
FangMuse = 34673,

WeaponMotif = 34690,
StrikingMuse = 34674,
HammerStamp = 34678,
HammerBrush = 34679,
HammerPolish = 34680,

LandscapeMotif = 34691,
StarryMuse = 34675,
StarryMotif = 34669,

StarPrism = 34681,

HolyWhite = 34662,
CometBlack = 34663;

public const ushort
SubPallet = 3674,
HammerReady = 3680,
StarStruck = 3681,
Aether1 = 3675,
Aether2 = 3676,
Monochrome = 3691;
}
}
1 change: 1 addition & 0 deletions XIVComboPlugin/XIVComboPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ private string ClassJobToName(byte key)
case 38: return "Dancer";
case 39: return "Reaper";
case 40: return "Sage";
case 42: return "Pictomancer";
}
}

Expand Down

1 comment on commit f10de64

@jakekcbyrne
Copy link
Author

Choose a reason for hiding this comment

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

Added my interpretation of what PCT support would look like.

  • Your single button combo gets replaced with the enhanced version when you have Subtractive pallet active - why this isn't already a thing as you literally can't use the other ability otherwise makes no sense, so removed 2 useless buttons with this change
  • Replaced Holy in White with Comet in Black when you have Monochrome Tones is active - again, you can't use the other ability when this buff is active or not, so why make 2 buttons??
  • Merged the motif/muses, why you need a separate button to "Draw" your motif and then a separate button to cast your muse, and why is Hammer setup the way it is, draw it, activate it, stamp it, why 3 buttons??
  • Merged Star Prism to Starry Sky, again, you can't cast Star Prism without the Starry Sky buff so why separate the buttons?!

Caveat to this, as SE has decided to track your Motif/Muse cooldown on your casting ability, and as we replace that with your Motif when you don't have it active and your muse when you do, you do still need to have the Muse action on your bars visible to track the CD but no longer need to press a separate button to cast it
Another caveat, I've not added any Level logic, so this really will only work fully at 100, I can't be bothered to add all the levelling logic to this myself.

Please sign in to comment.