~~META:
creator = Aikar
&description abstract = A Major macro & game engine improvement that serves as a Macro Manager and Equipment Swapping Manager. Uses a custom XML based scripting language.
~~
~~NOCACHE~~
====== SpellCast (2.22) ======
This plugin is advanced. It requires configuration before using. Please read over the documentation thoroughly before using.
This plugin is updated frequently. Please check back often for new updates.
===== Plugin Information =====
^ Information ^^
^ Developer| [[:user/Aikar|Aikar]] |
^ Download:| [[http://windower.net/plugins/SpellCast.dll?nocache=2.22.0 | SpellCast]]|
^ Download Count| [dlcount]spellcast[/dlcount] |
^ Release Date:| December 17th, 2008 |
^ Bug Tracker:| [[http://forums.windower.net/index.php?autocom=tracker&showproject=3|SpellCast Bugs]]|
^ Comments/Support/Bugs:| [[http://forums.windower.net/index.php?showforum=25 | Click Here]]|
^ Changelog:| [[:plugins:spellcast/changelog | Click Here]]|
^ SpellCast Lite Edition:| [[:plugins:spellcastlite|SpellCastLite]]|
^ Useful links ^^
| [[:plugins:spellcast/rules|Rules Page]]| Look here for all available conditions. Also some commonly used rules i.e. Elemental Staves or Obi Rules. |
| [[:plugins:spellcast/variables|Variables Page]]| Look here for all variables available for use. |
| [[:plugins:spellcast:userxml|User Submitted XML]]| Look here for XML files submitted by users. These vary from very basic to very complex. |
| [[http://zvon.org/xxl/XMLTutorial/General/book.html|ZVON.org XML Tutorial]]| A straight-forward XML Tutorial to get you started with the basics of the mark-up language which is used for Spellcast's configuration. |
| [[:plugins:spellcast/xmlediting|XML Editing]]| A guide to setting up an editor for XML files. |
| [[http://windower.net/plugins/spellcast.dtd|Document Type Definition for Spellcast]]| Right-click and Save As... this link. |
===== What is SpellCast =====
[[:plugins:spellcast]] is macro and game engine enhancement. [[:plugins:spellcast]] was designed to get around [[:Square Enix | SE's]] tedium of typing commands instead of using macros, and [[:Square Enix | SE's]] inability to give us more advanced macros capable of changing ALL our gear in 1 macro instead of only 5 pieces. SpellCast is for all jobs, giving you the power to quickly setup macros and easily change gear in your macros. SpellCast maximizes your potential with fast gear swaps.
[[:plugins:spellcast]]:
...will let you type 'simpler' spell commands, where you don't need , you don't need " " around double word spells, you dont need :,' or - within spells and you don't need to use roman numerics!
...now gives you the power to change ALL of your gear, when you want, when you need it to, all based on conditions you setup.
...will turn all of your macros into 1 line, the casting line! Since its release, many advanced features have been added, such as conditions with Weather, Day, MP, subjob and more!
...gives you the power to make sets of gear, and put those sets into groups.
Make a group for uncapped events, make a group for level caps. Doing a lv50 cap? Make a group for it, then issue the change group command and set it to the lv50cap group. Now, all your spells are using different sets of gear for level 50 things instead.
The power of this plugin will continue to grow. I hope this makes every caster alive happy and enjoy easier to use macros!
==== A Note to the Non-Mages ====
SpellCast was originally designed with mages in mind. This is no longer the case. References to spells within the documentation and xml actually encompass job abilities, weapon skills, etc.
===== Features of SpellCast =====
What follows are just some of the features of SpellCast that come along with the advanced equipment set management features.
=== Spell Simplification ===
In FFXI when you want to cast a higher tier spell, you must type the whole name with roman numerals in quotes no less! SpellCast not only allows you to type that spell without quotes, but also allows you to type numbers instead of those roman numerals, and removes the need to type non alphanumeric characters. ///ma "Cure IV"// becomes ///ma Cure4// with SpellCast running.
In FFXI when a ninja wants to use Utsusemi, they must type ///ma "Utsusemi: Ichi" //. SpellCast removes the necessity of the colon, ///ma "Utsusemi Ichi" // will work as well. In fact, with SpellCast you can even forget the space between Utsusemi and Ichi and the quotes, and it will still cast correctly. ie. ///ma Utsusemiichi // will work as well.
=== Quick Aliases ===
SpellCast adds commands that you can use in game to cast a spell. For example, instead of typing ///ma "Cure II" // in game, with SpellCast you can type //%%//%%Cure2//
=== Spell Type Fixing ===
SpellCast will automatically correct the pre-command for spells if you specify the wrong type. For example if you type ///ma "Dancing Edge" // SpellCast will automatically process the command correctly as ///ws "Dancing Edge" //.
=== Smart Targeting ===
In FFXI when you type ///ma "Cure"// and forget to add the ////, your spell does not process and your dunes party dies T T. With SpellCast the same mistake would by default cast on whoever you have targeted! Your dunes party rejoices, for as much as a dunes party can be happy anyway. Also, any spell that is only castable on yourself, will default to instead of . Previously in FFXI all spells defaulted to if no target was specified until one unneeded patch to the game. SpellCast brings that functionality back and improves it with handling.
Additionally, SpellCast allows you to change this functionality on a per spell basis using the DefaultTarget action.
=== Target Auto-completion ===
For those who are typing spells, Spellcast has auto-completion of the target. You only have to type a part of someone's name. It will match anyone in the zone, but people in your party or alliance will get priority.
So for instance, if someone named Jimbobstoner is in your alliance, all you have to type is ///ma Cure jimbob// and Spellcast will make Jimbobstoner the target if Jimbob is not in your Alliance. Any part will do. So provided they don't match anyone else in your alliance, ///ma Cure jimbo//, ///ma Cure bob// or ///ma Cure stoner// would all work.
=== Changing Spells ===
In FFXI when you attempt to cast Cure IV on someone who really needs it, but you are missing that one mp at the wrong time, you have to go back and attempt casting Cure III instead. Using ChangeSpell, you can automate this and have SpellCast cast lower levels of spells when you don't have enough MP for the first one.
===== SpellCast Commands =====
Current commands can be invoked via //__/spellcast__// or //__/sc__// in the chat area or //__spellcast__// or //__sc__// in the [[:readme|Windower Console]] followed by the appropriate command.
The following commands are available as of version [[:plugins:spellcast:changelog|2.11]].
^Command ^^Description ^
^SpellCast Related: ^^^
| file | //filename// |Changes the currently loaded XML file. |
| load | //filename// |Changes the currently loaded XML file. |
| reload | |Reloads the currently loaded XML file. |
| info | |Prints current information such as file, group, and counts. |
| group | //groupname// |Changes the currently used group. |
| set | //setname// |Manually triggers gear change to a set. |
| naked | |Makes you get naked. |
| disable | //slot// |Disables equipment switching in SpellCast while maintaining other functionality.\\ If no slot is specified, disables SpellCast equipment switching for all slots. |
| enable | //slot// |Re-enables equipment switching in SpellCast.\\ If no slot is specified, Re-enables SpellCast equipment switching for all slots. |
| help | |Displays a list of these commands if you cant remember them in game. |
| debug | on/off |Enables or disables debug logging. |
^Variable Related:^^^
| var | |Displays a list of variable commands if you cant remember. |
| var list | |Lists all custom variables. |
| var set | //varname// //value// |Creates or sets a variable with the specified value. |
| var rem | //varname// |Removes a custom variable. |
| var inc | //varname// |Increments an integer variable. |
| var dec | //varname// |Decrements an integer variable. |
===== XML Markup =====
[[:plugins:spellcast]] uses a special XML file to load your gear sets and spell rules. SpellCast XML files should be placed in your **plugins\spellcast\** sub folder of your Windower installation. When SpellCast loads, it automatically loads a file named //default.xml//. If this is your first time running SpellCast, the default.xml file is created for you on load.
The basic structure of the major SpellCast tags is as follows:
Descriptions of these tags, and the tags they contain are provided below.
==== ====
This is where we setup [[:plugins:spellcast]]. The following table lists the possible options for //config// with a description.
^ config - Optional ^^^^
^SpellCast Related: ^^^^
^ Attribute Name ^ Required? ^ Value ^Description ^
| AutoLoadXML | Optional | (True/**False**) |**Only valid in default.xml.** If set to true, default.xml will be completely ignored, and SpellCast will instead try to load another XML instead based on current job. Once XML has changed, if you change jobs again, SpellCast will again attempt to change XML files based on your new job. SpellCast will check for files in this order(using the first it finds): //CharacterName//_//MainJob//_//SubJob//.xml, //CharacterName//_//MainJob//.xml, //MainJob//_//SubJob//.xml, and //MainJob//.xml |
| Example Filenames:|||**aikar_whm_blm.xml**, **aikar_whm.xml**, **whm_blm.xml**, **whm.xml** |
| RequireVersion | Suggested | //VersionNumber// |If a version number is set, SpellCast will only load the XML if SpellCast is of a greater version than specified. This is to facilitate XML sharing as more SpellCast releases are made. |
| Debug | Optional | (True/**False**) |Enables or Disables the debug log file created by [[:plugins:spellcast]]. This is helpful for aiding with debugging the plugin or your XML file. |
| ShowGearSwaps | Optional | (True/**False**) |Enables or Disables information being displayed by the plugin during the 3 stages of gear swaps. This text is displayed in your client as a tell and **can not** be detected at this time by Square Enix. |
| DisableWS | Optional | (True/**False**) |Setting this to true will disable [[:plugins:spellcast]] on /ws and /weaponskill. |
| DisableJA | Optional | (True/**False**) |Setting this to true will disable [[:plugins:spellcast]] on /ja and /jobability. |
| DisablePET | Optional | (True/**False**) |Setting this to true will disable [[:plugins:spellcast]] on /pet. |
| DisableSO | Optional | (True/**False**) |Setting this to true will disable [[:plugins:spellcast]] on /so and /song. |
| DisableNIN | Optional | (True/**False**) |Setting this to true will disable [[:plugins:spellcast]] on /nin and /ninjutsu. |
| DisableMA | Optional | (True/**False**) |Setting this to true will disable [[:plugins:spellcast]] on /ma and /magic. |
^Set Related: ^^^^
^ Attribute Name ^ Required? ^ Value ^Description ^
| HELMSet | Optional | //SetName// |Specify the set of gear you would like to use when doing HELM. |
| FishingSet | Optional | //SetName// |Specify the set of gear you would like to use when fishing. |
^Spell Related: ^^^^
^ Attribute Name ^ Required? ^ Value ^Description ^
| ShowSpellInfo | Optional | (True/**False**) |Will show information about every spell you cast such as Recast Timers, MP Cost and Casting Time. This information is added to your FFXI chatlog. |
==== ====
Next we have //sets// (Required). //Sets// contain all of your //group// definitions. //Sets// have no configuration options but has a sub command called //Groups//.
=== ===
//Groups// are where we define our gear //sets// that we would like to use. Please refer to the following table for the possible options for //groups//.
^ group - Required ^^^^
| default | Optional | (Yes/**No**) |Tells [[:plugins:spellcast]] if this is our default group it should use on load. |
| name | Required | //group name// |This is the name of our group. This option supports alias. To add an alias simply separate the normal name with a pipe. ex. //// |
| inherit | Optional | //group name// |We can define another group that we would like to inherit gear sets from. This allows us to prevent multiple similar sets of gear between groups. |
== ==
Inside of our //group// we finally define our various gear //sets//. The command for this is //Set// not to be confused with the command //Sets//. //Set// has various configuration options as well as additional sub commands we use to specify what gear we want equipped and in which gear slot. The following table shows us the configuration options.
^ set - Required ^^^^
| name | Required | //set name// |This is the name of our set. This option supports alias. To add an alias simply separate the normal name with a pipe. ex. //// Supports * as well |
| BaseSet | Optional | //set name// |We can define another set we would like to base our current set on. Thus inheriting the unspecified pieces of gear from it. If an gear slot is used in both the current and baseset the current set will be the piece that is used. You can specify multiple sets, divided by pipes, to combine multiple sets. Gear from those sets will be applied in order, so if a slot is defined in more than one set, the definition from the last set named in the list that defines that slot will be used. **REQUIRED** if BaseGroup is set. |
| BaseGroup | Optional | //group name// |If needing to inherit a set from another group by chance, give the group name here. ex //// will inherit the Standard set from the 50cap group, even if your current group is set to Lvl75Cap or such. |
//Set// supports the following sub options.
^ Slot names ^^^^
| main | sub | range | ammo |
| head | neck | lear | rear |
| body | hands | lring | rring |
| back | waist | legs | feet |
Each of these supports the option //lock//. If this is set to anything, this gear will be 'locked' so that, any set inheriting from this set will not be able to override this gear slot with its own gear, and also any rules will not override this piece either. Example: if SetA has main set to LightStaff, and SetB Inherits SetA, but has main set to DarkStaff, If Main is not locked, Dark Staff will override LightStaff. If Lock is true, main will be kept to LightStaff, and no set inheriting the set can change that. Ex. //Light Staff// or //Light Staff//
SpellCast can also remove equipment for you. To do this, instead of specifying a piece of gear for a slot, specify //Remove// instead. Ex: remove will UNEQUIP that slot.
**NOTE:**
When specifying your gear within the set, you can use __[[#variables1|variables]]__ within the gear names.
==== ====
The variables section allows you to automate the process of setting up user defined variables. The variables tag itself has one attribute, //clear// which if true tells SpellCast to clear out all variables when the XML is loaded.
Ex: will erase ALL custom variables every time your XML is (re)loaded.
For more information on using variables, check the __[[#variables1|variables section]]__.
=== ===
The //var// tag has two attributes, //name// and //nooverwrite//. The value specified between the tags is the value that will be assigned to that variable upon XML (re)load. If //nooverwrite// is true, the variable will retain its current value on XML reload rather than the value specified in the XML.
Carbuncle
Congrats!
==== ====
This is what transforms SpellCast from merely holding sets of equipment, to helping you equip the right sets at the right time. When you cast a spell, SpellCast goes to this section to figure out what actions to do, what equipment to equip, and when to do these.
Within the rules section you can place **** rules, **** rules, **** rules, and ****s. Actions that are not placed within an , , or tag will process every time.
**Note**: you can specify rules on the **** tag itself, in order to keep SpellCast from even processing your rules.
=== ===
bound rules will be checked for "truth" every time they are reached in a SpellCast parse. The way you determine what SpellCast checks against is by adding attributes(rules) to the tag. __[[:plugins:/spellcast/rules|Click here for a list of all rules]]__.
Example rule:
Within the tag, you can place and also nest additional , , tags as deep as you need.
== ==
The //Action// tag is where you tell SpellCast what you actually want it to do when the time is right. It has one required option called //type//. Depending on the //type// attribute set, additional attributes become available.
^ action - Required ^^^^
^ type ^ Options ^ Description ^^
| ShowSpellInfo | None |Displays information in the chat log about current spell being cast, such as Recast Timers, MP Cost and Casting Time. This does the same thing as the config option ShowSpellInfo, only it allows you to setup display for only spells that trigger this action. Takes place in precast, and is based on final spell. ||
| CancelSpell | None |Cancels the spell from being casted and only processes PreCast and immediate actions. ||
| ChangeSpell | See Description | Optional |This changes the spell that is being casted to a different one as specified.\\ Example: |
| | Spell | Required |Used with ChangeSpell. This is the spell that will cast instead of the original spell going into the action. |
| ChangeTarget | See Description |Allows you to change the target of a spell before it is sent to ffxi. Specifies a different target() to auto append at end of spell. Format: ////. Replace //me// with the target you want such as p0 st or other. NOTE: //<// and //>// are used instead of < and >; to see why, look at the __[[#troubleshooting|troubleshooting section]]__. ||
| DefaultTarget | See Description |Specifies a different target() to auto append at end of spell. Format: ////. Replace //me// with the target you want such as p0 st or other. NOTE: //<// and //>// are used instead of < and >; to see why, look at the __[[#troubleshooting|troubleshooting section]]__. ||
| Command | None |Issues a WINDOWER command (NOT FFXI, you MUST use 'input'). See below for When parameter. You may use __[[:plugins:spellcast:spellcastvariables|variables]]__ in the command and they will be replaced before sending. ie. %Spell with the spell you are casting, and %target will be replaced with target.\\ Ex. //input /p Casting %spell on %target// ||
| | When | Optional |When to send the command to the Windower. Defaults to PreCast if when attribute is not manually set. Please see note below table for information on valid "times." |
| Equip | See Description |Changes Equipment. Equip type actions also support nesting of /slot//> tags( with __[[#locking|locking]]__ support.) Additional Attributes used: ||
| | When | Optional |When to Equip this set. Defaults to PreCast if when attribute is not manually set. Please see note below table for information on valid "times." |
| | Set | Optional |A base set to inherit from, the same way Set Definitions inherit. Required if SetGroup is defined. Note: you can use variables here, and they will be parsed. |
| | SetGroup | Optional |Same thing as BaseGroup in set definitions. Allows you to choose a different group to choose the Set from. |
| GearDelay | See Description | Optional |To delay PreCast. Must Set Delay with this. |
| | Delay | Required |Used with GearDelay. This is how long in seconds you want to delay the equipping of gear at PreCast action. |
| CastDelay | See Description | Optional |To delay casting after PreCast, mainly if you want say a few milliseconds delay for gear changes to finish. Must Set Delay with this. |
| | Delay | Required |Used with CastDelay. This is how long in seconds you want to delay spell casting after PreCast action. |
| MidCastDelay | See Description | Optional |To delay MidCast action after casting, mainly if you want to delay MidCast gear switching for whatever reason. MidCast will default to a delay of 600 ms after casting if MidCastDelay is not specified. Must set Delay with this option. |
| | Delay | Required |Used with MidCastDelay. This is how long in seconds you want to delay MidCast action after casting. |
| AfterCastDelay | See Description | Optional |To manually adjust AfterCast action delay after casting finishes. Delays are relative to a base of castime + 1.5 seconds. If AfterCastDelay is not specified, it will default to 0 for spells, 0 for ranged, and 1.5s for instants(ja/ws). Must set Delay with this option. |
| | Delay | Required |Used with AfterCastDelay. This is how long in seconds you want to delay AfterCast actions after casting(+ 1.5s). |
| AddToChat | See Description | Optional |Adds text to the chat log similar to echo, but lets you specify a color. This command supports __[[:plugins:spellcast/spellcastvariables|variables]]__. See below for Color attribute. |
| | Color | Optional |Sets the color for the added line. Defaults to 32 if unset.\\ __[[:plugins:spellcast/colortestxml|Click here for an xml that will list the colors for you.]]__||
| | When | Optional |When to send the text to the chatlog. Defaults to PreCast if when attribute is not manually set. Please see note below table for information on valid "times." |
| Return | None | Tells SpellCast to stop parsing the rest of the rules section when hit. This will not undo lines that have already been read.||
| ChangeLock | See Description |Locks or unlocks a slot from being overridden by later parsing. Additional Attributes used: ||
| | When | Optional |Specifies which building set to lock/unlock the specified slot for. Defaults to PreCast if when attribute is not manually set. Please see note below table for information on valid "times." |
| | Slot | Optional |This is the slot to lock or unlock. If no slot is specified, SpellCast will lock/unlock all slots. |
| | Lock | Optional |Specifies if SpellCast should lock or unlock the slots specified. ("yes"/"no") |
| Disable | See Description | Tells SpellCast to disable a particular slot from SpellCast equipment switching and clear any pending changes to that slot. This is the same as using the SpellCast disable command. Takes effect immediately. ||
| | Slot | Optional |This is the slot to disable. If no slot is specified, SpellCast will disable all slots. Supports piping of multiple slots. |
| Enable | See Description | Tells SpellCast to enable a particular slot to SpellCast equipment switching. This is the same as using the SpellCast enable command. Takes effect immediately. ||
| | Slot | Optional |This is the slot to enable. If no slot is specified, SpellCast will enable all slots. Supports piping of multiple slots. |
| Var | See Description | Tells SpellCast perform an action on a user defined variable. Takes effect immediately. ||
| | cmd | Required |This is where you set your command on the variable. Follows the same syntax as the /spellcast variable commands.\\ example: |
Example: \\ \\
**WHEN** attribute information:\\ SpellCast has the ability to process actions before casting starts(**PreCast**), after casting starts(**MidCast**), after casting completes(**AfterCast**), and new to 2.11, when an auto set is triggered(**AutoSet**). The //when// attribute is used to tell SpellCast at which "time" the action should take place.
* Casting related times:
* **PreCast** //or// pre* //or// start* //or// before* will process before casting even begins.
* **MidCast** //or// mid* //or// during* will process after casting begins.
* **AfterCast** //or// after* //or// post* //or// done* will process after casting completes.
* The timeline of actions looks like this:
* Command being intercepted by Spellcast.
* Rules being evaluated, pre/mid/aftercast sets constructed.
* Spellcast waits GearDelay seconds.
* PreCast gear is equipped.
* Spellcast waits PreCastDelay seconds.
* Command (Spell/Ability) is sent to FFXI server.
* MidCastDelay seconds after the command is sent, MidCast gear is equipped.
* MidCastDelay seconds after the command is sent, AfterCast gear is equipped.
* Status related times:
* **autoset** processes when any autoset is triggered.
* **resting** processes when autoset restingset is triggered.
* **engaged** processes when autoset engagedset is triggered.
* **idle** processes when autoset normalset is triggered.
* When attributes support piping to cover multiple times. ie. //when="PreCast%%|%%MidCast%%|%%resting" //
**NOTE:** Some SpellCast commands that relate to the inner workings of SpellCast process immediately as the line is read and do not have a when attribute.
=== ===
bound rule criteria will be checked only if the immediately preceding or rule check evaluated to false. Beyond that, it works exactly the same as an rule and supports the same nesting.
=== ===
rules will only process if the immediately preceding or rule criteria check evaluated to false. rules do not check against any rule criteria themselves. Beyond that, it works exactly the same as an rule and supports the same nesting.
=== ===
As mentioned, you can place //actions// directly into //rules// and they will be processed every time. For a list of actions, please refer to the above section under .
==== Examples ====
Please view the [[:plugins:spellcast:userxml|User Submitted XML]] section for XML examples and starts.
===== Autosets =====
In addition to processing the rules section when you cast a spell, [[:plugins:SpellCast]] will also process the rules section when you trigger certain status changes. These include engaging, resting, idle, etc. This was done in order to give you more control over what gear is equipped on autosets by limiting them with conditions, since previous config options for autosets did not parse rules, it was limited to 1 set name, and no way to be specific on what gear it should automatically equip. This also led to requiring the same set names for every group for auto sets. This new autoset parsing gives you more control, and therefor the config options are deprecated and not recommended!
As of SpellCast 2.11, the way these status changes are handled are via a pretend spell. When you change statuses, SpellCast sends to the rules section a spell named "autoset". This allows you to have special rules that only process on the status triggers. Along with this feature, you can additionally use the when attribute on actions, to specify the different status events.
Example:
The above example is very verbose to show spellcast features. In a real world configuration it could be reduced to:
[[:plugins:spellcast]] supports an old format for dealing with these autosets as well, which is through the config section. This feature has been deprecate however, and you should switch over to this format.
**NOTE:** Since HELM and Fishing sets are simple and should not require any conditionals on what to equip, those 2 autosets are remaining as options and not being added to rule parsing..\\
===== Locking =====
Locking in SpellCast allows you to keep equipment from being overridden without disabling the slot altogether. Locking happens on the /slot//> level of sets and equip actions. Locking is set by adding the lock attribute to a /slot//>.
==== Locking in Sets ====
Locking in sets allows you to keep inheriting sets from overriding a particular slot. Additionally if a slot is locked in a particular set, no equip actions will be able to override that lock while in that set.
==== Locking in Actions ====
Locking in actions allows you to keep any later actions from overriding a slot. Additionally you can set up rules and actions to keep from changing equipment from what you have equipped in FFXI.
**Note:** Locking within the rules section only keeps later actions from changing equipment. Autosets like EngagedSet will still change your equipment even if the last pass through of rules locked the slot. If you need to lock on a more global level use SpellCast disable/enable commands.
==== Locking Examples ====
* To lock equipment to what is currently equipped in FFXI, lock the slot with an empty tag:
* To lock an equipment switch so that it cant be overridden by later equip actions:
Ether ring
Astral ring
Custom pants
===== Rules =====
SpellCast conditionally determines what to do based on various criteria which you set. For a list of the possible rules you can have SpellCast check against, __[[:plugins:spellcast:rules|click here]]__.
===== Variables =====
[[:plugins:spellcast]] supports both predefined variables, and user defined variables. These variables can be used throughout SpellCast in order to perform some more advanced abilities. The basic idea of variables is that when SpellCast reaches a variable in say an action, it translates the variable to whatever value is stored inside before it process the command. SpellCast Variables are also used heavily in Advanced rules. This feature can be used in a growing number of places from actions, to set definition, and even when typing chatlines into FFXI! If you type ///p The weather is currently %Weather// into chat in FFXI for example, your party will actually be told whatever the weather really is in FFXI at the moment you send the chatline.
==== Predefined Variables ====
SpellCast comes with many predefined variables. SpellCast predefined variables are referenced by pre-pending a % sign before the variable name. For a full list of them, __[[:plugins:spellcast:variables|click here]]__.
==== User Defined Variables ====
SpellCast allows you to define your own variables for use. These can be used everywhere the predefined variables can, but have the extra ability to be set to custom values. User defined variables can be set using the section of your xml, the var type actions, or via SpellCast commands. User defined variables are referenced by pre-pending a $ sign before the variable name.
==== Parsing Precedence ====
When chaining parsing between predefined and user defined variables, the predefined variables will parse first.
==== Variable Usage ====
* **Assigning a variable to a value:**\\ set //VariableName// //Value//
* **Assigning a variable to another variable's value:**\\ set //Variable1Name// //$Variable2Name// \\ Note: When assigning one variable to another, it will only transfer one word unless using quotes when defining the second variable.
* **Assigning a variable to reference another variable:**\\ set //Variable1Name// //\$Variable2Name//
* **Combining pre-defined and user defined Variables:**\\ pre-defined variables will process before user defined variables. \\ So in the example below you can have a dynamic staff swap.
$SetStaff
Apollo's Staff
"Apollo's Staff"
"Pluto's Staff"
"Terra's Staff"
"Neptune's Staff"
"Auster's Staff"
"Vulcan's Staff"
"Aquillo's Staff"
"Jupiter's Staff"
==== Chaining Variables ====
When SpellCast processes a string with multiple variable indicators(% and $) in a row, it will attempt to resolve the variable name multiple times. This allows for some nice features. I should note that if mixing between custom and predefined variables, the ordering of indicators is important. SpellCast will remove indicators from right to left, and replace strings from left to right.
One common use of this is to equip the correct obi based on the weather element as follows:
Dorin Obi
Rairin Obi
Suirin Obi
Karin Obi
Suirin Obi
Furin Obi
Korin Obi
Anrin Obi
$%SpellElementObi
===== Usage In Game =====
Once you've completed your XML file you can begin using [[:plugins:spellcast]] inside Final Fantasy XI. Without changing a thing you may begin casting spells right from your //Spell Menu//. [[:plugins:spellcast]] will intercept the command and begin to parse its rules for one that includes the spell you selected. You may also type in the spell to the chat log. See the following example.
/ma Cure III
The above example will cast //Cure III// on whom ever you have targeted. Notice we do not enclose the spell name with quotation marks or specify //// as our target. The plugin as mentioned before removes those requirements.
We can also use simpler spell names.
/ma cure3
This has the same effect as our previous example.
==== Using with Macros ====
Using [[:plugins:spellcast]] with your macro palettes is the same as typing them in to the chat log. For example a macro for //Cure III// would contain only the following.
/ma Cure III
OR
/ma cure3
Since all of our gear swaps are handled by the rules we defined in our XML file we do not need to include them. Therefore macro's are reduced to a single line while retaining functionality.
==== Using with Scripts ====
Using [[:plugins:spellcast]] in scripts can be achieved using the following syntax.
Old Style, Not needed:
input /ma "Cure III"
using ma handler in scripts, no input command needed:
ma Cure3
Using as quick aliases:
cure3
==== Spellcast + Cancel = Spellcancel ====
With the addition of the cancel plugin to the windower plugin repertoire, some FFXI annoyances can now be fixed by use of SpellCast.\\ **You must have the [[:plugins:cancel]] plugin loaded in order for these to in fact cancel your buffs. Canceling buffs is not a SpellCast feature itself. **
:!:**WARNING:** The delays used in the following examples have been tested to work in a lag free area. You should test and adjust the delays accordingly for yourself. Anything from lag to planet alignment could delay the canceling to be too late if delay is not set short enough. These suggested delays do not consider equipment that enhances fastcast.
**Translation: Be prepared for a misfire of cancel activating too late. These rules are here as a starting point, not a guarantee.**
* Casting Utsusemi: Ichi does not override Utsusemi: Ni if shadows still remain. If we use Cancel for buff id 66 we can auto-cancel the remaining shadows. Note: Ichi over Ni is the only case this is needed for.
cancel 66
* Casting Sneak does not override Sneak. If we use Cancel for buff id 71 we can auto-cancel Sneak before the new cast takes effect. \\ **NOTE:** The following code does not differentiate between self casting and casting on others. Currently SpellCast is unable to tell who you have targeted with , so this is setup to only work on .
>
cancel 71
* Casting Stoneskin does not override Stoneskin. If we use Cancel for buff id 37 we can auto-cancel Stoneskin before the new cast takes effect.
cancel 37
* Using Spectral Jig does not override Sneak. As a result, the entire effect fails, even Invisible! Since Invisible is removed by using Spectral Jig, we only need to cancel Sneak.
cancel 71
===== Dynamic Sets =====
You may make use of the variable system to create Dynamic sets that you can change based on rules and reuse at a later date.
To do this, you would setup a new set and give each slot you want to be dynamic a value of a variable, as so:
$CustomMain
$CustomBody
$CustomHands
$CustomLegs
Now you can do /sc var set CustomMain "Light Staff" and now any time that set is called it will use light staff.
You can also use the to set pieces based on rules.
these sets will not change until you change them by resetting the variables.
Be creative!
===== Performance tips =====
**Do not repeat rules!(Nest when possible)**\\ example of improper use:
...
...
...
See how Main Job is duplicated? That can be changed to:
...
...
...
This is better, but lets say we cast Thunder, we still have extra checks which brings us to the next tip.
**Make use of //if//, //elseif// and //else// rules.**\\ example:
...
...
...
Now if we cast Thunder, SpellCast wont worry about checking if we casted Fire or Water.
**Do not wildcard 1 single rule for a full wildcard.**\\ examples of improper use:
...
or
...
Get the idea? It will ALWAYS return true... Dont waste CPU power 'checking'. Don't script a rule unless it should be restricting something.
If you want an action to ALWAYS be processed, regardless of group or job, don't put the action in any rule.\\ example:
The first action will always be processed, the 2nd one will only be processed if main job is blm.
===== Troubleshooting =====
* **SpellCast is changing my gear for everything! How can I stop it for 1 spell?**\\ Prefixing a command with /raw will prevent the command from being parsed by SpellCast. \\ Example: /raw /ma "Cure IV" \\ \\ Note: You do not get spell rewriting effect with raw!
* **SpellCast error "Can not find set"**\\ The most likely cause of these errors beyond misspelling a set is that a set was declared but not actually defined. Check the autosets declared in your section. SpellCast will assume that these sets are present in every one of your groups. If you are currently using a group that does not have the set inherited or defined, SpellCast will still look for it when you trigger that group. An example would be having a RestingSet declared from when you were writing those BLM rules, but then you started setting up SpellCast for your WAR who might rest but doesn't change gear.\\ \\ Fixing this error can be as easy as adding an empty set to your group of sets for WAR as follows:
* **FFXI error "You were unable to change your equipped items."**\\ This is an error message from FFXI and will actually happen even when not using SpellCast if you do any of the following:
* Actions that will cause the error:
* Equipping an item to the wrong slot, ie. a ring to an earring slot will produce this error.
* Having two of an item, one of them equipped, and requesting to equip that same item to the same slot may produce the error and not actually change equipment(need more testing).
* Actions that wont cause the error:
* Misspelling an item will not produce any errors, but will not equip anything.
* Having two of an item, one of them equipped, and requesting to equip that same item to another slot does not appear to produce an error.
* Requesting to equip an item that is already equipped, only one of the item in inventory, does not produce the error.
* Using an invalid tag(one that doesn't exist, not one that is incorrect) for the equipment slot in SpellCast will produce no errors in FFXI or SpellCast but will not do anything.
* **"SpellCast is changing gear too early for my aftercast action."**\\ SpellCast 2.11 currently has a pretty good idea of when most casts complete, and processes aftercast actions accordingly. If however you find that SpellCast is processing them too early, you can set additional delays. Please see the AfterCastDelay action for more info.
* **Problems using < and > in SpellCast command actions**\\ LessThan and GreaterThan symbols have special meaning in xml files(like the one SpellCast reads.) These are used to define the beginning and end of tags. In order to use them in your xml files for other uses, like putting in FFXI commands, you can use special four character tokens **<** and **>** in place of them. SpellCast will know to replace them with **<** and **>** respectively when it processes the command.\\ \\ As an example, suppose you wanted to tell SpellCast the default target for some spell. The following would be incorrectly parsed:
\\ The correct format for this would be:
\\ NOTE: While it may be annoying, this is the way the xml standard deals with < and > inside xml files. It is completely proper for SpellCast to use the 4 character tokens for < and >.
* **Nighttime rules not processing**\\ Nightime rules not processing are typically caused by an error in logic. Where as daytime rules are time is greater than 5:59 **AND** less than 18:00, nighttime rules should be time less than 6:00 **OR** time greater than 17:59. Check to make sure your nightime rule looks something like this.
* **Nighttime rules work, but when I engage I get the wrong set**\\ In the past SpellCast did not process the rules section for autosets. This has been changed as of SpellCast 2.11. Please read the autoset section for information if you are having issues.\\ \\ What follows is the **old** explanation of this issue.\\ Spellcast does not process the rules section for autosets (normalset, engageset, restingset.) There is hope however ^^. With the new variable system you can specify variablenames as part of the setname for these autosets, and it will try to match up the sets. For an example of how one might implement this in spellcast/autoexec, __[[:plugins:spellcast:NightimeDaytime|click here]]__. That being said, through the use of AutoExec and SpellCast groups(one for day and one for night), you could set up different auto sets anyway.
* **Unable to set search comments by macro while SpellCast is running**\\ SpellCast overrides the /sc command in FFXI. In order to update your search comment use either **/seacom** or **/raw /sc** in it's place in game.
* **Unable to cast tier 2 and tier 3 spells /SMN**\\ Because of the way SpellCast is setup to add support for quick aliases, when SpellCast detects summoner job it will assume you are attempting to use blood pacts if there is a blood pact equivalent for the spell. Essentially, BLM/SMN is snot supported. ^^
===== Known Issues =====
==== SpellCast Issues ====
* SpellCast 2.16 is unable to find the time signature for some users and will not load. An alternate method has been found and will be used in SpellCast 2.17. Some users are able to use 2.15 in the meantime available here: http://windower.net/plugins/oldplugins/spellcast/2.15/
* FFXI macro processing continues after spell cancellation for some users when SpellCast is loaded. Windower issue?
==== Non SpellCast Issues ====
* Windower is currently not sending special characters(used for other languages) to FFXI correctly. This means non english language will have issues with gear and spells that have them in their names. __[[http://forums.windower.net/index.php?showtopic=11758&view=findpost&p=164105|Source]]__
===== Reporting Errors & Help =====
==== Help with XML ====
Often times, issues are caused by errors in user XML.
**Before you ask for help please read the following:**
- **Please validate your XML**. Syntax errors are enough to render whole parts of your XML useless. To validate your XML, simply open the XML file with Firefox, this will point out most flaws. If you don't have Firefox, we can recommend pasting your XML to [[http://www.validome.org/xml/]] (don't forget to check Well-Formedness Only). There is no use for anyone to look at your XML until either method stops reporting errors. Using an XML editor like __[[http://notepad-plus.sourceforge.net/uk/site.htm|Notepad++]]__ can help prevent such errors.
- Once you have checked that your XML is valid, and you still have trouble, __[[http://forums.windower.net/index.php?act=Search|search]]__ the forum first.
- If you can't find anything relevant, post your **complete** XML on [[http://paste.windower.net]]. Don't post just the part that doesn't work. Seeing the whole file will give people helping you a better picture, a chance of figuring out what the values of certain variables might be, and the ability to possibly spot logic errors elsewhere in the file that might have impact on the part that isn't working. Set the syntax highlighting to XML.
- Make a new post on __[[http://forums.windower.net/index.php?showforum=25|SpellCast Forum]]__, describe your problem and include a link to your XML on the __[[http://paste.windower.net|Pastebin]]__.
==== Issues with Spellcast itself ====
To report a new issue, please go to the __[[http://forums.windower.net/index.php?showtopic=13662|SpellCast 2.21 Bug Report Thread]]__ and check to see that it is not already listed there and just has not been updated on the wiki. If it is a new bug feel free to post, with information on how to reproduce it. **If your issue MIGHT be an issue with your XML, please check that before reporting it as an issue.**
Power users may directly add the bug to the Bug Tracker: http://forums.windower.net/index.php?autocom=tracker&showproject=3