• Civilization 7 has been announced. For more info please check the forum here .

Creating a Reroll Macro With AutoHotKey

Sporaticus

Drooling Barbarian
Joined
Jul 26, 2011
Messages
147
Location
Under A Rock
Here's my contribution to the HoF community. I just created an easy reroll mouse macro which saves considerable strain on my wrist.

Step 1: Get AutoHotKey

http://www.autohotkey.com/

Step 2: An example for 1680x1050 game screen resolution.
+1::
click 1644, 13
Sleep 500
click 825, 514
Sleep 500
click 839, 538
Sleep 1000
click 829, 392
Sleep 500
click 829, 392
Sleep 50
MouseMove 817, 423
return

When I hold down the shift key and press the 1 key, the clicks and sleep times trigger. This is designed to be executed from the game screen. It clicks "Menu", then progresses to Single Player, then Play Now.

A more complex macro which goes into the advanced setup and selects 5 opponents:

Spoiler :
;restart
+1::
click 1644, 13
Sleep 500
click 825, 514
Sleep 500
click 839, 538
Sleep 1000
click 829, 392
Sleep 1000
click 841, 437
Sleep 750
click 915, 818
Sleep 250
;-----------
;Clicks below select England
click 618, 342
Sleep 250
click 743, 402
Sleep 250
click 628, 419
Sleep 250
;-----------
;Clicks below select India
click 618, 402
Sleep 250
click 744, 472
Sleep 250
click 652, 499
Sleep 250
;-----------
;Clicks below select Arabia
click 618, 479
Sleep 250
click 744, 552
Sleep 250
click 610, 535
Sleep 250
;-----------
;Clicks below select Siam
click 618, 545
Sleep 250
click 743, 639
Sleep 250
click 611, 622
Sleep 250
;-----------
;Clicks below select Askia
click 618, 612
Sleep 250
click 637, 689
Sleep 250
;Click "Start Game"
click 1144, 1010
MouseMove 817, 423
return


Step 3: Assign "Shift+1" to a button on your gaming keyboard. You may have to play with the sleep times. If there are not enough milliseconds between clicks, it won't work.

Now, not being a cheater, I cannot imagine how this can possibly be used to create any macro which violates HoF rules. It is simply intended to save strain on my 50 year old deflicted wrist.

Other macros I am going to make:

Reject friendship and open borders requests. (done)
Spoiler :
;reject request
+3::
click 838, 993
Sleep 500
click 841, 1028
Sleep 50
MouseMove 817, 423
return


Turn auto-end-turn on or off (done)
Spoiler :
;autoturn
+4::
click 1644, 13
Sleep 500
click 835, 444
Sleep 500
click 754, 643
Sleep 500
click 1153, 815
Sleep 500
click 835, 822
return



Dismiss those $&*#(#$ CS messages!

Open tech tree
 
Interesting indeed. You have the first third of a MapFinder there. Pre-recorded mouse actions to run through the screens.

If you take it to the next level, you could print the screen and save the game. The only question is can you rename\move both the save and screenprint? That is mostly how the Civ3 MapFinder works.
 
If you take it to the next level, you could print the screen and save the game.

It can be made to do that very easily.

The only question is can you rename\move both the save and screenprint? That is mostly how the Civ3 MapFinder works.

It can almost certainly do that, but I'm pretty sure it would have to minimize the game to the desktop to do anything outside of the game. If you look at their website, there is a wealth of information about the various abilities that it has, I just haven't looked at it for any purpose other than minimizing mouse usage during normal gameplay.

If you find that it can be used as a cheating tool, please delete this entire thread and PM me. I did not intend to give anyone any ideas other that the one in the OP.
 
I think this is a great idea :goodjob:

My wrist personally thanks you for this :D

Will have a go at getting this working.
 
I think this is a great idea :goodjob:

My wrist personally thanks you for this :D

Will have a go at getting this working.

Thanks!!!

The Window Spy utility will give you the coordinates you need for the "click" locations. If you are running the game in full screen, hover your mouse above the precise location you want, then make sure you do not move the mouse. Using your non-mouse hand, minimize the game and make sure to keep the mouse still. Look for this:


>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<
On Screen: 843, 405 (less often used)
In Active Window: 755, 273

Use the "On Screen" coordinate.

Also, make sure you "Suspend Hotkeys" before you use your keyboard outside the game, otherwise you will trigger the mouse actions when you don't want to. This is particularly bad if you use Shift+(any letter) for any of your macros.
 
Interesting indeed. You have the first third of a MapFinder there. Pre-recorded mouse actions to run through the screens.

If you take it to the next level, you could print the screen and save the game. The only question is can you rename\move both the save and screenprint? That is mostly how the Civ3 MapFinder works.

I so wish we had one for civ 5 :-(
 
Top Bottom