First things first... the requirements. Just to note, comments are between <!-- and -->
<?xml version="1.0" ?> <!-- this should be the first line, it identifies the file as being xml. --> <spellcast> <!-- this should be the 2nd line. it identifies the file as being for spellcast --> <config RequireVersion="2.16" Debug="true" HideErrors="false" ShowGearSwaps="False" /> <!-- this is the config section, see below --> <!-- other stuff here --> </spellcast> <!-- always close all tags.. this closes the spellcast tag. Should be the last line. -->
Config setion:
RequireVersion="2.16" <-- this is optional. It says that you must be using spellcast 2.16 or greater for this to work
Debug="true" <-- this puts the debug file in your spellcast directory. If everything is working, you can set it to false. If you have any questions, make sure to set this to true so we can help you.
HideErrors="false" <-- this puts errors in your console. It lets you know if you messed something up.
ShowGearSwaps="False" <-- if this is set to true, it puts an "echo" in ffxi showing all your gear swaps. if you set it to true, you can see exactly what gear is being equipped and when, which is nice when you don't know if a rule is working.
For the "other stuff" there are 3 sections. Variables, Sets, and Rules.
Variables are completely optional:
<variables> <!-- start the variables --> <var name="whatever">DefaultValue</var> <!-- this is how you define a variable --> </variables><!-- end the variables -->
Place any variables, between the opening and closing tag. From ffxi, if you type "//sc var list" it will list all your current variables in echo. To change the value of a variable, type "//sc var set whatever NewValue"
Sets. These are broken down into groups and individual sets.
<sets> <!-- say we are starting the sets --> <group default="yes" name="mygroup"> <!-- start of our first group. Only 1 group should have the default="yes". <set name="Standard"> <!-- this is the name of your first set in mygroup group. This will be your "normal" gear --> <main></main> <!-- this is all 16 possible equipment slots. Just put the name of the item you want between the tags --> <sub></sub> <ranged></ranged> <ammo></ammo> <head></head> <neck></neck> <lear></lear> <rear></rear> <body></body> <hands></hands> <lring></lring> <rring></rring> <back></back> <waist></waist> <legs></legs> <feet></feet> </set> <set name="Resting" BaseSet="Standard"> <!-- baseset means any slots you don't fill will use the baseset --> </set> <!-- resting set is when you take a knee --> <set name="Engaged" BaseSet="Standard"> <!-- engaged set is when you have your weapon out --> </set> <set name="WeaponSkill" BaseSet="Engaged"> <!-- weaponskill set is when you perform a weaponskill --> </set> <!-- you can add more sets to this group here --> </group> <!-- close your mygroup group <!-- add more groups here --> </sets> <!-- close all sets.. we can move on -->
You do not have to use the names I used. They do match with the rules section though.
So the rules. This is the "hard" part. The most important thing to remember is that rules work from top to bottom. So if you have a rule at the start to equip item A, then one later to equip item B, you will end up equiping item B. The following is some default rules, that will actually be useful for pretty much every single job anyway.
<rules> <!-- this starts your rules section --> <!-- "default" sets --> <if spell="autoset"> <!-- this makes it so when you change status (rest, idle, engage), your gear changes --> <action type="equip" when="resting" set="Resting" /> <!-- when resting, equip resting --> <action type="equip" when="idle" set="Standard" /> <!-- when idle, equip standard --> <action type="equip" when="engaged" set="Engaged" /> <!-- when fighting, equip engaged --> </if> <!-- always end your tags... note that this only changes gear when you change status, so if you gear swap a weapon skill, it doesn't automatically go back to engaged set --> <!-- default "aftercast" (to take care of above line) --> <if NotStatus="Engaged"> <!-- if we don't have our weapon out... --> <action type="equip" when="aftercast" set="Standard" /> <!-- ...return to standard (idle) set --> </if> <!-- don't forget to close it --> <else> <!-- otherwise (which means we do have weapon out) --> <action type="equip" when="aftecast" set="Engaged" /> <!-- ... return to engaged set --> </else> <!-- Keep weapons equipped. This keeps you from swapping weapons and losing your TP --> <if TPGT="10"> <!-- if we have at least 10 TP --> <action type="Disable" slot="main|sub|ranged" /> <!-- never allow any swaps on main/sub/ranged --> </if> <!-- note you can still swap ammo, because it doesn't lose TP. --> <else> <!-- otherwise (less then 10 TP) --> <action type="Enable" slot="main|sub|ranged" /> <!-- allow those slots to have gear swaps --> </else> <!-- Weapon skill --> <if Type="WeaponSkill" NotTPLT="100"> <!-- if you have 100 TP and use a weaponskill --> <action type="castdelay" delay=".2" /> <!-- delay it by .2 seconds (this is to give time for gear swap) --> <action type="Equip" when="Precast" set="WeaponSkill" /> <!-- equip your WeaponSkill set before you use it --> </if> <!-- note that any "instant" abilities (provoke, steal, hasso, etc) should be done like this with the .2 castdelay --> </rules> <!-- end your rules -->
So now we have all our parts... This is what the final product should look like (without most of the notes)
<?xml version="1.0" ?> <spellcast> <config RequireVersion="2.16" Debug="true" HideErrors="false" ShowGearSwaps="False" /> <variables> <var name="whatever">DefaultValue</var> </variables> <sets> <group default="yes" name="mygroup"> <set name="Standard"> <main></main> <sub></sub> <ranged></ranged> <ammo></ammo> <head></head> <neck></neck> <lear></lear> <rear></rear> <body></body> <hands></hands> <lring></lring> <rring></rring> <back></back> <waist></waist> <legs></legs> <feet></feet> </set> <set name="Resting" BaseSet="Standard"> </set> <set name="Engaged" BaseSet="Standard"> </set> <set name="WeaponSkill" BaseSet="Engaged"> </set> </group> </sets> <rules> <!-- "default" sets --> <if spell="autoset"> <action type="equip" when="resting" set="Resting" /> <action type="equip" when="idle" set="Standard" /> <action type="equip" when="engaged" set="Engaged" /> </if> <!-- default "aftercast" --> <if NotStatus="Engaged"> <action type="equip" when="aftercast" set="Standard" /> </if> <else> <action type="equip" when="aftecast" set="Engaged" /> </else> <!-- Keep weapons equipped --> <if TPGT="10"> <action type="Disable" slot="main|sub|ranged" /> </if> <else> <action type="Enable" slot="main|sub|ranged" /> </else> <!-- Weapon skill --> <if Type="WeaponSkill" NotTPLT="100"> <action type="castdelay" delay=".2" /> <action type="Equip" when="Precast" set="WeaponSkill" /> </if> </rules> </spellcast>
As a side note, if you put in your equipment in the sets, this will actually work for leveling any melee job as long as long as you don't need specific equipment for things like hasso, sneak attack, etc.
Now for the "Object oriented" part. AKA plug and play XML. This is stuff that has been tested and works and is used by quite a few people. It also makes it so that instead of asking "how do I get obi's to work" you can just copy the code from here. If there is something in "variables" tag, make sure you place it in the variables section. Otherwise, it should probably be in the rules section.
Elemental Obi's
<variables>
<var Name="EarthObi">Dorin Obi</var>
<var Name="ThunderObi">Rairin Obi</var>
<var Name="WaterObi">Suirin Obi</var>
<var Name="FireObi">Karin Obi</var>
<var Name="IceObi">Hyorin Obi</var>
<var Name="WindObi">Furin Obi</var>
<var Name="LightObi">Korin Obi</var>
<var Name="DarkObi">Anrin Obi</var>
</variables>
<rules>
<if Advanced='("%SpellElement" = "%WeatherElement" OR "%SpellElement" = "%DayElement") AND "$%SpellElementObi" != "\$%SpellElementObi"'>
<action Type="Equip" When="MidCast">
<waist>$%SpellElementObi</waist>
</action>
</if>
</rules>If you do not have the obi, remove it from the variables section. You only need the obi's that you actual own.
Elemental Staves
<variables> <var name="FireStaff">Vulcan's Staff</var> <var name="IceStaff">Aquilo's Staff</var> <var name="WindStaff">Auster's Staff</var> <var name="EarthStaff">Terra's Staff</var> <var name="ThunderStaff">Jupiter's Staff</var> <var name="WaterStaff">Neptune's Staff</var> <var name="LightStaff">Apollo's Staff</var> <var name="DarkStaff">Pluto's Staff</var> </variables> <rules> <action type="equip" when="midcast"> <main>$%SpellElementStaff</main> </action> </rules>
2 notes.. 1> if you have the NQ staff, change the value to the staff name (ie, change Vulcan's Staff to Fire Staff). 2 > there is no "if" section on this. if you just put this in right now, it will be trying to change staves on midcast of everything you do. Place the action inside the if section of the code when you want to change staves.
Black Mage Sorcerer's Tonban (AFv2 Pants)
First need a variable defined:
<variables> <var name="BLMAF2Pants">1</var> </variables>
Set to 1 if you have pants or set to 0 (or dont add the variable) if you do not have pants.
Then use the following rule:
<if Advanced='(!((regex)%Weather=^.* x2$(/regex) AND "%WeatherElement" = "%SpellElement" AND "$%SpellElementObi" != "\$%SpellElementObi") OR !("%WeatherElement" = "%spellElement")) AND ("%SpellElement" = "%DayElement" AND "$BLMAF2Pants" = "1") AND ("%skill"="ElementalMagic")'>
<action type="equip" when="midcast">
<legs lock="yes">Sorcerer's Tonban</legs>
</action>
</if>THIS IS DESIGNED TO BE COMBINED WITH THE ABOVE OBI SETUP. PLEASE USE THE ABOVE OBI SETUP TOO.
This will handle the logic on wether or not to use Sorcerer Tonban if you can get triple bonuses from Obi alone. These 2 rules are THE BEST way of handling both rules in SpellCast.
Day or Night
<variables> <var name="DorN">D</var> </variables> <rules> <if mode="OR" TimeLT="6.00" TimeGT="18.00"> <action type="Var" cmd="set DorN N" /> <!-- or just set night stuff --> </if> <else> <action type="Var" cmd="set DorN D" /> <!-- or just set day stuff --> </else> </rules>
The way this is currently written, if you want to equip certain things durring the day, use <if advanced=' "$DorN"=="D" '>. For night, use N instead of D.
Day or Night without variables
<rules> <if mode="OR" TimeLT="6.00" TimeGT="18.00"> <action type="equip"> <!-- night time stuff --> </action> </if> <else> <action type="equip"> <!-- day time stuff --> </action> </else> </rules>


Help




Back to top
MultiQuote















