|
|
Spellcast NIN AF Boots XML
By Hotelsoap 2011-08-02 14:42:29
I've recently begun to use the Spellcast plugin for Windower and have everything I need but one thing... A command that changes my AF3 +2 boots/Danzo's to my NIN AF1 boots from 18:00-06:00 while I'm idle. I've looked almost everywhere and can't seem to find a working command, the current one I'me trying is: <if mode="OR" timeLT="06.00" timeGT="17.59">
<equip when="Idle">
<feet lock="yes">Ninja Kyahan</feet>
</equip>
</if> If anyone has a working command please post, or if there's something I've done wrong in there lemme know.
Cerberus.Kelhor
Administrator
Server: Cerberus
Game: FFXI
Posts: 136
By Cerberus.Kelhor 2011-08-02 14:48:51
If you want them to just automatically change while you're standing there, without any input on your part, you need to look into something like autoexec. Spellcast only takes action when a command is entered. Is that what you meant?
Bismarck.Phaded
Server: Bismarck
Game: FFXI
By Bismarck.Phaded 2011-08-02 14:51:08
Off the top of my head try this at end of xml:
<if status="Idle">
<if mode="OR" TimeGT="17.59" TimeLT="6.00">
<equip when="Idle|Midcast|Aftercast">
<feet lock="yes">Ninja Kyahan</feet>
</equip>
</if>
</if>
Place Danzo in your standard Idle set. Should swap to AF1 at proper time. Probably a simpler way to do it, but meh.
Sylph.Zefyr
Server: Sylph
Game: FFXI
Posts: 196
By Sylph.Zefyr 2011-08-02 14:59:34
Cerberus.Kelhor said: If you want them to just automatically change while you're standing there, without any input on your part, you need to look into something like autoexec. Spellcast only takes action when a command is entered. Is that what you meant?
This. I recently ran into the same problem. The issue with spellcast is that the rules are only checked when a JA/WS/MA is used, so nothing necessarily happens when the time changes - at least until you use an ability of some sort. In my setup, I use a regular game macro to swap into my running gear (/sc set moveplus). The pieces needed beyond that are:
autoexec.xml to set the DayOrNight spellcast variable (you'll need to tweak the times - these are for Danzo and Ninja Kyahan +1, so the Night window is a bit longer than yours needs to be): Code xml
<?xml version="1.0"?>
<autoexec>
<register event="time_17.*|time_18.*|time_19.*|time_2*.*|time_0.*|time_1.*|time_2.*|time_3.*|time_4.*|time_5.*|time_6.*">sc var set DayOrNight Night</register>
<register event="time_7.*|time_8.*|time_9.*|time_10.*|time_11.*|time_12.*|time_13.*|time_14.*|time_15.*|time_16.*">sc var set DayOrNight Day</register>
</autoexec>
Two spellcast variables: Code xml
<variables clear="true">
<var name="Feet-Day">Danzo Sune-ate</var>
<var name="Feet-Night">Ninja kyahan +1</var>
</variables>
and a spellcast set... the $DayOrNight variable expands into either "Day" or "Night" based on the autoexec events, so then the feet section below ends up using either the $Feet-Day variable or the $Feet-Night variable depending on the time. Code xml
<set name="moveplus">
<hands>Iga Tekko +2</hands>
<feet>$Feet-$DayOrNight</feet>
<body>Iga Ningi +2</body>
</set>
Since the actual swapping-into-gear is done with a game macro, no rules are needed. If you wanted your feet to swap automatically, you would need to screw around with autoexec further to pull it off. Personally, I'd rather control the set that I'm in by hand.
The only other downside is that if I'm running around while the time changes, I suddenly slow down and I have to hit my moveplus macro again. No big deal, but maybe solveable with further autoexec stuff.
[+]
By Hotelsoap 2011-08-02 15:05:39
Thanks guys for your input, I'll try out Autoexec and Phaded's stuff as well.
Server: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2011-08-02 16:08:55
You don't want them locked so Phaded's code isn't a good choice, and Zefyr's is unnecessarily complicated. Do this:
Code xml <var name="NINIdleFeet">Danzo Sune-ate</var>
<if spell="Meteor">
<if mode="OR" TimeLT="6.00" TimeGT="17.59">
<var cmd="set NINIdleFeet Ninja Kyahan" />
</if>
<else>
<var cmd="set NINIdleFeet Danzo Sune-ate" />
</else>
<if status="idle"><equip when="precast" set="Idle" /></if>
<elseif status="engaged"><equip when="precast" set="$Melee" /></elseif>
<cancelspell />
<return />
</if>
Note that the last part where it equips sets is technically not required (cancelspell and return clean things up a bit but are also technically not required), but it'll swap you into the correct feet immediately and I also use Meteor as a dummy spell in case a gearswap doesn't fire properly (hence the engaged gearswap, plus I also have a day/night TP hands rule). Any set or time you want fastfeet to equip, just have them equip $NINIdleFeet (or whatever you choose to name the variable).
Autoexec: Code xml <register event="time_18.00" silent="true">input /ma "Meteor" <t></register>
<register event="time_6.00" silent="true">input /ma "Meteor" <t></register>
EDIT: Changed times and gear name, you're using NQ and I have +1.
Sylph.Zefyr
Server: Sylph
Game: FFXI
Posts: 196
By Sylph.Zefyr 2011-08-02 16:16:04
Fenrir.Nightfyre said:
Autoexec: Code xml <register event="time_18.00" silent="true">input /ma "Meteor" <t></register>
<register event="time_6.00" silent="true">input /ma "Meteor" <t></register>
The problem with this is that it defaults to Danzo, and it only checks the time at exactly 18:00 and 6:00, so if you log on (or switch to NIN) during the night time, you'll be running around in Danzo instead of the faster nin boots. A minor quibble, but it's the reason mine's "unnecessarily complicated".
Server: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2011-08-02 16:32:18
Sylph.Zefyr said: Fenrir.Nightfyre said:
Autoexec: Code xml <register event="time_18.00" silent="true">input /ma "Meteor" <t></register>
<register event="time_6.00" silent="true">input /ma "Meteor" <t></register>
The problem with this is that it defaults to Danzo, and it only checks the time at exactly 18:00 and 6:00, so if you log on (or switch to NIN) during the night time, you'll be running around in Danzo instead of the faster nin boots. A minor quibble, but it's the reason mine's "unnecessarily complicated". EDIT: Nevermind, I missed the wildcards. That does work, though you'd need an additional rule to swap automatically.
The part I was calling unnecessarily complicated was the way you handled your variables. The whole point of having a variable is being able to vary its value, so there's no reason to have a variable calling two more variables that each have a static value when you could just assign the first variable to the appropriate value. There are certainly situations where assigning a variable's value to another variable is a good approach, but this isn't one of them.
Server: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2011-08-02 16:33:59
Also, you can set additional autoexec triggers for login and job change if you so desire.
Sylph.Zefyr
Server: Sylph
Game: FFXI
Posts: 196
By Sylph.Zefyr 2011-08-02 16:50:08
The reason I did things the way I did is I specifically wanted to avoid a wacky spell hack like the Meteor thing. I cringe every time I see someone doing something like that in an example spellcast XML. Just personal preference.
Also, if I had it casting Meteor every single minute of the game, the spellcast engine would be processing all the rules every minute, which is likely to cause performance issues. If you want to have autoexec do something on every minute, it's better to have it just set a variable than trigger an evaluation of all your rules.
Edit: if you really wanted to avoid the dual-variable thing I did, you could do this instead: Code xml
<autoexec>
<register event="(nighttimes)">sc var set NINIdleFeet "Ninja Kyahan"</register>
<register event="(daytimes)">sc var set NINIdleFeet "Danzo Sune-ate"</register>
</autoexec>
I like having all of my gear-related text in the spellcast XML though instead of spread between multiple files. More logically straightforward to have autoexec simply indicate if it is currently day or night, and let spellcast handle the gear to use based on that condition.
Server: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2011-08-02 16:55:45
Sylph.Zefyr said: The reason I did things the way I did is I specifically wanted to avoid a wacky spell hack like the Meteor thing. I cringe every time I see someone doing something like that in an example spellcast XML. Just personal preference. I don't understand what's "wacky" about implementing a method to handle issues caused by a shitty game engine. If things like lag or an open menu didn't occasionally *** with my gearswaps, it would be completely unnecessary.
I get what your Autoexec is doing now and aside from the previously mentioned issue that it will not actually force a gearswap I think it's a decent design. Like I said, the Autoexec isn't what I was criticizing, it's your variable implementation.
Quote: Also, if I had it casting Meteor every single minute of the game, the spellcast engine would be processing all the rules every minute, which is likely to cause performance issues. If you want to have autoexec do something on every minute, it's better to have it just set a variable than trigger an evaluation of all your rules. <cancelspell />
<return />
Lakshmi.Greggles
Server: Lakshmi
Game: FFXI
Posts: 728
By Lakshmi.Greggles 2011-08-02 16:57:53
Sylph.Zefyr said: The reason I did things the way I did is I specifically wanted to avoid a wacky spell hack like the Meteor thing. I cringe every time I see someone doing something like that in an example spellcast XML. Just personal preference.
Also, if I had it casting Meteor every single minute of the game, the spellcast engine would be processing all the rules every minute, which is likely to cause performance issues. If you want to have autoexec do something on every minute, it's better to have it just set a variable than trigger an evaluation of all your rules.
Edit: if you really wanted to avoid the dual-variable thing I did, you could do this instead: Code xml
<autoexec>
<register event="(nighttimes)">sc var set NINIdleFeet "Ninja Kyahan"</register>
<register event="(daytimes)">sc var set NINIdleFeet "Danzo Sune-ate"</register>
</autoexec>
I like having all of my gear-related text in the spellcast XML though instead of spread between multiple files. More logically straightforward to have autoexec simply indicate if it is currently day or night, and let spellcast handle the gear to use based on that condition.
If you put the Meteor rule near the top of your XML, typing <return /> will cancel the rest of the parsing. Since Spellcast parses from the top to the bottom, doing it this way will save you a whole lot of parsing.
Edit: Changed a few words around <.<
Server: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2011-08-02 16:58:25
Sylph.Zefyr said: Edit: if you really wanted to avoid the dual-variable thing I did, you could do this instead: Code xml
<autoexec>
<register event="(nighttimes)">sc var set NINIdleFeet "Ninja Kyahan"</register>
<register event="(daytimes)">sc var set NINIdleFeet "Danzo Sune-ate"</register>
</autoexec>
I like having all of my gear-related text in the spellcast XML though instead of spread between multiple files. More logically straightforward to have autoexec simply indicate if it is currently day or night, and let spellcast handle the gear to use based on that condition. AutoExec indicates if it's day or night, then Spellcast sets the variable accordingly and potentially swaps your gear. It still works, you just need to adjust your design to accomodate. It would be more efficient to adjust in some manner anyway since your method currently requires some action on your part to actually implement the change every time you're idle, as opposed to just the occasional case where the rules can't process properly. I'm not a fan of suddenly dropping to normal movespeed at 7:00.
Sylph.Zefyr
Server: Sylph
Game: FFXI
Posts: 196
By Sylph.Zefyr 2011-08-02 17:01:57
Meh, as I stated in my original post
Sylph.Zefyr said: Personally, I'd rather control the set that I'm in by hand.
Take it or leave it OP, there's enough info here to decide which style you like more.
Server: Fenrir
Game: FFXI
Posts: 11681
By Fenrir.Nightfyre 2011-08-02 17:04:54
Sylph.Zefyr said: Meh, as I stated in my original post
Sylph.Zefyr said: Personally, I'd rather control the set that I'm in by hand.
Take it or leave it OP, there's enough info here to decide which style you like more. My method doesn't take you out of the appropriate set. That was the whole point of the second half of my Meteor rules, it forces you to equip the set you should be in.
[+]
Sylph.Zefyr
Server: Sylph
Game: FFXI
Posts: 196
By Sylph.Zefyr 2011-08-02 17:10:41
Yes, I understand your Meteor rules perfectly. I just don't like forcing spellcast to evaluate its rules that way.
Sylph.Zefyr said: The reason I did things the way I did is I specifically wanted to avoid a wacky spell hack like the Meteor thing. I cringe every time I see someone doing something like that in an example spellcast XML. Just personal preference.
Sylph.Zefyr said: Take it or leave it OP, there's enough info here to decide which style you like more.
Necro Bump Detected!
[290 days between previous and next post]
By Bahzell 2012-05-18 11:56:03
I know this is a bit of a necro, but the easiest way I found is to add these to your autoexec file.
Code <register event="time_18.00" silent="true">sc group night</register>
<register event="time_6.00" silent="true">sc group main</register>
<register event="time_18.00" silent="true">wait1; input /equip feet "Ninja Kyahan"</register>
<register event="time_6.00" silent="true">wait1; input /equip feet "Danzo Sune-Ate"</register>
Then I added a second group, with just the idle gear, inheriting all other gear from the main group. Code <group name="night" inherit="main">
<set name="Idle">
<feet>Ninja Kyahan</feet>
</set>
</group>
It does this swap mid fight, which can be a bit annoying, unless you're running like hell, then it may be a lifesaver. Since it changed groups, though, there's no fiddling with macros for gear. I'm pretty sure that if you're kiting and have locked your boots to avoid swapping to melee feet, it'll still swap your best kiting option in automatically, so when you see the time change coming, be prepared for the whole "Gear swap stopped my auto run" excitement.
I've recently begun to use the Spellcast plugin for Windower and have everything I need but one thing... A command that changes my AF3 +2 boots/Danzo's to my NIN AF1 boots from 18:00-06:00 while I'm idle. I've looked almost everywhere and can't seem to find a working command, the current one I'me trying is: <if mode="OR" timeLT="06.00" timeGT="17.59">
<equip when="Idle">
<feet lock="yes">Ninja Kyahan</feet>
</equip>
</if> If anyone has a working command please post, or if there's something I've done wrong in there lemme know.
|
|