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.

Difference between revisions of "User:Ikuu/Mac-Mining"

From A Tale in the Desert
Jump to navigationJump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==Overview==
 +
 
This page has my info on assistant programs for mining on MacOS.  These are not macros in the usual sense in ATitD because you still need to move the mouse and enter the command to work the mine.  They do however decide for you which crystal you want to select for pulling.
 
This page has my info on assistant programs for mining on MacOS.  These are not macros in the usual sense in ATitD because you still need to move the mouse and enter the command to work the mine.  They do however decide for you which crystal you want to select for pulling.
  
Using these helpers, I do about 4-500 rather relaxed 7 pulls an hour.  Mining is no longer a chore.
+
Using these helpers, I do about 4-500 rather relaxed pulls an hour.  Mining tin is still a chore, because it's *very* hard to get the right colored pixel, but the others, so far anyway, work 7 pulls with few errors - copper errors out every couple hundred pulls, antimony is hard like tin, iron and others based on "odd-one-out" logic tend to be more accurate than the rest.
  
 
To use these, you need Quartz Composer (QC), which comes with XCode Developer package from Apple and also Automator, which is part of the standard application suite in MacOS.
 
To use these, you need Quartz Composer (QC), which comes with XCode Developer package from Apple and also Automator, which is part of the standard application suite in MacOS.
  
 
The helpers all work the same way, except for the logic particular to the mine type.  They read a screenshot from a location you need to set, process 7 locations in the screenshot that you specify while running the composition, and display the index numbers appropriate for the memory game.  Once you're familiar with the operation of the compositions, you need simply read off the crystal number for your level of memory game, work that crystal and then continue the automator workflow.
 
The helpers all work the same way, except for the logic particular to the mine type.  They read a screenshot from a location you need to set, process 7 locations in the screenshot that you specify while running the composition, and display the index numbers appropriate for the memory game.  Once you're familiar with the operation of the compositions, you need simply read off the crystal number for your level of memory game, work that crystal and then continue the automator workflow.
 +
 +
If you use "Extra Suites" like [[User:Quin|Quin]] does, you should be able to write a full fledged macro now that the crystal choice is also encoded via the color background used for that number.
  
 
==Set-up==
 
==Set-up==
Line 11: Line 15:
 
To set up the compositions and automator, you need to do the following:
 
To set up the compositions and automator, you need to do the following:
 
# Open the appropriate mining helper in QC and open the viewer window.
 
# Open the appropriate mining helper in QC and open the viewer window.
# Position your ATitD and QC viewer windows so you can see the right-most column of numbers in the QC viewer while ATitD window is frontmost.  This lets you see the number of the appropriate crystal to choose after switching into the game.
+
# Position your ATitD and QC viewer windows so you can see the right-most set of number(s) in the QC viewer while ATitD window is frontmost.  This lets you see the number of the appropriate crystal to choose after switching into the game.
 
# Start up Automator with a new workflow, move the window to the right half of the screen, and give it 4 automation steps:
 
# Start up Automator with a new workflow, move the window to the right half of the screen, and give it 4 automation steps:
 
## Take screenshot, type Fullscreen, un-timed, Save To <file of your choice> - this step takes the snapshot of your ATitD window, saving it someplace that the composition will look
 
## Take screenshot, type Fullscreen, un-timed, Save To <file of your choice> - this step takes the snapshot of your ATitD window, saving it someplace that the composition will look
Line 24: Line 28:
 
## Save the helper and minimize the editor window.
 
## Save the helper and minimize the editor window.
 
# Position yourself in Egypt so that your mining crystals are all on the left side of the screen and as large as possible (not strictly necessary, but it makes the crystal specification step much easier)
 
# Position yourself in Egypt so that your mining crystals are all on the left side of the screen and as large as possible (not strictly necessary, but it makes the crystal specification step much easier)
# IMPORTANT: from here on out, use CMD-Tab to swap applications from ATitD to something else.  This is because the key command to lock the camera position is currently broken.  If you move yourself or the camera after doing these steps, so that the crystals change position in any way, you'll need to redo these steps.
+
# IMPORTANT: from here on out, use CMD-Tab to swap applications from ATitD to something else.  This is because the key command to lock the camera position is currently broken.  If you move yourself or the camera after doing these steps, so that the crystals change position in any way, you'll need to redo the following steps.
 
