The Wiki for Tale 5 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.

Difference between revisions of "Jimbly's Macros"

From ATITD5
Jump to navigationJump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
All of my macros and automation are written for VeggieTales - my LUA-based automation/macro engine.  I was fed up with issues with ACTool and AutoHotKey, so I did what any self-respecting engineer would do - re-invent the wheel!
 
All of my macros and automation are written for VeggieTales - my LUA-based automation/macro engine.  I was fed up with issues with ACTool and AutoHotKey, so I did what any self-respecting engineer would do - re-invent the wheel!
 +
 +
'''NOTE: If you use VeggieTales with the ATITD window in the background, the macros will work much better if you set ATITD to ''High Priority Mode'' under Options | Interface Options | Priority'''
  
 
These macros have not all been tested on T5.  Some definitely do not work.  [[User:Jimbly/contact|Contact me]] with any requests.
 
These macros have not all been tested on T5.  Some definitely do not work.  [[User:Jimbly/contact|Contact me]] with any requests.
  
I got too addicted to ATITD last telling, so this telling I'm only logging in one or two days a week, and focusing on my macros and not advancing within the game, since I enjoyed the writing of macros as much or more than actually "playing" the game.  If you do have any questions or comments about these, [[User:Jimbly/contact|contact me]].  Really, please do. I love to chat and am on IM much more often than I am in-game.
+
I got too addicted to ATITD last telling, so this telling I'm only logging in one or two days a month, and focusing on my macros and not advancing within the game, since I enjoyed the writing of macros as much or more than actually "playing" the game.  If you do have any questions or comments about these, [[User:Jimbly/contact|contact me]].  Really, please do. I love to chat and am on IM much more often than I am in-game.
  
 
== VeggieTales ==
 
== VeggieTales ==
Line 11: Line 13:
 
LUA Reference: http://www.lua.org/manual/5.1/ (Ignore the C API section)
 
LUA Reference: http://www.lua.org/manual/5.1/ (Ignore the C API section)
  
Source code is available via SVN access [[User:Jimbly/Contact|upon request]].
+
Source code is available via public SVN: svn://bigscreensmallgames.com/other/VeggieTales .  Commit access [[User:Jimbly/Contact|upon request]].
  
 
Some people have reported needing to run as administrator for these macros to work.
 
Some people have reported needing to run as administrator for these macros to work.
Line 30: Line 32:
 
== Changelog ==
 
== Changelog ==
  
 +
* v1.59 - updated "start macro" text to indicate that putting the ATITD window in focus or changing the priority mode is required.  Integrated script changes from Cegaiel, KasumiGhia, Skyfeather, Mazaki: flax improvements, clay gather, CC helper, essence creation, paper press fix.
 +
* v1.58 - added srKeyEvent function for sending keyboard presses
 
* v1.57 - changed flax_seeds to be able to rip out beds upon finishing, and also able to repeat multiple times.  Added optional support for adding to a bonfire and eating carrots to wood.lua.
 
* v1.57 - changed flax_seeds to be able to rip out beds upon finishing, and also able to repeat multiple times.  Added optional support for adding to a bonfire and eating carrots to wood.lua.
 
* v1.56 - added Fine Glass Rods/Pipes and Glass Blades to glass macro.  Fixed numpad input in text entries.  Added Kasiya's barley macro.
 
* v1.56 - added Fine Glass Rods/Pipes and Glass Blades to glass macro.  Fixed numpad input in text entries.  Added Kasiya's barley macro.
Line 86: Line 90:
  
 
*3rd Party Updates by Cegaiel
 
*3rd Party Updates by Cegaiel
**I am keeping updates to the newest seeds (Not all, but ones worthy of a new update, from the previous ones). These updates will include a new image file (.png) that will recognize the new seed (Plant menu).  Additionally, will include a new flax_common.inc so the script will use the new image.  For those having problems with the macro (particularly getting hung up on "Refocusing windows", there is also and updated flax.lua script. [[User:Cegaiel | View Updates]] page.
+
**For those having problems with the macro getting hung up on "Refocusing windows" AND the occasional freezing during planting - [[User:Cegaiel | View Update]]
  
 
=== flax_seeds.lua ===
 
=== flax_seeds.lua ===
Line 103: Line 107:
  
 
Example usage: Open up 20 Carpentry Shop windows, pin them, make sure they don't overlap much.  Click "custom" and put the mouse over "plane a piece of wood", select that (press shift as directed in the on-screen instructions), and it will plane 20 pieces of wood, then choose "ThisIs.png" to refresh all the windows, and then click "Last custom" again, and you'll plane another 20 pieces of wood.  Repeat to your heart's content!
 
Example usage: Open up 20 Carpentry Shop windows, pin them, make sure they don't overlap much.  Click "custom" and put the mouse over "plane a piece of wood", select that (press shift as directed in the on-screen instructions), and it will plane 20 pieces of wood, then choose "ThisIs.png" to refresh all the windows, and then click "Last custom" again, and you'll plane another 20 pieces of wood.  Repeat to your heart's content!
 +
 +
* [[User:Makazi/Macro#CC Assist|CC Assist]] a modified multi_click script by [[User:Makazi|Makazi]]
  
 
=== onions.lua ===
 
=== onions.lua ===

Latest revision as of 04:58, 10 March 2011

All of my macros and automation are written for VeggieTales - my LUA-based automation/macro engine. I was fed up with issues with ACTool and AutoHotKey, so I did what any self-respecting engineer would do - re-invent the wheel!

NOTE: If you use VeggieTales with the ATITD window in the background, the macros will work much better if you set ATITD to High Priority Mode under Options | Interface Options | Priority

These macros have not all been tested on T5. Some definitely do not work. Contact me with any requests.

I got too addicted to ATITD last telling, so this telling I'm only logging in one or two days a month, and focusing on my macros and not advancing within the game, since I enjoyed the writing of macros as much or more than actually "playing" the game. If you do have any questions or comments about these, contact me. Really, please do. I love to chat and am on IM much more often than I am in-game.

VeggieTales

Get it here: http://bigscreensmallgames.com/ATITD/VeggieTalesInstaller.exe

LUA Reference: http://www.lua.org/manual/5.1/ (Ignore the C API section)

Source code is available via public SVN: svn://bigscreensmallgames.com/other/VeggieTales . Commit access upon request.

Some people have reported needing to run as administrator for these macros to work.

VeggieTales Scripting Reference

T5 Info

The following macros have been tested/verified good for T5 (feel free to add/modify this section):

  • flax.lua and flax_seeds.lua (now works with either Old Egypt or Green Nile seeds)
  • mining_t5.lua
  • single_click_stat_mon.lua
  • wood.lua

This is not one of my macros, but for gathering slate/grass/etc, I recommend this macro from last telling (requires AutoHotKey): Macros/Iggys/Gather

Changelog

  • v1.59 - updated "start macro" text to indicate that putting the ATITD window in focus or changing the priority mode is required. Integrated script changes from Cegaiel, KasumiGhia, Skyfeather, Mazaki: flax improvements, clay gather, CC helper, essence creation, paper press fix.
  • v1.58 - added srKeyEvent function for sending keyboard presses
  • v1.57 - changed flax_seeds to be able to rip out beds upon finishing, and also able to repeat multiple times. Added optional support for adding to a bonfire and eating carrots to wood.lua.
  • v1.56 - added Fine Glass Rods/Pipes and Glass Blades to glass macro. Fixed numpad input in text entries. Added Kasiya's barley macro.
  • v1.55 - fixed issue in 1.54 that was causing it to hang out while "refocusing" for most users
  • v1.54 - updated flax macros to be more resilient to client stalls, shouldn't skip over flax as often, got Silt macro working for T5, updated single_click_stat_mon to work at 3 different font sizes. Some people reported problems with the new version, you can grab the old flax macros here: [[1]]
  • v1.53 - updated flax macros to not care if you have "make all planted crops guild owned"
  • v1.52 - updated flax macros to work with any kind of flax (repeatedly does whatever option becomes present on the flax window), added easily configurable grid size and number of passes
  • v1.5 - First T5 release

T4 Macros

These are not tested yet on T5, but may work as is, or may need some tweaking.

Notes on Specific Macros

All of these are available by installing VeggieTales (above), this page just lists information on these macros. Feel free to edit the descriptions to be more useful as needed (e.g. if you found that you needed to tweak some value to get it to work right, add that info here!).

In general, all macros, when first started, will prompt you for some initial parameters and then ask you to put the ATITD window in focus, and then press shift (may need to hold for a moment). You can also use this for other programs (or, for instance, have Photoshop open with a bunch of screenshots to toggle between, for testing purposes).

Also, generally, a macro will cancel if it detects you are holding Ctrl+Shift, and pause with Alt+Shift (some may have slightly different behaviors, they should all indicate on-screen which keys will do what).

Terms:

  • GhostMouse - Mouse events are sent entirely without moving your cursor. This means that:
    • You can freely use your mouse cursor (the only exception being do not click and drag within ATITD, because the mouse will not release where you were expecting).
    • ATITD does not need to be in the foreground. You can have other programs/chat programs/web browser/etc active and open and in use while this macro is running.
    • You do still need to have the ATITD window visible if the macro also requires ScreenScrape (e.g. for the quarry macro, at least the pinned quarry window and your Skills window need be visible. If the macro does not require ScreenScrape, then you can have the ATITD window completely obscured and it will still work fine (e.g. wood macro after initial setup)!
    • If the macro does *not* use GhostMouse, then you must not touch your mouse cursor at all while the macro is running (though you can pause and resume, which will work for most macros).
  • ScreenScrape - Macro requires reading of the screen - make sure to keep the screen visible

Thistle Mode

Details found at User:Jimbly/AutomaticThistles

Carrot Mode

This will plant up to 4 carrots at a time, water them, and harvest them, while refilling your water jugs from a nearby, pinned aqueduct. Currently some settings may need to be tweaked (apparently on some graphics cards the ATITD graphics render differently enough to throw off some of the image recognition), specifically the thresholds which determine whether a carrot patch has grown to the next size or not. If the program is often over-watering, observe the sizes reported for the carrots at each stage, and update config.txt appropriately. The sizes are the threshold it has to pass to be detected as the next size, so if an originally planted carrot is 75px, and when it grows it jumps up to 125px, you want the first size value set to around 100px (the middle between the two).

If the program encounters a situation it cannot resolve (it knows how to clean up after itself in some cases, like over-watering ;), it will play a sound to alert you that your intervention is required.

chem_helper.lua

Choose your Compound Type (Ra, Osiris, etc), your requirements, click Solve! Then, assemble your 5 ingredients, it shows a list of ingredients used in all recipes at the bottom, and assembles a list on the right side as you click on them to add them (each time filtering the list down to only those ingredients compatible with the ones you have already selected).

Screenshots and more explanation at User:Jimbly/Macros/ChemHelper

flax.lua

ScreenScrape

Must have Options|One-click|Enabled hotkeys on flax disabled.

Flax macro specifically designed for planting 5x5 arrays of Old Egypt flax (requires exactly two weedings, no watering). Macro and image could be modified to handle other configurations. If you have more DEX, you can probably do 6x6 grid of flax at once (probably need 3 Dexterity).

  • 3rd Party Updates by Cegaiel
    • For those having problems with the macro getting hung up on "Refocusing windows" AND the occasional freezing during planting - View Update

flax_seeds.lua

Same as above, but for gathering seeds, not flax.

mining_t5.lua

Not automation, but just a solver. Enter the information about your ore stones, and it will determine all valid sets.

multi_click.lua

GhostMouse ScreenScrape

Allows clicking of any number of identical buttons anywhere on your screen. This has some preset buttons to look for (e.g. "This is" is great for clicking to refresh all pinned windows, or "unpin" to dismiss all pinned windows), but you can also define custom buttons to look for on the fly - choose "Custom", and you will see a thumbnail of what part of the image it will search for (generally the first few letters of the text on the button is fine), and then after that you can click "Last custom" to search for and click all of these buttons again.

Example usage: Open up 20 Carpentry Shop windows, pin them, make sure they don't overlap much. Click "custom" and put the mouse over "plane a piece of wood", select that (press shift as directed in the on-screen instructions), and it will plane 20 pieces of wood, then choose "ThisIs.png" to refresh all the windows, and then click "Last custom" again, and you'll plane another 20 pieces of wood. Repeat to your heart's content!

onions.lua

ScreenScrape

Grows 3x3 grids of onions, expects a fill jugs with water icon visible.

  • 3rd party Updates by User:KasumiGhia
    • modified Onion Script handles differently shaped fields, allows use away from water, other changes.

quarry.lua - Automated Quarrying!

GhostMouse ScreenScrape

Works for 2-4 people. Not all people need to be running it (though much easier if they are!). Uses the "alphabetical" method of choosing a direction to work. Testing so far shows it can easily keep a high Endurance value constantly red on all workers, yielding about 1 marble/stone removed per minute at END of 22.

You can run multiple copies of VeggieTales and multiple copies of this script on the same computer (tile your ATITD windows so they're both visible, launch two VeggieTales, start one of them at a time).

If it gets stuck, someone can manually kick it back into action by intentionally tripping the quarry (just clicking the one your client should have clicked) and it should then recover. This has only been needed once while testing.

raeli_color_mon.lua

ScreenScrape

Automatically saves a screenshot, with timestamp, every time a specified pixel changes color. When first burning a Raeli Oven, this will give you about 50-100 screenshots you can very quickly toggle through to get an accurate list of what colors are generated at what times.

sand_mine.lua

GhostMouse ScreenScrape

Repeated works a sand mine, repairs it when needed, and continues (just have enough materials for as many repairs as you want to do).

single_click_stat_mon.lua

GhostMouse ScreenScrape

Clicks a single button over and over again as long as your stats are not red (monitors all stats). You need to mouse over the specific button you wish to press when setting up this macro. Great for all sorts of repetitive tasks - limestone, digging, etc.

timer.lua

A simple timer that will play a sound every specified number of seconds (decimals are OK, e.g. 2.5 seconds)

UITest.lua

A couple examples of UI functions.

wood.lua

GhostMouse

Repeatedly harvests wood from a set of trees. Pin any number of tree windows (there are 9 Bottle Trees near the SA CS that work well), they can be anywhere on your screen, but the macro searches the screen top to bottom (but you can have multiple side by side as long as one is slightly lower than the one next to it, it will work right). These windows need to be arranged so that clicking on them in order forms a "cycle", you should be able to click on one, then the next, then the next, and you should be able to get from one tree to the next without having to move, and then back to the first again (after a minute to let the tree heal) (you may need to experiment with ordering them, since the way ATITD determines "This is too far away" is not exactly clear ;).

This should be run without a hatchet and with high perception. Hatchets do not improve the wood per tree per minute, since they increase the time it takes to regenerate, while only giving you one bonus from your perception.

Notes

2010/09/23: Almelkehdes: As someone with advanced arthritis, I can't tell you how much I appreciate your work on those macros. Thank you Thank you!