Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Can jobs be made to take longer?  (Read 1578 times)

fasquardon

  • Bay Watcher
    • View Profile
Can jobs be made to take longer?
« on: September 29, 2014, 10:23:55 am »

So, some of the things I'd like to mod into Dwarf Fortress are reactions that realistically speaking would take a few months.  For example:

*Brewing that isn't instantaneous
*Piles of drying peat or seasoning wood

Or would take a few days, for example:

*Meat/fish drying racks
*Making more complex pieces of metalwork take longer to forge

Et cetera.

I've come to my wits end in my search for ways to make this possible.  Does anyone else have any ideas about how it might be done?

fasquardon
Logged

TheDorf

  • Bay Watcher
    • View Profile
Re: Can jobs be made to take longer?
« Reply #1 on: September 29, 2014, 10:38:17 am »

I'm pretty sure you can't change how long reactions take (except for possibly using DFHack, I have no idea about this though, it's just a theory), but I suppose you could split the reactions up into a bunch of reactions.

For example, you should be able to create reactions that do something like the following:
Bar -> Started complex metal-shaping
Started complex metal-shaping -> Half-finished complex metal-shaping
Half-finished complex metal-shaping -> Finished product

Might not be what you're looking for, but that's what I can come up with at the time being.
Logged
I love this community. Somebody asks "hay guise how do i tame shark", and then everybody is like "why don't we fling sharks at things with complex mechanical devices?".

fasquardon

  • Bay Watcher
    • View Profile
Re: Can jobs be made to take longer?
« Reply #2 on: September 29, 2014, 10:20:23 pm »

Can one write reactions so that on completion the automatically start the next reaction in the chain?  Without resorting to DFhack that is...

Still wouldn't fit with drying racks or fermenting barrels I feel, but it might be alright for some metallurgical processes.

fasquardon
Logged

ArKFallen

  • Bay Watcher
  • Bohandean Desserter
    • View Profile
Re: Can jobs be made to take longer?
« Reply #3 on: September 30, 2014, 07:12:56 am »

Can one write reactions so that on completion the automatically start the next reaction in the chain?  Without resorting to DFhack that is...

Still wouldn't fit with drying racks or fermenting barrels I feel, but it might be alright for some metallurgical processes.

fasquardon
Yes, with stipulations.
If you have [AUTOMATIC] for every reaction after the first they will automatically que up when they have the right reagents. And if every reaction has at least 1 reagent that can only be gotten from the previous reaction in the chain it will act like you desire.

Logged
Hm, have you considered murder?  It's either that or letting it go.
SigText
I logged back on ;_;

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Can jobs be made to take longer?
« Reply #4 on: September 30, 2014, 10:51:42 am »

If you have [AUTOMATIC] for every reaction after the first they will automatically que up when they have the right reagents. And if every reaction has at least 1 reagent that can only be gotten from the previous reaction in the chain it will act like you desire.
There is one limitation, though: it only works with kitchens, tanner's shops, kilns, smelters, and custom workshops (magma kilns, magma smelters, querns, millstones, stills, and craftsdwarf's workshops do not support automation).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

letsdance

  • Bay Watcher
    • View Profile
Re: Can jobs be made to take longer?
« Reply #5 on: September 30, 2014, 05:20:59 pm »

the bigger problem for me is the increase in speed with skill level. jobs like masonry take some time at low skill level, but it's fairly easy to get to level 20 and then they produce master pieces daily...
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Can jobs be made to take longer?
« Reply #6 on: October 01, 2014, 01:01:55 pm »

It may be possible to use DFHack to insert time delays... For example you could use a script that creates a barrel of booze and then have it be run a certain amount of time after a reaction completes.

The problem is that the default systems DFHack uses for time delays will not survive a save/load, so you would have to code a persistent time delay system as well (Rubble comes with one, but it depends on Rubble's DFHack loader system)

If I was to make a system like this I would use a Lua hook for the reaction, save a copy of the barrel (or rather enough information that it could be duplicated later) together with how many and what kind of plants are being brewed, then issue a command to create that barrel full of appropriate alcohol after the desired time.

Even more awesome would be to create an undrinkable item called "brewing booze" and after the specified delay find that particular item and transform it into a stack of drink items.

Neither of these would be impossible, but they could be challenging to write if you do not know DFHack scripting well (and they would require DFHack to work at all of course).
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Can jobs be made to take longer?
« Reply #7 on: October 01, 2014, 03:05:49 pm »

It may be possible to use DFHack to insert time delays... For example you could use a script that creates a barrel of booze and then have it be run a certain amount of time after a reaction completes.

The problem is that the default systems DFHack uses for time delays will not survive a save/load, so you would have to code a persistent time delay system as well (Rubble comes with one, but it depends on Rubble's DFHack loader system)

If I was to make a system like this I would use a Lua hook for the reaction, save a copy of the barrel (or rather enough information that it could be duplicated later) together with how many and what kind of plants are being brewed, then issue a command to create that barrel full of appropriate alcohol after the desired time.

Even more awesome would be to create an undrinkable item called "brewing booze" and after the specified delay find that particular item and transform it into a stack of drink items.

Neither of these would be impossible, but they could be challenging to write if you do not know DFHack scripting well (and they would require DFHack to work at all of course).
I like that idea for aging things like wine and hide.  I have absolutely no use for it in my current project, but I just had to say it's an impressive hack.

As far as I know, ReactionTrigger can be passed the location that a reaction took place but no useful information about the reagents or products... but if the script spawns the item it could set some kind of alarm thingie to manipulate that item later.  For things like barrels holding the undrinkable brew, the script would probably have to make an educated guess based on what empty barrel(s) are at the reaction's location.
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

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Can jobs be made to take longer?
« Reply #8 on: October 01, 2014, 03:52:17 pm »

Like I said: challenging but possible :)

I may make a time delay brewing mod as a proff of concept, but not for a while, I have some other stuff that needs doing first...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS