What you want is a killswitch mode setup. That's Yugl's preferred way of handling PDT/MDT/etc, and my own Include is set up to allow that as an option. I'd kept my initial suggestion for you simplified, though, as you hadn't indicated that you wanted it to work that way.
Here's a rewrite of the original suggestion using a killswitch methodology:
Code:<variables> <var name="MagicalDefense">None</var> <var name="MDTElement">Neutral</var> <var name="MDTModes">Firaga V|Stonega V|Waterga V|Aeroga V|Blizzaga V|Thundaga V|Banish V|Bio V|Diaga V</var> <var name="MDTOn">Aegis Schism</var> <var name="Killswitch">Barbed Crescent</var> </variables> <sets> -- as you have them, plus a "None" set without any gear <rules> <if Spell="$MDTModes"> <cancelspell /> <if spell="Diaga V"> <!-- Neutral element --> <var cmd="set MDTElement Neutral" /> </if> <else> <!-- Stonega V, Waterga V, Aeroga V, Firaga V, Blizzaga V, Thundaga V, Banish V, Bio V --> <var cmd="set MDTElement %SpellElement" /> </else> <if advanced='"$MagicalDefense" != "None"'> <var cmd="set MagicalDefense MDT-$MDTElement" /> </if> <addtochat>Magical Defense Element: $MDTElement</addtochat> <equip set="Standing|$MagicalDefense" /> <return /> </if> <elseif Spell="$MDTOn"> <cancelspell /> <var cmd="set MagicalDefense MDT-$MDTElement" /> <addtochat>Magical Defense: $MagicalDefense</addtochat> <equip set="Standing|$MagicalDefense" /> <return /> </elseif> <elseif Spell="$Killswitch"> <cancelspell /> <var cmd="set MagicalDefense None" /> <addtochat>Magical Defense: Off</addtochat> <equip set="Standing|$MagicalDefense" /> <return /> </elseif> ... <equip when="aftercast" set="Standing|$MagicalDefense" /> </rules>
Thanks a bunch!
I'm going to try this out in a bit.
One question though... on the two lines you have as:
Could I alter it an add a line after that so it looks like:Code:<equip when="aftercast" set="Standing|$MagicalDefense" />
Engaged set = regular TP gear...Code:<equip when="engaged|aftercast" set="Engaged|$MagicalDefense" /> <equip when="idle|aftercast" set="Standing|$MagicalDefense" />
Idle set = regular TP gear, except feet are Hermes Sandals (I don't care too much if I stay in MDT gear after becoming disengaged other than Hermes Sandals)
Figured I'd ask before I try it and mess up.
Nevermind I figured out why it wasn't working
Woops, the killswitch one shouldn't be using aftercast. Took that out.
As for the Hermes, a better way of handling that is adding:
And then all the equip lines should be:Code:<var name="Movement">None</var> <set name="Move|Kite"> <feet>Hermes' Sandals</feet> </set> <if Spell="Autoset"> <if status="Engaged"> <var cmd="set Movement None" /> </if> <else> <var cmd="set Movement Move" /> </else> </if>
Code:<equip when="aftercast" set="Standing|$MagicalDefense|$Movement" /> or <equip set="Standing|$MagicalDefense|$Movement" />
Thanks again!
What you are calling "Standing" is what should be my TP set? Had that as my idle set initially... that's an easy fix though...
It was still being a little wonky with the sandals...
Made a test file and changed the last line to:
That seems to work, other than staying in WS gear after a battle if I happen to kill the mob with a WS...Code:<equip when="engaged|aftercast" set="Standing|$MagicalDefense|$Movement" /> <equip when="idle|aftercast" set="$MagicalDefense|$Movement" />
I'm calling it that because you never defined $CurrentSet, so I used what you indicated was your TP gear set.
Also, you're defining aftercast in both of those rules. As such, only the second one will take effect. It does not mean "aftercast when engaged vs aftercast when idle", it means "when switching to engaged mode or *any* aftercast, followed by when switching to idle mode or *any* aftercast".
Could it be done with a setup like this?
If: status = engaged; equip tpset|magicdef
Elseif: status = idle; equip magicdef|movement
Lazily laid out, because I'm posting from an iPod, but that general logic...
Yes, that would work.
If variables aren't working, the first thing to check is to see what Spellcast evaluates the variable as. Add the following somewhere in the spellcast and trigger the output:
If you end up with something odd, you can start figuring out where the problem is. For example, misspelled %spellelement, a variable named $staff (so you end up with ThisOtherStaffFire or something similar), or whatever.Code:<addtochat>Var: $staff-%spellelement</addtochat>
So far this seems to be working perfectly. I think there are some redundancies, but I'm happy the kinks seem to be worked out at least...
Code:<if Spell="Autoset"> <if status="Engaged"> <var cmd="set Movement None" /> </if> <else> <var cmd="set Movement Move" /> </else> </if> <if Spell="$MDTModes"> <cancelspell /> <if spell="Diaga V"> <!-- Neutral element --> <var cmd="set MDTElement Neutral" /> </if> <else> <!-- Stonega V, Waterga V, Aeroga V, Firaga V, Blizzaga V, Thundaga V, Banish V, Bio V --> <var cmd="set MDTElement %SpellElement" /> </else> <if advanced='"$MagicalDefense" != "None"'> <var cmd="set MagicalDefense MDT-$MDTElement" /> </if> <addtochat>Magical Defense Element: $MDTElement</addtochat> <equip set="MNK-TP|$MagicalDefense|$Movement" /> <return /> </if> <elseif Spell="$MDTOn"> <cancelspell /> <var cmd="set MagicalDefense MDT-$MDTElement" /> <addtochat>Magical Defense: $MagicalDefense</addtochat> <equip set="MNK-TP|$MagicalDefense|$Movement" /> <return /> </elseif> <elseif Spell="$Killswitch"> <cancelspell /> <var cmd="set MagicalDefense None" /> <addtochat>Magical Defense: Off</addtochat> <equip set="MNK-TP|$MagicalDefense|$Movement" /> <return /> </elseif> <if status="engaged"> <equip when="engaged|aftercast" set="MNK-TP|$MagicalDefense" /> </if> <elseif status="idle"> <equip when="idle|aftercast" set="Standing|$MagicalDefense|$Movement" /> </elseif> <else> <equip when="idle|aftercast" set="Standing|$MagicalDefense|$Movement" /> </else>
Yeah, seems to be working 100% - thanks a ton for all the help Motenten!
I actually have one other question - a pretty simple one...
Does "midcast" exist on JAs?
Rarely my chakra set will lag a bit... I think it's related to just hitting the macro at an awkward time, during another gear swap or something...
Would it make any difference?Code:<if Spell="Chakra"> <action type="equip" when="Precast" set="Chakra"/> </if> vs <if Spell="Chakra"> <action type="equip" when="Precast|Midcast" set="Chakra"/> </if>
I remember reading that midcast can be used on JAs (the same sort of timing is used regardless of type), but since the JA will have already completed there's no real point.
You've probably already done this in the rest of your code, but sticking the MDT killswitch's command at the top of your PDT switch (assuming you want PDT and MDT to be mutually exclusive), and vice versa, will ensure there's no undesired overlap. Your TP switch should call both your MDT and PDT killswitches.
I will try this when I get home; but I guess logically it made sense that if I could pull up a set name based on %Type or %skill in a rule, then you should be able to put a set with <main>$Staff-%Spellelement</main> w/o setting any sort of variable command line.
Or is it because I've created the variable myself, I'm forced to call it up with a var cmd line? (As opposed to the others which are already recognized by SC)
It doesn't matter what you think you have, Spellcast may not evaluate it the way you expect. For example, I had some vars named like T3-Fire, AM-Fire, Brd-Fire, etc. T3-Fire evaluated as expected, but neither AM-Fire nor Brd-Fire would. I changed them to TAM-Fire and TBrd-Fire, etc, and some of them worked but not all of them. Finally changed to T-AM-Fire and T-Brd-Fire to get it to work. Still no idea what the problem was.
Because of that, when debugging you need to see what's -actually- there before trying to guess what's going wrong.
I have no idea if this can be done. My knowledge of .xml is little next to nothing but can a script Summon/release summons then every time Blood Pact Rage: Ward is up it would do one based on the summon that's up release and repeat?
Something like:
If Carbuncle: -> Healing Ruby
If Garuda -> Aerial Armor
If Shiva -> Frost Armor
If Ramuh -> Rolling Thunder
If Ifrit -> Crimson Howl
If Titan -> Earthen Ward
If Leviathan -> Spring Water
If Fenrir -> Ecliptic Growl
If Diabolos -> Noctoshield
I know there's one that summons and releases all the summons but from what I've read that seems super slowish now.
I tried to clean up some redundancies in my script.
Code:<if Spell="Autoset"> <if status="Engaged"> <var cmd="set Movement None" /> </if> <else> <var cmd="set Movement Move" /> </else> </if> <elseif Spell="$MDTOn"> <cancelspell /> <var cmd="set MagicalDefense MDT-$MDTElement" /> <var cmd="set PhysicalDefense None" /> <addtochat>Magical Defense: $MagicalDefense</addtochat> <equip set="MNK-TP|$PhysicalDefense|$MagicalDefense|$Movement" /> <return /> </elseif> <elseif Spell="$PDTOn"> <cancelspell /> <var cmd="set MagicalDefense None" /> <var cmd="set PhysicalDefense PDT" /> <addtochat>Physical Defense: On</addtochat> <equip set="MNK-TP|$PhysicalDefense|$MagicalDefense|$Movement" /> <return /> </elseif> <elseif Spell="$Killswitch"> <cancelspell /> <var cmd="set MagicalDefense None" /> <var cmd="set PhysicalDefense None" /> <addtochat>Phys./Mag. Defense: Off</addtochat> <equip set="MNK-TP|$PhysicalDefense|$MagicalDefense|$Movement" /> <return /> </elseif> <equip set="MNK-TP|$PhysicalDefense|$MagicalDefense|$Movement" /> <equip when="aftercast" set="MNK-TP|$PhysicalDefense|$MagicalDefense|$Movement" />
EDIT: Quoted portion is the problem I was having... I figured it out though... added "engaged|idle" to the when="aftercast" part.Hermes' Sandals weren't switching to Tantra Gaiters upon engaging... I thought it was an issue with the $movement setup... then I realized landing a killshot with my a WS left me standing in my WS gear.
I put on a mess of random gear, and engaged a mob. The gear didn't switch at all.
Aftercast is working just fine, and the MDT/PDT gear swaps are working perfectly, but no gear swaps are being made when engaging/disengaging.
The issue is probably glaringly obvious to someone with more experience... any ideas?
Motenten, if you read this, you can rest easy that I've at least learned something from all of this.
I was thinking of adding something like this...
What I want with that is to have it trigger when I engage a mob, kind of as a reminder to switch out of PDT/MDT if I want to (blinkmenot sometimes makes it hard to remember...) What would be the syntax for the instant you engage a mob?Code:<if PhysicalDefense = "PDT"> <addtochat>PDT On</addtochat> </if> <elseif>MagicalDefense = "MDT-$Element"> <addtochat>MDT On</addtochat> </elseif> <else> <addtochat>TP Gear On</addtochat> </else>