I read the little guide bit on http://wiki.windower.net/plugins/spellcast
but uh... It kinda went over my head, behind me, then kicked me down some stairs... Just wondering if there's like an Idiot's Guide to spellcast somewhere.
Hur Dur New To Spellcast |
||
|
hur dur new to spellcast
I read the little guide bit on http://wiki.windower.net/plugins/spellcast
but uh... It kinda went over my head, behind me, then kicked me down some stairs... Just wondering if there's like an Idiot's Guide to spellcast somewhere. The page you linked has basically everything there is to know on it. There is no real quick and simple method to understanding it, read through it, use some user generated XMLs as a basis for your own (also on the page you linked) and mess about. Takes some toying to get things how you like em.
Only thing I would recommend is downloading Notepad++ just to make the XML formatting stand out easier and tabbed files for all your jobs. Also being able to find/replace say Heafoc Mitts over Alkys in every job that uses it in the press of one button is infinitely useful. 1. Don't rely on a user made spellcast to work for you 100%. If it's not a job you care about then sure, use one. You'll end up having issues regardless unless you make it yourself. They are excellent resources to look at how other people do things, and take examples from them or use their spellcast and plug in your gear although I would not recommend that, because if you had and issue down the road and you didn't teach yourself how to make a spellcast from scratch you wouldn't know the first thing towards fixing it.
When you create your own spellcast from scratch, you're tailoring it towards your play style and not the play style of someone else when using their spellcast. 2. Start out by learning the basics. Oh yea, download this: Notepad ++. There are more advanced programs that auto-complete your tags to speed up the process of writing rules, but it isn't necessarily. If you do wan't to know of such said program you could "look" for Visual Studio 2010 (link is a 30 day free trial, wont give you the full version) and try it out, I personally use it over notepad ++ but that's only because I like the auto-complete tags feature. Code xml <?xml version="1.0" encoding="utf-8"?>
<spellcast xmlns:xi="http://www.w3.org/2001/XInclude">
<config
<!-- This is to configure your xml, you really dont need anything here unless your debugging -->
/>
<variables>
<!-- Don't worry about this right now, it's more advanced -->
</variables>
<sets> <!-- This is where you make your equipment sets -->
<group Name="JOB" Default="Yes"> <!-- This is a group, you can make multiple groups if you want but stick to just one for now. Replace JOB with the job your making this spellcast for (like White Mage). -->
<set Name="My First Set"> <!-- This is a set, nothing very complicated here -->
<main>SomeCoolWeaponChoice</main> <!-- This is where you put the equipment name, For example: Healer's Briault +1 or Hlr. Briault +1 will work. Just put one or the other with no mistakes otherwise it wont work. -->
</set>
</group>
</sets>
<rules> <!-- This is where you create the rules to make your sets do their job -->
<if Spell="Cure"> <!-- This is a rule, it is checking to see if the spell your casting is Cure and if it is it will proceed to the next line, if it isn't it will skip over this rule -->
<equip When="Precast" Set="My First Set" /> <!-- This is the innerworkings of a rule, this is what make rules so powerful. If the spell is Cure, then during precast it will equip your "My First Set" set and all the gear in that set. -->
</if>
</rules>
</spellcast>3. Always try to keep your indentations correct. It helps keep things organized. BTW, you can leave comments: Code xml <!-- This is a comment --> Comments are incredibly useful in long xml's and I would encourage you to make comments as you go. If you have to go back, and you don't remember what this rule does but you have to tweak it you could end up messing something up if you don't know how to do it correctly. Make notes as you go! 4. Learn about rules. Start off with an auto set, very easy. do ctrl+f on spellcast page to read about it. IT really only deals with when your engaged, healing/resting, and idle/not doing anything. Very basic, yet very powerful. 5. Make a rule, nothing difficult. Code xml <if spell="Cure">
<equip when="precast" set="My first Set" />
</if>6. You noticed a few things. First, I used the same set name as the one I made above. Make sure you do that and keep them exactly the same name. You also see /> at the end of my equip line, this is a shortcut basically. If I didn't use that I would of had to do: <equip when="precast" set="My first Set"></equip> It saves time. 7. Start writing the skeleton of your spellcast. Don't get complex, figure out what spells you want to do and tackle the easy ones first that don't require anything very complicated. Remember, you have precast, midcast, and after cast at your disposal. Using these three is what makes spellcast as great as it is. It's even more powerful with advanced rules and variables but don't try to get into that stuff until you get the basics down. 8. Once you have your skeleton made out, and the easy spells done, stop. You need to test the spells you just finished, and make sure they are working properly and equipping the gear properly. To do this you need to save, but you need to save it in a specific location and properly. You need to save it in your spellcast folder > Plugins > Spellcast and name it YourCharacterName_Job, in this guide I'll be using Example_WHM. ![]() You should save every change you make to your xml in the future, because if you go ahead and write some huge rule that you think works, and it turns out it doesn't, your going to be extremely pissed off, believe me. 9. If your encountering some errors, or it's not working properly for a few spells, you should enable debug mode on your xml. To do this add this to the very top of your xml: Code xml <?xml version="1.0" encoding="utf-8"?>
<spellcast xmlns:xi="http://www.w3.org/2001/XInclude">
<config
Debug="True"
ShowgearSwaps="True"
ShowSpellInfo="True" />See the debug line? That is the one I'm talking about. You should have a config section in your xml. Now I'm going to purposely mess up this script to show you how debug works. Code xml <rules> <if Spell="Cure"> <equip When="Precast" Set="My First Sets" /> </if> </rules> You notice that I added an s at the end of my set name, misspelling it. I'm also going to add the healer's body to my first set so it actually has something real to look for. ![]() Let's say you didn't know what the error was, or why it was happening. Let's open up our debug file, located in the windower folder > plugins > spellcast under the name debug_PlayersName.log (extensions could be removed based on your folder settings). For example mine would be: debug_Kalilla.log. Let's see whats wrong: [1:43:37 AM] 11428:<28892> Attempting to auto load XML. [1:43:37 AM] 11428:<0> Checking: Kalilla/SMN_BLM [1:43:37 AM] 11428:<0> Loading filename: Kalilla/SMN_BLM.xml [1:43:37 AM] 11428:<0> Checking: Kalilla/SMN [1:43:37 AM] 11428:<0> Loading filename: Kalilla/SMN.xml [1:43:37 AM] 11428:<0> Checking: Kalilla_SMN_BLM [1:43:37 AM] 11428:<0> Loading filename: Kalilla_SMN_BLM.xml [1:43:37 AM] 11428:<0> Checking: Kalilla_SMN [1:43:37 AM] 11428:<0> Loading filename: Kalilla_SMN.xml [1:43:37 AM] 11428:<0> Valid XML. Checking for Validity [1:43:37 AM] 11428:<0> Documented Kalilla_SMN.xml loaded successfully! [1:43:37 AM] 11428:<0> Checking for Required Version [1:43:37 AM] 11428:<0> Writing to Console: SpellCast: Kalilla_SMN.xml Loaded Successfully [1:43:37 AM] 11428:<0> Entering ChangeGroup(INIT_LOAD) [1:43:37 AM] 11428:<0> checking for group [1:43:37 AM] 11428:<0> entering for loop in ChangeGroup [1:43:37 AM] 11428:<0> Loop... [1:43:37 AM] 11428:<0> found attrib Default on White Mage [1:43:37 AM] 11428:<0> Exited the for loop [1:43:37 AM] 11428:<0> found group <White Mage> and returning [1:43:37 AM] 11428:<0> Writing to Console: SpellCast: Changed group to White Mage [1:43:37 AM] 11428:<0> printing statistics [1:43:37 AM] 11428:<0> Writing to Console: SpellCast: v2.45 Information - \cs(0,255,0)DEBUG ENABLED\cr [1:43:37 AM] 11428:<0> Writing to Console: File: \cs(255,255,255)Kalilla_SMN.xml\cr - Group: \cs(255,255,255)White Mage\cr [1:44:23 AM] 15388:<45068> Loading filename: example_whm.xml [1:44:23 AM] 15388:<16> Valid XML. Checking for Validity [1:44:23 AM] 15388:<0> Documented example_whm.xml loaded successfully! [1:44:23 AM] 15388:<0> Checking for Required Version [1:44:23 AM] 15388:<0> Writing to Console: SpellCast: example_whm.xml Loaded Successfully [1:44:23 AM] 15388:<0> Entering ChangeGroup(INIT_LOAD) [1:44:23 AM] 15388:<0> checking for group [1:44:23 AM] 15388:<0> entering for loop in ChangeGroup [1:44:23 AM] 15388:<0> Loop... [1:44:23 AM] 15388:<0> found attrib Default on White Mage [1:44:23 AM] 15388:<0> Exited the for loop [1:44:23 AM] 15388:<0> found group <White Mage> and returning [1:44:23 AM] 15388:<0> Writing to Console: SpellCast: Changed group to White Mage [1:44:23 AM] 15388:<0> printing statistics [1:44:23 AM] 15388:<0> Writing to Console: SpellCast: v2.45 Information - \cs(0,255,0)DEBUG ENABLED\cr [1:44:23 AM] 15388:<0> Writing to Console: File: \cs(255,255,255)example_whm.xml\cr - Group: \cs(255,255,255)White Mage\cr [1:44:34 AM] 8036:<11263> Loading filename: Example_WHM.xml [1:44:34 AM] 8036:<0> Valid XML. Checking for Validity [1:44:34 AM] 8036:<0> Documented Example_WHM.xml loaded successfully! [1:44:34 AM] 8036:<0> Checking for Required Version [1:44:34 AM] 8036:<16> Writing to Console: SpellCast: Example_WHM.xml Loaded Successfully [1:44:34 AM] 8036:<0> Entering ChangeGroup(White Mage) [1:44:34 AM] 8036:<0> checking for group [1:44:34 AM] 8036:<0> entering for loop in ChangeGroup [1:44:34 AM] 8036:<0> Loop... [1:44:34 AM] 8036:<0> we has a name! White Mage [1:44:34 AM] 8036:<0> the name matches current group, its valid. [1:44:34 AM] 8036:<0> Exited the for loop [1:44:34 AM] 8036:<0> found group <White Mage> and returning [1:44:34 AM] 8036:<0> Writing to Console: SpellCast: Changed group to White Mage [1:44:34 AM] 8036:<0> printing statistics [1:44:34 AM] 8036:<0> Writing to Console: SpellCast: v2.45 Information - \cs(0,255,0)DEBUG ENABLED\cr [1:44:34 AM] 8036:<0> Writing to Console: File: \cs(255,255,255)Example_WHM.xml\cr - Group: \cs(255,255,255)White Mage\cr [1:48:03 AM] 16292:<209306> SpellSearch Returned: (yes) Cure : <t> (no) - NotST [1:48:03 AM] 16292:<0> Final Spell name: Cure [1:48:03 AM] 16292:<0> Parsing rules [1:48:03 AM] 16292:<0> depth increased [1:48:03 AM] 16292:<0> PASSED: Depth: 1 <if Spell="Cure"> [1:48:03 AM] 16292:<0> depth increased [1:48:03 AM] 16292:<0> entering ParseRuleActions: EQUIP - with spell Cure [1:48:03 AM] 16292:<0> type=equip [1:48:03 AM] 16292:<0> checking when: Precast [1:48:03 AM] 16292:<0> parsing equip actions for precast [1:48:03 AM] 16292:<0> entering ParseEquipAction for Precast [1:48:03 AM] 16292:<0> Loading set: My First Sets [1:48:03 AM] 16292:<0> entering LoadSet for GearSet: <Precast> [1:48:03 AM] 16292:<0> with group White Mage [1:48:03 AM] 16292:<0> and set My First Sets [1:48:03 AM] 16292:<0> entering for to find group for loadset <GROUP White Mage ><SET My First Sets > [1:48:03 AM] 16292:<0> found set by name My First Sets [1:48:03 AM] 16292:<0> breaking [1:48:03 AM] 16292:<0> exiting for when checking for group White Mage [1:48:03 AM] 16292:<0> entering for on sets with group White Mage looking for My First Sets [1:48:03 AM] 16292:<0> [ERROR] did not find Set: My First Sets in Group: White Mage [1:48:03 AM] 16292:<0> Writing to Console: SpellCast: Did not find Set: My First Sets in Group: White Mage [1:48:03 AM] 16292:<0> Loaded the set, now modifying gear set [1:48:03 AM] 16292:<0> ========== Modifying Precast ========= [1:48:03 AM] 16292:<0> Precast Set modified [1:48:03 AM] 16292:<0> done checking when [1:48:03 AM] 16292:<0> end for/rule parse [1:48:03 AM] 16292:<0> depth decreased [1:48:03 AM] 16292:<0> end for/rule parse [1:48:03 AM] 16292:<0> depth decreased [1:48:03 AM] 16292:<0> rules fully parsed [1:48:03 AM] 16292:<0> Finished parsing rules [1:48:03 AM] 10512:<0> Handling spell: Cure [1:48:03 AM] 10512:<0> Starting Precast actions>>> [1:48:03 AM] 10512:<0> Equipping Precast Gears [1:48:03 AM] 10512:<0> gear changing complete for Precast [1:48:03 AM] 10512:<0> >>>finished precast actions [1:48:03 AM] 10512:<0> Casting Spell: /raw /magic "Cure" <t> [1:48:03 AM] 10512:<16> is not <st>, waiting [1:48:04 AM] 10512:<593> waited for midcast delay done. [1:48:04 AM] 10512:<0> Starting Midcast [1:48:04 AM] 10512:<0> Equipping Midcast Gears [1:48:04 AM] 10512:<0> gear changing complete for Midcast [1:48:04 AM] 10512:<0> Finished Midcast [1:48:13 AM] 13296:<9250> SpellCast: Unloading There we go, we have our answer!....yea Debug has so much garbage, but it isn't nonsense. I urge you to to examine its structure. I'm not saying learn everything here, just the logic. The logic is VERY IMPORTANT. This is how spellcast "thinks", and when your writing complicated rules you have to think this way. When you cast something, what are you doing? I mean, what are you really doing? Think about it for a second. Sure you may be casting cure on a target, but how many steps goes into this? I'm not expecting you to know, because I don't know. It isn't about knowing how many steps it takes to actually cast cure on someone, this is about knowing how to think logically and in the appropriate steps to successfully complete what you set out to do, make your very own spellcast. Now I'll do the looking for you, lets pull out cure from this debug mess: Code xml [1:48:03 AM] 16292:<209306> SpellSearch Returned: (yes) Cure : <t> (no) - NotST [1:48:03 AM] 16292:<0> Final Spell name: Cure [1:48:03 AM] 16292:<0> Parsing rules [1:48:03 AM] 16292:<0> depth increased [1:48:03 AM] 16292:<0> PASSED: Depth: 1 <if Spell="Cure"> [1:48:03 AM] 16292:<0> depth increased [1:48:03 AM] 16292:<0> entering ParseRuleActions: EQUIP - with spell Cure [1:48:03 AM] 16292:<0> type=equip [1:48:03 AM] 16292:<0> checking when: Precast [1:48:03 AM] 16292:<0> parsing equip actions for precast [1:48:03 AM] 16292:<0> entering ParseEquipAction for Precast [1:48:03 AM] 16292:<0> Loading set: My First Sets [1:48:03 AM] 16292:<0> entering LoadSet for GearSet: <Precast> [1:48:03 AM] 16292:<0> with group White Mage [1:48:03 AM] 16292:<0> and set My First Sets [1:48:03 AM] 16292:<0> entering for to find group for loadset <GROUP White Mage ><SET My First Sets > [1:48:03 AM] 16292:<0> found set by name My First Sets [1:48:03 AM] 16292:<0> breaking [1:48:03 AM] 16292:<0> exiting for when checking for group White Mage [1:48:03 AM] 16292:<0> entering for on sets with group White Mage looking for My First Sets [1:48:03 AM] 16292:<0> [ERROR] did not find Set: My First Sets in Group: White Mage [1:48:03 AM] 16292:<0> Writing to Console: SpellCast: Did not find Set: My First Sets in Group: White Mage [1:48:03 AM] 16292:<0> Loaded the set, now modifying gear set Alright... Simple breakdown: Line #2: It knows its Cure, so its looking at your XML to see if any of your rules match with Cure. Line #5: It found a rule that uses Cure! Looking deeper Line #7: It is reading your rule, and knows you want to start equipping. Line #9: It sees that you want this rule to start equipping during precast. Line #12: It sees you want to equip the equipment in "My First Sets" set, and proceeds to find this set in your xml. Line #16-18: It is searching your sets/group and looking for My First Sets, but breaks the operation because no set has that name. Line #19-20: It exits that group, and looks to see if you have another group as a possibility, which you only have that one group. Line #21-22: It has decided that you don't have a set by the name "My First Sets", and proceeds to follow the steps with the information it has, which is none :). 10. Alright, lets back up for a second. What have you learned so far (hopefully)? You should know the structure of the spellcast, you should know what a set is, and what groups are. You should know what a rule is, although you probably don't know how to make anything complicated yet. If you can cast cure, and have it equip to something by now then your on the right track. Also, if you followed the debug section (#9) then you should know how to look through the debug to figure out whats wrong with your spellcast xml and pinpoint the exact location where things are going terribly wrong. You'll get more practice with this as you write rules, I encourage you to save after every rule you make to test the steps and make sure it is running smoothly, if you notice something isn't working correctly look at your debug and find the location where it isn't working properly. This wont tell you what you have to do, that's the challenge, but it gives you the knowledge of what isn't working. 11. Alright, now that you have the basics down I think it's time you can get slightly more advanced. Your going to need a few resources though first: Spellcast Wiki Page - Download Spellcsat v2.45 (Most Recent Since Oct. 8, 2011) Rules Page Variables Page User Submitted XML's XML Code Updater (Very Useful) You will be visiting these pages quite a lot, bookmark them if you must, but you'll want to have quick access to them as your writing. I will start off by expanding more on rules, before we get into variables and advanced rules. There is still a few things to go over before your ready to mess with those. By advanced rules, I mean rules that have rules inside the rule, inside the rule~ and so on. Here is a challenge! This is just for learning, don't expect to test these examples in game because they will be too complicated. Write up a rule, but not any type of rule. Make a rule that works only with White Magic, using the Healing Magic Skill, that is a Light element, using the Main Job White Mage, with your level greater than level 1, during the time greater than 3:00 vana'diel time, during Ice weather, on Watersday, within a Spell Target Distance Less Than 21 Yalms, only when the Main Slot is equipped with Surya's Staff +3, and only when the Spell is Cure. *whew* Also, you must write this rule to equip during midcast and equip set My First Set. Good Luck! (Answer in spoiler, don't cheat!)Alright, so you made your code and it might look like mine, or it might not. Spellcast has great flexibility, and you should as well... so here is your next challenge. With the same code you made before, make it so it will work with Scholar (main job) as well but do not combine it with your current rule with white mage, it has to be separated (for this challenge, feel free to combine stuff in your own xml :P This is just for the challenge). Also... I don't like Ice weather anymore... change it to double fire weather. And make it so it only works when the time is less than 16:00 (KEEP THE OLD TIME AS WELL). Good Luck! (Answer in spoiler, don't cheat!) Work In Progress The key to it is simple trial and error. Eventually you'll start figuring it out and what stuff does.
Using an already made user xml is great for that. Copy, modify it, and see what's going on. Fenrir.Moldtech said: » The key to it is simple trial and error. Eventually you'll start figuring it out and what stuff does. Using an already made user xml is great for that. Copy, modify it, and see what's going on. Kali, did I ever tell you I loved you? >.>;;
I've been screwing around with my XML's for ages but never figured out the most basic thing... Where to save the bloody things, no guides told me, people told me to just save it, you're the first one to actually give me a file location. :D |
||
|
All FFXI content and images © 2002-2025 SQUARE ENIX CO., LTD. FINAL
FANTASY is a registered trademark of Square Enix Co., Ltd.
|
||