Mod was not working for 12.x so went ahead and updated it. Now works properly, as far as I could test. I have not tested it in MP with the new fixes, but should work fine thanks to FreeER's fixes. If anyone finds any bugs, let me know and I will try to figure out the issue.
Name: Time Display
Version: 2.0.0
Created by: Dark (Original); v 11.x Fix done by: Frostea/FreeER; v12.x Update by: TheLapisFox
Factorio-Version: 0.12.20
Description: Displays configurable in-game time and play duration.
Release: 2016-01-18
Category: UI, Helper
Tags: User-Interface
Image of the 12h option on the in-game clock
timedisplay image.jpg (40.86 KiB) Viewed 10086 times
Configuration Options
/c remote.call("TimeDisplay", "SetSetting", "enabled", true/false, "nickname") -- enables or disables mod [default: false]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "show_clock", true/false, "nickname") -- controls display of day time clock [default: true]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "show_run_clock", true/false, "nickname") -- controls display of play time clock [default: true]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "style", "12h/24h", "nickname") -- style for day time clock [default: 24h]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "location", "left/top/center", "nickname") -- display location [default: left]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "minute_rounding", 1-60, "nickname") -- rounds minutes in daytime clock to this value [default: 15]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "show_minutes", true/false, "nickname") -- show/hide minutes in day time clock [default: true]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "show_seconds_in_runtime", true/false, "nickname") -- should run time clock show seconds [default: false]
------------------------------------------------------------------
/c remote.call("TimeDisplay", "SetSetting", "frame_leftpadding", 0-9999, "nickname") -- shifts display horizontally, set to 1440 on 1080p monitor to move display near minimap [default: 20]
Changelog
V2.0.0
* Fixed obsolete coding calls
V1.0.1
* MP Fixes (FreeER)
* Updated from 10.x to 11.x (FreeER)
v1.0.0
* First Creation by Dark
Re: [MOD 0.12.20] Time Display
Posted: Sun Mar 06, 2016 4:15 pm
by DaysofKnight
'Unknown key:"Error while running the on_load:_ _timedisplay_ _/control.lua:143: attempt to index global 'game' (a nil value)" '
There's no game.on's in the control.lua file... Wtf?
Re: [MOD 0.12.20] Time Display
Posted: Sun Mar 06, 2016 4:21 pm
by daniel34
DaysofKnight wrote:'Unknown key:"Error while running the on_load:_ _timedisplay_ _/control.lua:143: attempt to index global 'game' (a nil value)" '
There's no game.on's in the control.lua file... Wtf?
script.on_load(function()
-- restore gui state on load or right after save
for playerindex, player in ipairs(game.players) do <--- line 143
set_defaults(playerindex)
init_gui(playerindex)
do_update(playerindex)
end
end)
The script.on_load function has a reference to game.player - references to 'game' within on_load are not allowed anymore.
script.on_load(function()
-- restore gui state on load or right after save
for playerindex, player in ipairs(game.players) do <--- line 143
set_defaults(playerindex)
init_gui(playerindex)
do_update(playerindex)
end
end)
The script.on_load function has a reference to game.player - references to 'game' within on_load are not allowed anymore.
Had that problem with Evolution: Alien Manipulation. Deleted the code for game.player in that one and it worked fine, but in that one if was more obvious what needed to be deleted.
What do I need to delete to make this one work? Just line 143?
Edit: I got it to work by removing the "for playerindex, player in ipairs(game.players) do" line and removing the first end. Now sure if that's right, but it loads now. Not a coder in anyway, so I don't know what that did.
Edit 2 (Days later): It doesn't work anymore
Re: [MOD 0.12.20] Time Display
Posted: Mon Mar 28, 2016 12:22 am
by Bergzwerg
i fiddled around with it now too but can't get it to work.
would love an updated version though.
Re: [MOD 0.12.20] Time Display
Posted: Mon Mar 28, 2016 1:38 am
by seronis
The go to the Bobs Mods section and grab it. Its appropriately named 'clock'
Re: [MOD 0.12.20] Time Display
Posted: Mon Mar 28, 2016 9:08 am
by Bergzwerg
hey, tahnks for your quick reply!
i did try to download bob's clock but:
509 Bandwidth Limit Exceeded
The server is temporarily unable to service your request due to the site owner reaching his/her bandwidth limit. Please try again later.