Page 1 of 1

Modifying laser beams

Posted: Tue Aug 25, 2020 6:28 am
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.

Re: Modifying laser beams

Posted: Tue Aug 25, 2020 8:01 am
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?

Re: Modifying laser beams

Posted: Tue Aug 25, 2020 3:58 pm
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.

Re: Modifying laser beams

Posted: Tue Aug 25, 2020 4:00 pm
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.