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 "User:Qu/Macros/QCrematory"

From ATITD5
Jump to navigationJump to search
m
m
Line 4: Line 4:
  
 
Please read the page fully before running the macro. It requires some setting up before it can be used.
 
Please read the page fully before running the macro. It requires some setting up before it can be used.
 +
 +
Please note, the macro will '''not''' work with a crematory that you built because I don't have my own crematory to take a screenshot of. For now it will work only with ones that say "This is a Crematory" and not "This is your crematory".
  
 
Before you do anything you need to figure out which buttons on your crematory do what. You will need to know both which buttons control which bars, and which directions the bars move when the button is on (button is on when it's black). This is unique to each crematory.  Without this information the macro will not work correctly.
 
Before you do anything you need to figure out which buttons on your crematory do what. You will need to know both which buttons control which bars, and which directions the bars move when the button is on (button is on when it's black). This is unique to each crematory.  Without this information the macro will not work correctly.
Line 9: Line 11:
 
====How to use====
 
====How to use====
  
- Install [http://www.autohotkey.com/ Autohotkey] if you haven't yet.
+
Install [http://www.autohotkey.com/ Autohotkey] if you haven't yet.
- Open and pin your crematory windows. Make sure no other windows overlap them and they don't overlap each other, not even by one pixel.
+
 
- Run the macro.
+
Open and pin your crematory windows. Make sure no other windows overlap them and they don't overlap each other, not even by one pixel.
- The macro will find all crematory windows and store their position on the screen. At this point the macro will either tell you how many windows it found, or if there was an error.
+
 
- If you move any of the crematory windows you will have to reload the macro.
+
Run the macro.
- Load up your crematories with lime, wood, and whatever else you want.
+
 
- Start the crematories.
+
The macro will find all crematory windows and store their position on the screen. At this point the macro will either tell you how many windows it found, or if there was an error.
- Hit ctrl+alt+a to have the macro take over the button pushing.
+
 
- After the crematories are done you will have to reload the crematories manually each time (auto reload currently in development).
+
If you move any of the crematory windows you will have to reload the macro.
- The macro will continue to monitor the crematory windows even after they're done, and will resume button pushing as soon as the crematories are restarted (unless you reloaded the macro, in which case you'll need to press ctrl+alt+a again)
+
 
- The macro clicks a lot, up to several clicks per second. You can move the mouse around and click and do other stuff, but sometimes your clicks will be lost and your mouse movement might be affected a bit. If the macro is working properly, as long as you don't block or move the crematory window, it shouldn't mess up.
+
Load up your crematories with lime, wood, and whatever else you want.
 +
 
 +
Start the crematories.
 +
 
 +
Hit ctrl+alt+a to have the macro take over the button pushing.
 +
 
 +
After the crematories are done you will have to reload the crematories manually each time (auto reload currently in development).
 +
 
 +
The macro will continue to monitor the crematory windows even after they're done, and will resume button pushing as soon as the crematories are restarted (unless you reloaded the macro, in which case you'll need to press ctrl+alt+a again)
 +
 
 +
The macro clicks a lot, up to several clicks per second. You can move the mouse around and click and do other stuff, but sometimes your clicks will be lost and your mouse movement might be affected a bit. If the macro is working properly, as long as you don't block or move the crematory window, it shouldn't mess up.
 
   
 
   
 
====Hotkeys====
 
====Hotkeys====
Line 32: Line 44:
 
For now you'll need to edit the macro to set this up. For each crematory that you want to run you'll need seven pieces of information. You'll need to know which way each bar moves when the button that controls it is on (black). The definition for one of the crematories I use looks like this:
 
For now you'll need to edit the macro to set this up. For each crematory that you want to run you'll need seven pieces of information. You'll need to know which way each bar moves when the button that controls it is on (black). The definition for one of the crematories I use looks like this:
  
C1B1V2:=1
+
:<tt>C1B1V2:=1</tt>
C1B2V5:=1
+
:<tt>C1B2V5:=1</tt>
C1B2V6:=1
+
:<tt>C1B2V6:=1</tt>
C1B3V3:=-1
+
:<tt>C1B3V3:=-1</tt>
C1B4V4:=-1
+
:<tt>C1B4V4:=-1</tt>
C1B4V7:=-1
+
:<tt>C1B4V7:=-1</tt>
C1B5V1:=1
+
:<tt>C1B5V1:=1</tt>
  
 
C1 means it's crematory #1. B1 through B5 is buttons one through five. V1 through V7 is which slider the button affects. Finally there's 1 or -1 on the end. 1 means the bar goes up when the button is on. -1 means bar goes down when the button is on. For example, the first line has C1B1V2:=1, which means on the first crematory (C1) the firsbutton (B1) makes bar #2 (V2) go up when the button is on (black). Each crematory will need these seven things defined properly for the macro to function correctly.
 
C1 means it's crematory #1. B1 through B5 is buttons one through five. V1 through V7 is which slider the button affects. Finally there's 1 or -1 on the end. 1 means the bar goes up when the button is on. -1 means bar goes down when the button is on. For example, the first line has C1B1V2:=1, which means on the first crematory (C1) the firsbutton (B1) makes bar #2 (V2) go up when the button is on (black). Each crematory will need these seven things defined properly for the macro to function correctly.

Revision as of 04:32, 4 May 2011

QCrematory: File:QCrematory.zip

Version 1.0

Please read the page fully before running the macro. It requires some setting up before it can be used.

Please note, the macro will not work with a crematory that you built because I don't have my own crematory to take a screenshot of. For now it will work only with ones that say "This is a Crematory" and not "This is your crematory".

Before you do anything you need to figure out which buttons on your crematory do what. You will need to know both which buttons control which bars, and which directions the bars move when the button is on (button is on when it's black). This is unique to each crematory. Without this information the macro will not work correctly.

How to use

Install Autohotkey if you haven't yet.

Open and pin your crematory windows. Make sure no other windows overlap them and they don't overlap each other, not even by one pixel.

Run the macro.

The macro will find all crematory windows and store their position on the screen. At this point the macro will either tell you how many windows it found, or if there was an error.

If you move any of the crematory windows you will have to reload the macro.

Load up your crematories with lime, wood, and whatever else you want.

Start the crematories.

Hit ctrl+alt+a to have the macro take over the button pushing.

After the crematories are done you will have to reload the crematories manually each time (auto reload currently in development).

The macro will continue to monitor the crematory windows even after they're done, and will resume button pushing as soon as the crematories are restarted (unless you reloaded the macro, in which case you'll need to press ctrl+alt+a again)

The macro clicks a lot, up to several clicks per second. You can move the mouse around and click and do other stuff, but sometimes your clicks will be lost and your mouse movement might be affected a bit. If the macro is working properly, as long as you don't block or move the crematory window, it shouldn't mess up.

Hotkeys

- Ctrl+Alt+Shift+R reloads the macro.
- Ctrl+Alt+Shift+E edits the macro.
- Ctrl+Alt+Shift+` (tilde key, left of your 1 key) pauses the macro.
- Ctrl+Alt+a starts the auto-clicker part.


Setting up the macro

For now you'll need to edit the macro to set this up. For each crematory that you want to run you'll need seven pieces of information. You'll need to know which way each bar moves when the button that controls it is on (black). The definition for one of the crematories I use looks like this:

C1B1V2:=1
C1B2V5:=1
C1B2V6:=1
C1B3V3:=-1
C1B4V4:=-1
C1B4V7:=-1
C1B5V1:=1

C1 means it's crematory #1. B1 through B5 is buttons one through five. V1 through V7 is which slider the button affects. Finally there's 1 or -1 on the end. 1 means the bar goes up when the button is on. -1 means bar goes down when the button is on. For example, the first line has C1B1V2:=1, which means on the first crematory (C1) the firsbutton (B1) makes bar #2 (V2) go up when the button is on (black). Each crematory will need these seven things defined properly for the macro to function correctly.

Multiple Crematories

Finally, if you run more than one crematory you're probably wondering how the macro numbers the windows. The macro searches for crematory windows from top left of the screen to bottom right. The first one it finds is #1, the second one is #2 and so on. When you have two crematory windows on the screen, the one higher up will be found first. If they're both on the same level, the one on the left will be found first. You'll want the window defined with C1 be higher on the screen than the one defined with C2, which needs to be higher than C3, and so on.