# Swap to Automator and run your workflow - it will take the first snapshot of your mine, swap to QC briefly to load the image file, then swap to ATitD.
 
# Swap to Automator and run your workflow - it will take the first snapshot of your mine, swap to QC briefly to load the image file, then swap to ATitD.
 
# Swap back to QC viewer and click on the title-bar button for full screen mode - not strictly necessary, but it helps with crystal specification)
 
# Swap back to QC viewer and click on the title-bar button for full screen mode - not strictly necessary, but it helps with crystal specification)
# For each crystal in the screenshot, hold down the number 1-7 that you decide will correspond to that crystal and move your mouse until it's properly positioned for that crystal.  You'll see the corresponding sub-image next to the screenshot showing you what's under the mouse, plus the color data for the precise pixel under the mouse.
+
# For each crystal in the screenshot, hold down the number 1-7 that you decide will correspond to that crystal and move your mouse until it's properly positioned for that crystal.  You'll see the corresponding sub-image next to the screenshot showing you what's under the mouse, plus the color data for the pixel under the mouse.
 
# Once you've done all 7 crystals, the bottom number in the right-most column should show the correct crystal to choose, assuming no memory game.  If this is not correct, double-check your crystal selection and that you're running the right helper for the mine in question.
 
# Once you've done all 7 crystals, the bottom number in the right-most column should show the correct crystal to choose, assuming no memory game.  If this is not correct, double-check your crystal selection and that you're running the right helper for the mine in question.
 
# Press ESC to exit full screen mode.
 
# Press ESC to exit full screen mode.
Line 42: Line 46:
 
To use the memory game for tin (and similar minerals, if I ever get a mine to write and test a helper for), where the memory game is independent of your ore extraction skill level, just choose the top number on the right side.  It will fail most of the next 6 pulls, then start working at pulling 7 at a time.
 
To use the memory game for tin (and similar minerals, if I ever get a mine to write and test a helper for), where the memory game is independent of your ore extraction skill level, just choose the top number on the right side.  It will fail most of the next 6 pulls, then start working at pulling 7 at a time.
  
To use the memory game for copper, iron and similar minerals that depend on your OE level, read the corresponding number from the bottom that matches your OE level.  There are 5 numbers shown, corresponding to the max OE level of 5.  Like tin, it will likely fail for the first few pulls, until the mine recognizes you're doing the appropriate level of memory game.
+
To use the memory game for copper, iron and similar minerals that depend on your OE level, enable the display for your OE level via Alt-#.  There are up to 5 numbers shown, corresponding to the max OE level of 5.  Like tin, it will likely fail for the first few pulls, until the mine recognizes you're doing the appropriate level of memory game.
  
 
Note, the memory game numbers need to be determined by the composition before they're usable.  So do the first few pulls using no memory game.
 
Note, the memory game numbers need to be determined by the composition before they're usable.  So do the first few pulls using no memory game.
 +
==Bonus Features==
 +
 +
Because this is not a true fully automated macro, you get some utility that otherwise would be lacking.
 +
 +
*After you work the suggested crystal of a mine, if the result is wrong, you can immediately switch, via <cmd>-<tab>, to QC and adjust the crystal location that you think is incorrect.  This way you provide necessary feedback to the helper, improving it's selection ability and thus reducing its error rate.
 +
**If you've been following the memory game, pay attention to the relevant color values and see that your new crystal location adjusts them appropriately.
 +
**If you've been using the immediate mode, watch the displayed value to be sure it changes to another crystal - which hopefully is the one that would have been right.
 +
**After adjustment, simply pause a moment to be sure ATitD has your crystals visible for the screenshot, then switch to Automator and continue the workflow.
 +
**The composition saves the value for the memory game that exists when <space> is pressed, which adheres to the changes you've made above.
 +
*You can easily pause your mining and do other tasks, then resume mining without losing any memory of what happened.
 +
**The drawback is that you still should be sure to not move the camera while doing these other actions.  However, if you do move the camera, you can set new crystal locations without losing the memory of what happened.
 +
