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

Topics and discussion about specific mods
Post Reply
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

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

Post by ssilk »

I needed to add also inventory_size.

Code: Select all

    damage_hit_tint = {r = 1, g = 0, b = 0, a = 0},
    inventory_size = 0,
This is the current content of prototypes/fatcontroller.lua:

Code: Select all

require ("prototypes.fatcontroller_annimation")

data:extend({

{
    type = "player",
    name = "fatcontroller",
    icon = "__base__/graphics/icons/player.png",
    flags = {"pushable", "placeable-player", "placeable-off-grid", "not-repairable", "not-on-map"},
    max_health = 100,
    healing_per_tick = 100,
    collision_box = {{-0.2, -0.2}, {0.2, 0.2}},
	collision_mask = {"ghost-layer"},
    --selection_box = {{-0.4, -1.4}, {0.4, 0.2}},
    crafting_categories = {"crafting"},
    mining_categories = {"basic-solid"},
    damage_hit_tint = {r = 1, g = 0, b = 0, a = 0},
    inventory_size = 0,
    build_distance = 0,
    drop_item_distance = 0,
    reach_distance = 0,
    reach_resource_distance = 0,
    ticks_to_keep_gun = 0,
    ticks_to_keep_aiming_direction = 0,
    running_speed = 0,
    distance_per_frame = 0,
    maximum_corner_sliding_distance = 0,

    subgroup = "creatures",
    order="z",
    eat =
    {
      {
        filename = "__TheFatController__/sound/empty.ogg",
        volume = 1
      }
    },
    heartbeat =
    {
      {
        filename = "__TheFatController__/sound/empty.ogg"
      }
    },
    animations = fcanimations,
	mining_speed = 0,
	mining_with_hands_particles_animation_positions = {0, 0},
    mining_with_tool_particles_animation_positions = {0},
    running_sound_animation_positions = {0, 0}
  }
  
 })
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post by kovarex »

I just wanted to say that I love the mod, this is exactly something I was missing in Factorio. It should also enable to add all the trains automatically. I'm going to stick it.

This also makes me want to add the camera gui elements and possible to integrate something like this into the core game someday.

P.S. It will no longer crash in 0.11.22 when you use this mod and craft at the same time.

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 »

Glad you like it and thanks for the bug fix, that crash has caught me a few times in my current game. Here is a version that auto manages the trains list and but i'm having issue changing styles on GUI objects (I think, i haven't nutted it out yet, the idea of rewriting it without changing styles worries me a bit). There are a few other small bugs to be worked out but it works mostly for single player. I won't put it in the fist post as it is defiantly not ready for general use but here it is anyway.
TheFatController_0.1.0.zip
v 0.1.0
(56.06 KiB) Downloaded 525 times

quinor
Filter Inserter
Filter Inserter
Posts: 404
Joined: Thu Mar 07, 2013 3:07 pm
Contact:

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

Post by quinor »

JamesOFarrell, maybye try applying for a job in Wube software if Kovarex likes so much both of your 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 »

psorek wrote:JamesOFarrell, maybye try applying for a job in Wube software if Kovarex likes so much both of your mods ;)
Ha, I don't think Wube need a Systems Administrator and I sadly cannot program in C++ or move to Prague, which from memory was a requirement last time they were looking for a new developer :)

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

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

Post by ssilk »

I want to see also cars/tanks. I think steering of cars/tanks would be cool, but that would give them too much power; if the player doesn't need to sit in the vehicle, he could use that for too much ugly stuff (steering a tank into the opposite camp in multiplayer and destroying stuff for example). But seeing where all the cars are and manipulating the surroundings in some limited way would be really useful.

EDIT:
JamesOFarrell wrote:
psorek wrote:JamesOFarrell, maybye try applying for a job in Wube software if Kovarex likes so much both of your mods ;)
Ha, I don't think Wube need a Systems Administrator and I sadly cannot program in C++ or move to Prague, which from memory was a requirement last time they were looking for a new developer :)
See the last FFF, there are other developers like Rseding91, that work remote in part-time.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Degraine
Filter Inserter
Filter Inserter
Posts: 281
Joined: Wed Aug 13, 2014 10:49 am
Contact:

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

Post by Degraine »

Someone mooted the possibility of automated cars that could be given stops to drive between, though that would make them rather more powerful and useful than trains at present. But I do like the idea of road trains (a real term out here in Australia for very large B-double trucks with multiple trailers attached to them) crossing the desert and fighting off bugs chasing them with trailer-mounted turrets, all Convoy-like.

User avatar
Lone_Player
Inserter
Inserter
Posts: 44
Joined: Sat Jul 12, 2014 9:56 am
Contact:

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

Post by Lone_Player »

Hi,

I recently started to use your mod, to manage my Train Routes, (atm. 9 Trains @ 6 Train Routes & 12 Train Stop´s). Yesterday all went without a problem, adding train´s etc.

Today if i click @ -> " Trains + " -> " S " (Station´s) i get a error message: (Factorio 0.11.21)

Error while running the event handler: attempt to compare string with number

The game run´s still in the background (i can see the robot´s flying around).
If i klick on " OK ". I´am back to the Menu.
If i press " esc " the errormessage go´s away, and i can continue to play. (Trainlist still update´s)

Tryed if it is the Station Name, and renamed both of the new Station´s, didnt helped.

(Trainlist work´s & update´s, i just cant acess the Stationslist anymore.)

