Loaders Modernized


Compact 1x1 loader requiring electricity to run. There are options to enable or modify capabilities like stacking, disable power consumption, or recipe cost.

Content
a month ago
2.0 - 2.1
38.6K
Logistics Circuit network

b [2.1] Crash in editor

13 days ago

I'm experiencing a reproducible, consistent crash whenever I try to place a Loader in the editor. Doesn't seem to matter where I place it or which kind of loader. The actual crash is:

The mod Loaders modernized (2.1.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event loaders-modernized::on_built_entity (ID 6)
__loaders-modernized__/scripts/loaders-modernized.lua:49: attempt to index field 'fast_replace_variant' (a nil value)
stack traceback:
    __loaders-modernized__/scripts/loaders-modernized.lua:49: in function 'handler'
    __core__/lualib/event_handler.lua:72: in function <__core__/lualib/event_handler.lua:70>

Having a brief look, it seems to be happening at "local surface_data = storage.fast_replace_variant[entity.surface.index]". For whatever reason, it appears that the "storage" field is not being populated in the editor. I'm not up to tracking where the population takes place and why it might not happen, but that's the only explanation I can come up with. The loaders work perfectly fine in the actual game.

10 days ago

Some how that means your save got into a state that doesn't have the storage value appropriately initialized. The population takes place during loading a save after adding the mod, or starting a new save. It should be persistent. How are you getting into editor mode? Do you have any other mods loaded? Do you have the issue is you place the loader when NOT in editor mode? Is there an upgrade sequence in here somewhere - i.e. update Loaders Modernized from an older version - if so what version was it? Can you provide the save some where that is reproducing it?

9 days ago

OK, this is interesting. I have a "Free Play" scenario set up with nothing on it, used for testing mods. I don't remember when I made, but THAT is what's broken. Scenarios I create now don't have this issue, regular saves don't have this issue. It's just that one old scenario. To answer your questions:

  • I get into the scenario from the main menu -> Scenarios -> Edit Scenario.
  • I do have a fair few other mods loaded, but I don't think any of them are the cause.
  • I do not have this issue in regular play, and I don't have it in new scenarios I create now.
  • I don't remember what updates I've made to Loaders Modernized, but the only mod file I have for it is "loaders-modernized_2.1.3.zip".
  • The scenario in question can be found here, just in case.

To be perfectly honest - if the issue is the one scenario I created, then I can just recreate it. There's nothing in the scenario that actually matters - it's a blank slate to drop buildings into so I can see if their pipe connections are in the right place and such.

New response