Home » Stars! 2.6/7 » The Academy » Stars automated micromanagement
Stars automated micromanagement |
Thu, 20 January 2011 19:08 |
|
BlueTurbit | | Lt. Commander
RIP BlueTurbit died Oct. 20, 2011 | Messages: 835
Registered: October 2002 Location: Heart of Texas | |
|
Some things can be done with automation in Stars games, and some can't. For example: if you have a large number of planets and need to queue things, like building ships, this can become time consuming. Unless of course you go through and click on all the planets and enter the building orders for several years in advance, which is not always desirable.
However, there is another way to automate things.
Here is a short video showing automated manual pop drops each turn, and building a number of ships or other items on the planet build list, like, ships on several planets each turn with a couple of mouse clicks only. Very handy when you have dozens of planets to manage building on, in mid to late game stages.
Video - Stars automation
Use your imagination to do much more automatic micromanagement.
This is using the free AutoHotkey script writer/recording program, with a couple of fine tunings added to the files by me. For example: the dialog input boxes for ship type, number of planets and number of ships to build per planet.
Video 1 - step 1 begin recording your script
Video 2 - step 2 test-run your script
Video 3 - step 3 game-compatibility
Video 4 - step 4 input-boxes
this is the code for the input boxes used in video 4:
Quote: | InputBox, shipno, ship type number, Enter number of ship type on list., , 300, 150
Sleep, 100
shipverify = %shipno%
; on my screen the first item on production list is at
; cursor position 25+16, the next item is 16 down, etc.
; item(ship) 3 would be 25 + (16*3) in making selection
shipno := 25 + (16 * shipno)
InputBox, planets, Number of Planets, Enter number of planets to queue., , 300, 150
Sleep, 100
InputBox, ships, number of shps to build, Enter number of ships to queue., , 300, 150
Sleep, 100
; on my screen 70 is the cursor row location for first planet on planet summary window
planetrow := 70
;MsgBox [, Options, Title, Text, Timeout]
MsgBox, 4, , .You entered ship type %shipverify%`n Build on %planets% planets`n %ships% ships on each planet`n Do you want to continue?`n (Press YES or NO)
IfMsgBox No
return
|
UPDATE:
After other member suggestions and doing more work I believe I have come up with a better script. One that does not require people to record scripts. This script uses key inputs only, no mouse clicks. You should be able to install AutoHotKey and then load the game and run the AHK script when you want to automate production items.
Only requirement: open Planet Summary window first and click on first planet name you want to start on. Script will follow planets in order listed going down from your selection. So sort list to your preference first.
Script uses the "next" button in production key to produce your requests on the number of planets you entered in input box.
So, although my videos are useful to learn recording with AutoHotKey and making changes to make script compatible with games, I believe most of you can now just use this script to do the tasks for you, and save a lot of time.
Quote: | WinWait, Stars!,
IfWinNotActive, Stars!, , WinActivate, Stars!,
WinWaitActive, Stars!,
Sleep, 100
Send, q
WinWait, Production Queue
IfWinNotActive, Production Queue, , WinActivate, Production Queue,
WinWaitActive, Production Queue,
Send, {TAB}{HOME}{SHIFTDOWN}{TAB}{SHIFTUP}
InputBox, shiptype, ship type number, Enter number of ship/item type on list., , 350, 150
loop, %shiptype% {
Send, {DOWN}
}
Send, {UP}
InputBox, ships, number of shps to build, Enter number of ships to queue., , 350, 150
InputBox, planets, Number of Planets, Enter number of planets to queue., , 350, 150
; MsgBox [, Options, Title, Text, Timeout]
MsgBox, 4, , .You entered ship/item type %shiptype%`n Build on %planets% planets`n build %ships% on each planet`n Do you want to continue?`n (Press YES or NO)
IfMsgBox No
return
Send, {HOME}
sleep, 1000
SetMouseDelay, 0
Loop, %planets% {
WinWait, Production Queue
IfWinNotActive, Production Queue, , WinActivate, Production Queue,
WinWaitActive, Produ |
...
[Updated on: Wed, 26 January 2011 13:06]
BlueTurbit Country/RockReport message to a moderator
|
|
|
Goto Forum:
Current Time: Sun May 12 19:22:48 EDT 2024
|