Equip Grip Error And Spellcast Help

Language: JP EN DE FR
users online
Forum » Windower » Spellcast Scripting » White Mage » Equip grip error and Spellcast help
Equip grip error and Spellcast help
 Carbuncle.Divinite
Offline
Server: Carbuncle
Game: FFXI
user: Divinite
Posts: 26
By Carbuncle.Divinite 2013-06-01 13:36:04
Link | Quote | Reply
 
Hello,

I'm relatively new to Spellcast and working with XML. There are a few things I'm trying to accomplish for now before moving into advanced areas. I wanted to see if anyone has experience with this and can point me in the right direction. Any help would be greatly appreciated.

1. In situations where I swap from Club/Shield to Staff/Grip, I intermittently get the error "You must have a two-handed weapon equipped in the main weapon slot in order to equip a grip". I cannot consistently reproduce this issue, so it seems to come up at random times. At this point, if I open my equip menu, the staff will be equipped but NOT the grip, which is what I would expect given the error.

2. I'm not trying to setup fast cast sets just yet, but I would like to take advantage of some of the gear I do have. Take the AF3+2 legs for instance. I would like to make sure it's equipped before the cure begins casting. What I did to try and achieve this was add a <castdelay delay=".1"/> before each spell. There may be more elegant ways of accomplishing this, but this is what I came up with my research.

Sidenote: I have seen some examples of setting up base sets as apposed to the way I'm doing it (coming from simple windower scripts), but I don't see what advantage it offers other than reducing lines in the file.

WHM XML updated 11/16/13
Code
<?xml version="1.0" ?>

