Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Macro doesn't repeat  (Read 2830 times)

n4m3l3ss

  • Bay Watcher
    • View Profile
Macro doesn't repeat
« on: April 29, 2016, 04:05:08 am »

So I create a macro - for example to shoot an arrow (f + aim it somewhere + Enter). Or more complex ones, like pick up a stone, knap it and throw it. Then I set the repeat to some high number (ctrl+u+99+Enter).

But the macro plays only once, regardless of the repeat number! For example, I notice that only one arrow gets fired, no matter what.

What am I doing wrong? How do I get the macro to repeat 99 times for real?

Or do I have no choice but to repeat it lots of times manually while recording it?

I'm currently playing DF version 42.06 on Windows. On Linux, 42.06 seems to be even worse at macro, because the projectile aiming part is slow.
Logged

quekwoambojish

  • Bay Watcher
    • View Profile
Re: Macro doesn't repeat
« Reply #1 on: April 29, 2016, 11:39:24 am »

It's likely your macro is whiffing a command, be it a command that isn't macro-able or your guy is missing a component when he goes to repeat the macro.

(This happens a lot when trying to reference an object that has disappeared from your inventory as well)

Try doing the ol' throw water from a container trick, if that works then I doubt it's an issue with your version, more just the commands you are using.
« Last Edit: April 29, 2016, 11:42:39 am by quekwoambojish »
Logged

Gun_Secutor

  • Bay Watcher
    • View Profile
Re: Macro doesn't repeat
« Reply #2 on: May 06, 2016, 07:12:36 pm »

I'm pretty sure you're supposed to press ctrl + p (plays the macro once) after pressing ctrl + u + 99 but while the little tab on the top is still there.
Like this: ctrl + u + 99 + ctrl + p.
Logged

kontako

  • Bay Watcher
    • View Profile
Re: Macro doesn't repeat
« Reply #3 on: May 06, 2016, 10:38:35 pm »

If you move the mouse the macro pauses. You just have to sit there and watch.
Logged
"Confederacy of Businesses"?! By Armok's Blood! These Communist animals are CAPITALISTS!
"This town ain't big enough for the two of us, turkey"
*gobbles menacingly*

Luponius

  • Bay Watcher
    • View Profile
Re: Macro doesn't repeat
« Reply #4 on: May 08, 2016, 01:13:03 pm »

I'm pretty sure you're supposed to press ctrl + p (plays the macro once) after pressing ctrl + u + 99 but while the little tab on the top is still there.
Like this: ctrl + u + 99 + ctrl + p.

Exactly this.  Took me a while until I accidentally did that and it repeated.  Be careful though repeating macros may lead to major shenanigans.  I recommend increasing macro delay and cleaning up macro commands from the saves files, check wiki for that.
Logged

n4m3l3ss

  • Bay Watcher
    • View Profile
Re: Macro doesn't repeat
« Reply #5 on: June 02, 2016, 04:19:21 pm »

I'm pretty sure you're supposed to press ctrl + p (plays the macro once) after pressing ctrl + u + 99 but while the little tab on the top is still there.
Like this: ctrl + u + 99 + ctrl + p.

Exactly this.  Took me a while until I accidentally did that and it repeated.  Be careful though repeating macros may lead to major shenanigans.  I recommend increasing macro delay and cleaning up macro commands from the saves files, check wiki for that.


Thank you, Gun_Secutor, that was a big step forward.

But now the next problem is that the macro always messes up (the one with knapping and throwing stones). My macro works when I do it without repeats, the small rock is always in the same place on the ground for me to pick it up. But even if I set it to repeat just twice, it does weird things, like not having the rock in hand and stopping in the middle of the x menu.

I just don't get it, what the hell is wrong?! I've tried editing the macro file, adding [MACRO_MS:2000] or SetKeyDelay, 40, 40 to it. I've also tried adding "Sleep 2000" after every command - but to no avail. Every time I edited the macro file, I restarted the game to ensure that it is refreshed.

Also, if I just record the same macro again, but perform the action multiple times, a similar problem happens.

Is this some kind of bug?
Logged

n4m3l3ss

  • Bay Watcher
    • View Profile
Re: Macro doesn't repeat
« Reply #6 on: June 07, 2016, 03:08:50 am »

UPDATE!

I've copied my savegame over to Linux and tried running my macro there. It actually worked as expected!!  :D I just made the stone-knapping-throwing macro, then ctrl+u+99+ctrl+p and it worked.

Note: This works on the vanilla game (42.06). For some reason, the starter pack I have for Linux crashes when I try to knap a stone.

Yes, I've said before that the Linux version is worse at speed than Windows, but I didn't really know how to get a macro to repeat. But in the end, the Linux version is somehow better, because it actually works with repeat macros.

If anyone knows how to "slow down" the macro in the Windows version, please tell me.
Logged