**If you can't remember whether you've worked the currently suggested crystal, simply compare the crystal colors in QC with the colors in ATitD.
  
 
== Mining Helpers==
 
== Mining Helpers==
[[Media:Copper_Mining_Helper.qtz]] - Choose location on each crystal with maximal saturation.
+
[[Image:Aluminum_Mining_Helper.qtz]] - Choose area (yes area, this one averages RGB values within a 14x14 square) in each crystal that has highest RGB.  Some will be too bright relative to others, causing errors.  When that happens, adjust the erroneous crystal to have slightly lower RGB values - if you've been *not* doing the memory game, then adjust erroneous crystal so that it's RGB is small enough for choice on last screenshot to be a different crystal.
 +
 
 +
[[Image:Antimony_Mining_Helper.qtz]] - I seem to have the best luck with a slight overhead view and choosing crystal locations that are on the edge between two faces.  The third column of number help you see which two crystals the helper thinks go together and, as will quickly become apparent, the choice is sometimes quite delicate and easy to get wrong.  No memory game, like lead, you just get more ore for more right in a row.
 +
 
 +
[[Image:Copper_Mining_Helper.qtz]] - Choose location on each crystal with maximal saturation.
 +
 
 +
[[Image:Iron_Mining_Helper.qtz]] - Choose crystal locations that best match each other, minimizing the ∂ values of the similar crystals - do at least twice, the second time getting the odd crystal out from the first time set up.  Aim for ∂ values that are around 1 or less.  Errors in the crystal chosen indicate that the erroneous crystal choice is too far different from the others and should be redone.
 +
 
 +
[[Image:Lead_Mining_Helper.qtz]] - Choose crystal locations that best match each other, minimizing the ∂ values of the similar crystals - do at least twice, the second time getting the odd crystal out from the first time set up.  Aim for ∂ values that are around 1 or less.  Poor choice in crystal pixels *will* interfere with the accuracy of the helper.  This helper is very kind for you to fix the locations on the fly, so adjust as often as you need to.  In fact, long mining sessions will require it as the shadows and lighting change throughout the day.  One of the few helpers with what I consider a perfect record.
  
[[Media:Tin_Mining_Helper.qtz]] - Choose location on each crystal with minimal blue. Needs updating to better user-friendly version.
+
[[Image:Tin_Mining_Helper.qtz]] - Choose location on each crystal with minimal blue. The very dark edges of the crystal seem to work best.
  
[[Media:Iron_Mining_Helper.qtz]] - Choose crystal locations that best match each other, minimizing the ∂ values of the similar crystals - do at least twice, the second time getting the odd crystal out from the first time set upErrors in the crystal chosen indicate that the erroneous crystal choice is too far different from the others and should be redone.
+
[[Image:Tungsten_Mining_Helper.qtz]] - Choose location on each crystal that is most similar to its corresponding crystal, using the helpers.  Similarity is entirely based on hue and so one crystal should always stand out as separate from the restMemory game is like tin, independent of your OE level.
  
[[Media:Lead_Mining_Helper.qtz]] - Choose crystal locations that best match each other, minimizing the ∂ values of the similar crystals - do at least twice, the second time getting the odd crystal out from the first time set upPoor choice in crystal pixels *will* interfere with the accuracy of the helperThis helper is very kind for you to fix the locations on the fly, so adjust as often as you need toIn fact, long mining sessions will require it as the shadows and lighting changes throughout the day.
+
[[Image:Zinc_Mining_Helper.qtz]] - Choose location on each crystal with maximal saturation - ignore the ∂ values.  Pay attention to the immediate output, in lower right, which is of form #H or #LH means that most of the crystal colors should be washed out, L means most should appear vibrantIf you don't agree with that assessment, then adjust your crystal locationsMemory game is like tin, independent of your OE level.

Latest revision as of 06:51, 9 March 2009

Overview

This page has my info on assistant programs for mining on MacOS. These are not macros in the usual sense in ATitD because you still need to move the mouse and enter the command to work the mine. They do however decide for you which crystal you want to select for pulling.

