Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Macros  (Read 380 times)

Kearn

  • Bay Watcher
  • insert witty tagline here
    • View Profile
Macros
« on: January 20, 2011, 05:48:56 pm »

What am I doing here?

I know ctrl+R starts recording a macro, but how do i use them?
Logged
i like goats

tolkafox

  • Bay Watcher
  • Capitalism, ho!
    • View Profile
    • Phantasm
Re: Macros
« Reply #1 on: January 20, 2011, 06:02:34 pm »

Quote from: wiki
To create a macro press Ctrl+r to begin recording your actions. When you have recorded all the action you want stop recording by hitting Ctrl+r again and save (Ctrl+s) the macro. The macro is then added to your macro list. To load a macro from the list just press Ctrl+l. You can then play the macro using Ctrl+p.

Either that was helpful, or you already read the wiki and I'm a jerk.
Logged
It was a miracle of rare device, A sunny pleasure-dome with caves of ice!

Hans Lemurson

  • Bay Watcher
    • View Profile
Re: Macros
« Reply #2 on: January 20, 2011, 06:16:17 pm »

I've read t and I still don't understand how to do macros.
Logged
Foolprooof way to penetrate aquifers of unlimited depth.  (Make sure to import at least 10 stones for mechanisms)
Toughen Dwarves by dropping stuff on them.  (Nothing too heavy though, and make sure to wear armor.)
Quote
"Urist had a little lamb
whose feet tracked blighted soot.
And into every face he saw
his sooty foot he put."

NecroRebel

  • Bay Watcher
    • View Profile
Re: Macros
« Reply #3 on: January 20, 2011, 06:22:32 pm »

First, you hit ctrl-r to start recording. Then, you do whatever it is you want your macro to do. Then, you hit ctrl-r again to stop recording.

So, for example, let's say I want to make a macro to select a whole page on the trade screen. First, I go to the trade screen and find a whole page of things I want to trade (this step is not, strictly, necessary, but it's helpful). Next, I hit ctrl-r. Now, I select a whole page of things, in this case by alternating between hitting down and ENTER 16 times, then I hit ctrl-r again. The macro is now recorded.

At this point, I can hit ctrl-p, and the game will do exactly the same button presses as I did. In the above example, at this point hitting ctrl-p will alternate between hitting down and ENTER 16 times. This will continue to be the case until I exit Dwarf Fortress entirely (including closing the program), hit ctrl-r again (which would start recording a new macro), or load a different, pre-saved macro with ctrl-l.

Speaking of pre-saved macros, if you hit ctrl-s, the game will open up a little box in which you can type in a name. This will save the currently-active macro with that name. You can then reload that macro at any time by pressing ctrl-l, scrolling through the list that pops up, and hitting ENTER, at which point hitting ctrl-p will run that macro.



The short of it is, you tell the game to record your following actions as a macro, you do the actions you want the macro to do, then you tell it to stop recording. It's really fairly intuitive once you just start doing it.
Logged
A Better Magma Pump Stack: For all your high-FPS surface-level magma installation needs!

Hans Lemurson

  • Bay Watcher
    • View Profile
Re: Macros
« Reply #4 on: January 20, 2011, 06:33:51 pm »

Thanks NecroRebel!

I think this could come in handy for constructing massive pump-stacks.
Logged
Foolprooof way to penetrate aquifers of unlimited depth.  (Make sure to import at least 10 stones for mechanisms)
Toughen Dwarves by dropping stuff on them.  (Nothing too heavy though, and make sure to wear armor.)
Quote
"Urist had a little lamb
whose feet tracked blighted soot.
And into every face he saw
his sooty foot he put."