Can Turrets be modded to use electricty?

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
ctuncks
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jan 24, 2018 10:50 am
Contact:

Can Turrets be modded to use electricty?

Post by ctuncks »

Just wondering if it is possible to mod turrets (that aren't laser turrets) to require electricity for their operation? (along with their regular ammo requirements)

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Can Turrets be modded to use electricty?

Post by DaveMcW »

Not easily. You have to build a turret and an electric-energy-interface, then use a control.lua script to tie them together.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Can Turrets be modded to use electricty?

Post by mrvn »

How about building a turret with just 1 ammo capacity, a small ammo chest and an inserter to transfer ammo one clip at a time.

When you have power the turret "charges", which means one ammo clip is loaded into the turret when the inserter has enough power. It can then fire with the "stored" power. After 10 shots the "stored" power is used up and it needs more power to reload.

You can even have a drain on the inserter but running out of power won't stop the turret from finishing the ammo clip.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Can Turrets be modded to use electricty?

Post by bobingabout »

there are 3 types of turret.
turret, which doesn't cost anything to fire, it just shoots whatever (used for worms)
electric turret, which costs electric to shoot, used for the laser turret.
ammo turret, which costs ammo to shoot.

Actually, there's a 4th kind for the artillery.

With the exception of artillery, I'm fairly sure you can just use whichever you need to shoot anything, so you could make an ammo turret shoot lasers if you made some laser ammo, or make an electric turret shoot bullets.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Modding discussion”