Quick Adjustable Inserters


Adjust inserter pickup and drop positions in world, without GUI.

Tweaks
29 days ago
1.1 - 2.0
5.88K
Logistics

b ✅ Crash during migration application

a month ago

When loading my Py save from 1.1.101 I get following error:

Error while applying migration: Quick Adjustable Inserters: 005_update_to_2.0_and_data_structure_version_5.lua

...tions/005_update_to_2.0_and_data_structure_version_5.lua:8: attempt to index local 'animation' (a number value)
stack traceback:
...tions/005_update_to_2.0_and_data_structure_version_5.lua:8: in main chunk

a month ago

I, uhm, don't see how that's possible. That's really weird.
Could you tell me which version of QAI was in that save before loading it with the new version? (Pretty sure it'll tell you in the list of mods of the save file before hitting 'Load').
My only guess right now is that I did something dumb in a previous version of the mod, but I don't want to go through each version of it right now so knowing which one I should look at would make it easier

a month ago
(updated a month ago)

1.1.8

I'm surprised there is migration at all. What does the migration do?

a month ago

Thank you for the report, fixed for 2.0.2.

And the migration exists because in Factorio 2.0 there's lots of API changes, so any mod with runtime scripting and storing things in 'sotrage' (formerly known as 'global') has a good chance of needing to migrate. Of course it depends on the mod. In QAI's case the 2 changes to the API which required a migration file are the fact that 'rendering' objects are no longer referred to by an id, they are now full LuaRenderingObjects, and the fact that 'rendering.draw_polygon' expects a different format for its vertices (and QAI has those cached in 'storage').
Another API change that technically needs migration in QAI is the new directions in 2.0. There's 16 instead of 8 now. So any direction value in 'storage' would need to be migrated, however in QAI I was luckily able to pretty much ignore this change as there's a generic 'switch_to_idle_and_back' function in QAI which gets called 'on_configuration_changed' which completely resets a given player's state and repopulates it with new values - including new and correct direction values.

a month ago

Thank you, fix confirmed.

New response