[MOD 0.13] Time Tools (& Clock Combinator)

These mods are not game-changing, but enhance the gameplay by helping you with useful functions.
Mods like showing the current game-time, keep track over your resources, rail-laying...

[MOD 0.13] Time Tools (& Clock Combinator)

Postby binbinhfr » Thu Mar 31, 2016 10:44 pm

Infos
  • Type: Mod
  • Name: TimeTools
  • 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).
  • Portal download : https://mods.factorio.com/mods/binbinhfr/TimeTools
timetools-screencopy7.jpg
timetools-screencopy7.jpg (56.01 KiB) Viewed 11477 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
timetools-screencopy1.jpg (5.66 KiB) Viewed 16148 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
timetools-screencopy4.jpg (5.41 KiB) Viewed 16148 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
timetools-screencopy2.jpg (5.82 KiB) Viewed 16148 times

timetools-screencopy3.jpg
timetools-screencopy3.jpg (5.88 KiB) Viewed 16148 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
timetools-screencopy5.jpg (75.48 KiB) Viewed 16148 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.
Last edited by binbinhfr on Fri Aug 05, 2016 5:36 pm, edited 66 times in total.
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.29+] TimeBar v1.0.0

Postby Alexs » Fri Apr 01, 2016 7:28 am

uppssss...
Attachments
timebar.jpg
timebar.jpg (135.55 KiB) Viewed 16896 times
Alexs
Fast Inserter
Fast Inserter
 
Posts: 107
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.29+] TimeBar v1.0.0

Postby Factorio2016 » Fri Apr 01, 2016 7:39 am

confirm! when you create a new game same thing! :(
English is not my native language. Translator.
Factorio2016
Fast Inserter
Fast Inserter
 
Posts: 136
Joined: Wed Dec 23, 2015 1:17 pm
Location: Russia

Re: [MOD 0.12.29+] TimeBar v1.0.0

Postby blacky » Fri Apr 01, 2016 9:33 am

confirmed, broken, same problem
blacky
Manual Inserter
Manual Inserter
 
Posts: 1
Joined: Fri Apr 01, 2016 9:30 am

Re: [MOD 0.12.29+] TimeBar v1.0.0

Postby Roktaal » Fri Apr 01, 2016 10:03 am

Until the OP makes the changes you can open control.lua and change all instances of "butimon" to "button"
User avatar
Roktaal
Long Handed Inserter
Long Handed Inserter
 
Posts: 79
Joined: Sat Mar 26, 2016 6:42 pm

Re: [MOD 0.12.29+] TimeBar v1.0.0

Postby Alexs » Fri Apr 01, 2016 10:23 am

thx rocktaal, it works.

..and THX for your mod, binbinbar..
Attachments
control.lua
(3.55 KiB) Downloaded 49 times
Alexs
Fast Inserter
Fast Inserter
 
Posts: 107
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.29+] TimeBar v1.0.0

Postby binbinhfr » Fri Apr 01, 2016 11:08 am

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.
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.30+] Time Tools

Postby binbinhfr » Sat Apr 09, 2016 11:18 pm

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...
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.X] Time Tools 1.0.1 (& Clock Combinator)

Postby apcnc » Sun Apr 10, 2016 2:28 pm

german locale
Code: Select all
[item-name]
clock-combinator = Uhrenkombinator

[recipe-name]
clock-combinator = Uhrenkombinator

[entity-name]
clock-combinator = Uhrenkombinator

[virtual-signal-name]
signal-clock-gametick=Uhr/Gameticks
signal-clock-day=Uhr/Tag
signal-clock-hour=Uhr/Stunde
signal-clock-minute=Uhr/Minute
signal-clock-darkness=Uhr/dunkelheit
signal-clock-lightness=Uhr/helligkeit
signal-clock-alwaysday=Uhr/immer Tag

apcnc
Inserter
Inserter
 
Posts: 20
Joined: Fri Apr 08, 2016 1:34 pm
Location: Germany

Re: [MOD 0.12.X] Time Tools 1.0.1 (& Clock Combinator)

Postby binbinhfr » Sun Apr 10, 2016 2:41 pm

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
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby Alexs » Mon Apr 11, 2016 2:29 pm

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.
Alexs
Fast Inserter
Fast Inserter
 
Posts: 107
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby binbinhfr » Mon Apr 11, 2016 4:40 pm

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...
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby Sander_Bouwhuis » Wed Apr 13, 2016 9:13 pm

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?
Sander_Bouwhuis
Long Handed Inserter
Long Handed Inserter
 
Posts: 67
Joined: Mon Dec 07, 2015 10:45 pm
Location: The Netherlands

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby binbinhfr » Wed Apr 13, 2016 9:38 pm

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. ;)
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby Sander_Bouwhuis » Thu Apr 14, 2016 7:32 am

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.
Sander_Bouwhuis
Long Handed Inserter
Long Handed Inserter
 
Posts: 67
Joined: Mon Dec 07, 2015 10:45 pm
Location: The Netherlands

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby binbinhfr » Thu Apr 14, 2016 7:46 am

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.

Did you check the craftable item Night Vision https://wiki.factorio.com/index.php?title=Night_vision ?

Otherwise, you have to put Lamps everywhere ! https://wiki.factorio.com/index.php?title=Lamp
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby Sander_Bouwhuis » Thu Apr 14, 2016 8:11 am

Yes, I did see that mod. Thanks for reminding.
Lamps everywhere is what I do now.

Thanks for your mod and info.
Sander_Bouwhuis
Long Handed Inserter
Long Handed Inserter
 
Posts: 67
Joined: Mon Dec 07, 2015 10:45 pm
Location: The Netherlands

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby binbinhfr » Thu Apr 14, 2016 11:35 pm

Sander_Bouwhuis wrote:Yes, I did see that mod. Thanks for reminding.
Lamps everywhere is what I do now.

Thanks for your mod and info.


Well I write a little mod for you tonight :
have a look at this mod.
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Re: [MOD 0.12.X] Time Tools 1.0.2 (& Clock Combinator)

Postby Sander_Bouwhuis » Fri Apr 15, 2016 6:32 am

@binbinhfr

!!!TOTALLY AWESOME!!!
Sander_Bouwhuis
Long Handed Inserter
Long Handed Inserter
 
Posts: 67
Joined: Mon Dec 07, 2015 10:45 pm
Location: The Netherlands

Re: [MOD 0.12.X] Time Tools 1.0.3 (& Clock Combinator)

Postby binbinhfr » Sun Apr 17, 2016 9:31 pm

here is v1.0.3 : just a change to remote interface to set current day and current clock separately.
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
 
Posts: 1394
Joined: Sat Feb 27, 2016 7:37 pm
Location: South of France

Next

Return to Helper mods

Who is online

Users browsing this forum: Arumba, TokMor and 3 guests