Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: macro countdown  (Read 763 times)

jcochran

  • Bay Watcher
    • View Profile
macro countdown
« on: February 18, 2014, 11:22:32 am »

The macro capability of dwarf fortress is usable, but a minor tweak would make it better. Currently when a macro is running, you display a blinking "Play" on the screen to indicate so. But since macro playback can be a bit slow, if you have a large repetition factor, the duration of the macro is unknown to the player. How about also indicating the current count on the playback. Or perhaps the number of repetitions still to execute? That way the use would still know that a macro is playing and be able to estimate how much longer the playback will take.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: macro countdown
« Reply #1 on: February 18, 2014, 12:38:41 pm »

The macro capability of dwarf fortress is usable, but a minor tweak would make it better. Currently when a macro is running, you display a blinking "Play" on the screen to indicate so. But since macro playback can be a bit slow, if you have a large repetition factor, the duration of the macro is unknown to the player. How about also indicating the current count on the playback. Or perhaps the number of repetitions still to execute? That way the use would still know that a macro is playing and be able to estimate how much longer the playback will take.
This would require Toady to implement variables in the macro language (which I don't recall seeing in there) and a variable monitor mechanism in the interface.  Although looping and conditional execution would be nice, it's probably not in the foreseeable future.  There are external tools that do this (I think they function as keystuffers so that the internals of the macro are hidden from DF).

If you want to make a vanilla DF macro show a counter, try designating and undesignating a spots for mining/channeling every N iterations.  Suppose your macro is doing 500 steps.  After 100, you designate top-left square.  Then the top-right one.  Then the lower-right one.  Then the lower-left one.  Then clear all four after the 500th step.

For bonus points, you can designate pixelated numbers instead.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

jcochran

  • Bay Watcher
    • View Profile
Re: macro countdown
« Reply #2 on: February 18, 2014, 12:46:49 pm »

I don't think you understand... Currently we define a macro using Ctrl-R and playback using Ctrl-P  or Ctrl-U, one or two digit count, Ctrl-P.
If you use the Ctrl-U and count method, I'd simply like for the remaining playback count to be displayed instead of simply blinking "Play" as the macro runs.
No extra variables. No loop control for use defined macros. Nothing that you mentioned. Simply display the count (that Toady needs to maintain anyway).
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: macro countdown
« Reply #3 on: February 18, 2014, 01:09:06 pm »

I don't think you understand... Currently we define a macro using Ctrl-R and playback using Ctrl-P  or Ctrl-U, one or two digit count, Ctrl-P.
If you use the Ctrl-U and count method, I'd simply like for the remaining playback count to be displayed instead of simply blinking "Play" as the macro runs.
No extra variables. No loop control for use defined macros. Nothing that you mentioned. Simply display the count (that Toady needs to maintain anyway).
You're right, I completely mis-read that.  I was imagining those folks who duplicate their instructions within the macro using a text editor (to dig down 20 z levels or something).
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map