Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Auto-designation macro 2.0  (Read 3906 times)

Valdemar

  • Bay Watcher
    • View Profile
Auto-designation macro 2.0
« on: March 16, 2008, 08:49:00 pm »

This tool no longer works. Please see the 1.0 version here.

Spoiler (click to show/hide)
« Last Edit: November 11, 2008, 04:27:06 pm by Valdemar »
Logged

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Auto-designation macro 2.0
« Reply #1 on: March 20, 2008, 10:00:00 am »

Sorry to be such a n00b, but what does this exactly do? I don't really understand.


Oh I see, does it do walls/floors too?

[ March 20, 2008: Message edited by: Beacon ]

Logged

valcon

  • Bay Watcher
  • Experience rivers.
    • View Profile
    • My YouTube Channel
Re: Auto-designation macro 2.0
« Reply #2 on: March 20, 2008, 12:09:00 pm »

Very impressive!  Thanks for adding the movie, that went a long way towards demonstrating the potential.  Good work Valdemar!

OCDDwarf cancels Go Insane: Interrupted by macro.

Logged
Still doing Let's Plays, still got a gold toof. 

Adventure Mode:  The Movie!

Steelgeek

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #3 on: March 21, 2008, 11:44:00 am »

*applauds*
Tried it out, very very cool.
Thanks for the time invested in this, it makes large scale planning so much easier.

Now if we could just do this with furniture...

Logged

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Auto-designation macro 2.0
« Reply #4 on: March 24, 2008, 01:58:00 pm »

Anyone? Does it work with walls/floors?
Logged

Symmetry

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #5 on: March 24, 2008, 02:28:00 pm »

I love you

Edit: arg it only does digging! I need ramps and stairs for something  :)  I'll wait for the next version.

[ March 24, 2008: Message edited by: Symmetry ]

Logged

Valdemar

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #6 on: March 24, 2008, 08:24:00 pm »

Constructions and furniture are much, much harder than designation because they are stored in some separate area of memory than tiles. While I can't do actual constructions, I got it sort of working by editing the tile to be actual wall/floor. The rock type, however, is unpredictable. Usually it's the same type of rock as the rest of the layer. The other complication I get with constructions is that there's some kind of allocation of sky tiles, and getting them allocated is not as easy as designating the whole level like with rock  :(

I'll release the construction version once I work out a few more bugs with it.

quote:
arg it only does digging! I need ramps and stairs for something  I'll wait for the next version.

If you use the .csv format (see the thread for version 1.0, first link in the OP), you can do any type of designation with this version. The old AHK version can do constructions too.

Steelgeek

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #7 on: April 02, 2008, 06:59:00 am »

Odd. After working for some time it's been giving me an error.

version generic version, pid 3536, player a6
a4814b8 a481508 a4b3aa8 0
Exception in Tkinter callback
Traceback (most recent call last):
 File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
   return self.func(*args)
 File "C:\Documents and Settings\Administrator\Desktop\Games\Dwarf Fortress\com
panion\scripts\autodesig.py", line 81, in designate
   if DEBUG_MODE:
NameError: global name 'DEBUG_MODE' is not defined


Did I delete something during a purge that I needed?

Logged

Symmetry

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #8 on: April 03, 2008, 05:35:00 pm »

I got that too, I think there's a bug with that line.  You can remove the if DEBUG_MODE: line from the file (and move the "raise #" below it to the left so it's tabbed correctly) if you like but the bug is with error reporting so once you make the change it'll just be able to report the error that's actually stopping it from working.

Probably you're trying to designate a pattern in tiles that DF hasn't allocated yet, the error message for this reads like this:
"Exception: Tile is out of bounds or unallocated. Try designating the entire level for mining, undesignating, and try again."

[ April 03, 2008: Message edited by: Symmetry ]

Logged

Aytaya

  • Escaped Lunatic
    • View Profile
Re: Auto-designation macro 2.0
« Reply #9 on: April 25, 2008, 03:46:00 am »

I get an error saying setMapInfo() takes exactly 8 arguments (7 given)

What does this mean. This is when the windows up and everythings right and i click the designate button.

Logged

Valdemar

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #10 on: April 25, 2008, 08:48:00 pm »

quote:
Originally posted by Aytaya:
<STRONG>I get an error saying setMapInfo() takes exactly 8 arguments (7 given)

What does this mean. This is when the windows up and everythings right and i click the designate button.</STRONG>



It seems that the Dwarf Companion API has changed in version 0.11. It now supports temperature adjustment. Unfortunately the API to get the temperature is not working, but the tile modifier expects the temperature value to be given to it. Until this is fixed, please replace 'dwarfdbg.py' in the root Dwarf Companion folder with this. (Or you can just use Companion version 0.10)

secco

  • Escaped Lunatic
    • View Profile
Re: Auto-designation macro 2.0
« Reply #11 on: April 28, 2008, 11:24:00 am »

I'm trying to use this utility, but, having never opened Excel before, I'm having trouble creating a .csv file that the macro is willing to accept.

I have tried to make the spreadsheet as described in the other thread (blank cells for undesignated tiles, D for diggable tiles, etc), like this

but, upon saving the file, excel warns me that the file has certain "characteristcs" that are incompatible with the csv format (?), Still, I save the file as csv (opting to lose those "characteristics", whatever those may be) but, when trying to use the roomdef with the macro, I'm given an error like: "Invalid tile 'D;D;D;D;D;D;D;D;D;D;etc;#' in csv file"

If i try to open one of the example roomdefs provided with the macro package it looks like this (and, obviously, it works as intended)

Basically, I have absolutely no clue how this messy-looking format relates to the first spreadsheet

Help me please :P

Logged

Keizo

  • Bay Watcher
  • Proving dwarven motorcycle gangs are yankees too.
    • View Profile
Re: Auto-designation macro 2.0
« Reply #12 on: April 28, 2008, 12:05:00 pm »

quote:
Originally posted by secco:

Help me please :P[/QB]


Sure, I know what's wrong here. First, a short explanation. a .csv file is a "comma seperated value" file. The default format for .csv's are to have your information in each cell separated by a comma character (by default), and information in each row separated by a return line character. When you saved your .csv, you somehow saved it using semicolons ( ;) instead of commas, which the macro program doesn't recognize as the separator character. This is probably an option you glossed over in excel somewhere.

The fix is simple. Open your .csv file in notepad, do a find and replace for semicolons to replace with a comma (find ;  and replace with  , ). Then it should work. Make sure you resave the file with the same extension (.csv).

[ April 28, 2008: Message edited by: Keizo ]

Logged
火族

Goblin Dragoon 085

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #13 on: April 29, 2008, 05:49:00 pm »

Wait, does this mean I can create digging templates? Wohooo. Ssweet thanks.
Logged

DDouble

  • Bay Watcher
    • View Profile
Re: Auto-designation macro 2.0
« Reply #14 on: April 29, 2008, 07:14:00 pm »

This is really impressive, thank you for making this! I had suggested to Toady a macro program, like TOME or Angband's, that could quickly create the fractal bedrooms on the wiki. I'm glad to see it come to fruition through a user mod!
Logged
Pages: [1] 2