Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: New "Task": Wait  (Read 1677 times)

Derakon

  • Bay Watcher
    • View Profile
New "Task": Wait
« on: June 15, 2008, 11:43:24 am »

I propose a new task that would be assignable to any workshop/lever/etc: Wait. You'd get to select a number of ticks, and then as soon as the Wait task is next in the queue, it would activate and delay activation of the task following it. A few possible uses:

* Slowing a consumer down to match the pace of a producer (for example, if you have a legendary armorsmith and a dabbling furnace operator, you'll use up metal bars much more quickly than you create them)
* Allow periodic lever-based activation of traps without mucking about with the machine logic stuff on the wiki (putting a lever on Pull Lever / R alone doesn't always do what you need)
* Allow a single dwarf to split his time between multiple workshops. For example, if you want a dwarf to alternate between making beds and studding them with gems, then you'd put the bed and gem tasks on repeat, with a short delay after each so the dwarf would have time to pick a new task after each bed/gem task is completed.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Abyssal Squid

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #1 on: June 15, 2008, 12:25:20 pm »

2 and 3 sound pretty useful, but they don't sound like they'd work the same way.  With levers, you'd want the dwarf to stick around so he can flip it again as soon as its effect activates, a "joggle" task.  I can't see wait being very useful for them, but I also can't see a reason not to allow it in addition to joggle.

With legendaries, I'd rather have a "suspend instead of cancel" toggle for workshops and get my legendaries working in spurts, rather than wandering off after every job.
Logged

irmo

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #2 on: June 15, 2008, 04:10:12 pm »

2 and 3 sound pretty useful, but they don't sound like they'd work the same way.  With levers, you'd want the dwarf to stick around so he can flip it again as soon as its effect activates, a "joggle" task.  I can't see wait being very useful for them, but I also can't see a reason not to allow it in addition to joggle.

The way to do that is to queue "Pull the lever, Pull the lever, Wait" on repeat.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #3 on: June 15, 2008, 06:02:37 pm »

No.  As pulling the lever twice has the same result as pulling it once (but leaves the lever in the wrong position).

Pull, Wait(1), Pull, Wait(300), Repeat.
Logged

Cryten

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #4 on: June 16, 2008, 03:27:46 am »

I think this would be good for setting up lever sequences but would add anouther unesciary layer to workshop ques. Though thats my preference feel free to think otherwise.

At the moment if I want a task which keep running out of materials to be done repedativly I just schedual it in a job manager, itll abort when it runs out of materials and then re add the task when materials become availible.
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #5 on: June 16, 2008, 09:55:51 am »

The problem with the job manager is that I typically have many workshops of the type that tend to be resource-constrained (typically forges and glass furnaces), with different profiles to lock out that ****ing Dungeon Master or the untrained dwarves I have churning out low-quality crud. The job manager doesn't care what workshop a task is assigned to.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Erk

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #6 on: June 16, 2008, 04:57:54 pm »

Sounds like two separate ideas, both of which would be great.

One works like "suspend" or "repeat": press W and get a little green W beside the work order. Wait for materials. The work order will be checked like any other work order, but instead of being canceled with a "Urist has canceled Smelt Magnetite Ore/R: needs magnetite ore", cancelations are not announced and the job, rather than being removed from the list, is shunted to the end of the queue and tried again later.

The other is a full queue action, "man post" or "hold position" or just "standby". That one works by setting a number of ticks for a unit to wait at the post, standing their until the time has elapsed.

IMO it is these kind of dwarf maintenance commands that the fortress really needs right now.
Logged
'River' cancels eat: Food is problematic.

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: New "Task": Wait
« Reply #7 on: June 17, 2008, 10:48:13 am »

Erk's summation seems eminently applicable and very useful.  Supported.
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

Derakon

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #8 on: June 17, 2008, 11:07:53 am »

I think that those would be useful features, and would accomplish some things more elegantly than a wait task would, but they don't accomplish everything that a wait task can do. In particular, manning a post doesn't say anything about when to pull levers, and waiting for materials doesn't let you alternate between tasks when there's ready materials for both tasks.

The more I think about it, the more I realize how useful that latter use for waiting would be. I frequently have the situation where I want a dwarf to have a default activity (e.g. make raw green glass), but I want him to do anything that has a higher priority in preference to that task. So what I could do is simply have a workshop dedicated to the default task, with a short wait between instances; that way, every time the dwarf finishes a default task, he looks around for anything else that's available, which doesn't include the default task yet. Some cases where this would come in handy:

* Glassmaker making raw green glass
* Cook
* Mason making stone blocks
* Carpenter making barrels (depending on your wood supply, of course)

Pretty much any dual-class crafter dwarf would benefit.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: New "Task": Wait
« Reply #9 on: June 20, 2008, 02:47:12 pm »

I'm not sure I would want to go so far as to implement this for all workshops. Only for levers:
'Wait for (x) seconds'
It would be great if we could add 'timed intervals / delays' to the logic port designs.
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Erk

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #10 on: June 21, 2008, 06:45:10 pm »

why would you allow it for levers and not other workshops? Seems a bit unfair to the folks who want the option on everything. I've often wished I could slow down my legendary crafters a little, but not stop them.
Logged
'River' cancels eat: Food is problematic.

ShadowDragon8685

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #11 on: June 21, 2008, 09:10:20 pm »

Awh, nuts. I thought this was a "Wait on-call" task for levers. I hate having a job to PULL THE LEVER and nobody does it because they're all hauling.

Man, that's what levers need. First, they need a priority that's second only to "engaging in/fleeing from combat", and they need a "Man the lever but do not pull it" task. I'm tired of having to lock dwarves in the lever-room to make sure there's always someone on-hand to PULL THE LEVER.
Logged

Erk

  • Bay Watcher
    • View Profile
Re: New "Task": Wait
« Reply #12 on: June 21, 2008, 10:34:04 pm »

This is the purpose to children and nobles. It is why they exist.
Logged
'River' cancels eat: Food is problematic.

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: New "Task": Wait
« Reply #13 on: June 22, 2008, 05:16:03 am »

I second the wait-on-call idea.
It shouldn't be too hard to implement, since catapults and ballista's already have it.

And.. On second thought.. Sure. Why not for workshops as well. It would be a bit unfair indeed.
I was focused too much on the thought of implications for logic gates.
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479