<if area="Abyssea*"> then. I've never seen anyone use wild card stuff within advanced rules, so I doubt that they work. They're probably being read as literally Abyssea* rather than Abyssea(Any character after this).
That seems to work. I've always used advanced rules with various rules. Examples:
Code:<elseif spell="Ranged"> <if advanced='"%SpellTargetDistance" > "24.9"'> <return /> </if> </elseif>Code:<if advanced = '"%zone" == "Abyssea - Konschtat"'> <var cmd = 'set zti kon' /> </if>Admittedly each of these has an exact value and no wildcards.Code:<if mode="OR" NOTadvanced='%TPAfterCast < 0' advanced='%TPAfterCast = 0'> <equip when = "precast|midcast" set = "Step" /> </if>
Next question: How do I get spellcast to recognize if I have one of multiple possible weapons equipped? I know I have to test for exact name, but whenever I try to use a variable more than once it gives me problems.
Trying to use this, but each time it gives me a message 'Attribute equipMain redefined':
Code:<if mode="OR" equipMain="Caduceus" equipMain="Kitty Rod" equipMain="Rounsey Wand"> do stuff </if>
Use pipes.
<if equipmain="Caduceus|Kitty Rod|Rounsey Rod">
You can use wildcards here as well. "Caed*|Kitty*|*Rod" would be fine, though probably too general.I know I have to test for exact name
I don't recall ever seeing one. Well atleast on the Windower site anyway Does one exist? I wanted to try to work on brd at some point and wanted to keep songs close to cap as much as I could....
I knew this. What I was actually meaning was I couldn't call a weapon type, but had to go by name. So something like <if equipmain=staff> wouldn't work, but <if equipmain="*staff"> would for anything named 'XXX staff'.
Thanks again Yugl and Radec for all the help you've given.
Mind my asking why? I use 0/1 for a lot of things out of habit but if it's poor practice that would be good to know.
I honestly don't remember why I set it up to do an integer check instead of the typical string comparison, may revert that since the string comparison is a more standard format for Spellcast. There shouldn't be any functional difference in that context.
I use 1/0 in several xmls as true/false checks and as far as I can tell, haven't had a problem with them acting properly. I'd also like to know a good reason to not use 1/0, if there is one.
There's nothing technically wrong with doing so (it won't break anything), but it's a weaker choice from a 'best practices' point of view (though admittedly that's from someone that works at the scope of framework APIs).
The main issue is that something like $Utsusemi = 0 or $Utsusemi = 1 doesn't have any semantic meaning; you have to derive the meaning from the context of the code around it. Whereas $UtsusemiActive = Yes or $UtsusemiActive = No provides its own semantics, and you can verify that the code it controls fits within those semantics rather than the other way around.
I actually revised that spellcast a few days ago (don't worry, the sets are pretty much the same), and here is the new version:
Includes:
Yugl-Include.xml
Byrth-Include.xml
Spellcast: Byrth_DNC.xml
Autoexec: autoexec.xml
Resources: status.xml
Most of my include functions are modified versions of Yugl's functions. I prefer to be able to toggle things instead of having a reset button, and he likes having a reset button. If you want to switch it back to his mode, you just go into the Spellcast xml and change Byrth-Include to Yugl-Include on the relevant lines. Also, instead of having the return rule kill any WS attempts that it processes at less than 100TP, mine allows them to process at or below 85TP. It lets you WS a little faster (you don't have to wait for the cast delay after getting 100TP).
"Installing" the spellcast (all inside the plugins folder):
You need to replace the "status.xml" in the Resources folder with the one above. You put the "autoexec.xml" in the autoexec folder. The two includes are just stuck into the Spellcast folder and named as above. Change the "Byrth_DNC.xml" to be "Yourname_DNC.xml" Change the gearsets to match your own. I tried to put comments in that say what is what, so you should be able to figure it out either by looking at the sets or reading the comments.
This version eliminates the lag and is minorly changed from the last version I posted here (I split out an include file for my variations on Yugl's functions, basically).
The link is to the old include. Do you want me to keep that one there for people to use in case I modify whatever they're supposed to change? And the resources file is for...durations?
Edit: Fuck, I just remembered that I should add the minor additions to the BLU XML (Sleep durations and Utsu > Occultation). At least people can copy pasta their sets over.
Oh, I just tried to link the most recent includes from your user page. Where is the newest one?
The resources file renames the five statuses named "Finishing Move" to "Finishing Move 1", "Finishing Move 2", etc. so I can tell the difference between them when people use Building Flourish (which effectively gives a Berserk effect when used with 2+ FMs.)
http://pastebin.com/BtAREr77
Are people at windower willing to auto-insert modified resources whenever they update?
I don't know. I haven't asked. It's not very hard for me to go in and change it though. The spellcast doesn't break if it isn't replaced or something, and it's a pretty minor part of the whole thing (because no one uses Building), but I was working on it for the Dancer return rules in my include.
ok ive looked and looked, tryin to run Yugl's mnk xml, opens fine in xml editor, when i try to open in windower holy popups, main error in windower is: XML Parsing error: line 0 - invalid XPath on file included and no fallback, updated include fixed that issue and loads fine now but no gear swaps will activate, loads group r, equipment changed in xml event load set command will not initiate set change, any ideas?
Try unloading and reloading SC if you haven't. I understand what you mean by no gear swaps activate, but I don't know what you mean by the other two problems.
I've used 0/1 for a while now in Spellcast and elsewhere, it's clearly functional. I try to maintain good practice/"style" in my code though, so sometimes minor aesthetic/backend design choices like this arise. Motenten makes a good point: yes/no or on/off are more explicit and thus friendlier to other users/coders and even yourself if you're working with a lot of code and don't immediately recall what each variable is doing. 0/1 is ambiguous; it could be a variety of things and you have to figure out which applies from the surrounding code.