Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Can we have a hullmod to make PD weapons attack ships as their first priority?  (Read 1642 times)

sycspysycspy

  • Commander
  • ***
  • Posts: 193
  • Translator of the Council of AL
    • View Profile

Just some random idea.  I am not sure if this is even worth the effort.  We have IPDAI to make small weapons PD though.  :P
Logged
Please report any translation error to me with PM.
- I just went over to my bank account and figured out I can live comfortably without working for the rest of my life as long as I die on next Tuesday.

Achataeon

  • Commander
  • ***
  • Posts: 169
  • ~stare~
    • View Profile

Maybe even name it "Point Defense Override"

Reduce turn rate a bit and increase range by small amount, Or some other things in other forms of permutations. But the idea is good though.
Logged
"On average, a human has one breast and one testicle"
- Vsauce, Michael here

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile

We have for weaponAPI: setPD(boolean), so yes, you can desactivate PD with a hullmod.

After, you need just check reactivate setPD after when you delete hullmod on your ship. (If not, you can go take all weapon on your ship and setPD(false) for all.


No?


EDIT: Oups, fail . You can add everyframeeffect on your weapon a effect who  each frame check if a ennemi(use lazerlib for that) can be shoot and you desactivate PD (with setPD as a missile is not too near or no ship in area.
EDIT2: Mass fail, you can put this everyframeeffect on your hullmod in advance. And do not forgot save weapon who is PD before. (Or just modifiate only this save list.)
Spoiler
private  Map<weaponAPI,String> weaponshiplistPD = new arraymap<>;
private int ID = 0;

Advance:
listweaponshipiterator = ship.allweapons.iterator;
for (listweaponshipiteration.isNext()){
weaponAPI weapon = (weaponAPI) listweaponshipiteration.next()
if weapon is a PD and is not in map,  add this weapon with a special ID with incrementation (String) ID++
if weapon is not in list : continue;

blabla if ennemi script,   setPD(false), else setPD(true) bla bla bla script.
}
[close]

No? (2)
« Last Edit: February 10, 2016, 07:08:53 AM by Snrasha »
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.