Quality Turrets Reworked

by Xearox

Turrets gain quality by killing

Tweaks
11 days ago
2.0
621
Combat

g Interaction with AAI Programmable Vehicles

14 days ago

Just wanted to drop a note here because I don't think this is fixable but I noticed a curious interaction with AAI Programmable Vehicles of all things.

AAI Programmable Vehicles adds in an "exclusion zone" around enemies like biter nests. While by itself this does nothing, when combined with this mod, it does present a curious case as follows:

Capturing a biter nest turns it friendly and thus removes the exclusion zone, meaning turrets can then be built around it.

However, once the biter nest starves and becomes wild, the AAI exclusion zone will kick in. Our wall of turrets then does turret things and kills the now-spawning biters.

The baby turret grows up and tries to upgrade its quality, but however because the exclusion zone is now there the baby turret has a crisis of existence and vanishes.

Like I said, I don't think this is fixable but I did want to leave this here for anyone else who might come by and wonder where their wall of baby-sitter turrets went.

14 days ago

Would you like to download this https://github.com/xsoftwareforge/factorio-mod-quality-turret-reworked/archive/refs/heads/main.zip

I've added a possible fix for your report. It would be nice if you can test it before I upload the fix for public.

13 days ago

First try gave me this result:

The mod Quality Turrets Reworked (0.10.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event quality-turrets-reworked::on_entity_died (ID 4)
quality-turrets-reworked/control.lua:26: attempt to index global 'global' (a nil value)
stack traceback:
quality-turrets-reworked/control.lua:26: in function 'GetState'
quality-turrets-reworked/control.lua:81: in function 'QueuePendingUpgrade'
quality-turrets-reworked/control.lua:168: in function 'DidTurretKill'
quality-turrets-reworked/control.lua:123: in function <quality-turrets-reworked/control.lua:119>

13 days ago

Without AAI Programmable it still errors but it's a different error:

The mod Quality Turrets Reworked (0.10.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event quality-turrets-reworked::on_entity_died (ID 4)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__quality-turrets-reworked
/control.lua:204: in function 'DidTurretKill'
quality-turrets-reworked/control.lua:123: in function <quality-turrets-reworked/control.lua:119>

12 days ago

Without AAI Programmable it still errors but it's a different error:

The mod Quality Turrets Reworked (0.10.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event quality-turrets-reworked::on_entity_died (ID 4)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__quality-turrets-reworked
/control.lua:204: in function 'DidTurretKill'
quality-turrets-reworked/control.lua:123: in function <quality-turrets-reworked/control.lua:119>

I think I got it. I've uploaded a new version to my git repo. You can just download it from the old link above.
If it works I will upload the new version here.

11 days ago

I think it works! Hasn't crashed and the turrets don't disappear anymore!

11 days ago

I think it works! Hasn't crashed and the turrets don't disappear anymore!

Sweet 🙂 glad to hear it works now!

If anything else pops up, just let me know.

11 days ago

You successfully managed to fix an edge case caused by an entirely different and seemingly unrelated mod so you're definitely getting a gold star. I will let you know if anything else pops up since you've clearly proven you can solve the unsolvable!

11 days ago

Also while troubleshooting earlier I realized that there was an entire deadzone setting that I missed in Map Options that I could have just set to 0 in the first place, so not only did you fix the problem, you also fixed a problem I could have bypassed had I not been blind to my available options.

Thanks for your hard work!

New response