AutoCraft Documentation - steponmepls/scripts Wiki

What is this?

It automates the start of new macros by sending keys to the game process.

How does it work?

You set the number of desired loops (aka how many crafts you need), then you fill the pairs of forms beneath depending on how many macro you need to complete the task. The left form is for the in-game bind you need to use the macro, the right form is for the total duration of the macro (in milliseconds).

In order for your bind to be parsed properly it needs to follow a certain syntax explained more in depth on the AHK documentation. It is very important you do so or your bind might not work or something else might be sent in return causing other hotbar actions to be used instead of your bind (ex: using home or Home instead of {Home} is the same as sending an h+o+m+e key sequence).

Here is a list of bind names you might find useful. Examples of valid binds and bind combos are:

1
g
{2}
{z}
{Home}
{Space}
{Ctrl down}a
{Shift down}{Alt down}3

Normally you would also need to append an Up event when using binds with modifiers like so {Ctrl down}3{Ctrl up} but in order to address inherent game latency issues (Up event being sent too fast and causing the game to receive a 3 instead of Ctrl+3) I added an hardcoded Up event for Ctrl, Shift and Alt modifiers with a 500ms filler delay. Without this hack there would be a 10% fail chance.

As I already mentioned, the delay is in milliseconds and it's needed so that AHK will wait x amount of time before starting a new loop iteration. Check your crafting macro duration in Team Craft and convert it in milliseconds (41s is 41000 milliseconds). If you use a macro recursion plugin, meaning your macro features /nextmacro at the end, you can simply sum up the duration of all the macros and use that instead of splitting it in 2 or 3 and adding a delay for each macro part.

In most of the cases the default delay I set for each action will work for you. There are some cases were people might play with high latency and this is why there's a Delay tab letting you tweak the values yourself. You can also save the values for future runs. This will generate a config file in the directory where the script is stored. If no value is found or if there's no config file at all, the script will just use the default values. I tested the default value mainly at 60ms and everything always worked perfectly.

There were instances of binds being sent to soon when playing at high ping (180-200ms) but doubling the Synthesize delay value to 2400ms fixed the issue. People using XivAlexander might not even need to tweak these values at all but I will leave the testing to you.

What's the meaning of each delay form?

What are the limitations of this script?

In order to avoid loss of focus when moving the cursor during crafting macros - which would otherwise prevent the use of Confirm - you need to minimize the game in the taskbar. The script does that automatically for you when starting a loop. Minimizing is only needed when using menu/UI navigation binds such as Up, Down, Left, Right, Confirm, Cancel, etc.. I haven't tested it yet with fullscreen video settings because I only play in borderless windowed so I don't know if the built-in minimize would fuck up your game (nor do I care honestly). You could test it yourself with the in-game crafting tests.

How do I keep track of what is happening if I can't see anything?

A workaround I use is OBS. Add the game as game/window video source, right click on it and then pick Windowed Projector. This will generate a small popup window showing you the game video source. Peeking at the game from inside OBS without any of this is also a solution.

Can I use this script for something else other than crafting?

Yes. You just have to toggle off the Auto click option in Advanced which would otherwise send a chain of Confirm to autoclick on Synthesize at the end of each loop. Other use cases are loops of coffers unboxing or logos extraction.