Modifying laser beams

Place to get help with not working mods / modding interface.
Post Reply
DRT99
Inserter
Inserter
Posts: 25
Joined: Mon Jul 11, 2016 5:11 pm
Contact:

Modifying laser beams

Post by DRT99 »

Hey all, new modder here.

I am trying to create a laser that deals moderate damage to its target, but also lower, continuous splash damage to entities near it. So far i have been trying to add this from the turret side, but have only succeded in giving the turret a single burst of damage to one target when it is first targets something. I am beginning to think that i am going about this the wrong way, and that I would need to create a new laser beam type and use that as the ammo-type for the new turret? So I had a quick look through the base game files and couldnt even find where the "laser-beam" entity that turrets fire is created so i have no idea what code i would need to copy.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Modifying laser beams

Post by Qon »

Grand Imperial Laser Turret is a laser turret with additional explosive damage and AoE on target.

In prototypes/entities/projectiles.lua the laser type is defined with the laser-bubble effect. Might be what you are looking for. But otherwise looking at thesource of GILT will probably help you get going in the right direction.

What is continuous splash damage here? Like poison capsule?

DRT99
Inserter
Inserter
Posts: 25
Joined: Mon Jul 11, 2016 5:11 pm
Contact:

Re: Modifying laser beams

Post by DRT99 »

Yes like a poison capsule, but as splash damage from the laser on every "shot" not "do damage to enemies in a fixed area" if that makes any sense?

I will have a look at that mod as that seems to be the effect i am looking for.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Modifying laser beams

Post by Qon »

DRT99 wrote:
Tue Aug 25, 2020 3:58 pm
Yes like a poison capsule, but as splash damage from the laser on every "shot" not "do damage to enemies in a fixed area" if that makes any sense?
Makes no sense at all to me, but glad that I was helpful.

Post Reply

Return to “Modding help”