The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.
If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.
User:Quin/Macros
I primarily use AutoHotKey on my PC. However, I will shortly be experimenting with Applescript, as I usually play the game on my Mac Laptop.
AutoHotKey Scripts
Charcoal
Description & Usage
This is an edited version of a macro Tesuji of T3 wrote. I rewrote it in T3 for operating my 10 charcoal ovens, but it actually can support 12 ovens. You must be in full-screen (not window) mode for this macro to work properly. It has settings to make the mouse move super-fast, so I typically don't have this macro always running in the background.
Controls are as follows:
- Setup
- Ctrl+Shift+Z: Add a window and position it. Hover the mouse over the window and press this key. Do not move a window after it has been placed.
- Ctrl+Shift+X: Clear all window settings. You must set them up again by using Ctrl+Shift-Z on each window.
- Ctrl+Shift+R: Begin recalibrating relative button positions.
- Buttons
- Ctrl+Shift+Q: Press Begin on all windows.
- Ctrl+Shift+W: Add wood to all windows.
- Ctrl+Shift+E: Add water to all windows.
- Ctrl+Shift+A: Close all vents.
- Ctrl+Shift+S: Set all vents to partially open.
- Ctrl+Shift+D: Open all vents.
Macro
#SingleInstance force
SendMode Play
SetMouseDelay, 10, Play
; Number of columns before going to next row
ColumnCount := 4
; Relative positions of each location.
; Set here permanently or recalibrate every time.
SizeX := 222
SizeY := 239
BeginX := 105
BeginY := 215
WoodX := 34
WoodY := 222
WaterX := 76
WaterY := 222
CloseX := 128
CloseY := 222
MiddleX := 155
MiddleY := 222
OpenX := 179
OpenY := 222
WindowCount := 0
IsCalibrating := false
BaseX(Index)
{
global ColumnCount
global SizeX
return (Floor(Mod(Index, ColumnCount))) * SizeX
}
BaseY(Index)
{
global ColumnCount
global SizeY
return (Floor(Index / ColumnCount)) * SizeY
}
ClickAll(RelX, RelY)
{
global WindowCount
Loop %WindowCount%
{
x := BaseX(A_Index - 1) + RelX
y := BaseY(A_Index - 1) + RelY
ControlClick, X%x% Y%y%, ahk_class eGenesis Client,,,, NA
; Click %x%, %y%
}
}
+^z::
if IsCalibrating
{
return
}
; else
x := 0
y := 0
MouseGetPos, x, y
MouseClickDrag, Left, %x%, %y%, 1, 1
MouseClickDrag, Left, 1, 1, % BaseX(WindowCount) , % BaseY(WindowCount)
WindowCount := WindowCount + 1
return
+^x::
WindowCount := 0
MsgBox, 0, , % "Clearing Window Positions"
return
+^r::
if IsCalibrating
{
IsCalibrating := false
MsgBox, 0, , % "Ending Recalibration Mode"
return
}
; else
IsCalibrating := true
MsgBox, 0, , % "Beginning Recalibration Mode. Press Control-h for help."
return
+^h::
if IsCalibrating
{
MsgBox, 0, % "Calibration Mode", % "Calibrate each button hotkey. First, move a Charcoal Oven window to the upper-left corner of the screen. Then move the mouse over each kind of button and press the associated hotkey. Current status:`n"
. "Begin (q): (" . BeginX . ", " . BeginY . ")`n"
. "Wood (w): (" . WoodX . ", " . WoodY . ")`n"
. "Water(e): (" . WaterX . ", " . WaterY . ")`n"
. "Close(a): (" . CloseX . ", " . CloseY . ")`n"
. "Middle(s): (" . MiddleX . ", " . MiddleY . ")`n"
. "Open (d): (" . OpenX . ", " . OpenY . ")`n`n"
. "To finish calibrating, press Control-R`n"
. "Change the appropriate variables in the script to make calibration permanent."
return
}
; else
MsgBox, 0, % "Run Mode", % WindowCount . " windows active.`n"
. "Keys:`n"
. "Control+Shift-z: Add a window and position it. Hover the mouse over the window and press this key. Do not move a window after it has been placed.`n"
. "Control+Shift-x: Clear all window settings. You must set them up again by using control-a on each window.`n"
. "Control+Shift-r: Begin recalibrating relative button positions`n"
. "Control+Shift-q: Press Begin on all windows`n"
. "Control+Shift-w: Add wood to all windows`n"
. "Control+Shift-e: Add water to all windows`n"
. "Control+Shift-a: Close all vents`n"
. "Control+Shift-s: Set all vents to partially open`n"
. "Control+Shift-d: Open all vents"
return
+^q::
if IsCalibrating
{
MouseGetPos, BeginX, BeginY
return
}
; else
ClickAll(BeginX, BeginY)
return
+^w::
if IsCalibrating
{
MouseGetPos, WoodX, WoodY
return
}
; else
ClickAll(WoodX, WoodY)
return
+^e::
if IsCalibrating
{
MouseGetPos, WaterX, WaterY
return
}
; else
ClickAll(WaterX, WaterY)
return
+^a::
if IsCalibrating
{
MouseGetPos, CloseX, CloseY
return
}
; else
ClickAll(CloseX, CloseY)
return
+^s::
if IsCalibrating
{
MouseGetPos, MiddleX, MiddleY
return
}
; else
ClickAll(MiddleX, MiddleY)
return
+^d::
if IsCalibrating
{
MouseGetPos, OpenX, OpenY
return
}
; else
ClickAll(OpenX, OpenY)
return
Carpentry Blades
Description & Usage
This script is meant to automate the manufacturing of carpentry blades! It will *not* load or unload the blades, so you have a chance to make sure quality is to your standards.
Get overhead view (F8 twice) and zoom in completely. Position mouse directly over upper-left point of carpentry blade, then press Ctrl+Shift+G. This script will plot your future hammer hits.
Have your chat minimized! Then press Ctrl+Shift+H to use the numbers generated above on the carp blade. If you move at all, or it doesn't quite work right, you will need to reset the numbers (Ctrl+Shift+G).
Be sure to turn on "Chat appears above player's head" in "Chat-related Options" so you can easily see the Quality at the end of the macro.
Macro
;This script is meant to automate the manufacturing of carpentry blades!
; Get overhead view (F8 twice) and zoom in completely.
; Position mouse directly over upper-left point of carpentry blade,
; then press Ctrl+Shift+G. This script will plot your hammer hits.
^+G::
MouseGetPos, xpos, ypos
x9 = %xpos%
x9 += 9
x20 = %xpos%
x20 += 20
x26 = %xpos%
x26 += 26
x33 = %xpos%
x33 += 33
x39 = %xpos%
x39 += 39
x51 = %xpos%
x51 += 51
x58 = %xpos%
x58 += 58
x71 = %xpos%
x71 += 71
x84 = %xpos%
x84 += 84
x90 = %xpos%
x90 += 90
x97 = %xpos%
x97 += 97
x110 = %xpos%
x110 += 110
x123 = %xpos%
x123 += 123
x129 = %xpos%
x129 += 129
x141 = %xpos%
x141 += 141
x148 = %xpos%
x148 += 148
x154 = %xpos%
x154 += 154
x161 = %xpos%
x161 += 161
x172 = %xpos%
x172 += 172
y2 = %ypos%
y2 += 2
y12 = %ypos%
y12 += 12
y38 = %ypos%
y38 += 38
y54 = %ypos%
y54 += 54
y64 = %ypos%
y64 += 64
y77 = %ypos%
y77 += 77
y92 = %ypos%
y92 += 92
y114 = %ypos%
y114 += 114
return
; This command will use the stored numbers to make a carpentry blade.
; If you moved at all, you'll need to use the command above first to
; allign everything.
; Be sure to have your chat window closed before you start!
; When ready, press Ctrl+Shift+H.
^+H::
MouseMove %x90%, %y64%
Send s9
Click %x9%, %y114%
Click %x172%, %y114%
Click %x33%, %y114%
Click %x148%, %y114%
Click %x58%, %y114%
Click %x123%, %y114%
Click %x84%, %y114%
Click %x97%, %y114%
Send c9
Click %x20%, %y114%
Click %x161%, %y114%
Click %x71%, %y114%
Click %x110%, %y114%
Send c4
Click %x90%, %y64%
Click %x58%, %y64%
Click %x123%, %y64%
Send b9
Click %x26%, %y54%
Click %x154%, %y54%
Click %x26%, %y2%
Click %x154%, %y2%
Click %x33%, %y12%
Click %x148%, %y12%
Click %x39%, %y2%
Click %x141%, %y2%
MouseMove %x90%, %y64%
Send c5
Click %x51%, %y77%
Click %x129%, %y77%
Send b3
Click %x58%, %y92%
Click %x123%, %y92%
Click %x33%, %y92%
Click %x148%, %y92%
Click %x20%, %y92%
Click %x161%, %y92%
Click %x9%, %y92%
Click %x172%, %y92%
Send s3
Click %x51%, %y54%
Click %x129%, %y54%
Click %x71%, %y38%
Click %x110%, %y38%
Send q
return
^+=::
InputBox, Input, Carp Blade Count, How many blades will you make?,, 220, 120
Loop %Input%
{
Click 800, 80
Sleep 100
Click 800, 80
Sleep 500
MouseMove %x90%, %y64%
Send s9
Click %x9%, %y114%
Click %x172%, %y114%
Click %x33%, %y114%
Click %x148%, %y114%
Click %x58%, %y114%
Click %x123%, %y114%
Click %x84%, %y114%
Click %x97%, %y114%
Send c9
Click %x20%, %y114%
Click %x161%, %y114%
Click %x71%, %y114%
Click %x110%, %y114%
Send c4
Click %x90%, %y64%
Click %x58%, %y64%
Click %x123%, %y64%
Send b9
Click %x26%, %y54%
Click %x154%, %y54%
Click %x26%, %y2%
Click %x154%, %y2%
Click %x33%, %y12%
Click %x148%, %y12%
Click %x39%, %y2%
Click %x141%, %y2%
MouseMove %x90%, %y64%
Send c5
Click %x51%, %y77%
Click %x129%, %y77%
Send b3
Click %x58%, %y92%
Click %x123%, %y92%
Click %x33%, %y92%
Click %x148%, %y92%
Click %x20%, %y92%
Click %x161%, %y92%
Click %x9%, %y92%
Click %x172%, %y92%
Send s3
Click %x51%, %y54%
Click %x129%, %y54%
Click %x71%, %y38%
Click %x110%, %y38%
Send q
Click 900, 195
Keywait, y, D T10
if ErrorLevel
return
Click 475, 435
}