Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Bedroom-building macro  (Read 623 times)

Valdemar

  • Bay Watcher
    • View Profile
Bedroom-building macro
« on: November 22, 2007, 03:36:00 pm »

Designating bedrooms can get tedious very quickly, so I wrote an AutoHotKey macro that can do it for you.
http://www.dwarffortresswiki.net/index.php/User:Valdemar

Instructions and usage examples are in the readme file.

UPDATE - The macro can now place furniture in the rooms and you can define several .ini configuration files that are swappable with just a press of Alt-1 through 9.

Demo Videos -
Part 1
Part 2

[ November 23, 2007: Message edited by: Valdemar ]

sphr

  • Bay Watcher
    • View Profile
Re: Bedroom-building macro
« Reply #1 on: November 22, 2007, 11:17:00 pm »

that's a nice idea! I think designation is actually more utilizable than rewall coz of the material selection problem. (the amount of effort to stock pile and forbid material temporarily could more than offset the benifits of rewall unless the player don't care about materials.)

btw, I think in the long run, this can go in as two more suggestions for ToadyOne.
1) Some way to remember last material/material, and a quick way to repeat last construction until material/same type of object runs out.

2) Some way to "record" and "playback" room macros.  Doesn't have to be defined in game.  e.g. I can have some data file defining a construction macro like:

code:

▒▒d▒▒
▒...▒
▒.b.▒
▒f.h▒
▒▒▒▒▒


▒ = wall, . = space
d = door, b = bed, f = cabinet, h = coffer
and put it in a txt file or somewhere. Then have a macro that reads/binds the key and "playback".  Can interpret it depending on build/decorate mode.  e.g. for the above, the build mode could generate the following build designations
code:

..D..
.DDD.
.DDD.
.DDD.
.....  


D = dig, . = ignore

The decorate will generate

code:
 
..d..  
.....  
..b..  
.f.h.  
.....  


d = door, b = bed, f = cabinet, h = coffer

smoothing/engraving will have no need since we usually just cover the whole area.

interesting...

valcon

  • Bay Watcher
  • Experience rivers.
    • View Profile
    • My YouTube Channel
Re: Bedroom-building macro
« Reply #2 on: November 23, 2007, 03:44:00 am »

man i just give my guys ratty doorless cubbyholes.  puts a beard on em.  even the babies.  even the LADY babies.
Logged
Still doing Let's Plays, still got a gold toof. 

Adventure Mode:  The Movie!

Asehujiko

  • Bay Watcher
    • View Profile
Re: Bedroom-building macro
« Reply #3 on: November 23, 2007, 04:12:00 am »

Communual barracks own idvidual rooms anyway simply becase it's harder to pick a single dwarf without being zerged by them all.
Logged
Code: [Select]
Tremble, mortal, and despair! Doom has come to this world!
.....EEEE..E..E.E...EEE.EE.EE.EEE.EE..EE.EE.E.EE.EE.E.EE.
......E..EE.EE.EE.EE..E...EEEE..E..E.E...EEE.EEE...E.EEE.
.☺..EE.E...E.EE.EE...E.EE..E..EE.EE.EE.EE..E...EE.EE..E.E
.....E..E.E.E.E.E.EE.E.E.EE.E...E.EE.EE...E.EE.EE.EEE...E
....E.EE.EEE.EE..EE.EE.E..EEEE..E..E.E...EEE.EEE..E.E..EE

Valdemar

  • Bay Watcher
    • View Profile
Re: Bedroom-building macro
« Reply #4 on: November 23, 2007, 09:52:00 am »

quote:
Originally posted by sphr:
<STRONG>
2) Some way to "record" and "playback" room macros.  Doesn't have to be defined in game.  e.g. I can have some data file defining a construction macro like:
</STRONG>

That's basically exactly what my macro does. To get what you want, you would modify "bedroom.ini" to be:


code:

[rooms]
width          = 3    
height         = 3
; Change this to however many you want each time you press Alt-R    
number_per_row = 5      
number_of_rows = 1    
build_dir      = right
row_dir        = down  

[doors]
enable_doors   = yes    
door_dir       = top
door_pos       = 2  

It doesn't do furniture yet, but I'm working on getting that in. That will also be defined in the ini file, and will be a different shortcut.

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: Bedroom-building macro
« Reply #5 on: November 23, 2007, 05:11:00 pm »

If you don't mind my asking, why do your macros always return the cursor to the same position after each piece of furniture is put down?  Wouldn't it be faster and more efficient for the cursor to remain where it is and build the room incrementally?

It might be a pain in the ass to script, though...

Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Valdemar

  • Bay Watcher
    • View Profile
Re: Bedroom-building macro
« Reply #6 on: November 23, 2007, 07:20:00 pm »

quote:
Originally posted by JT:
<STRONG>If you don't mind my asking, why do your macros always return the cursor to the same position after each piece of furniture is put down?  Wouldn't it be faster and more efficient for the cursor to remain where it is and build the room incrementally?

It might be a pain in the ass to script, though...</STRONG>


Yes, it's for simplicity. I'll try improving it, it shouldn't be all that hard to do.