Techno's SMN.XML (v2.3)

Hello, everyone. I'm Techno from the Phoenix server and this is my smn.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. 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.

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.

This is the XML file for my SMN. To understand exactly what is going on in it you need to also check out my include.xml file. If you're not familiar with Spellcast v2.3 and include statements then I've included a short guide on that page to explain what include statements are and how they can benefit you.

Some notes about this file:

  • Several months ago I promised some people on the forum who were using my DRG XML as a template that I was going to make an effort to simplify my automatic event set change code. I started writing this code a while back because I wanted to create a way for Spellcast to work together with Autoexec in order to automatically change what gear I had equipped depending on what event I was doing, specifially Assault and Campaign. Why do this? It was mostly for my own amusement, partly so that I didn't have to remember to change gear groups upon entering said events. I'm skipping the usual explanation of why I made major changes because it was long, boring, and irrelevant. What you see here is the third (and final) version of my attempt to do this. It uses a concept I called Dynamic Set Inheritance. I was pleasantly surprised to find that Spellcast does support it. Kudos to Aikar for having the foresight to include it.

This is not for the faint of heart or people who have no idea what they're doing. If you're a Spellcast newb, you may just want to turn around and go back where you came from now. Copy and paste my XML file at your own risk. I take no responsibility for failed/bugged attempts to implement any changes to my work, though I might be inclined to help you out if you ask nicely.

The heart of all this lies in Autoexec XML rules. Autoexec updates a Spellcast variable called $EventStatus. $EventStatus contains the information on what event you are currently taking part in, eg: Normal, Assault, Campaign. If you wanted to add other events such as Dynamis, you certainly could. Here is the code to enable this:

<?xml version="1.0" ?>
<autoexec>
	<!-- Triggers for Campaign -->
	<register silent="true" event="gainbuff_Allied_Tags">sc var set EventStatus "Campaign";</register>
	<register silent="true" event="losebuff_Allied_Tags">sc var set EventStatus "Normal";</register>
 
	<!-- Triggers for Assault -->
	<register silent="true" event="zone_Ilrusi*|zone_Mamool*|zone_Periqia|zone_Lebros*|zone_Leujaoam*|zone_Nyzul*|zone_*Talif|zone_*Remnants">sc var set EventStatus Assault;</register>
	<register silent="true" event="zone_Aht*">sc var set EventStatus Normal;</register>
</autoexec>

Contrary to my former hatred of creating lots of different gear sets, Dynamic Set Inheritance relies on it. If you have a single piece of gear that is different in your Campaign WS set, you have to create a Normal WS set and an Assault WS set even if you don't do anything different in your Assault WS set. The benefit over my old method, however, is that you're able to alias sets that use the same pieces of gear or leave sets blank rather than creating an exponentially-growing list of variables.

As an example of what to do, I will describe the situation with WS gear in my DRG XML file. I specify sets for 5 different WSs. These WS sets also have a base set that they inherit from. The base WS set contains pieces of gear common to all or most of the WSs. I also have a few pieces of gear that I want to equip in events such as my Ulthalam's Ring in Assault or my Bull Necklace in Campaign. So, how this works is that the WS-Base set dynamically inherits from the event-specific sets. The event-specific sets obviously contain the event-specific gear which must be locked to prevent inheriting sets from overriding those pieces. When the $EventStatus variable is set, the WS-Base set will automatically inherit from the correct event-specific set. Then, the individual WS sets inherit from WS-Base. For you nerds, it's a many-to-one-to-many relationship.

The final thing to note is that if you have a situation where a base set inherits from the event-specific sets, you must create an empty “Normal” set. Take for instance the aforementioned WS example. The basic WS gear must be included in the WS-Base set. So this is your Normal WS gear. You might be tempted to alias the Normal-WS set to the WS-Base set. After all, they're the same, right? But the WS-Base set inherits from $EventStatus-WS. If this is Normal-WS, then it will try to look at that same set. Then it will look for what that set inherits from, which again is Normal-WS. Thus, you have a potential there for creating an infinite loop. I never tried this to find out what would happen, but I don't advise it. Just create the empty Normal set.

There are other comments throughout the file. Please enjoy.

