Page 1 of 1

[MOD 0.12.20] Time Display

Posted: Mon Jan 18, 2016 6:55 am
by TheLapisFox
Original Post: Time Display

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
Image of the 12h option on the in-game clock
timedisplay image.jpg (40.86 KiB) Viewed 10086 times
Configuration Options
Changelog

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?
Yes, that's an error in the mod.

Code: Select all

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.

Re: [MOD 0.12.20] Time Display

Posted: Sun Mar 06, 2016 4:27 pm
by DaysofKnight
daniel34 wrote:Yes, that's an error in the mod.

Code: Select all

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.

will try again tommorrow.

Re: [MOD 0.12.20] Time Display

Posted: Mon Mar 28, 2016 10:33 am
by seronis
https://www.dropbox.com/s/ooui2pq4y0fso ... 7.zip?dl=1

His current download link from the general thread. Seems to be working for me

Re: [MOD 0.12.20] Time Display

Posted: Mon Mar 28, 2016 5:45 pm
by Bergzwerg
thanks a bunch!

must have missed the dropbox link and scrolled down to the separate downloads :roll: