Train Scaling


Automate the construction and deconstruction of your trains! Configure a train currently scheduled for a station as a template for the station - the mod's special train construction station will automatically build (or destroy) copies of the template train on demand, or in response to circuit conditions.

Content
2 years ago
0.16 - 1.1
5.01K
Trains

b Crash when creating or deconstructing trains

5 years ago

The crash occurs as soon as a train hits the station. I just send a train there to be deconstructed.
I had another crash before when I tried to scale/create a train and I think it was the same error.

Error while running event train-scaling::on_train_changed_state (ID 23)
Can't set currently burning to an item without a fuel value
stack traceback:
train-scaling/control.lua:1703: in function <train-scaling/control.lua:1493>
stack traceback:
[C]: in function 'newindex'
__train-scaling
/control.lua:1703: in function <train-scaling/control.lua:1493>

5 years ago

Was this save upgraded from 0.16? I've seen a report like this where I suspect that some item got into the saved fuel state which is no longer burnable, like a wooden power pole, but I'm not sure if it's that or something else. Can you upload a save where you're seeing this somewhere and I can dig?

5 years ago
(updated 5 years ago)

It was a new 0.17 game and the train and refuel chest had 'solid fuel' as fuel.

I've made a minimal save game with just train scaling enabled that produces this crash as soon as the train hits the train scaling station. I've replaced just about everything except for the station. Its a new train with wood as fuel and wood in the refuel chest. There is no crash if I remove the cargo wagon. The error is slightly different now but I'm guessing its still the same.

https://drive.google.com/open?id=1TvZ9nmBIo4aR5DCFfV0LFWEpjfzJ8bFe

Error while running event train-scaling::on_train_changed_state (ID 23)
LuaItemPrototype API call when LuaItemPrototype was invalid.
stack traceback:
train-scaling/control.lua:1703: in function <train-scaling/control.lua:1493>
stack traceback:
[C]: in function 'newindex'
__train-scaling
/control.lua:1703: in function <train-scaling/control.lua:1493>

5 years ago

Should be fixed in 0.17.1, thanks a lot for tracking this down!

5 years ago
(updated 5 years ago)

Thanks for the quick fix and it works now but it seems you left a debug option enabled. Whenever a train is created I get a chat message that says ' "name-of-fuel-source" some-fuel-value?'. Like "wood" 2000000.

5 years ago

Hahaha, smooth :( Sorry about that, will fix shortly

New response