<?xml version="1.0" ?>
<spellcast xmlns:xi="http://www.w3.org/2001/XInclude">
<config
	RequireVersion="2.30"
	Debug="false"
	ShowGearSwaps="false"
/>
 
<variables>
	<!-- These variables are more like constants which store the static names of pieces
	of gear to be referenced by dynamic gear sets.  This has to be done to make Spellcast
	work correctly with equipment names that have more than word or apostrophes. You can
	get around it by using the escape characters for double and single quotes in the
	variable set commands, but doing this makes it a little easier to read, if not slightly
	more complex.  I know the elemental stave constants are required to make the elemental
	stave dynamic set rule work correctly, especially if you have HQ staves. --> 
 
	<xi:include href="include.xml" xpointer="/includes/include[@name='ElementalStaveConstants']/*" />
 
	<var name="SummonersHorn">"Summoner's Horn"</var>
	<var name="WalahraTurban">"Walahra Turban"</var>
	<var name="KaruraHachigane">"Karura Hachigane"</var>
	<var name="YinyangRobe">"Yinyang Robe"</var>
	<var name="SummonersDoublet">"Summoner's Doublet"</var>
	<var name="NashiraGages">"Nashira Gages"</var>
	<var name="CarbuncleMitts">"Carbuncle Mitts"</var>
 
	<!-- These variables are the actual dynamic sets.  They have to be
	initialized to a default piece of armor, lest they fail to work correctly.  When
	Spellcast updates one of these dynamic sets it sets it equal to one of the
	"Constants" you see above.  Some are updated automatically by Autoexec when
	changing areas or subjobs.  Putting in the "nooverwrite" option makes sure
	whatever your variables are set to won't change if you reload your XML file
	while playing. -->
 
	<xi:include href="include.xml" xpointer="/includes/include[@name='EventStatusVariable']/*" />
	<var name="SmnSetHead" nooverwrite="true">Walahra Turban</var>
	<var name="SmnSetBody" nooverwrite="true">Yinyang Robe</var>
	<var name="SmnSetHands" nooverwrite="true">Nashira Gages</var>
</variables>
 
<sets>
	<group name="Haste" default="yes"> <!-- Named Haste for consistency with other job XMLs -->
		<set name="Standard|Normal-Std|Campaign-Std">
			<sub>Staff Strap</sub>
			<ammo>Phantom Tathlum</ammo>
			<neck>Morgana's Choker</neck>
			<lear>Loquacious Earring</lear>
			<rear>Antivenom Earring</rear>
			<head>Walahra Turban</head>
			<body>Yinyang Robe</body>
			<hands>Nashira Gages</hands>
			<lring>Ether Ring</lring>
			<rring>Evoker's Ring</rring>
			<back>Intensifying Cape</back>
			<waist>Hierarch Belt</waist>
			<legs>Summoner's Spats</legs>
			<feet>Evoker's Pigaches +1</feet>
		</set>
		<set name="Assault-Std" baseset="Standard">
			<rear>Storm Earring</rear>
		</set>
		<set name="Idling" Baseset="$EventStatus-Std">
			<main>$Staff-Earth</main>
		</set>
		<set name="Resting">
			<main>$Staff-Dark</main>
			<head>Yigit Turban</head>
			<neck>Grandiose Chain</neck>
			<rear>Antivenom Earring</rear>
			<body>Yigit Gomlek</body>
			<legs>Yigit Seraweels</legs>
		</set>
		<set name="Summoning" Baseset="$EventStatus-Std">
			<head>$SmnSetHead</head> <!-- Dynamic set for automatic gear changes depending on the weather. -->
			<body>$SmnSetBody</body> <!-- Dynamic set for automatic gear changes depending on the day. -->
			<hands>$SmnSetHands</hands> <!-- Dynamic set for automatic gear changes depending on avatar. -->
			<legs>Evoker's Spats</legs>
		</set>
		<set name="Blood Pact Time" Baseset="Summoning">
			<head>Summoner's Horn</head>
			<body>Yinyang Robe</body>
			<hands>Summoner's Bracers</hands>
			<legs>Summoner's Spats</legs>
			<feet>Summoner's Pgch.</feet>
		</set>
		<set name="Blood Pact Skill" Baseset="Summoning">
			<head>Evoker's Horn</head>
			<neck>Summoning Torque</neck>
			<hands>Summoner's Bracers</hands>
			<feet>Nashira Crackows</feet>
		</set>
		<set name="Blood Pact Damage" Baseset="Summoning">
			<head>Evoker's Horn</head>
			<neck>Summoning Torque</neck>
			<body>Summoner's Doublet</body>
			<hands>Summoner's Bracers</hands>
			<feet>Summoner's Pgch.</feet>
		</set>
		<set name="Fast Cast">
			<hands>Nashira Gages</hands>
			<waist>Swift Belt</waist>
			<feet>Nashira Crackows</feet>
		</set>
	</group>
</sets>
 
<rules>
	<xi:include href="include.xml" xpointer="/includes/include[@name='SpellCancelRules']/*" />
	<xi:include href="include.xml" xpointer="/includes/include[@name='ReturnRules']/*" />
	<xi:include href="include.xml" xpointer="/includes/include[@name='FastCastRule']/*" />
	<xi:include href="include.xml" xpointer="/includes/include[@name='ElementalStaveRule']/*" />
 
	<equip when="resting" set="Resting" />
	<equip when="idle" set="Idling" />
 
	<if skill="SummoningMagic">
	<!-- Carbuncle's Mitts Rule -->
		<if Spell="Carbuncle">
			<var when="precast" cmd="set SmnSetHands $CarbuncleMitts" />
		</if>
		<else>
			<var when="precast" cmd="set SmnSetHands $NashiraGages" />
		</else>
	<!-- Summoner's Horn and Karura Hachigane Rules -->
		<if Advanced='"%WeatherElement"="%SpellElement"'>
			<var when="precast" cmd="set SmnSetHead $SummonersHorn" />
		</if>
		<elseif spell="Garuda">
			<var when="precast" cmd="set SmnSetHead $KaruraHachigane" />
		</elseif>
		<else>
			<var when="precast" cmd="set SmnSetHead $WalahraTurban" />
		</else>
	<!-- Summoner's Doublet Rule -->
		<!-- Carby's perpetuation cost is already 0 MP/tick even without the Summoner's Doublet.
                If I equip the doublet then I won't receive the 1 MP/tick Refresh from the YYR. -->
		<if Advanced='"%DayElement"="%SpellElement"' NotSpell="Carbuncle">
			<var when="precast" cmd="set SmnSetBody $SummonersDoublet" />
		</if>
		<else>
			<var when="precast" cmd="set SmnSetBody $YinyangRobe" />
		</else>
		<equip when="midcast" set="Summoning" />
	</if>
 
<!-- TP Weapon-Lock Rules -->
	<if TPGT="25" when="idling">
		<disable slot="Main|Sub|Ranged" />
	</if>
	<else>
		<enable slot="Main|Sub|Ranged" />
	</else>
 
<!-- Job Ablilty Rules -->
	<if Type="BloodPactRage">
		<equip when="precast" set="Blood Pact Time" />
		<equip when="midcast" set="Blood Pact Damage" />
		<if spell="Stone*|Water*|Aero*|Fire*|Blizzard*|Thunder*|Meteorite|Nether Blast|Geocrush
		|Grand Fall|Wind Blade|Meteor Strike|Heavenly Strike|Thunderstorm">
			<equip when="midcast"><back>Altius Mantle</back></equip>
		</if>
		<equip when="aftercast" set="Summoning" />
	</if>
	<elseif type="BloodPactWard">
		<equip when="precast" set="Blood Pact Time" />
		<equip when="midcast" set="Blood Pact Skill" />
		<equip when="aftercast" set="Summoning" />
	</elseif>
	<elseif Spell="Release">
		<equip when="precast" set="Idling" />
	</elseif>
	<elseif Spell="Elemental Siphon">
		<equip when="precast" set="Blood Pact Skill" />
		<equip when="aftercast" set="Idling" />
	</elseif>
</rules>
</spellcast>
plugins/spellcast/userxml/smn/techno_smn.txt · Last modified: 2010/11/10 00:28 by techno
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0