<spellcast>

	<guildwork
		character="Divinite"
		server="Carbuncle"
		job="WHM"
		/>

	<config Debug="false"
		ShowGearSwaps="false"/>

	<sets>
		<group name="WHM" default="yes">

			<set name="IDLE">
				<main>Owleyes</main>
				<head>Wivre Hairpin</head>
				<neck>Twilight Torque</neck>
				<lear>Moonshade Earring</lear>
				<rear>Ethereal Earring</rear>
				<body>Cleric's Briault +2</body>
				<hands>Serpentes Cuffs</hands>
				<lring>Defending Ring</lring>
				<rring>Dark Ring</rring>
				<back>Umbra Cape</back>
				<waist>Witful Belt</waist>
				<legs>Rubeus Spats</legs>
				<feet>Serpentes Sabots</feet>
				<sub>Genbu's Shield</sub>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="HASTE">
				<main>Celeritas Pole</main>
				<head>Xux Hat</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Cleric's Briault +2</body>
				<hands>Bokwus Gloves</hands>
				<lring>Defending Ring</lring>
				<rring>Dark Ring</rring>
				<back>Swith Cape</back>
				<waist>Witful Belt</waist>
				<legs>Rubeus Spats</legs>
				<feet>Serpentes Sabots</feet>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="CURE">
				<main>Arka IV</main>
				<head>Orison Cap +2</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Orison Bliaud +2</body>
				<hands>Bokwus Gloves</hands>
				<lring>Sirona's Ring</lring>
				<rring>Ephedra Ring</rring>
				<back>Swith Cape</back>
				<waist>Witful Belt</waist>
				<legs>Orison Pantaloons +2</legs>
				<feet>Cure Clogs</feet>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="BAR">
				<main>Beneficus</main>
				<head>Orison Cap +2</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Orison Bliaud +2</body>
				<hands>Orison Mitts +2</hands>
				<lring>Sirona's Ring</lring>
				<rring>Ephedra Ring</rring>
				<back>Swith Cape</back>
				<waist>Witful Belt</waist>
				<legs>Cleric's Pantaloons +2</legs>
				<feet>Orison Duckbills +2</feet>
				<sub>Genbu's Shield</sub>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="ENHANCE">
				<main>Beneficus</main>
				<head>Xux Hat</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Cleric's Briault +2</body>
				<hands>Bokwus Gloves</hands>
				<lring>Sirona's Ring</lring>
				<rring>Ephedra Ring</rring>
				<back>Swith Cape</back>
				<waist>Siegel Sash</waist>
				<legs>Cleric's Pantaloons +2</legs>
				<feet>Orison Duckbills +2</feet>
				<sub>Genbu's Shield</sub>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="HEALING">
				<main>Celeritas Pole</main>
				<head>Orison Cap +2</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Orison Bliaud +2</body>
				<hands>Orison Mitts +2</hands>
				<lring>Sirona's Ring</lring>
				<rring>Ephedra Ring</rring>
				<back>Swith Cape</back>
				<waist>Witful Belt</waist>
				<legs>Orison Pantaloons +2</legs>
				<feet>Orison Duckbills +2</feet>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="NUKE">
				<main>Iridal Staff</main>
				<head>Xux Hat</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Cleric's Briault +2</body>
				<hands>Bokwus Gloves</hands>
				<lring>Sirona's Ring</lring>
				<rring>Ephedra Ring</rring>
				<back>Swith Cape</back>
				<waist>Witful Belt</waist>
				<legs>Rubeus Spats</legs>
				<feet>Serpentes Sabots</feet>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="REGEN">
				<main>Beneficus</main>
				<head>Xux Hat</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Cleric's Briault +2</body>
				<hands>Orison Mitts +2</hands>
				<lring>Sirona's Ring</lring>
				<rring>Ephedra Ring</rring>
				<back>Swith Cape</back>
				<waist>Siegel Sash</waist>
				<legs>Rubeus Spats</legs>
				<feet>Orison Duckbills +2</feet>
				<sub>Genbu's Shield</sub>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="STONE">
				<main>Earth Staff</main>
				<head>Xux Hat</head>
				<neck>Orison Locket</neck>
				<lear>Orison Earring</lear>
				<rear>Loquacious Earring</rear>
				<body>Cleric's Briault +2</body>
				<hands>Bokwus Gloves</hands>
				<lring>Sirona's Ring</lring>
				<rring>Ephedra Ring</rring>
				<back>Swith Cape</back>
				<waist>Siegel Sash</waist>
				<legs>Cleric's Pantaloons +2</legs>
				<feet>Orison Duckbills +2</feet>
				<ammo>Incantor Stone</ammo>
			</set>

			<set name="RESTING">
				<main>Iridal Staff</main>
				<head>Wivre Hairpin</head>
				<neck>Twilight Torque</neck>
				<lear>Moonshade Earring</lear>
				<rear>Ethereal Earring</rear>
				<body>Cleric's Briault +2</body>
				<hands>Serpentes Cuffs</hands>
				<lring>Paguroidea Ring</lring>
				<rring>Sheltered Ring</rring>
				<back>Umbra Cape</back>
				<waist>Witful Belt</waist>
				<legs>Rubeus Spats</legs>
				<feet>Serpentes Sabots</feet>
				<ammo>Incantor Stone</ammo>
			</set>

		</group>

	</sets>

	<rules>

		<equip when="idle|aftercast" set="IDLE"/>
		<equip when="resting" set="RESTING"/>

		<if spell="Cure*|Cura*">
			<castdelay delay="0.2"/>
			<equip when="precast" set="CURE"/>
		</if>

		<elseif spell="Poisona|Paralyna|Blindna|Silena|Stona|Viruna|Cursna|Erase|Sacrifice|Esuna|Raise*|Reraise*">
			<castdelay delay="0.2"/>
			<equip when="precast" set="HEALING"/>
		</elseif>

		<elseif spell="Haste|Stun">
			<castdelay delay="0.2"/>
			<equip when="precast" set="HASTE"/>
		</elseif>

		<elseif spell="Slow|Paralyze|Silence|Dia*|Flash|Addle|Repose|Holy*|Banish*">
			<castdelay delay="0.2"/>
			<equip when="precast" set="NUKE"/>
		</elseif>

		<elseif spell="Protect*|Shell*|Blink|Aquaveil|Auspice|Invisible|Sneak|Deodorize|Boost*">
			<castdelay delay="0.2"/>
			<equip when="precast" set="ENHANCE"/>
		</elseif>

		<elseif spell="Stoneskin">
			<castdelay delay="0.2"/>
			<equip when="precast" set="STONE"/>
		</elseif>

		<elseif spell="Regen*">
			<castdelay delay="0.2"/>
			<equip when="precast" set="REGEN"/>
		</elseif>

		<elseif spell="Bar*">
			<castdelay delay="0.2"/>
			<equip when="precast" set="BAR"/>
		</elseif>

	</rules>

