Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Macros and Micromanagement  (Read 1087 times)

KingEridani

  • Escaped Lunatic
    • View Profile
Macros and Micromanagement
« on: November 13, 2012, 08:25:12 pm »

I often find myself frustrated with the amount of micromanagement in DF.* I have used macros once before for a Roguelike called Dungeon Crawl Stone Soup,(!) and I've seen and heard a small amount about their application in Dwarf Fortress. I write upon this forum seeking hints, locations or access to learning materials on creating macro commands both in general and in Dwarf Fortress.

It occurs to me there might be other solutions to the amount of time spent micromanaging. At this point in both my DF and computer proficiency, alone I cannot grok any others.

If you know of a handy resource or an ingenious shortcut, I implore you send it my way either via this thread or a private message.

*
Spoiler (click to show/hide)

!
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Macros and Micromanagement
« Reply #1 on: November 13, 2012, 08:44:02 pm »

Macros can be created by hitting ctrl+r, typing in the commands that you want to perform, hitting ctrl+r to end the macro, and then ctrl+s to save them. Saved macros can then be loaded with ctrl+l and the loaded macro can be played with ctrl+p. Once you've saved a macro you probably want to optimize it through the process outlined in the bottom half of "creating macros" on this wiki page. Note that in order to optimize a macro you will need to fully quit DF, optimize it, and then restart DF for the changes to take effect.

You also should start using the manager window (j-m) if you aren't already, since it allows for easy assignment of large number of tasks. Just make sure you have a manager noble or nothing will get assigned!

(You probably know this already) but you can create custom jobs in DFTherapist. This lets you easily apply a single set of labors to a large number of dwarves with a couple of clicks and can help save lots of time.

Lastly you might want to check out this. It's a easy to use UI for the workflow management and automation tool that comes as part of the DFHack package and can automate a lot of the more basic commands.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

KingEridani

  • Escaped Lunatic
    • View Profile
Re: Macros and Micromanagement
« Reply #2 on: November 14, 2012, 05:36:54 am »

Thank you kindly i2amroy! These are exactly the things I was looking for, all in one post!
Logged

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Macros and Micromanagement
« Reply #3 on: November 14, 2012, 06:46:40 am »

Another useful shortcut is [ctrl+u], which allows you to repeat a chosen command a specified number of times.

For example, "[ctrl+u] [3] [0] [ctrl+p]" would play the currently loaded macro 30 times.
Logged

urmane

  • Bay Watcher
    • View Profile
Re: Macros and Micromanagement
« Reply #4 on: November 14, 2012, 12:24:51 pm »

I have a tendency to deep dive to magma early, so I have two macros I use a lot - one to dig stairs and a ramp spiral down, and another to carve tracks over those ramps.  They are set up to go a full revolution (four Z) and end where the next one should begin, so I can hit ctrl-p a few times, unpause and watch it get being dug, and undesignate / adjust if I hit a cavern.  (Early on the minecarts are the bottleneck - I set up four or five overlapping routes from my iron source pile to the magma forges to get a good amount of ore down there).

I've just done a new one to dig a housing block, but macro-furnishing it is still too error prone to easily macro-ize for me (durn bags), and migrants arrive too fast - my furniture production always seems to lag way behind the actual population.

A lot of job adjustment is needed early on, until you get enough to dedicate and backup, and then there's too many to keep busy :-)  I had forgotten about the custom jobs, I'll check that out.

The workflow thing looks good, too - I'm convinced that a good part of my FPS problems are due to excess blood and items being sprinkled around after a few invasions.  There needs to be an "unravel" command to turn all those troll fur socks into a big spool of yarn.  Or I need to make trash compactor.  Ooh, I can automate one with a pressure plate, can't I ....
Logged