Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: SHIP_NO_FF  (Read 2346 times)

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
SHIP_NO_FF
« 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.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: SHIP_NO_FF
« Reply #1 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.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: SHIP_NO_FF
« Reply #2 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.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: SHIP_NO_FF
« Reply #3 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.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: SHIP_NO_FF
« Reply #4 on: January 13, 2014, 05:04:05 PM »

Ahhhh.  So, like the old projectile definitions for beams, that is possible...

Will test :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: SHIP_NO_FF
« Reply #5 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) :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack