Page 1 of 1

[0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 5:41 am
by Kalsius
I have just updated to 0.12.11 and with various mods installed attempted to start a new map and the following error occurred after clicking generate in the new game dialog.

__rso-mod__/control.lua:1522: attempt to index global 'game' (a nil value)

This isn't RSO specific. I have cleared out all mods and tried just importing single mods or mod packs such as DyTech and at some point in running the mods during map generation it appears they are trying to call 'game' before it has anything in it. I didnt have this problem yesterday on 0.12.10.

I have also clean installed 0.12.10 and run just RSO mod fine. I then update to 0.12.11 and get the error on trying to generate a new map. Has the load order changed at all for map generation or did some of the namespace changes in 0.12.11 have an effect?

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 5:46 am
by Smarty
Uhh there is no 0.12.11

Not yet atleast

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 5:48 am
by Kalsius
I got the prompt to update to 0.12.11 this morning and have installed the update so either its 'aliens' or there is an update :D

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 5:50 am
by kovarex
That is strange, because the screen seemed to stop, I need to check later.

But yes, we changed the interface, so most of the mods will have to be updated. It should be easy to do (find and replace).

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 5:56 am
by Kalsius
Okay will stick with 0.12.10 until mod authors get around to updating. As the game progresses towards final release will there be a 'code change breaks mods' notification for authors before a new code patch goes out?

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 2:04 pm
by Rseding91
Kalsius wrote:Okay will stick with 0.12.10 until mod authors get around to updating. As the game progresses towards final release will there be a 'code change breaks mods' notification for authors before a new code patch goes out?
https://forums.factorio.com/forum/vie ... 34&t=16558

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 2:13 pm
by Zeblote
Rseding91 wrote:
Kalsius wrote:Okay will stick with 0.12.10 until mod authors get around to updating. As the game progresses towards final release will there be a 'code change breaks mods' notification for authors before a new code patch goes out?
https://forums.factorio.com/forum/vie ... 34&t=16558
Maybe changing or removing things from the API should only be done in major releases? I'd never expect a minor update to do this... maybe new functions or deprecations, but nothing that literally breaks every mod.

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 2:27 pm
by kovarex
Zeblote wrote:
Rseding91 wrote:
Kalsius wrote:Okay will stick with 0.12.10 until mod authors get around to updating. As the game progresses towards final release will there be a 'code change breaks mods' notification for authors before a new code patch goes out?
https://forums.factorio.com/forum/vie ... 34&t=16558
Maybe changing or removing things from the API should only be done in major releases? I'd never expect a minor update to do this... maybe new functions or deprecations, but nothing that literally breaks every mod.
Yes, but if we didn't do it, we would never get a stable version as there is no other way to stop players from crashing/desyncing the game by doing the stuff in the on_save/on_load methods.

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 2:42 pm
by Zeblote
kovarex wrote: Yes, but if we didn't do it, we would never get a stable version as there is no other way to stop players from crashing/desyncing the game by doing the stuff in the on_save/on_load methods.
Why does that even cause a de-sync, doesn't multiplayer save on every client at the same time? (Or is that only for autosaves?)

Alternatively, why not just run the callback on all clients if someone saves?

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 5:19 pm
by kovarex
Zeblote wrote:
kovarex wrote: Yes, but if we didn't do it, we would never get a stable version as there is no other way to stop players from crashing/desyncing the game by doing the stuff in the on_save/on_load methods.
Why does that even cause a de-sync, doesn't multiplayer save on every client at the same time? (Or is that only for autosaves?)

Alternatively, why not just run the callback on all clients if someone saves?
It saves on every client, but when someone joins later, the previous save calls weren't executed.

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 5:21 pm
by Zeblote
kovarex wrote:
Zeblote wrote:
kovarex wrote: Yes, but if we didn't do it, we would never get a stable version as there is no other way to stop players from crashing/desyncing the game by doing the stuff in the on_save/on_load methods.
Why does that even cause a de-sync, doesn't multiplayer save on every client at the same time? (Or is that only for autosaves?)

Alternatively, why not just run the callback on all clients if someone saves?
It saves on every client, but when someone joins later, the previous save calls weren't executed.
But that doesn't matter, because the current game state will be downloaded when they join? I'm not getting it

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 7:54 pm
by kovarex
Zeblote wrote:
kovarex wrote:
Zeblote wrote:
kovarex wrote: Yes, but if we didn't do it, we would never get a stable version as there is no other way to stop players from crashing/desyncing the game by doing the stuff in the on_save/on_load methods.
Why does that even cause a de-sync, doesn't multiplayer save on every client at the same time? (Or is that only for autosaves?)

Alternatively, why not just run the callback on all clients if someone saves?
It saves on every client, but when someone joins later, the previous save calls weren't executed.
But that doesn't matter, because the current game state will be downloaded when they join? I'm not getting it
But they can save some global variable without actually serialising it.
And also replays have to work. You might autosave during normal game, but not during replay.

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 8:01 pm
by Zeblote
Well, you can run the callback during replays aswell.

I can't actually think of something that needs to be done before saving though, so this discussion is probably pointless

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 8:05 pm
by kovarex
Zeblote wrote:Well, you can run the callback during replays aswell.

I can't actually think of something that needs to be done before saving though, so this discussion is probably pointless
During replay, I want to have the possibility to save at any time (or don't save at all), and still make it work.
The Factorio story util used in the campaigns actually relied on on_save/on_load and it required some rewriting to make it work without it, but now it is less vulnerable to desyncs created by human error.

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 8:07 pm
by Zeblote
Wait... you can save from replays? Like, fast forward until your outpost got attacked and start playing again from there? That's amazing, never knew this :D

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 8:26 pm
by kovarex
Zeblote wrote:Wait... you can save from replays? Like, fast forward until your outpost got attacked and start playing again from there? That's amazing, never knew this :D
Yes, one of the things I missed in starcraft :)
I'm not really sure though, if the game continued this way will still produce a valid replay, I'm afraid it won't, but it could be fixed.

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 8:32 pm
by Zeblote
Can the replay get some way to jump to a specific time? Like you know you want to go to exactly 12 hours 33 minutes because that's 10 minutes before your autosave.

Then it will simulate with 100% cpu usage (no rendering, just fast forward as fast as possible) until it reached that point and pause. Manually fast forward for a few minutes at very high speeds is too dangerous :D



I assume a way to reverse the replay isn't possible, so if you overshoot you have to start all over again

Re: [0.12.11] MODS Fail to load

Posted: Fri Oct 16, 2015 8:41 pm
by kovarex
Zeblote wrote:Can the replay get some way to jump to a specific time? Like you know you want to go to exactly 12 hours 33 minutes because that's 10 minutes before your autosave.

Then it will simulate with 100% cpu usage (no rendering, just fast forward as fast as possible) until it reached that point and pause. Manually fast forward for a few minutes at very high speeds is too dangerous :D



I assume a way to reverse the replay isn't possible, so if you overshoot you have to start all over again
Well, if you are replaying with 32X speed, the rendering itself isn't the limiting factorio, as you have 32 updates per 1 render.

There is no way to limit the replay until certain point currently, I'm not sure if such a feature would really be worth it.

And no, it is not possible to go reverse in replay because of laws of causality. It could be possible to have something like checkpoints. The game would be completely saved every hour for example, so you could always start from the nearest checkpoint (This principal is used in video codecs). The problem is, that the replay would get very huge for saves with tens of hours of playtime, so it is probably not worth it as well.

Re: [0.12.11] MODS Fail to load

Posted: Sat Oct 17, 2015 4:07 am
by DaveMcW
kovarex wrote:There is no way to limit the replay until certain point currently, I'm not sure if such a feature would really be worth it.
Well, the game is designed to be really slow at the beginning. Skipping the first 20 minutes should be a popular option.