Page 1 of 18

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

Posted: Mon Jun 23, 2014 11:01 pm
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

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

Posted: Mon Jun 23, 2014 11:46 pm
by bulldog98
That is what I always wanted :D , please devs put that into the main game.

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

Posted: Tue Jun 24, 2014 4:11 pm
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.

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

Posted: Thu Jun 26, 2014 2:31 pm
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.

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

Posted: Thu Jun 26, 2014 4:04 pm
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. :)

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

Posted: Thu Jun 26, 2014 4:12 pm
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.

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

Posted: Thu Jun 26, 2014 4:15 pm
by Rahjital
That should fixed by putting this into console:

Code: Select all

game.player.gui.left.fatController.destroy()

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

Posted: Thu Jun 26, 2014 8:53 pm
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!

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

Posted: Thu Jun 26, 2014 9:22 pm
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.

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

Posted: Thu Jun 26, 2014 9:47 pm
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.

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

Posted: Fri Jun 27, 2014 12:12 am
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

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

Posted: Fri Jun 27, 2014 7:14 am
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]

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

Posted: Fri Jun 27, 2014 9:38 pm
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

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

Posted: Fri Jun 27, 2014 9:46 pm
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

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

Posted: Mon Jun 30, 2014 3:01 pm
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.

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

Posted: Mon Jun 30, 2014 6:08 pm
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.

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

Posted: Tue Jul 15, 2014 8:30 pm
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.

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

Posted: Tue Jul 15, 2014 8:50 pm
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.

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

Posted: Tue Jul 15, 2014 8:58 pm
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

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

Posted: Sat Jul 19, 2014 3:46 pm
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.