v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Macros and keymaps

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

If you are creating a redirect to the current version's page, do not use any namespace. For example: use #REDIRECT [[Cat]], not #REDIRECT [[Main:Cat]] or #REDIRECT [[cv:Cat]]. See DF:Versions for more information.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 10: Line 10:
 
The [[controls]] for creating macros within DF are as follows:
 
The [[controls]] for creating macros within DF are as follows:
  
*{{k|Ctrl}}+{{k|r}} = record (the REC will be shown at top left of screen and {{k|Ctrl}}+{{k|r}} again to finish recording)  
+
*{{k|Ctrl}}+{{k|r}} = record (and finish recording)
*{{k|Ctrl}}+{{k|s}} = save (name the macro then {{k|Enter}})
+
*{{k|Ctrl}}+{{k|s}} = save
*{{k|Ctrl}}+{{k|l}} = load  
+
*{{k|Ctrl}}+{{k|l}} = load
 
*{{k|Ctrl}}+{{k|u}}+number = set to repeat [number] of times (maximum of 99) - Note that this seems to be broken as of v50.05
 
*{{k|Ctrl}}+{{k|u}}+number = set to repeat [number] of times (maximum of 99) - Note that this seems to be broken as of v50.05
*{{k|Ctrl}}+{{k|p}} = play (the PLAY will be shown at top left of screen, repeat when hold, repeating macro will stop after the mouse cursor leaves the game screen)
+
*{{k|Ctrl}}+{{k|p}} = play (will repeat when hold, repeating macro will stop when the cursor leaves the screen)
  
 
To create a macro, press {{k|Ctrl}}+{{k|r}} to begin recording your actions.  When you have recorded all the actions that you want, stop recording by hitting {{k|Ctrl}}+{{k|r}} again and save ({{k|Ctrl}}+{{k|s}}) the macro.  The macro is then added to your macro list.  To load a macro from the list just press {{k|Ctrl}}+{{k|l}}. If you just recorded the macro, it is loaded even without saving. You can then play the macro by pressing {{k|Ctrl}}+{{k|p}} whenever you want.  You can also set a macro to repeat by pressing {{k|Ctrl}}+{{k|u}}, typing a two digit number, and then pressing {{k|Ctrl}}+{{k|p}} to begin the playback session.  Moving your mouse from the playing window, or otherwise losing focus on Dwarf Fortress, is an annoying way <s>a good way</s> to interrupt a macro session from continuing (also the only known method).
 
To create a macro, press {{k|Ctrl}}+{{k|r}} to begin recording your actions.  When you have recorded all the actions that you want, stop recording by hitting {{k|Ctrl}}+{{k|r}} again and save ({{k|Ctrl}}+{{k|s}}) the macro.  The macro is then added to your macro list.  To load a macro from the list just press {{k|Ctrl}}+{{k|l}}. If you just recorded the macro, it is loaded even without saving. You can then play the macro by pressing {{k|Ctrl}}+{{k|p}} whenever you want.  You can also set a macro to repeat by pressing {{k|Ctrl}}+{{k|u}}, typing a two digit number, and then pressing {{k|Ctrl}}+{{k|p}} to begin the playback session.  Moving your mouse from the playing window, or otherwise losing focus on Dwarf Fortress, is an annoying way <s>a good way</s> to interrupt a macro session from continuing (also the only known method).
Line 227: Line 227:
 
Bedrooms, especially larger ones or large blocks of identical ones, involve a lot of designations and build orders. These macros are designed to streamline the process. For all of these mass-building macros you may wish to temporarily forbid any of your artifact or masterwork furniture, to avoid giving overly-valuable items to your dwarf peasantry.
 
Bedrooms, especially larger ones or large blocks of identical ones, involve a lot of designations and build orders. These macros are designed to streamline the process. For all of these mass-building macros you may wish to temporarily forbid any of your artifact or masterwork furniture, to avoid giving overly-valuable items to your dwarf peasantry.
  
