Loaded Turrets


Recipes to craft turrets with pre-filled ammo which are ready to fire soon after being placed.

Tweaks
4 months ago
1.1
765
Combat

b Crash on launch

4 months ago

Fail to load on launch after latest patch.

https://ibb.co/qrXV9Xz

4 months ago

Tried a rollback to v.1.0.0 and got a different crash on startup

https://ibb.co/6YkpccM

v.0.3.0 works

4 months ago

Thanks for your report! Just published 1.0.2 with a fix.

4 months ago

Well it now causes a hard crash on startup.
Gave it a solid 5 minutes to see if anything happened.

Which, for record, have never happened to me before with 240+ mods running.

https://ibb.co/mJvPFyS

4 months ago

Can I get a mods list json from your mods folder?

4 months ago

Thanks, but actually I need a save with your mods installed, except Loaded Turrets ofc since it won't load. I think it would be smaller to upload if you start a new map.

Sorry I'm new to mod dev. 😅

4 months ago

Sure, this is a brand new save https://filebin.net/g6f21x6l1teosqth

The crash is on starting the game though, not when loading the save.
Also, if the mod startup settings are not loaded when you activate this save, the game won't launch.
"Zsorter" takes a minute or two to load at startup too, so you have to be a bit patient if you don't have a beefy CPU.

4 months ago

Thanks for the save file, it was very helpful to fix Loaded Turrets. I have released 1.0.3 which loads the provided save and seems to work after doing some quick tests.

I noticed that some turrets only allow a stack size of 1 but since their automated_ammo_count field is larger than their max stack size Loaded Turrets will try to put more than will fit in the turret and spill the remainder on the ground. IMO the correct fix for this is for those mods to tune the automated_ammo_count field for the turrets that they create.

4 months ago

Sweet great job, works now :)

Regarding the stack size and spilling of items.
Can't you instead of using the stack size of the turrets, use the stack size of the ammunition?
Then you can also have an additional mod-option that let us choose the % of stack size we want the loaded turrets to have.
This will also clean up the recipes a bit, so we only have 1 recipe for each type of ammo a turret use. (Now it's one for 10 and one for 20 for normal turret at least).

E.g.
Ammo loaded: 0.2 - would make recipes use 20% of max stack size of the ammo used and load the turret accordingly.

Ammo loaded: 1.0 - would make recipes use 100% of max stack size of the ammo used to load the turret accordingly.

If max stack size is 1, then just round up to nearest integer.

Idk if this is possible, but would make it more compatible with other mods maybe.

New response