Fractal Softworks Forum

Starsector => Suggestions => Topic started by: xenoargh on January 13, 2014, 12:13:10 PM

Title: SHIP_NO_FF
Post by: xenoargh on January 13, 2014, 12:13:10 PM
A new collision mask; would allow Beams to interact with enemy Ship objects but not commit friendly-fire.

They're the only weapon in the game that cannot be entirely prevented from committing FF without breaking mechanics atm; a mask of SHIP masks enemies with shields up, but does not mask them if shields are down, but only if they do not have a Shield at all (i.e., if this is set, ships with Phase Cloak can never be hit), which is weird.

Anyhow, not the world's biggest problem, just a minor annoyance, since I'd really rather just get rid of FF altogether and now I guess I'll have to do an auto-fire check just for Beams.
Title: Re: SHIP_NO_FF
Post by: Alex on January 13, 2014, 01:18:57 PM
Maybe I'm missing something, but what's the issue with using RAY_FIGHTER for this? That's the point of that collision class - no friendly fire.
Title: Re: SHIP_NO_FF
Post by: xenoargh on January 13, 2014, 01:39:22 PM
Tested with this mask:

"pierceSet":[PROJECTILE_FF,PROJECTILE_NO_FF,PROJECTILE_FIGHTER,MISSILE_FF,MISSILE_NO_FF,RAY_FIGHTER],

It still registered FF hits from Beams.
Title: Re: SHIP_NO_FF
Post by: Alex on January 13, 2014, 01:55:46 PM
No, no, that's not what I meant.

You can have"collisionClass" and "collisionClassByFighter" in the beam's .wpn file. I guess that's, ah, entirely undocumented.

So, if you do:
   "collisionClass":"RAY_FIGHTER",
   "collisionClassByFighter":"RAY_FIGHTER",

That ought to give you a non-FF beam.
Title: Re: SHIP_NO_FF
Post by: xenoargh on January 13, 2014, 05:04:05 PM
Ahhhh.  So, like the old projectile definitions for beams, that is possible...

Will test :)
Title: Re: SHIP_NO_FF
Post by: xenoargh on January 13, 2014, 05:11:12 PM
Works!  Thanks Alex! 

I'll write a FF-avoidance system for Auto-Fire AIs just to give people some example code for Vanilla Auto-Fire AIs anyhow, since I am pretty sure I have it blocked out in my head (that, and I got most of the major variants, like a "smart Strike" and "smarter PD" system built already) :)