Diffrence to yesterday added the Atomic Power Mod, build 1 (atm.) more Train Route, with 2 Train´s on it & 2 Train Stop´s.
Removing all mod´s, & the new Station´s & replace the new locomotives to get diffrent names for them, didnt help.

Update: I think i have found the cause of the problem, if i remove the Train, that has " fluorite " loaded, from the list of Managed Train´s, the Station List, it work´s again without a problem.

Ps: I play Factorio in German language, perhaps it is related, to the Problem ?.

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 »

Lone_Player wrote: Today if i click @ -> " Trains + " -> " S " (Station´s) i get a error message: (Factorio 0.11.21)

Error while running the event handler: attempt to compare string with number
I think what you are seeing is a combination of two bugs in The Fat Controller, the first one causing the error is a type issue with lua. Was one of your stations named just a number? If so it is incorrectly getting cast by lua into an integer. This should have been fixed when you renamed the station but there is a second bug in TFC that means the station list doesn't get reset properly. Once you removed the train the station was taken out of the list and the game stopped crashing. You should be safe to use trains with fluorite in them as long as they go to stations with text in their names.

What were your stations called?

User avatar
Lone_Player
Inserter
Inserter
Posts: 44
Joined: Sat Jul 12, 2014 9:56 am
Contact:

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

Post by Lone_Player »

The first one was named " Joe Bacon ", was then renamed to "1 " and later to " Fluorite Harbor " but the error message is still there...
The second one, is named " Jorik Seisveld " (I let the Trainstop name´s @ the mines, as they where named when placed).

Deconstruction of the first stop ("1" aka. "Fluorite Harbor") & removing it, from the Stop List @ all Trains on that track.
Then replacing the Trainstop ("Tut" -> Fluorite Harbor") & re-list it, at all Trains on that Track, fixed it.

Thank you ;)

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 »

New version(0.0.12) posted. Adds support for RailTanker because I was sick of guessing how much oil they have in them.

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by JamesOFarrell »

version 0.11 is up with initial multiplayer support. God knows how it works but it does so post the bugs here when you find them. You should really uninstall the old version then open your save and re-save it before using this version. You defiantly have to do this is you used the 0.1.0 release that is hanging around.

ColonelWill
Inserter
Inserter
Posts: 20
Joined: Sat Jun 21, 2014 2:25 am
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by ColonelWill »

Cheers for this works perfectly in MP so far tested with Deamonengineer.

New version does not work on my mega bsae tho get a crash to desktop :(

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by JamesOFarrell »

ColonelWill wrote:Cheers for this works perfectly in MP so far tested with Deamonengineer.

New version does not work on my mega bsae tho get a crash to desktop :(
ColenelWill, you're going to have the mot trouble of all the people with this version because of the custom version I gave you. To get it to work uninstall the all versions. load the save, resave it then install the new version. If you have already tried that post your save somewhere and I'll debug it.

Talguy
Fast Inserter
Fast Inserter
Posts: 105
Joined: Tue Apr 29, 2014 8:54 pm
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by Talguy »

Was it an error about line 170 of control.lua (attempt to index field guiSettings: a nil value)?

I fixed it using the following code (around line 168ish):

Code: Select all

game.onevent(defines.events.onplayercreated, function(event)
       if glob.guiSettings == nil then glob.guiSettings = {} end
       glob.guiSettings[event.playerindex] = init(game.players[event.playerindex], glob.guiSettings[i])
This is when starting a new freeplay.

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by JamesOFarrell »

Talguy wrote:Was it an error about line 170 of control.lua.
it was an error,thanks for reporting it. Fixed it up and uploaded a new version (v0.1.2). Also fixed an issue with detecting when TFC should be unlocked

ColonelWill
Inserter
Inserter
Posts: 20
Joined: Sat Jun 21, 2014 2:25 am
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by ColonelWill »

This is what I get when I load the Mega base with it http://puu.sh/ivxsi/4e50720d52.jpg

Have cleared the mod, saved and then added new mod etc

I can still use the custom one tho so no big deal really.

kiba
Filter Inserter
Filter Inserter
Posts: 344
Joined: Thu Jun 11, 2015 5:32 am
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by kiba »

It crash factorio when a train still connected to the manage got destroyed. Is this a known bug?

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.11.22 + MP] The Fat Controller. Remote train management

Post by JamesOFarrell »

New version posted. It should fix some bugs and adds alarms. Alarms are basic notifications when trains have been stuck somewhere for to long or if they have no path. I might make them more complication in the future. If you can think of any good alarms to add, let me know and i'll sort try to add them. if you use rail tanker, get the latest version, it will fix display issues with the tanker inventories.
ColonelWill wrote:This is what I get when I load the Mega base with it http://puu.sh/ivxsi/4e50720d52.jpg
That is really weird. Not sure what is causing it. PM me the save and i'll have a look or try the new version, see if that works
kiba wrote:It crash factorio when a train still connected to the manage got destroyed. Is this a known bug?


This was a bug, i have fixed it in 0.2.0. thanks!

PiggyWhiskey
Filter Inserter
Filter Inserter
Posts: 252
Joined: Wed May 13, 2015 5:28 am
Contact:

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

Post by PiggyWhiskey »

Playing with a few mods with Dytech as one of the major mods (other little ones in there)

Start a new freeplay, terrain gen's fine and can place the starting Furnace/Miner. But the moment I manually mine something I get a crash at line 780 of control.lua
Error while running the event handler:__TheFatController__/control.lua:780:
attempt to index field 'guiSettings' (A nil value)

Post Reply

Return to “Mods”