Simple Train Fuel Stop


Automatically requests low-fuel trains, easy to set up and highly customizable.

Content
4 years ago
0.17 - 0.18
20
Trains

b No matching Refuel Station [Closed]

4 years ago

Greetings,

I've encountered two issues while using this mod.
First, my trains keep saying "No matching Refuel Station. The refuel station is totally acessible for them, if I manually add that station to their schedule on automatic mode, they go there without any problem.
I used the dedicated UI to configure for L-C-C-L setups exactly as my train are and nothing is happening, I'm still having the message.
I even tried to lay a L-C-L train as it is the default template when we just put the refuel station, to no avail.

Moreover, I'm having this message from time to time when I'm clicking on the refuel station in order to make its UI appear :

Error while running event simple_train_fuel_stop::stfs-open-window (ID 164)
Gui element with name stfs_gui_main_frame already present in the parent element.
stack traceback:
simple_train_fuel_stop/script/gui.lua:105: in function 'CreateGUI'
simple_train_fuel_stop/script/gui.lua:52: in function 'OpenGUI'
simple_train_fuel_stop/script/gui.lua:19: in function <simple_train_fuel_stop/script/gui.lua:13>
stack traceback:
[C]: in function 'add'
simple_train_fuel_stop/script/gui.lua:105: in function 'CreateGUI'
simple_train_fuel_stop/script/gui.lua:52: in function 'OpenGUI'
simple_train_fuel_stop/script/gui.lua:19: in function <simple_train_fuel_stop/script/gui.lua:13>

Tell me if you want more details to help solving that issue.
Thank you in advance ;)

4 years ago

Hello! Thank you for this information.

First of all I fixed the Gui bug you've encountered, that should no longer happen.
Secondly, I was not able to reproduce the problem you described. Could you try to check the new update and see if it works now? I also added the possibility to copy/paste the trainstop settings now.

If it's still now working, can you give me details about a train setup where it isn't working?

4 years ago

Thanks for the answer :)

I tried a simple setup : https://i71.servimg.com/u/f71/16/38/19/35/fac10.jpg and still have that message but maybe I'm not doing it correctly.
Is there something I missed ?

4 years ago

hey, i have this message, too.

might be because of using modded trains, so your mod does not assign the amount of wagons/locos right, because it doesnt recognize the modded trains?

4 years ago

I tried full vanilla with only this mod, so it may not come from modded trains

4 years ago
(updated 4 years ago)

I found the bug! the cargo and back locomotive count was swapped in a function, so it worked only when there was the same count for them....
Im sorry for the inconvenience and thanks for all the infos!

The update should be up now, tell me if everything works as intended

4 years ago
(updated 4 years ago)

Great job dude, everything is working fine :D

May I suggest, if possible, to :
1) Have a checkbox on the station UI "any template" that allows any train to refuel here regardless of its template ?
2) Be able to define a threshold before refueling, because I don't always need it to refuel at the end of its schedule ?

I understand that the mod is called "simple train fuel stop" so maybe you're willing to keep it as simple as possible, no problem there.

Anyway, thanks again :)

4 years ago

For 1):
Thats a great idea, I may add that in a future update

For 2):
I think I'm not certain what you mean there. Do you want to change when the train is refueled or something else?

4 years ago

Currently, I have a train that has 1/3 of its fuel slots full, which is way enough to follow its schedule several times. However the refueling station is added even if it has way than enough fuel to last a dozen schedules.
By the way, how is decided where in the schedule the refueling station is added ?
I have both trains picking up resources and unloading them elsewhere, however for one train the refueling station is added after the unloading station (2nd station in the schedule) while for the second, the refueling station stands right after the picking up station (1st station in the schedule). If I drag the temporary station in the schedule and put it in the bottom of the list then remove it, it will still appear where they were :)

4 years ago

ok, let me explain some things.
So it's not exactly 1/3, it's when the train has only one fuel slot left. Since you you can also have a train with more than 3 fuel slots. Also you could use another fuel type with way more MJ than coal, so count is also not enough. I think the best way would be to calculate it's current MJ of fuel and decide on that matter (sadly that's quite a lot of work, since I need to store these values at the start of the game).
For the temporary train stop schedule: it is always inserted after the current stop, when the train refueling condition is met.

You pointed out a lot things that may be very useful. I'm thinking about adding a button to the gui to open another window for global settings.

Ty again for all the feedback!

4 years ago
(updated 4 years ago)

I've reworked quite a bit in the mod today and made a lot of additions! It is now posible to change advanced settings inlcuding:
- an option for trains to hold there with "any template"
- an adjustable fuel threshold (this is a global setting that can be accesses in every fuel station and changed by every player)
- adjustable train wait conditions for the temporary stop

Thanks again for all these good ideas! I think they really made a difference

4 years ago

Tried the new features, you're the best dude :D

Now all you have to do is rename the mod from "simple train fuel stop" to "capable train fuel stop".
May I ask if there's a way to have an option to put the temporary station in the bottom of the schedule ?

Otherwise, great mod ! It's a pleasure to help you adding ideas ;)

4 years ago

oh right! I forgot to add this, it was planned :)
One update is coming today, which fixes some small things, I can add that too

New response