==== Placing Beds and Furnitures ====
+
==== Placing Beds ====
  
Before placing any beds or furnitures it has some problems as the keyboard cursor will back to the middle tile of the screen the every time designate the construction.  
+
So you've recorded a macro to dig out a series of bedrooms, and now you have to fill them. Bring up the {{k|b}}uild menu, select {{k|b}}ed, and go the first position you want to place a bed in.
  
So you've recorded a macro to dig out a series of bedrooms, and now you have to fill them. Bring up the {{k|b}}uild menu, select {{k|f}} urniture {{k|b}}ed, Select "use closest material" and "keep building after placement", and go the first position you want to place a bed in.
+
Start a new macro ({{k|Ctrl}}+{{k|r}}) and place the bed (selecting the first bed from the list), then move to the next bedroom in sequence. Repeat this until you reach the end of the row. If you are placing beds into multiple long rows of bedrooms, move the cursor to the first bed in the next row to make things faster. Turn off macro recording ({{k|Ctrl}}+{{k|r}}), but don't exit the build menu. You can then save your macro if you wish, though it's not necessary. Play the macro ({{k|Ctrl}}+{{k|p}}), and you have just laid out another row. Repeat until you have enough bedrooms or you run out of beds.
  
Start a new macro ({{k|Ctrl}}+{{k|r}}) and place the bed (selecting the first bed from the list), then move to the next bedroom in sequence. Repeat this until you reach the end of the row. If you are placing beds into multiple long rows of bedrooms, move the cursor to the first bed in the next row to make things faster. Use {{k|w}}/{{k|a}}/{{k|s}}/{{k|d}} to make the macro loop froward it will move 11 tiles away from start from the macro you record. Turn off macro recording ({{k|Ctrl}}+{{k|r}}), but don't exit the build menu.
+
==== Placing Coffers ====
You can then save your macro if you wish, though it's not necessary.
 
  
Play the macro ({{k|Ctrl}}+{{k|p}}), and you have just laid out another row. Repeat until you have enough bedrooms or you run out of beds.
+
Placing coffers (but ''not'' bags) requires an extra step. Pause the game (you ''did'' remember to pause before playing macros, didn't you?) and go to the Stocks menu. Forbid all bags, regardless of what's inside them or what they're being used for (this is temporary). Exit to main screen and repeat the steps above, this time placing containers in your rooms. You will end up placing only chests / coffers / boxes, ignoring any bags. Repeat and play back for the rest of your bedrooms, then un-forbid your bags before un-pausing the game.
 +
 
 +
==== Resizing Rooms ====
 +
 
 +
If the bedroom is finished (at least all the beds are hauled to place), you may want to create a new macro to designate each room as a bedroom. {{k|q}}uery the building and select the first bed. Start a new macro and press {{k|r}} to designate it as a bedroom, then press + a few times to fill the available space. If you are fine with the size of the bedroom you can press enter, move on to the next bed, and repeat this for the whole row. If you want bedrooms that fill all the room and not all your bedrooms are the same size, you may have to press + a bit more or less for the larger cases. Repeat this for the rest of the rows as above.
 +
 
 +
=== Mass Selector ===
 +
 
 +
With this macro you can select a lot of things at once. Extremely helpful if you want to sell a lot of junk to the caravans. Record {{k|enter}}, then {{k|down}} about 10-25 times in a row. (For some menus you may wish to use {{k|enter}}, then {{k|+}}) When the caravan arrives, your dwarves haul all the bins to your Trade Depot for sale as normal. At the trade menu, load the macro and play it as many times as you like. The macro will select all the items in your "for sale" list, saving the bins you carried them in for later use. Be sure to at least browse through the final list once you're done to avoid selling items you didn't wish to sell, i.e. items that were in the same bin as your trade goods that you wish to keep, or non-wood items if you're trading with the Elves.
  
 
=== Mass Trap Builder ===
 
=== Mass Trap Builder ===

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

This page is a member of 1 hidden category: