Sedar wrote:Thank you for all yours excellent mods. And especially for this one!
you're welcome !
updated for 0.15
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Thu May 04, 2017 2:47 am
by zakman
Any chance you could code in an "instant night" button for the next version of the mod?
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Thu May 04, 2017 7:06 am
by binbinhfr
zakman wrote:Any chance you could code in an "instant night" button for the next version of the mod?
alas no, i'm not playing factorio or modding anymore...
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Thu Jun 22, 2017 7:06 am
by rcraft
FYI for anyone still reading this, 0.15.22 seems to break this mod on existing saves. The GUI loads successfully on a new game, but loading a game causes the GUI to be hidden.
Until / if they fix it, you can get it to show up by running this in the console:
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).
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
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
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-screencopy3.jpg
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
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.
I have a problem. This part is causing game crashes into Main Menu:
local function on_gui_click(event)
if event.element.name == "but_time" then
if not global.surface.always_day then
global.frozen = not global.frozen
global.surface.freeze_daytime( global.frozen ) --THIS RIGHT HERE! "global.surface.freeze_daytime" is nowhere else defined what the hell it is.
update_guis()
end
You will find it in control.lua, line #295. I use 0.15.23 version of Factorio. I used Notepad++ for the opening of the .lua file.
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Tue Jun 27, 2017 5:04 pm
by binbinhfr
yes they change the way surface.freeze_daytime() function works. Now it's a boolean.
Please update to latest mod version.
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Tue Jun 27, 2017 5:48 pm
by Durabys
binbinhfr wrote:yes they change the way surface.freeze_daytime() function works. Now it's a boolean.
Please update to latest mod version.
Now THIS is what I call 'Real Time User Support'!
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Tue Jun 27, 2017 6:55 pm
by binbinhfr
Tomik wrote:Now THIS is what I call 'Real Time User Support'!
Glad you appreciate it !
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Thu Jul 20, 2017 7:38 pm
by wvlad
Hi, I like this mod and I modified it (for personal use) but I'd like to share my ideas with you in case you think my changes are worth:
1. No cheating - can't switch day/night (I suggest you to add it as an option).
2. When I move and speed < 0.75 it's set to 0.75 temporarily until I stop.
3. Speed < 1 changed by +-0.1 (not by */2).
4. No clock.
If you (BinbinHfr) want to see my code changes let me now.
For me the game looks too fast and I want more time for planning but I don't want any cheat buttons to switch day/night. The #2 is very helpful so that I can setup my base like usually and the slowdown doesn't stop me from moving but the time is not wasted when I stop and think.
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Fri Jul 21, 2017 8:28 am
by binbinhfr
wvlad wrote:Hi, I like this mod and I modified it (for personal use) but I'd like to share my ideas with you in case you think my changes are worth:
1. No cheating - can't switch day/night (I suggest you to add it as an option).
2. When I move and speed < 0.75 it's set to 0.75 temporarily until I stop.
3. Speed < 1 changed by +-0.1 (not by */2).
4. No clock.
If you (BinbinHfr) want to see my code changes let me now.
For me the game looks too fast and I want more time for planning but I don't want any cheat buttons to switch day/night. The #2 is very helpful so that I can setup my base like usually and the slowdown doesn't stop me from moving but the time is not wasted when I stop and think.
Hi there,
I understand the idea in the changes that you made, but I'm afraid I won't change my mod in this way. There are 1500 users that could be annoyed by such radical changes. You should write your own mod and call it "flexible time" or "elastic time" Have fun.
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Mon Sep 11, 2017 12:07 am
by ares0027
is it possible to (add if it is not already there) to increase speed up to 64x when crafting something manually and revert it back to normal (or previously set speed) when it is done? i haven't played factorio for years and , just came back and that was available for one of the mods which had not been update (also) for years... i am sad now
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Mon Sep 11, 2017 7:39 am
by binbinhfr
ares0027 wrote:is it possible to (add if it is not already there) to increase speed up to 64x when crafting something manually and revert it back to normal (or previously set speed) when it is done? i haven't played factorio for years and , just came back and that was available for one of the mods which had not been update (also) for years... i am sad now
yes, it's in the doc in page 1 of this thread :
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.
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Mon Sep 11, 2017 12:23 pm
by ares0027
binbinhfr wrote:
yes, it's in the doc in page 1 of this thread :
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.
i think i did not make myself cleaar, my bad. what i meant is in a way "addon itself clicks the increase button when i craft something manually and it reverts it back when crafting is done" so i don't have to click the button at all.
i jus came here to provide a workaround for people like me (who absolutely dont know **** about modding ) i just created a autohotkey script the saves the mouse button, clicks the button you mentioned when i press the "h" button and simply returns mouse back to where it was. but the thing is it is not automated like i meant originally but it helps.
~h::
Process, Exist, factorio.exe
If (ErrorLevel != 0) ; If it is not running
{
Sleep, 200
MouseGetPos, StartX, StartY
Click 140, 17
MouseMove, StartX, StartY
}
return
P.S. If you remember the old mod TimeButtons it had a feature like this. you would set "crafting speed" and the second you craft something manually it would match the speed and returns it back. that is exactly the feature i was talking about. yet, thank you for this amazing mod :)h
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Mon Sep 11, 2017 12:28 pm
by binbinhfr
ok, I understand what you mean now.
I do not know this old TimeButtons mod, but alas, I'm not playing nor modding factorio anymore. From now on, I just make the minimum to adapt my mods to new factorio versions.
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Mon Sep 11, 2017 12:55 pm
by ares0027
binbinhfr wrote:ok, I understand what you mean now.
I do not know this old TimeButtons mod, but alas, I'm not playing nor modding factorio anymore. From now on, I just make the minimum to adapt my mods to new factorio versions.
i see, at least thank you for your fast reply, i am quite happy with the workaround i have but it would be more than amazing if the mod had this itself, or at least keybindings to change speed to maximum and revert. anyway i will still hope that one day you will return and add those features
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Fri Dec 01, 2017 4:07 pm
by Megouski
Does this mod have a feature to:
1. Auto speed up to a set multiplier when I am crafting something then go back to the default multiplier?
2. Separate button for often used multiplier so I don't have to click from 2x to 64x and back constantly?
3. Or, similar to #2, have the functionality of the current button be when you click on it, it swaps back and forth to two set multipliers rather than 1 set multiplier and 1x.
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Fri Dec 01, 2017 9:38 pm
by binbinhfr
Does this mod have a feature to:
1. Auto speed up to a set multiplier when I am crafting something then go back to the default multiplier?
No
2. Separate button for often used multiplier so I don't have to click from 2x to 64x and back constantly?
No
3. Or, similar to #2, have the functionality of the current button be when you click on it, it swaps back and forth to two set multipliers rather than 1 set multiplier and 1x.
No
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Sat Dec 02, 2017 11:19 am
by _Markos_
Would it be possible to create a keybind to speed up and speed down?
Re: [MOD 0.13] Time Tools (& Clock Combinator)
Posted: Fri Dec 15, 2017 4:35 pm
by Fizzbin10
Thanks for the update for 0.16, sadly I get an error when loading the mod, it complains that a graphics file is missing (__base__/graphics/entity/combinator/activity-leds/combinator-led-constant-east.png).
I had a look in the directory and the file is there but has been renamed to constant-combinator-LED-E.png