Turret Shields

by OwnlyMe

Lightweight scripted shields with power consumption for all turrets (configurable or researchable)

Content
4 years ago
0.16 - 0.18
113
Combat

b Error when research finishes.

6 years ago

Wanted to try this mod but getting the following error when the research finishes;
Error while running event Turret-Shields::on_research_finished (ID 18)Turret-Shields/control.lua:263:attempt to perform arithmetic on global 'research_size' (a boolean value)

I thought it might have been another mod causing the issue but I tried a clean base version without mods and it still failed. Factorio version 0.16.36.

6 years ago
(updated 6 years ago)

I found a similar error. I have an error when installing a building after I have forcibly researched the console script.

And I would like to advise you on the localization file.

[technology-name]
turret-shields-base=Turret Energy Shields
turret-shields-speed-1=Shield recharging rate 1
turret-shields-speed-2=Shield recharging rate 2
turret-shields-speed-3=Shield recharging rate 3-X
turret-shields-size-1=Shield recharging rate 1
turret-shields-size-2=Shield recharging rate 2
turret-shields-size-3=Shield recharging rate 3-X
↓
[technology-name]
turret-shields-base=Turret Energy Shields
turret-shields-speed=Shield recharging rate
turret-shields-size=Shield recharging rate

Replace the above sentence with the following sentence. :D
And you can tell the effect by putting the following sentence into the technical effect.

effects ={{
type = "nothing",
effect_description = {"modifier-description.turret-shields-size-1"},
}},

--locale file
[modifier-description]
turret-shields-size-1=Increases the HP of your turret shields to 100

6 years ago

I think i've found the problem. There is a writing mistake in control.lua on the second line:

research_size = settings.global["TS_research_enabled"].value

change this to:

research_size = settings.global["TS_research_size"].value

and it should work

6 years ago
(updated 6 years ago)

sorry, i was in a hurry last night
i fixed the two lines with "research_size = settings.global["TS_research_enabled"].value"
and the localization
hope everything is correct now, i still didn't have time to test it extensively

6 years ago

Working great, awesome mod!

New response