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

Topics and discussion about specific mods
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

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

Post by Choumiko »

Type: Mod
Name: The Fat Controller
Description: The Fat Controller adds a gui to track trains
License: MIT
Download-Url: v2.0.7
Website: Github Repo

How to use
Long description
Version history
License
Do not download
Last edited by Choumiko on Thu May 18, 2017 11:11 am, edited 70 times in total.
bulldog98
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Tue Apr 08, 2014 6:40 am
Contact:

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

Post by bulldog98 »

That is what I always wanted :D , please devs put that into the main game.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

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

Post by bobingabout »

This sounds useful, I might try it out later, but I have no trains in my current map, just a really large logistics network.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
transportman
Inserter
Inserter
Posts: 34
Joined: Thu Jun 26, 2014 2:13 pm
Contact:

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

Post by transportman »

I like this mod, I have some trains running around to transport myself around the base, and it is nice to know where I need to go to board (or how long I should wait), but I encountered an error when loading a game in 0.10.0. I made that game in Factorio 0.9.8, updated to 0.10.0 and later added the mod, and now when loading the game I get the following error:

Code: Select all

Error 2 while running the event handler:
...pData\Roaming\Factoria\mods\TheFatController|control.lua:27: Gui element with name fatController already present in the parent element.
Updating Factorio to 0.10.1 did not help.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

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

Post by Rahjital »

I took a quick peek at the mod and it seems the mod does not support saving and loading. It doesn't save its fatControllerInit state when the game saves, so when it is loaded, the mod tries to initialize all over again, causing this crash. At least that's what I think is happening, I might be wrong.

You should be able to load the game with the mod turned off just fine. I'm sure JamesOFarrell will release a fixed version soon. :)
transportman
Inserter
Inserter
Posts: 34
Joined: Thu Jun 26, 2014 2:13 pm
Contact:

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

Post by transportman »

Rahjital wrote: You should be able to load the game with the mod turned off just fine. I'm sure JamesOFarrell will release a fixed version soon. :)
Loading with the mod disabled works fine, only the windows remain on the screen doing nothing.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

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

Post by Rahjital »

That should fixed by putting this into console:

Code: Select all

game.player.gui.left.fatController.destroy()
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

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

Post by JamesOFarrell »

transportman wrote:

Code: Select all

Error 2 while running the event handler:
...pData\Roaming\Factoria\mods\TheFatController|control.lua:27: Gui element with name fatController already present in the parent element.
Sorry about that, there were 3 lines in the script already to fix that bug but they were disabled for testing and I forgot to put them back in. New version has been uploaded with the fix for this.
Rahjital wrote:I took a quick peek at the mod
I am so sorry, it is an unplanned mess. I sat down to write it and just threw code at the problems I encountered instead of stopping and thinking.
Rahjital wrote:It doesn't save its fatControllerInit state when the game saves
fatControllerInit is a local variable intentionally, it is supposed to init every time, it still supports loading and saving though as it stores all its state in the glob table.
Rahjital wrote:That should fixed by putting this into console
Thanks for helping out Rahjital!
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

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

Post by Rahjital »

Oh, so that's how it works! I thought it was commented out because it was some debug stuff. It doesn't really matter, but just for dev OCD matters, wouldn't it be cleaner to just set your pointers to the gui elements again instead of destroying them and creating them again?

Ah, I was glad to help! It's a great mod, truly useful for large railroads. Would it be possible to see an ETA for arrival to the next station? It wouldn't need to be accurate, just a rough estimate on how long would it take calculated from the speed of the train and distance to the station. Or maybe just showing the distance itself, that would work just as well. That would make the mod truly indispensable.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

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

Post by JamesOFarrell »

Rahjital wrote:Oh, so that's how it works! I thought it was commented out because it was some debug stuff. It doesn't really matter, but just for dev OCD matters, wouldn't it be cleaner to just set your pointers to the gui elements again instead of destroying them and creating them again?
Probably but it is so easy to just blow it away and let it be recreated if it is needed. That way i don't need to really think about the current GUI state at start up.
Rahjital wrote:Ah, I was glad to help! It's a great mod, truly useful for large railroads. Would it be possible to see an ETA for arrival to the next station? It wouldn't need to be accurate, just a rough estimate on how long would it take calculated from the speed of the train and distance to the station. Or maybe just showing the distance itself, that would work just as well. That would make the mod truly indispensable.
Things with stations are actually a little hard as I don't know where the stations are in game or the name of them. Once I rewrite how the state of this mod is stored and clean up the gui code a little I'll be in a better position to actually think about stations just thinking allowed I'll probably do something like finding all station entities near a stopped train and guessing which station it is based on the trains schedule. Once I do that I can do a rough calculation of ETA. The other thing I I could so is track the time it takes to travel between stations each time and display a guesstimation based on the average trip.

I could add the X/Y coords or the distance from your player as I know both of these things already but they are not that useful. What maybe more useful is the current direction (N/E/SW...) as this would allow you to see at a glance which direction it is heading.
ColonelWill
Inserter
Inserter
Posts: 20
Joined: Sat Jun 21, 2014 2:25 am
Contact:

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

Post by ColonelWill »

Been playing with this mod today, found it very useful and fun, one thing I would like would be to give each train a name or have it show the name of loco so I know what each one in the list is doing, as atm it only shows where it is/ heading.

Many thanks great Mod
transportman
Inserter
Inserter
Posts: 34
Joined: Thu Jun 26, 2014 2:13 pm
Contact:

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

Post by transportman »

JamesOFarrell wrote: Sorry about that, there were 3 lines in the script already to fix that bug but they were disabled for testing and I forgot to put them back in. New version has been uploaded with the fix for this.
Thanks for the quick fix, will try it later.

[EDIT]It works, thanks. Got an error when going to camera mode, but restarting the game solved that.[/EDIT]
orion420
Inserter
Inserter
Posts: 24
Joined: Fri Jun 06, 2014 12:12 am
Contact:

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

Post by orion420 »

I have localized this error to when i load TheFatController. Game Crashes with this error. strange cause that file is in that location. But its is a .wav not .ogg. wired
Attachments
New Bitmap Image.jpg
New Bitmap Image.jpg (20.17 KiB) Viewed 46233 times
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

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

Post by JamesOFarrell »

orion420 wrote:I have localized this error to when i load TheFatController. Game Crashes with this error. strange cause that file is in that location. But its is a .wav not .ogg. wired
Edit: New version with 0.9.8 support (hopefully, not tested because I don't have a 0.9.8 install) and a bug fixed

Try v0.0.3. it might fix the issue
orion420
Inserter
Inserter
Posts: 24
Joined: Fri Jun 06, 2014 12:12 am
Contact:

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

Post by orion420 »

JamesOFarrell wrote:
orion420 wrote:I have localized this error to when i load TheFatController. Game Crashes with this error. strange cause that file is in that location. But its is a .wav not .ogg. wired
Edit: New version with 0.9.8 support (hopefully, not tested because I don't have a 0.9.8 install) and a bug fixed

Try v0.0.3. it might fix the issue
I do not follow are you saying i should play using Factorio v0.0.3.
transportman
Inserter
Inserter
Posts: 34
Joined: Thu Jun 26, 2014 2:13 pm
Contact:

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

Post by transportman »

orion420 wrote:
JamesOFarrell wrote:
orion420 wrote:I have localized this error to when i load TheFatController. Game Crashes with this error. strange cause that file is in that location. But its is a .wav not .ogg. wired
Edit: New version with 0.9.8 support (hopefully, not tested because I don't have a 0.9.8 install) and a bug fixed

Try v0.0.3. it might fix the issue
I do not follow are you saying i should play using Factorio v0.0.3.
No, with v0.0.3 of this mod, which is linked to in the first post.
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

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

Post by SHiRKiT »

I feel as everytime I leave the game I need to add the trains back to my list. I can't confirm wether it's everytime or just when the game crashes, but I know it's pretty damn frequent.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

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

Post by JamesOFarrell »

SHiRKiT wrote:I feel as everytime I leave the game I need to add the trains back to my list. I can't confirm wether it's everytime or just when the game crashes, but I know it's pretty damn frequent.
Can you post a save so I can check this out? I don't have this issue myself but it does not really surprise me that it is happening. The "trains" in the game at pretty temporary and seem to get recreated if anything changes about them (adding or removing a carriage). I have plans for fixing this issue by tracking trains in a different way. Hopefully I'll get some time to work on this mod over the upcoming weekend.
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

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

Post by SHiRKiT »

The save I was playing is over 100MB, I'm starting a new one. I'll try to reproduce this in this new game. Thanks for the mod anyways, I love to remotely control the train. I feel like really fat! :D
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

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

Post by SHiRKiT »

It happens whenever I add/remove wagons to the train. Maybe you could check, after the train is rebuilt, if he has the same name, locomotive position, schedule and from there guess that's the same train, and re-add it to the list.
Post Reply

Return to “Mods”