Description: Adds a tiny time toolbar at the top of the UI, that displays an ingame clock, allows to switch from night-and-day mode to continuous daylight and to tweak game speed. Also adds a Clock Combinator item to have access to time/daylight/luminosity variables through the logistic network.
Tested-With-Factorio-Version: 0.13.0
Multiplayer compatible: tested on a headless server...
Locale: english, french, german
Tags: Time, Daylight, Game speed, Clock combinator
License: You are free to use and distribute this mod and also to modify it for personal use, but not to release a modified version without permission (unless visibly not maintained anymore).
timetools-screencopy7.jpg (56.01 KiB) Viewed 36814 times
Description
Description
The time button on the left displays the current ingame day and time (dd-hh:mm). Note that it is different from your playing time in real seconds (as a mod like EVO-GUI can display it). It is the time corresponding to the ingame days and night cycle.
If you click on the time button, it pauses the time (but not the game) and the time becomes red. Click again to resume ; the time becomes green again
timetools-screencopy1.jpg (5.66 KiB) Viewed 41485 times
If you click on the second button, it switches between classical night/day mode and continuous daylight (where time is frozen at 12:00).
timetools-screencopy4.jpg (5.41 KiB) Viewed 41485 times
With the three last buttons, you can tweak the game speed :
- click on "<" or ">" to decrease or increase game speed from /8 to x64.
- click on the game speed button to directly revert to x1 normal speed, or to switch instant to last memorized speed if you are already in normal speed.
timetools-screencopy2.jpg (5.82 KiB) Viewed 41485 times
timetools-screencopy3.jpg (5.88 KiB) Viewed 41485 times
If you did researched the Circuit Network technology, you now have access to a Clock Combinator item that provides an access to several variables/signals :
current game tick (from the beginning of the game)
current day
current hour
current minute
always day status (0: night&day, 1: always daylight)
current darkness (from 0 to 100%)
current lightness (from 0 to 100%), inverse of darkness.
timetools-screencopy5.jpg (75.48 KiB) Viewed 41485 times
If you want to change the clock settings, you can use the remote interface from the console :
/c remote.call( "timetools", "setclock", hour.minute ) ex: /c remote.call( "timetools", "setclock", 9.27 ) to set at 09:27am
you can also enable/disable the time display (if you want to keep only the combinator part), using
/c remote.call( "timetools", "off" )
and
/c remote.call( "timetools", "on" )
You can also edit the config.lua file if you want to lower the maximum speed, or change the clock refresh rate.
Download
For Factorio 0.13.X : Please now use the portal for downloads (see link above or use ingame mod install/update), as I won't update both downloads links here anymore.
You can probably find some of these features in other separate mods, but I gather them into one simple mod with a tiny gui bar.
Thanks for GopherAtl and his Nixie Tubes mod that I use to display numbers in my last screenshot.
The classic display of the first screenshot is from my SmartDisplay mod.
Re: [MOD 0.12.29+] TimeBar v1.0.0
Posted: Fri Apr 01, 2016 7:28 am
by Alexs
uppssss...
Re: [MOD 0.12.29+] TimeBar v1.0.0
Posted: Fri Apr 01, 2016 7:39 am
by Factorio2016
confirm! when you create a new game same thing!
Re: [MOD 0.12.29+] TimeBar v1.0.0
Posted: Fri Apr 01, 2016 9:33 am
by blacky
confirmed, broken, same problem
Re: [MOD 0.12.29+] TimeBar v1.0.0
Posted: Fri Apr 01, 2016 10:03 am
by Roktaal
Until the OP makes the changes you can open control.lua and change all instances of "butimon" to "button"
Re: [MOD 0.12.29+] TimeBar v1.0.0
Posted: Fri Apr 01, 2016 10:23 am
by Alexs
thx rocktaal, it works.
..and THX for your mod, binbinbar..
Re: [MOD 0.12.29+] TimeBar v1.0.0
Posted: Fri Apr 01, 2016 11:08 am
by binbinhfr
Ooops, sorry for the error. I did not detect it because my GUI was created for a long time now...
Corrected in the original zip file.
Re: [MOD 0.12.30+] Time Tools
Posted: Sat Apr 09, 2016 11:18 pm
by binbinhfr
I extended this mod with Clock Combinators, to have access to several time and daylight variables through the logistic network. Could be usefull to trigger some actions at night, or only when the sun is up.
I also revamp the interface and add a freeze time feature.
Now the mod should be multiplayer compatible, but as I'm always playing solo, I cannot test it, so please, I am interested by some feedback on this aspect.
As I renamed the mod from "Time Bar" to "Time Tools", do not forget to delete the previous "Time Bar" mod, if you installed it before...
Re: [MOD 0.12.X] Time Tools 1.0.1 (& Clock Combinator)
Re: [MOD 0.12.X] Time Tools 1.0.1 (& Clock Combinator)
Posted: Sun Apr 10, 2016 2:41 pm
by binbinhfr
apcnc wrote:german locale
Thanks again, guy !
And so here is v1.0.2 :
Adds locale for german (thanks to Apcnc) and french (my own langage). download v1.0.2
Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)
Posted: Mon Apr 11, 2016 2:29 pm
by Alexs
Thanks for the update.
There is at me a small problem:
I'm already at day 375 (EVO-GUI) in the game, but it is only 7 day display.
Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)
Posted: Mon Apr 11, 2016 4:40 pm
by binbinhfr
Alexs wrote:Thanks for the update.
There is at me a small problem:
I'm already at day 375 (EVO-GUI) in the game, but it is only 7 day display.
Well, I installed EVO-GUI, and it seems to me that it shows your play-time since the beginning of the scenario in days/hours (you see that the seconds are close to real seconds). It is extrapolated from the gameticks variable provided by the API. This time is a real playtime, if you keep game speed at x1. If you increase game speed, this time also speeds up.
Under this value, if you expand the EVO gui, you have the ingame-time (calculated from the daytime API variable) : my clock displays this apparent time in the game (which is ticking far quicker). This is the ingame time corresponding to the cycle of days/nights in the game. In one real day, you have a lot of factorio days My mod displays this number of days, not the number of real days you played the game.
Note that if you choose "always day", the game time is blocked to 12:00 (full sun) and also my day-counter is blocked, but your real playtime still increases.
As far as I know, there is no intern API counter for the number of ingame-days, so my mod count them from the moment you installed it, increasing of +1 each time the ingame-clock goes from 23:59 to 00:00. So day 0 in my mod starts at the moment you installed my mod in your scenario...
So my clock is not here to show your playtime, but to help you dealing with the cycle of night and days. To see when your accumulators will works, to trigger some actions with the clock-combinator depending on the ambient luminosity, etc...
Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)
Posted: Wed Apr 13, 2016 9:13 pm
by Sander_Bouwhuis
Ok, maybe outside of the scope of this mod but maybe you can help.
I'm looking for a mod to make the night a little less dark. So, I still want the night to be there (for solar panel purposes), but don't want it so I can hardly see anything.
Is that something you could add to your mod?
Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)
Posted: Wed Apr 13, 2016 9:38 pm
by binbinhfr
Sander_Bouwhuis wrote:
I'm looking for a mod to make the night a little less dark. So, I still want the night to be there (for solar panel purposes), but don't want it so I can hardly see anything.
Is that something you could add to your mod?
Well not in my mod. Infact the only way to do this seems to constantly tweak the clock like in this mod : viewtopic.php?f=120&t=14509
But then the game-clock is speeding, slowing and freezing to simulate the type of day you want. In your case, you'll have to freeze time when the night starts to fall, then wait some time, and then swith directly to morning when sun climbs up again. You'd better ask the other modder if you can achieve this with his mod.
Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)
Posted: Thu Apr 14, 2016 7:32 am
by Sander_Bouwhuis
Ok, that's a shame.
I thought because you had looked into the day/night cycle you would also know how to change the light level at night.
Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)
Posted: Thu Apr 14, 2016 7:46 am
by binbinhfr
Sander_Bouwhuis wrote:Ok, that's a shame.
I thought because you had looked into the day/night cycle you would also know how to change the light level at night.
Some other modders or devs can correct me, but I don't think that you can modify the luminosity independantly from the game-time-of-the-day.