</spellcast>	
 Cerberus.Mirril
Offline
Server: Cerberus
Game: FFXI
user: flywacket
Posts: 44
By Cerberus.Mirril 2013-06-01 13:58:26
Link | Quote | Reply
 
Try putting your main hand weapon at the top of the list in your item set and the sub weapon/grip/shield in the lowest spot on the list in your item set. Same trick works when equipping two same-name rings or earrings. Space them out, that's what I do. I can't assure you it will be perfect, and if someone has a better solution, I'd love to hear it =D
 Carbuncle.Divinite
Offline
Server: Carbuncle
Game: FFXI
user: Divinite
Posts: 26
By Carbuncle.Divinite 2013-06-01 14:15:55
Link | Quote | Reply
 
Thanks! I'll definitely give this a shot and reply back if it doesn't work.
 Carbuncle.Divinite
Offline
Server: Carbuncle
Game: FFXI
user: Divinite
Posts: 26
By Carbuncle.Divinite 2013-06-02 00:07:03
Link | Quote | Reply
 
Thus far your suggestion seems to have worked, thanks!

I'm also hoping someone can check me on my casting delays and if I'm doing it correctly. I've seen lots of Spellcasts making use of precast delays and such but am unsure what would suit what I'm trying to do. Open to any suggestions for improvement.
 Carbuncle.Divinite
Offline
Server: Carbuncle
Game: FFXI
user: Divinite
Posts: 26
By Carbuncle.Divinite 2013-06-04 12:42:39
Link | Quote | Reply
 
I guess I spoke too soon :/ The issue is still happening even after moving the ammo and sub to the bottom of the set. It's not often, but it does happen, causing no grip to be equipped. It's strange I never had this problem using simple Windower scripts. Can anyone else suggest a possible fix?
 Sylph.Hitetsu
Offline
Server: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2013-06-04 16:35:57
Link | Quote | Reply
 
Carbuncle.Divinite said: »
I guess I spoke too soon :/ The issue is still happening even after moving the ammo and sub to the bottom of the set. It's not often, but it does happen, causing no grip to be equipped. It's strange I never had this problem using simple Windower scripts. Can anyone else suggest a possible fix?

<equip when="precast" set="stuff1" />
<equip when="midcast" set="stuff1" />

It'll run the set equip twice.

Alternatively, you could use <equip when="midcast">
<slot>Stuff</slot>
</equip>


Also, Spellcast separates things by default - the problem is timing. Spellcast equips gear faster than Windower macros from what I've seen, so you may need a cast delay.
 Carbuncle.Divinite
Offline
Server: Carbuncle
Game: FFXI
user: Divinite
Posts: 26
By Carbuncle.Divinite 2013-06-05 15:53:56
Link | Quote | Reply
 
Sylph.Hitetsu said: »
Carbuncle.Divinite said: »
I guess I spoke too soon :/ The issue is still happening even after moving the ammo and sub to the bottom of the set. It's not often, but it does happen, causing no grip to be equipped. It's strange I never had this problem using simple Windower scripts. Can anyone else suggest a possible fix?

<equip when="precast" set="stuff1" />
<equip when="midcast" set="stuff1" />

It'll run the set equip twice.

Alternatively, you could use <equip when="midcast">
<slot>Stuff</slot>
</equip>


Also, Spellcast separates things by default - the problem is timing. Spellcast equips gear faster than Windower macros from what I've seen, so you may need a cast delay.

I've been trying your suggestion so far and it seems to be working. I saw you included some midcast options to try, but since I'm not using any midcasts whatsoever, I just put them in as precast (I'm trying to make sure my fast cast grip is equipped -before- casting)

I moved the strap out of my sets so my cure rule now looks like this:
Code
	<if spell="Cure*|Cura*">
			<equip when="precast" set="CURE"/>
			<equip when="precast">
				<sub>Vivid Strap</sub>
			</equip>
		</if
 Carbuncle.Divinite
Offline
Server: Carbuncle
Game: FFXI
user: Divinite
Posts: 26
By Carbuncle.Divinite 2013-06-06 12:14:37
Link | Quote | Reply
 
It's still not working. I'm not really sure what else to try at this point. I don't think I would have the problem if I always used a staff/grip combo. The only other thing I can think of would be adding some kind of delay between the "cure set equip" and the "grip equip". I'm just not really sure it'd be worth it at that point for 1% fast cast lol :P

I also did some testing on cast time. My spells don't have any fast cast unless I put in a 0.2 delay at the top. I tested this with curaga (4.5s cast time). So that cleared up part of what I was doing.
necroskull Necro Bump Detected! [32 days between previous and next post]
 Ragnarok.Achira
Offline
Server: Ragnarok
Game: FFXI
user: Achira
Posts: 16
By Ragnarok.Achira 2013-07-08 03:29:05
Link | Quote | Reply
 
I know I'm a bit late to the party, but wanted to add that you may need to keep a couple of thins in mind: first, a fast cast set as a precast set for a spell that takes less than 2-ish seconds to cast won't work. Second, depending on your latency issues, you may have to employ a mid cast delay.

As far as your code goes, you can't put the cast delay at the top. You need to put it in each rule. Did you try that?
 Quetzalcoatl.Hidegger
Offline
Server: Quetzalcoatl
Game: FFXI
user: Hidegger
Posts: 130
By Quetzalcoatl.Hidegger 2013-07-08 03:52:35
Link | Quote | Reply
 
the error occurs for me only when 2 independent items occupy main and sub slots and changing into a set with sub dependent on main. This doesn't always cause a problem but for me setting up precast/fastcast to remove either the main or the sub fixes this.

so Idle
<main>Owleyes</main>
<sub>Genbu Shield</sub>

Fastcast ex1
<main>Winged Wand</main>
<sub>remove</sub>

Fastcast ex2
<main>remove</main>
<sub>Genbu's Shield</sub>

and for a Magian Staff as the fastcast I would just not bother with Vivid Strap so the midcast resolves properly, ~1% fast cast isn't worth your spell not gaining the fullest benefits
 Ragnarok.Achira
Offline
Server: Ragnarok
Game: FFXI
user: Achira
Posts: 16
By Ragnarok.Achira 2013-07-08 05:22:43
Link | Quote | Reply
 
Quetzalcoatl.Hidegger said: »
the error occurs for me only when 2 independent items occupy main and sub slots and changing into a set with sub dependent on main. This doesn't always cause a problem but for me setting up precast/fastcast to remove either the main or the sub fixes this.

Oh that's not a bad idea. I actually switched to just using clubs on WHM and SCH (healer role) because I was always having shield/grip conflicts.
necroskull Necro Bump Detected! [131 days between previous and next post]
 Carbuncle.Divinite
Offline
Server: Carbuncle
Game: FFXI
user: Divinite
Posts: 26
By Carbuncle.Divinite 2013-11-16 15:05:55
Link | Quote | Reply
 
Hi thanks for the response. I had been taking a break for a few months so hadn't been checking this. I am interested in what you're saying.

First, let me reiterate that I'm not trying to create a separate fast cast and cast set. I'm only creating one set that starts and ends the spell. I really just want the gear to be on my character before they start casting the spell to get the most out of the fast cast gear I'm using.

Quote:
first, a fast cast set as a precast set for a spell that takes less than 2-ish seconds to cast won't work. Second, depending on your latency issues, you may have to employ a mid cast delay.

Would you be able to explain this further? A precast set should in theory get equipped before the spell begins casting, so why won't that work?

Quote:
As far as your code goes, you can't put the cast delay at the top. You need to put it in each rule. Did you try that?

I didn't know this was necessary, but I went ahead and added the cast delay to each of the rules just in case. Thanks!

PS. I have my updated code in my OP and I decided to just get rid of the Vivid Strap ^^
Log in to post.