[MOD 0.15.x] The Fat Controller. Remote train manager 2.0.7

Topics and discussion about specific mods
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

Boogieman14 wrote:If that is what I think it appears to be, I think I'll gladly overlook that leftover debug statement ;) Can't wait to give that a whirl!
It is and it is working :) I just need to tighten up the text format (as changing it once people start posting blueprints will be a pain), fix this multiplayer desync issue and then I'll release it.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by Boogieman14 »

I'll be happy to do some pre-release testing if you want, just shoot me a PM :)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

So my new mod has been posted and I have learned a lot about how factorio GUIs works in multiplayer. I also wrote a fat controller style GUI for it that I should be able to port over so we can start getting some train management in MP games. There is also a whole manner of train related API changes I want to explore so lookout for a new version of TFC with MP support and alerting on train related errors coming in the next week or so.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by Rahjital »

JamesOFarrell wrote:So my new mod has been posted and I have learned a lot about how factorio GUIs works in multiplayer. I also wrote a fat controller style GUI for it that I should be able to port over so we can start getting some train management in MP games.
Any chance of sharing what you have learned? It would be great if the rest of us could learn from your experience instead of having to go through the same ourselves.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

Sure. This thread has some code from jeroon that's probably your best bet and should get you working. The gist of it is that factorio is not syncing the GUIs of mods so you need to destroy all GUIs in the onsave event and then recreate them. Be careful though because can't use onload as the new player doesn't exist in the event so you need to trigger an ontick event to happen just after the player connects. If you do this right you will cause one of 2 issues, desync on save or desync on connect. Either way it is a hack to get it to work. Jeroon's code is a better example than mine because his has desync on connect where as mine has desync on save (auto save triggers it). Shoot me a PM or hit me up on irc if you want more help.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by Rahjital »

Thank you very much, I think I got it now.

Slpwnd mentioned a new luaevent (onplayercreated) to be included in the next version of Factorio. I wonder if it could be useful in case GUI syncing doesn't make it to the next version.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by ssilk »

By this I think how cool it would be to have an event onVehicleGenerated() or so, to get rid of manually adding the trains.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

ssilk wrote:By this I think how cool it would be to have an event onVehicleGenerated() or so, to get rid of manually adding the trains.
I can do this now I just haven't. It was written this way so it could be used with a already in progress game but it should have an auto add option really. There are some cool new train events in 0.11 that i have even looked at yet. I just have too many mods and not enough time
Rahjital wrote:Thank you very much, I think I got it now.

Slpwnd mentioned a new luaevent (onplayercreated) to be included in the next version of Factorio. I wonder if it could be useful in case GUI syncing doesn't make it to the next version.
This should make things a lot easier to handle. Looking forward to 11.2.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by ssilk »

Remark: as I understand it, every change on the train creates a new train (or change on the loco?). Can become soon complex to not get lost the sorting in the list.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

ssilk wrote:Remark: as I understand it, every change on the train creates a new train (or change on the loco?). Can become soon complex to not get lost the sorting in the list.
Thats true. I keep track of them via loco now and if the train object becomes invalid it gets readded to the table so that issue is fixed mostly. The sorting is annoying. I can get the train name now though (and set it i think) so that will give me something to sort by.
User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 742
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by SuperSandro2000 »

When I load my newly created world the game crashes with that report:

Code: Select all

Error while running the event handler: ...dcore - 0.11\mods\TheFatController_0.0.8.zip|control.lua:16: attempt to index upvalue 'tech' (a nil value)
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

SuperSandro2000 wrote:When I load my newly created world the game crashes with that report:

Code: Select all

Error while running the event handler: ...dcore - 0.11\mods\TheFatController_0.0.8.zip|control.lua:16: attempt to index upvalue 'tech' (a nil value)
Should be a new version with a fix though I don't know how that happened as tech is set the line above. If this version doesn't display the button for you after you unlock rail signals please let me know. It should also fix another annoying bug stopping it from working on maps that have been played in multiplayer.
User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 742
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by SuperSandro2000 »

Thx. I can start my game now.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

SuperSandro2000 wrote:Thx. I can start my game now.
No worries. Glad it fixed the issue.
ColonelWill
Inserter
Inserter
Posts: 20
Joined: Sat Jun 21, 2014 2:25 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by ColonelWill »

Would it be possible for it to work in a MP game for just one person (the host) so that person could be reasonable for managing the trains ?
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

ColonelWill wrote:Would it be possible for it to work in a MP game for just one person (the host) so that person could be reasonable for managing the trains ?
The plan is to have it working in MP as soon as the devs fix this bug. It should work for every player individually with the train list being shared. It will take a small update to get TheFatController there but as soon as the bug is fixed I'll be working on it.
Damrus
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sat Aug 23, 2014 12:41 pm
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by Damrus »

Seems the bug has been fixed in 11.4!
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

Damrus wrote:Seems the bug has been fixed in 11.4!
I've re-written it to support multiplayer but it still has to many bugs to release. I'll stop playing in a few hours and have a look at fixing the last bugs.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by Boogieman14 »

Updated to 0.11.4, single player game, a few seconds after loading an original 0.11.3 game (75 hours in)
Image

Not entirely surprising, the error goes away after changing that to 'destroy' ;)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.x] The Fat Controller. Remote train management

Post by JamesOFarrell »

Boogieman14 wrote:Updated to 0.11.4, single player game, a few seconds after loading an original 0.11.3 game (75 hours in)
Image

Not entirely surprising, the error goes away after changing that to 'destroy' ;)
I should probably learn to spell =)

Edit: also there are bugs in the current version when removing trains before removing them from TFC. I've fixed it for the next version
Post Reply

Return to “Mods”