Capsule launcher


Introduce a turret that fires capsules (slowdown, poison, and combat robots) for strategic base defense.

Content
3 days ago
2.0
409
Combat

b Error on startup

19 days ago
(updated 19 days ago)

I'm getting the following error.

Failed to load mods: __capsule-launcher__/utils/utils.lua:124: attempt to index field '?' (a nil value)
stack traceback:
    __capsule-launcher__/utils/utils.lua:124: in function 'get_projectile'
    __capsule-launcher__/data-final-fixes.lua:12: in function 'is_combat_robot_capsule'
    __capsule-launcher__/data-final-fixes.lua:23: in main chunk

The referenced function is this: https://github.com/0001-0110/Capsule-launcher/blob/d3645bb2c9cc54a01499d7c951df2a9620c1b53c/utils/utils.lua#L122-L126.

I'm using a lot of mods, so I guess it's related to some of them. It was working before the last update that enabled support for modded capsules.

18 days ago

I'll look into it, but it will be hard to find the exact problem without more information. Can you maybe give me the list of mods you are using ?

I'm having this (almost) exact error too. Unfortunately your mod appears to be causing some general instability now as well. I've spent a bit of time testing and I hope what I found is helpful because your mod is absolutely critical to my war against the bugs.

I was able to isolate two mods as causing the above traceback issues in my load order: Schall's Radioactive Waste and Frost Biters. These also happen to add new capsules to the game.

Unfortunately, after enabling the last handful of mods while reaching the end of my binary search, (Cerys, Change Inserter Drop Lane, Concentrated Solar, Muluna, and AAI Vehicle Group), the mod now without fail causes Factorio to freeze on initialization WHILE loading capsule-launcher until I manually remove the mod from my installation.

Rolling back to 1.4.3 did not resolve
Rolling back to 1.4.2 did not resolve
Rolling back to 1.3.1 DID resolve the failure to initialize.

Rolling back to 1.3.1 also resolved the above traceback errors when loading Schall's Radioactive Waste and Frost Biters. My full mod stack now loads without issue.

Schall's adds a decontamination capsule to the game, and Frost Biters adds a cold capsule. If line 48 of your utils.lua comes across a newly added capsule that doesn't have the full capsule_action.attack_parameters.ammo_type.action.action_delivery.target_effects associated with it, it will come back with a nil value that your utility function does NOT like. For instance, Frost Biters does not have a target effect defined. This can probably be fixed with a null check.

6 days ago
(updated 6 days ago)

Thanks a lot for the detailed report. I was finally able to reproduce the issue and will start debugging.
About the freeze on initialization, did you test the 1.4.4 version ?
I am really sorry about the general instability and will keep fixing my mod as quickly as I can.

1.4.4 is when the freeze on init started, but only after I got rid of the mods that were causing the initial traceback. If I had to put my money on which of the the mods during that phase of testing caused it, I would guess Muluna as that mod recently had a pretty massive update that has had a handful of fringe conflicts with other mods I'm using.

5 days ago

I did not manage to reproduce the issue. I tested many different mods, and mod combinations, including Muluna, but my game managed to start just fine without any major delay. If the new update doesn't fix the freeze for you (which I don't believe it will, as I fixed something completely unrelated), I would need an exact list of the mods you are using.

3 days ago

I think I figured it out, and the problem should now be fixed.

New response