Using these helpers, I do about 4-500 rather relaxed pulls an hour. Mining tin is still a chore, because it's *very* hard to get the right colored pixel, but the others, so far anyway, work 7 pulls with few errors - copper errors out every couple hundred pulls, antimony is hard like tin, iron and others based on "odd-one-out" logic tend to be more accurate than the rest.

To use these, you need Quartz Composer (QC), which comes with XCode Developer package from Apple and also Automator, which is part of the standard application suite in MacOS.

The helpers all work the same way, except for the logic particular to the mine type. They read a screenshot from a location you need to set, process 7 locations in the screenshot that you specify while running the composition, and display the index numbers appropriate for the memory game. Once you're familiar with the operation of the compositions, you need simply read off the crystal number for your level of memory game, work that crystal and then continue the automator workflow.

If you use "Extra Suites" like Quin does, you should be able to write a full fledged macro now that the crystal choice is also encoded via the color background used for that number.

Set-up

To set up the compositions and automator, you need to do the following:

  1. Open the appropriate mining helper in QC and open the viewer window.
  2. Position your ATitD and QC viewer windows so you can see the right-most set of number(s) in the QC viewer while ATitD window is frontmost. This lets you see the number of the appropriate crystal to choose after switching into the game.
  3. Start up Automator with a new workflow, move the window to the right half of the screen, and give it 4 automation steps:
    1. Take screenshot, type Fullscreen, un-timed, Save To <file of your choice> - this step takes the snapshot of your ATitD window, saving it someplace that the composition will look
    2. Launch Application, Quartz Composer - this simply switches to QC since it's already running
    3. Watch Me Do - here you need to record yourself pressing the spacebar, then clicking someplace safe in your ATitD window (like a chat window - key is that it doesn't move you when the click happens) - then set the playback speed to 10x. The spacebar tells the composition in QC viewer to re-read the screenshot.
    4. Loop, ask to continue - this inserts a wait until you're ready to continue step, giving you time to actually work the mine before the next screenshot)
  4. Save your workflow (not as an application, but as a workflow) for future use.
  5. Go to the QC editor window:
    1. Find the patch with a blue header titled, "Image Downloader". It will be on the left side of the composition flowchart, about halfway down.
    2. Click on it, then click on the gear in the title bar labelled "Patch Parameters".
    3. You should now see a place to enter the image location - enter the location where your screenshot is saved per the automator workflow you just created.
    4. Save the helper and minimize the editor window.
  6. Position yourself in Egypt so that your mining crystals are all on the left side of the screen and as large as possible (not strictly necessary, but it makes the crystal specification step much easier)
  7. IMPORTANT: from here on out, use CMD-Tab to swap applications from ATitD to something else. This is because the key command to lock the camera position is currently broken. If you move yourself or the camera after doing these steps, so that the crystals change position in any way, you'll need to redo the following steps.
  8. Swap to Automator and run your workflow - it will take the first snapshot of your mine, swap to QC briefly to load the image file, then swap to ATitD.
  9. Swap back to QC viewer and click on the title-bar button for full screen mode - not strictly necessary, but it helps with crystal specification)
  10. For each crystal in the screenshot, hold down the number 1-7 that you decide will correspond to that crystal and move your mouse until it's properly positioned for that crystal. You'll see the corresponding sub-image next to the screenshot showing you what's under the mouse, plus the color data for the pixel under the mouse.
  11. Once you've done all 7 crystals, the bottom number in the right-most column should show the correct crystal to choose, assuming no memory game. If this is not correct, double-check your crystal selection and that you're running the right helper for the mine in question.
  12. Press ESC to exit full screen mode.
  13. Swap back to ATitD.

Execution

Once you've finished the set-up, test your workflow and composition by working the crystal index listed in the lower right corner of the window. To use the memory game, applicable in most cases but not all, switch to QC Viewer and press Alt-# (# = 2,3,4 or 5) to display the crystal index for the desired OE level of memory game. You can't disable the immediate mode, and for those mines that don't depend on OE level, there won't be any response from the Alt-# keys.

You basically just repeat these steps over and over until the mine breaks...

  1. Work the specified crystal
  2. Swap, via CMD-Tab, to Automator and "Continue" the workflow.
  3. Hear it take the screenshot, watch it swap to QC viewer to load and process it, then swap back to ATitD.

