Railwright


Build smarter train stations. An in-game train station blueprint generator for Factorio 2.1, inspired by BurnySc2's original Train Station Blueprint Creator.

Content
2 days ago
2.1
76
Trains

b Error on second open after creating first BP

2 days ago

Error while running event railwright::on_lua_shortcut (ID 43)
Unknown entity name:
stack traceback:
[C]: in function 'add'
railwright/scripts/gui.lua:61: in function 'add_row'
railwright/scripts/gui.lua:84: in function 'entity_picker'
railwright/scripts/gui.lua:319: in function 'open'
railwright/scripts/gui.lua:472: in function 'toggle'
railwright/control.lua:88: in function <railwright/control.lua:84>

2 days ago

Hi, thanks for reporting this. I found the cause.

The problem is not the blueprint itself. Railwright has saved the compact-loader selection as an empty value. When the Railwright window is opened again, Factorio tries to interpret that empty value as an entity name and produces the “Unknown entity name” error.

This can happen if the loader selection was cleared or if the installed loader mods were changed.

As a temporary workaround, please enter this command in the Factorio console:

/c storage.players[game.player.index].loader_name = nil

After that, you should be able to open Railwright again and select the desired loader. Your save and existing blueprints should be fine.

I’ve identified where Railwright needs additional validation so that an empty or removed entity can no longer cause this crash. If you remember whether you recently removed a loader mod or cleared the loader selection, please let me know, as that would help confirm exactly how the empty value was created.

2 days ago

Hi!
I have not removed ar added any mod in that playthrough.
I got to trains and stared testing this one. Fist BP was ok, but then I tried to see, what i can change, and got that error on second open just seconds after the first one.
I also did not pick a loader option, so this is default behaviour.

The command returnt an error: attempt to index field 'players' (a nil value)
I managed to fix issue by preset random loader in apropiate tab, and for now it doesn't break after that.

2 days ago

Hi, thank you. I think this confirms that the problem is caused by Railwright’s default behaviour. You did not cause it by adding, removing or changing any mods.

I think that when you created the first blueprint without selecting a loader or the mod thinks you did , Railwright incorrectly saved the untouched loader field as an empty value. When you opened Railwright a second time, Factorio tried to interpret that empty value as an entity name and crashed.

The console command I previously gave you was also incorrect because it cannot access Railwright’s private mod storage. Sorry about that.

Selecting any loader appears to be a valid temporary workaround. I have prepared a fix for version 0.3.9 that should correct this default workflow and automatically repair affected saves, so no console command should be necessary after updating.

Thank you for explaining the exact steps. That was very helpful in confirming the likely cause.

2 days ago

Thanks!

New response