D'Hoffryn's Guide to Ashitacast
Part 1 – Weapon Swapping
There are many occasions when you need to change the weapon that you are using, such as when you are doing a weapons trial, you have been using your very best weapon and you need to quickly swap to the trial weapon before the monster dies.
This shows you how to configure Ashitacast to toggle between three weapons in sequence on the press of a function key. This technique can be used to swap any equipment slot, or group of slots. You will need two variables in the variables section of your script –
<variables> <var name="Primary">"Twash"</var> <var name="WSet">0</var> </variables>
You will also need to define the function key that you want to use, you can set any default values for any of your variables in this section –
<init> <command>/bind F10 /wswitch</command> <setvar name="Primary" value="Twash"/> </init>
You don’t strictly need the setvar command in the init section as the variable is set to a default value when it was created (in the first box above), but this shows that you can change the value before it is used for the first time (and every time that you change job or sub job).
I have assigned the F10 key as the one I want to use, but you can set it to any F key that has not already been bound in your default.txt file.
When the F10 key is pressed the command
/wswitch is issued to AshitaCast. What happens when
the command is issued is explained a bit further down.
It’s worth noting that you can enter the command by hand, you don’t need to use a function key, I just use one because I’m lazy and pressing one F key is much quicker than typing a command. If you use this technique for several jobs it is wise to use the same F key for ALL jobs.
The power of this technique is that once you have edited your sets any changes you make to your weapons or sets will apply to all your sets.
This is my physical turtle, or TP set for my THF (I have removed the augments to make it easier to read). You will see that I have not included any data for the main or sub slots –
<set name="Basic" baseset="$Primary"> <ammo>Vanir Battery</ammo> <head>Volte Cap</head> <body>Volte Jupon</body> <hand>Volte Bracers</hands> <legs>Volte Hose</legs> <feet>Volte Boots</feet> <neck>Veisa Collar</neck> <waist>Chaac Belt</waist> <ear1>Mache Earring +1</ear1> <ear2>Moonshade Earring</ear2> <ring1>Defending Ring</ring1> <ring2>Vengeful Ring</ring2> <back>Moonbeam Cape</back> </set>
The missing slots will be set by the baseset, which I have called Primary.
Now you will need to identify the different weapons, I have included all 3 of my weapon sets below and shown main and sub, though you could just define main if you don’t want to swap the off-hand weapon slot –
<set name="Bang"> <main>Em. Baghnakhs</main> <sub></sub> </set> <set name="Sandung"> <main>Sandung</main> <sub>Thief's Knife</sub> </set> <set name="Twash"> <main>Twashtar</main> <sub>Vajra</sub> </set>
Now to the meat, when the function key is pressed and the command is issued, it is processed in the inputcommands section –
<inputcommands> <cmd input="/wswitch"> <if advanced="$WSet=0"> <setvar name="WSet" value="1"/> <setvar name="Primary" value="Sandung"/> </if> <elseif advanced="$WSet=1"> <setvar name="WSet" value="2"/> <setvar name="Primary" value="Bang"/> </elseif> <elseif advanced="$WSet=2"> <setvar name="WSet" value="0"/> <setvar name="Primary" value="Twash"/> </elseif> </cmd> </inputcommands>
The current value of the WSet variable is tested. If it is currently “0” it is changed to “1” and the variable called Primary is set to “Sandung”.
- If it is currently “1” it is changed to “2” and the variable called Primary is set to “Bang”.
- If it is currently “2” it is changed to “0” and the variable called Primary is set to “Twash”.
So, What Actually Happens?
Well, every time you press the F10 key (in my example) the two variable change, cycling every three presses.
Every time they change AshitaCast updates the current set based on the new value of Primary. You should consider the set (in the example above I called it Basic) as being “The contents of Basic plus the contents of whatever Primary is pointing at”.
Have fun swapping your weapons, if you are not sure of anything I can be reached on Discord, or in the LS chat.
D’Hoffryn, Sept 2023