To use the memory game for tin (and similar minerals, if I ever get a mine to write and test a helper for), where the memory game is independent of your ore extraction skill level, just choose the top number on the right side. It will fail most of the next 6 pulls, then start working at pulling 7 at a time.

To use the memory game for copper, iron and similar minerals that depend on your OE level, enable the display for your OE level via Alt-#. There are up to 5 numbers shown, corresponding to the max OE level of 5. Like tin, it will likely fail for the first few pulls, until the mine recognizes you're doing the appropriate level of memory game.

Note, the memory game numbers need to be determined by the composition before they're usable. So do the first few pulls using no memory game.

Bonus Features

Because this is not a true fully automated macro, you get some utility that otherwise would be lacking.

  • After you work the suggested crystal of a mine, if the result is wrong, you can immediately switch, via <cmd>-<tab>, to QC and adjust the crystal location that you think is incorrect. This way you provide necessary feedback to the helper, improving it's selection ability and thus reducing its error rate.
    • If you've been following the memory game, pay attention to the relevant color values and see that your new crystal location adjusts them appropriately.
    • If you've been using the immediate mode, watch the displayed value to be sure it changes to another crystal - which hopefully is the one that would have been right.
    • After adjustment, simply pause a moment to be sure ATitD has your crystals visible for the screenshot, then switch to Automator and continue the workflow.
    • The composition saves the value for the memory game that exists when <space> is pressed, which adheres to the changes you've made above.
  • You can easily pause your mining and do other tasks, then resume mining without losing any memory of what happened.
    • The drawback is that you still should be sure to not move the camera while doing these other actions. However, if you do move the camera, you can set new crystal locations without losing the memory of what happened.
    • If you can't remember whether you've worked the currently suggested crystal, simply compare the crystal colors in QC with the colors in ATitD.

Mining Helpers

File:Aluminum Mining Helper.qtz - Choose area (yes area, this one averages RGB values within a 14x14 square) in each crystal that has highest RGB. Some will be too bright relative to others, causing errors. When that happens, adjust the erroneous crystal to have slightly lower RGB values - if you've been *not* doing the memory game, then adjust erroneous crystal so that it's RGB is small enough for choice on last screenshot to be a different crystal.

File:Antimony Mining Helper.qtz - I seem to have the best luck with a slight overhead view and choosing crystal locations that are on the edge between two faces. The third column of number help you see which two crystals the helper thinks go together and, as will quickly become apparent, the choice is sometimes quite delicate and easy to get wrong. No memory game, like lead, you just get more ore for more right in a row.

File:Copper Mining Helper.qtz - Choose location on each crystal with maximal saturation.

File:Iron Mining Helper.qtz - Choose crystal locations that best match each other, minimizing the ∂ values of the similar crystals - do at least twice, the second time getting the odd crystal out from the first time set up. Aim for ∂ values that are around 1 or less. Errors in the crystal chosen indicate that the erroneous crystal choice is too far different from the others and should be redone.

File:Lead Mining Helper.qtz - Choose crystal locations that best match each other, minimizing the ∂ values of the similar crystals - do at least twice, the second time getting the odd crystal out from the first time set up. Aim for ∂ values that are around 1 or less. Poor choice in crystal pixels *will* interfere with the accuracy of the helper. This helper is very kind for you to fix the locations on the fly, so adjust as often as you need to. In fact, long mining sessions will require it as the shadows and lighting change throughout the day. One of the few helpers with what I consider a perfect record.

File:Tin Mining Helper.qtz - Choose location on each crystal with minimal blue. The very dark edges of the crystal seem to work best.

File:Tungsten Mining Helper.qtz - Choose location on each crystal that is most similar to its corresponding crystal, using the helpers. Similarity is entirely based on hue and so one crystal should always stand out as separate from the rest. Memory game is like tin, independent of your OE level.

File:Zinc Mining Helper.qtz - Choose location on each crystal with maximal saturation - ignore the ∂ values. Pay attention to the immediate output, in lower right, which is of form #H or #L. H means that most of the crystal colors should be washed out, L means most should appear vibrant. If you don't agree with that assessment, then adjust your crystal locations. Memory game is like tin, independent of your OE level.