Hello, everyone. I'm Techno from the Phoenix server and this is my include.xml file. If you've looked through the user-submitted XML files before you may have seen my multiple job XML. I went with the multiple job XML approach because I liked the idea of being able to reuse the rules I'd written without having to copy them between different XML files for different jobs.
You should note that I no longer play FFXI. This file will not be updated anymore. I am posting this final update on Nov. 9, 2010 in order to upload any changes I made before quitting during the time when I was unable to update this wiki entry. If you need some help with your Spellcast XML file, PM me on the forum and I will still probably be willing to help you. Please note, however, that I essentially know nothing about anything added in the Sept. 2010 update or afterward. I had become disillusioned with SE by that time and checked out of the game. I never broke the level 80 cap, I didn't order Scars of Abyssea, and I hated Trial of the Magians. Do not expect there to be any information about gear or abilities that were added in Sept. 2010 or afterward in this file.
Now that Spellcast v2.3 has been released in beta, however, I wanted to try out some of its new features. Specifically, I liked that it would automatically change to the appropriate XML file based on your job and subjob. So, I ended up splitting my single XML file into many. I lost some of the code reuseability in the process, but overall I'm happy with the switch. Of course, it's possible to retain reusable code with v2.3 through the use of an include file, which is what this page is about. Do you really need to make the switch to v2.3? Well, that depends. There's not really a need for someone like me who was using a single XML file for all their jobs. If, however, you were already using multiple XML files for your different jobs then you should seriously consider upgrading.
There are a few things you should know about v2.3. First is that the XML syntax has changed dramatically from previous versions. I've updated my XML files to the new syntax, which means that none of my XML files will work with previous versions of Spellcast. Second is the use of include statements. “Include” statements are a way of having a program take a piece of code from another file and automatically insert it at run time into another file. For instance, consider a list of elemental staff variables. If you had several different jobs that use them, say BLM, WHM, and SMN, and you used seperate XML files for each job, then you would have to copy the same variables to each file. If you had to change something, say you upgraded a staff from NQ to HQ, then you would have to edit each file.
With include statements then you can keep the list of staff variables in a single file. You can see my list of staves at the top of the XML code below. Then in your job XML files you put one line of code in the appropriate place in the file that links to your list. When your job XML file is loaded, it dynamically pulls the list of staves from the include file and inserts it into the job XML. If you have to edit the list, you make one change in the include file. All of my XML files that you'll find here on the wiki use include statements. As a result, none of them can stand alone. To understand what's going on in a job XML file, you'll have to refer to my include file too.
Since this is my include.xml file it doesn't really do anything on its own. It's just a list of code snippets that I wanted to be able to reuse across two or more files. Some examples are my rules for Cancel plugin support, the elemental staff rule, and elemental obi rules. I'll be uploading 3 of my job XML files, DRG, SMN, and BLU/NIN, to the wiki in addition to the include.xml file you see here. I think it gives a decent cross-section of what you can do in v2.3, specifically with include statements. There are additional comments throughout my files. Anyone may feel free to PM me on the forum for assistance, however, as I previously stated I no longer play FFXI. Please enjoy.
Some notes about the file:
Experienced Spellcast
XML users may notice my slightly odd variable naming scheme. For instance, I use $Staff-Fire instead of $FireStaff. The reason for this is simple. If you ask spellcast to list all the variables it's currently storing it will print them out in alphabetical order. If you have 20+ variables that it's storing then sorting through them to debug something is a pain in the ass. You end up with similar variables (like all the elemental staves) spread out through the list. Listing them as $Staff-Element keeps them all grouped together, enabling you to find the information you need quickly.
<?xml version="1.0" encoding="utf-8"?>
<includes>
<!-- Elemental Stave Constants -->
<include name="ElementalStaveConstants">
<var name="Staff-Fire">Fire Staff</var>
<var name="Staff-Ice">Ice Staff</var>
<var name="Staff-Wind">Wind Staff</var>
<var name="Staff-Earth">Earth Staff</var>
<var name="Staff-Thunder">Thunder Staff</var>
<var name="Staff-Water">Water Staff</var>
<var name="Staff-Light">Light Staff</var>
<var name="Staff-Dark">Dark Staff</var>
</include>
<!-- Elemental Obi Constants -->
<!-- Enter a value of "0" for any obis you DO NOT have. Enter the name of the obi for any obis that you do own. -->
<include name="ElementalObiConstants">
<var name="Obi-Fire">0</var>
<var name="Obi-Ice">Hyorin Obi</var>
<var name="Obi-Wind">Furin Obi</var>
<var name="Obi-Earth">0</var>
<var name="Obi-Thunder">Rairin Obi</var>
<var name="Obi-Water">0</var>
<var name="Obi-Light">Korin Obi</var>
<var name="Obi-Dark">Anrin Obi</var>
</include>
<!-- Event Status Variable -->
<include name="EventStatusVariable">
<var name="EventStatus" nooverwrite="true">Normal</var>
</include>
<!-- Opo-opo Necklace Rule -->
<!-- You have to try to perform an action while sleeping in order for it to be equipped, but often I'll
try to Jump or something before I realize I'm asleep so it's done automatically for me most of the time. -->
<include name="OpoOpoNecklaceRule">
<if MLvlGT="60" BuffActive="Sleep">
<equip when="precast|midcast|aftercast">
<neck>Opo-opo Necklace</neck>
</equip>
</if>
</include>
<!-- Spell Cancel Rules -->
<include name="SpellCancelRules">
<if Spell="Sneak" BuffActive="Sneak" TargetType="SELF">
<midcastdelay delay="1.5" />
<command when="midcast">cancel 71</command>
</if>
<elseif spell="Spectral Jig" BuffActive="Sneak">
<command when="precast">cancel 71</command>
</elseif>
<elseif Spell="Monomi*" BuffActive="Sneak">
<midcastdelay delay="2.5" />
<command when="midcast">cancel 71</command>
</elseif>
<elseif spell="Utsusemi: Ichi" BuffActive="Copy Image*">
<if mainjob="NIN" mlvlgt="36">
<midcastdelay delay="2.5" />
<command when="midcast">cancel 66</command>
</if>
<elseif subjob="NIN" slvlgt="36">
<if buffactive="Hasso|Seigan">
<midcastdelay delay="4" />
</if>
<else>
<midcastdelay delay="2.5" />
</else>
<command when="midcast">cancel 66</command>
</elseif>
</elseif>
<elseif Spell="Stoneskin" BuffActive="Stoneskin">
<midcastdelay delay="2.8" />
<command when="midcast">cancel 37</command>
</elseif>
<elseif Spell="Blink" BuffActive="Blink">
<midcastdelay delay="5.2" />
<command when="midcast">cancel 36</command>
</elseif>
</include>
<!-- Return Rules -->
<!-- These stop any gear changes if I'm unable to take particular actions. The reason for this is because
if I'm impatient and spamming a macro while petrified or something I don't want a WHM to be unable to target
me for Stona, for instance. -->
<include name="ReturnRules">
<!-- Exits if the action cannot be taken. -->
<if BuffActive="Sleep|Petrification|Stun|Terror|Charm">
<return />
</if>
<elseif Type="*Magic|BardSong|Ninjutsu" BuffActive="Silence">
<return />
</elseif>
<elseif Type="Weaponskill|JobAbility|PetCommand" BuffActive="Amnesia">
<return />
</elseif>
<elseif type="Weaponskill">
<if mode="OR" TPLT="100" advanced="%SpellTargetDistance > 4" notstatus="engaged">
<cancelspell />
<return />
</if>
</elseif>
</include>
<!-- Fast Cast Rule -->
<include name="FastCastRule">
<!-- The second half of the rule prevents switching to my Swift Belt if I haven't used all the MP from my Hierarch Belt. -->
<if Type="WhiteMagic|BlackMagic|SummonerPact|BardSong|Ninjutsu|BlueMagic"
advanced='"%EquipWaist"!="Hierarch Belt" or %MP<=%MPMax-48'>
<equip when="precast" set="Fast Cast" />
</if>
</include>
<!-- Elemental Stave Rule -->
<include name="ElementalStaveRule">
<if MLvlGT="50" Type="WhiteMagic|BlackMagic|SummonerPact|BardSong" NotSpell="Stoneskin|Blink|Sneak|Invisible|Deodorize
|Teleport*|Recall*|Raise*|Protect*|Shell*|Haste|Reraise*|*na|Erase|Esuna|Auspice|Warp*|Escape|Tractor|Retrace">
<equip when="midcast">
<main>$Staff-%SpellElement</main>
</equip>
</if>
<elseif MLvlGT="50" Spell="Stoneskin">
<equip when="midcast">
<!-- Change to Kirin's Staff or some other +MND Magian staff you wasted days of your life trying
to get if you prefer something other than a Water Staff. -->
<main>$Staff-Water</main>
</equip>
</elseif>
</include>
<!-- Elemental Obi Rule -->
<include name="ElementalObiRule">
<if advanced='("%SpellElement"="%WeatherElement" OR "%SpellElement"="%DayElement") AND "$Obi-%SpellElement"!="0"'>
<equip when="midcast">
<waist lock="yes">$Obi-%SpellElement</waist>
</equip>
</if>
</include>
<!-- The rules for enfeebling magic are kept here in the include file because they are referenced by multiple job XML
files and are slightly more complex than the average magic skill rule. Although it's not likely that I'll ever have to edit these
rules, keeping them here means that I can simply reference 7-8 lines of code with a single include statement in the individual job
XML files. -->
<!-- Enfeebling Magic rules -->
<include name="EnfeeblingMagicRules">
<if Skill="EnfeeblingMagic">
<if Type="WhiteMagic">
<equip when="midcast" set="MNDEnfeeblingMagic" />
</if>
<if Type="BlackMagic">
<equip when="midcast" set="INTEnfeeblingMagic" />
</if>
</if>
</include>
<!-- Sonia's Plectrum Rule -->
<include mlvlgt="59" name="SoniasPlectrumRule">
<if spell="Curing Waltz*|Divine Waltz">
<equip when="precast">
<ammo>Sonia's Plectrum</ammo>
</equip>
</if>
</include>
</includes>