Bay 12 Games Forum

Please login or register.

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

Author Topic: Slow down time/ speed up dwarves?  (Read 7578 times)

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Slow down time/ speed up dwarves?
« Reply #15 on: August 01, 2014, 01:10:42 am »

...which messes up military training schedules and everything else that depends on calender time (?)

Otherwise a slow, normal and fast game speed would be a nice setting to have. :)

Only if you actually stop time.

There are certain events that only update when the calendar tick updates (like designating most 'idle' jobs, including military training, eating, drinking, and sleeping), but if the calendar updates every 100 ticks instead of every 10 ticks the difference should be negligible.  Beyond this the only difference should be logical changes - a month-long training session will last 10 times as long, because the month is longer.  (Though this might lead to bad thoughts about long patrols.)

There are other bugs associated with speeding up time too much (skipping calendar events, not updating seasons properly), but I think that as long as it doesn't go faster than 10 times normal speed, it shouldn't be a problem.

I suppose I could try to whip up a quick script, although I have no idea whether it could be ported to DF2014, given all the changes made to the passage of time.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Slow down time/ speed up dwarves?
« Reply #16 on: August 01, 2014, 04:09:21 am »

Here it is: timestream.lua

It multiplies the speed of calendar time by a specified value.  0-1 will slow down time, over 1 will speed it up.  It seems to work as intended, but be warned that inputting a factor over 10 may cause buggy behavior.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Slow down time/ speed up dwarves?
« Reply #17 on: August 01, 2014, 04:15:39 am »

I theory I could slap that in, with "timestream 1" in the dfhack init, and it wont change anything? I will run some tests with it today, and add it as an experimental feature if all checks out. Its actually something several people requested without knowing it... I often read posts like "I wish migrants wouldnt come so soon" or "I get spammed with traders" or "With low FPS nothing happens, no sieges, no attacks..."

These could be influenced a bit. You want more attacks? Timestream 9. You want more time in between the migrant waves? Timestream 0.5.

Just to make extra sure:
What happens when there is a 0 ?
What happens if there is >10 ? (Just asking, I will cap it at 10)
The numbers between 0 and 1 can have any number of decimals? 0.1 ? 0.25 ? 0.333333 ?

I think that script is very neat. :) 
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Slow down time/ speed up dwarves?
« Reply #18 on: August 01, 2014, 04:40:41 am »

If it is 0, time will stop.  This is not advised, as it will prevent anyone from taking idle jobs and everyone will eventually starve.
A value greater than 10 works (a value of 1000 will let you run through a year in a matter of seconds) but it will have to skip over calendar ticks to do so.  Since certain checks and updates are made only on particular calendar ticks, going too fast may have unintended behavior which gets worse the faster you go, like visitors getting stuck in limbo if their arrival date passes, seasonal temperature changes not updating properly, and possible crashes due to skipped events piling up.
The numbers between 0 and 1 can be any decimal.

atracious

  • Escaped Lunatic
    • View Profile
Re: Slow down time/ speed up dwarves?
« Reply #19 on: August 07, 2014, 05:13:55 pm »

Here it is: timestream.lua

It multiplies the speed of calendar time by a specified value.  0-1 will slow down time, over 1 will speed it up.  It seems to work as intended, but be warned that inputting a factor over 10 may cause buggy behavior.
So how do I run this? I D/L dfhack but I can't seem to run the timestream file.
I've tried:
Code: [Select]
timestream.lua(#)                    timestream a nil value
timestream.lua[#]                    nothing happens '>>>'
timestream.lua (#)                   syntax error near timestream
timestream.lua [#]                   nothing happens '>>>'
timestream(#)                        timestream a nil value
timestream[#]                        nothing happens '>>>'
timestream (#)                       timestream a nil value
timestream [#]                       nothing happens '>>>'
and I've tried entering a number when I'm given '>>>', but then i just get syntax error near #
note: I'm not typing '#' I'm trying numbers
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Slow down time/ speed up dwarves?
« Reply #20 on: August 07, 2014, 05:41:41 pm »

Timestream is a script; you do not need to put in "lua" before it, it's a dfhack command.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Slow down time/ speed up dwarves?
« Reply #21 on: August 07, 2014, 05:54:25 pm »

Its "timestream X" with X being a number from 0.1 to 10. It multiplies the speed with that number, so 0.1 is ten times slower, 1 is normal and 10 is 10 times speed. Anything in between is accepted.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

atracious

  • Escaped Lunatic
    • View Profile
Re: Slow down time/ speed up dwarves?
« Reply #22 on: August 07, 2014, 06:43:00 pm »

Timestream is a script; you do not need to put in "lua" before it, it's a dfhack command.
Thanks for the help, I had put the file in the lua folder instead of the scripts folder, but now it works.

The script is exactly what I was looking for! Hopefully there are no hidden surprise effects from this script :)

Thank you all for your help,
~Atracious
Logged
Pages: 1 [2]