Bay 12 Games Forum

Please login or register.

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

Author Topic: Macro Repository  (Read 3878 times)

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Macro Repository
« on: March 22, 2011, 03:50:09 am »

This is exactly what you think it is. I thought it was about time we started some sort of repository for macros on the forum, much like the worldgen cookbook.

If you didn't know, macros are stored in a makefile in the data/init/macros folder in your DF directory. Makefiles can be opened in programs like notepad. To create a makefile, just copy the text into notepad, save it as [filename].mak, and put it into your macros folder. Especially large macros may be bigger than the character limit, so in that case just upload the makefile somewhere and post a link.

I'll start. This one is used to designate a housing complex, specifically the six-room clusters design:
http://www.mediafire.com/?wuolduvhvzw76dw
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

Encased in burning magma

  • Bay Watcher
  • Nekkid
    • View Profile
Re: Macro Repository
« Reply #1 on: March 22, 2011, 08:41:20 am »

Why not post the text directly in a spoiler or something?
Logged
[MILL_CHILD:ONLY_IF_GOOD_REASON]

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: Macro Repository
« Reply #2 on: March 22, 2011, 08:44:14 am »

Why not post the text directly in a spoiler or something?
It's HUGE. Most macros would exceed the character limit by themselves.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Macro Repository
« Reply #3 on: March 22, 2011, 09:27:42 am »

I guess I'll throw in a contribution here.

Ever need to buy pages upon pages of trader stuff?  Say for example mountains of meat or the elves's entire home forest?

Slow work hitting "down, enter" 100,000 times isn't it?

Well now there is Greiger's "Buy Lots" Macro!  Combined with the game's natural input speed increase when holding a key, this can buy 30 pages or more of objects in seconds! 

It can even be used for selling! Don't have a crafter worth a damn and need to dump mountains of crap on the traders to get any kind of value out of it?  Or simply want a large amount of junk to leave the map via the traders?  This macro will do it all!


Yours for only one low payment of ctrl-c and ctrl-v.  Or a ready made version here! -> http://dl.dropbox.com/u/22514454/Buy%20lots.mak for just the low low price of one eternal soul.(does not have to be yours!)


P.S. All it does is hit down and enter once per run of the macro.  Hold down the play key for the desired effect.

EDIT:  By the by the macro holds a whole lot more information than I thought it does.  Anybody know what all those things near the top are for?  And why does enter come up as "CUSTOM_CTRL_R"?  I would think that would be a different key.
« Last Edit: March 22, 2011, 09:33:40 am by Greiger »
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

ZeroSumHappiness

  • Bay Watcher
    • View Profile
Re: Macro Repository
« Reply #4 on: March 22, 2011, 09:57:25 am »

It's control R because it's saving the \r character, which is carriage return, which is the enter key.  (Approximately.)
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Macro Repository
« Reply #5 on: March 22, 2011, 10:00:36 am »

Huh actually yea, I forgot ctrl r was carriage return.  I wonder what else I forgot from A+ Operating Systems class.

Thanks
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Sizik

  • Bay Watcher
    • View Profile
Re: Macro Repository
« Reply #6 on: March 22, 2011, 10:03:36 am »

The first set of commands is everything that the Enter key does, the second set is everything the down key does, and ctrl+r is the key you pressed to end the macro, which also got recorded.
Logged
Skyscrapes, the Tower-Fortress, finally complete!
Skyscrapes 2, repelling the zombie horde!

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Macro Repository
« Reply #7 on: March 22, 2011, 10:15:34 am »

That explains all the top stuff perfectly.  Wonder if that means that you could edit a macro manually with notepad and get a macro that does different things under different context.  Say for example scrolls a menu down if in a menu where that is a valid key, but nothing if doing a mining designation.

But I'm wandering off topic, and I can't think of a practical use for something like that at any rate, even if it worked perfectly.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: Macro Repository
« Reply #8 on: March 22, 2011, 10:21:29 am »

But I'm wandering off topic, and I can't think of a practical use for something like that at any rate, even if it worked perfectly.
The bulk of the text in the macros comes from the multiple keybindings, so I guess you could save a lot of space by going through the macro and deleting unnecessary bindings from each group. But when it's that long it could take hours, unless you... made a macro... to do it for you.

Huh.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

Aramco

  • Bay Watcher
    • View Profile
Re: Macro Repository
« Reply #9 on: March 22, 2011, 03:24:26 pm »

If someone could make a macro for this, it would be great. I'm not sure I can do it myself, even with the image.
Spoiler (click to show/hide)
Logged
Or maybe there's a god who's just completely insane and sends you to Detroit, Michigan in a new body if you ever utter the name "Pat Sajak".

Urist Imiknorris

  • Bay Watcher
  • In the flesh, on the phone and in your account...
    • View Profile
Re: Macro Repository
« Reply #10 on: March 22, 2011, 05:14:26 pm »

Easy. Press ctrl+r, designate the whole thing, ctrl+r again, ctrl+s.
Logged
Quote from: LordSlowpoke
I don't know how it works. It does.
Quote from: Jim Groovester
YOU CANT NOT HAVE SUSPECTS IN A GAME OF MAFIA

ITS THE WHOLE POINT OF THE GAME
Quote from: Cheeetar
If Tiruin redirected the lynch, then this means that, and... the Illuminati! Of course!

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Macro Repository
« Reply #11 on: March 22, 2011, 05:18:08 pm »

Yea that's basically how it would be done.  You have to do the macro once while the game is recording.  After that you can save it and never need to do it manually again.

Personally I go for a smaller, more modular design, though it would never end up looking nearly as good as that.

replace all the dig parts in that main courtyard with ramps and it becomes even more epic.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

BigD145

  • Bay Watcher
    • View Profile
Re: Macro Repository
« Reply #12 on: March 22, 2011, 05:18:33 pm »

Easy. Press ctrl+r, designate the whole thing, ctrl+r again, ctrl+s.

So basically just start up Quickfort, load the plans, then do your thing.
Logged

Aramco

  • Bay Watcher
    • View Profile
Re: Macro Repository
« Reply #13 on: March 22, 2011, 05:30:04 pm »

Right, but, as I said, I'd probably mess it up every time, and never get it.
Logged
Or maybe there's a god who's just completely insane and sends you to Detroit, Michigan in a new body if you ever utter the name "Pat Sajak".

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Macro Repository
« Reply #14 on: March 22, 2011, 06:08:21 pm »

It dosn't matter if you mess it up, as long as the end result once yer done designating is and hit ctrl-r again  It saves everything you did.  Even you correcting small mistakes.  So it will always look the same each time.

Here's my modular room macro for example. (and to keep adding macros to the repository)


Dimentions 16x10 Starting point at the X.  7 tiles west 8 tiles east 10 tiles south of free space required.

Download

As you'll see as it runs it actually copies how you made the rooms perfectly.  In the same order you made them.  If you make a mistake, yes it will make the mistake too, but then immediately correct it just as you did.  And how quickly you make the recording also doesn't matter.  You could wait 10 minutes from one keypress to the other and when you playback the recording that delay won't exist.

tl;dr Whether you make a mistake or not, or go slowly or not as long as you designated it out the way you want it by the time you stop the recording, that's how it will look.  If you make a bunch of mistakes just up the macro run speed in one of the init files.

P.S.  Yes I know my modular rooms aren't very space efficient.
« Last Edit: March 22, 2011, 06:11:54 pm by Greiger »
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!
Pages: [1] 2