TrainsSignalSender deprecated

by Hermios

Associate signals to a train

Content
4 years ago
0.15.10 - 0.18
11
Transportation

b Crashes with Factorio 0.17.79->FIXED

4 years ago

I actually tried to use the signal sender for the first time ever, and got two distinct crashes:

1) Not sure whether your mod is to blame for this bug, as it is another mod that's crashing. I click on a new locomotive. As soon as I click on "+" in the Signal sender GUI, I get this error:

Error while running event RealisticReactors::on_gui_click (ID 1)
__RealisticReactors__/stats.lua:449: attempt to concatenate local 'reactor_key' (a nil value)
stack traceback:
    __RealisticReactors__/stats.lua:449: in function <__RealisticReactors__/stats.lua:443>

Not sure what happened here, so I'll report this also to the authors of RealisticReactors.

2) This bug is obviously related to TrainsSignalSender. It happened after I deactivated RealisticReactors. I clicked on a locomotive, and the SignalSender GUI opened. Added signal "C" (count: 1). Clicked on the locomotive again, and got this error:

Error while running event TrainsSignalSender::on_gui_opened (ID 83)
Only callable on sprite-button.
stack traceback:
    __HermiosLibs__/guiLibs.lua:76: in function 'updateGuiElement'
    __HermiosLibs__/guiLibs.lua:167: in function 'addToGui'
    __HermiosLibs__/guiLibs.lua:179: in function 'addToGui'
    __HermiosLibs__/guiLibs.lua:190: in function 'addToGui'
    __HermiosLibs__/guiLibs.lua:179: in function 'addToGui'
    __HermiosLibs__/guiLibs.lua:125: in function 'InitOpeningGui'
    __HermiosLibs__/controlLib.lua:173: in function <__HermiosLibs__/controlLib.lua:148>

If needed, I can provide you with a saved game for testing -- just say so! :-)

4 years ago

Hi Pi-C
Why does every bug have to do with guiLibs :'( I am proud of this framework, but this is a pain in the ass to debug...!
Ok, more seriously: For the first one, this is very confusing that MY mod triggers something on THEIR side. Still, I don't see how to fix it by me. I suggest to let them see. Of course, if something in my code is not appropriate, they can come back to me and I'll fix it.
For the second one, which version of the library HermiosLibs do you use? I assume that this is not the last one. Can you confirm? If so, please update first. I think I already fixed this bug.
Just kidding for the complain, Many thanks for the feedback :D

4 years ago

Hi Pi-C
Why does every bug have to do with guiLibs :'( I am proud of this framework, but this is a pain in the ass to debug...!
Ok, more seriously: For the first one, this is very confusing that MY mod triggers something on THEIR side. Still, I don't see how to fix it by me. I suggest to let them see. Of course, if something in my code is not appropriate, they can come back to me and I'll fix it.

Yes, it's strange that interacting with one mod's GUI should cause a bug in an entirely unrelated mod, but sometimes, shit happens. I haven't used GUIs in my mods, though, so I've no idea what could be the problem here. Anyway, just filed a bug against the other mod as well. :-)

For the second one, which version of the library HermiosLibs do you use? I assume that this is not the last one. Can you confirm? If so, please update first. I think I already fixed this bug.

I usually keep the mods I play with up to date (unless an update breaks something). The crash happened with HermisoLibs 0.1.7 and TrainsSignalSender 0.3.7. Both should be the latest versions. So, unfortunately, you didn't fix this bug yet. :-D

Just kidding for the complain, Many thanks for the feedback :D

You're welcome! But, of course, giving feedback is in my very own interest: I'm trying to build a smart train-network without LTN, and it seems your mod would be the perfect tool to easily distinguish between empty cargo trains and empty fluid trains. Storing this information directly on a train would save me a couple of combinators on every stop where trains need to decide what route to take, so this would help a lot! :-)

4 years ago

Indeed... I found out the issue, and fixed it (I actually fixed it before, but didn't publish.... :( )
Yes, replace LTN with mine, so happy, he is my nemesis (Well, I am pretty sure he doesn't even know I exist, and he does a great job anyway, but I like to have nemesis... :D )
Last question: Did you try my other mod, Train Automated Caller? This one is quite powerful, and can easily distinguish as well between different kind of cargos, and their content etc.
I assume it is not so easy to use it, as it requires some logic to configure it. If you have the opportunity, I would be glad to have some feedback about it
Many thanks :D
Niko

4 years ago
(updated 4 years ago)

Indeed... I found out the issue, and fixed it (I actually fixed it before, but didn't publish.... :( )

Great! Not at home right now, but I'll try it when I get back.

Yes, replace LTN with mine, so happy, he is my nemesis (Well, I am pretty sure he doesn't even know I exist, and he does a great job anyway, but I like to have nemesis... :D )

Sorry, no can do! I've never used LTN yet, just know it exists. When I got Factorio last year, I was inspired by Aavak's "Let's play" series (starting at episode 5 or 6, I think) where he tried to set up a smart rail network just with combinators. Had to give up then (bad planning), but want to try again -- even if it's not in a vanilla game.

Last question: Did you try my other mod, Train Automated Caller? This one is quite powerful, and can easily distinguish as well between different kind of cargos, and their content etc.

Not yet. Actually, I really want to try to do the train routing and dispatching without too much help of other mods. In my previous attempt (which started as a direct copy of Aavak's setup, although he quit his series just as it got interesting), I distinguished between fluid and solid cargo trains by measuring the length of trains (using dummy branch-offs and reading the state of rail signals). Being able to set a signal on each train directly will make it easier and also allow for more flexibility as I'll be able to use different train lengths as the game progresses.

I assume it is not so easy to use it, as it requires some logic to configure it. If you have the opportunity, I would be glad to have some feedback about it
Many thanks :D
Niko

I might give it a try, but I'm a really slow player, so feedback in the very near future is unlikely.
Thank you for your efforts!

Andreas

4 years ago

Indeed... I found out the issue, and fixed it (I actually fixed it before, but didn't publish.... :( )

Sorry, doesn't work yet! I've sent you a message over on the forums, with saved game (plus fixed changelog file) included …

4 years ago

Just for anybody else reading this thread: Updating this mod to 0.3.8, and HermiosLibs to 0.1.8, will fix the second bug reported in this thread!

New response