Author Topic: "Huge" weapons  (Read 1744 times)

0 Members and 1 Guest are viewing this topic.

Hi, sorry if this question as been asked but is there a way to make a weapon able to damage ships with the "Big Damage" flag also useable by the AI on small ships like fighters and bombers? I know about the "Huge" flag but it prevents AI from using this kind of weapon on small ships.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Hi, sorry if this question as been asked but is there a way to make a weapon able to damage ships with the "Big Damage" flag also useable by the AI on small ships like fighters and bombers? I know about the "Huge" flag but it prevents AI from using this kind of weapon on small ships.
Nope. It looks like it would be rather easy to add, though; could probably stick it into the last WIF_* slot and then add it to the WIF_HURTS_BIG_SHIPS define for a really low-effort addition.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Although that effectively gives every weapon the Huge/Supercap flags, which may not be the desired behavior.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Yes, in fact I'd like this behavior only for specific weapons. Also the "Disable weapon damage scaling" won't make AI use the weapons with "Huge" flag on smaller craft and that is my main problem ;). I still want "Huge" weapons (ie that damage large ships and not fired on smaller crafts) but I'd want "Large" weapons (that damage large ships and that can be fired at smaller crafts in the same time) for some turrets.

 

Offline Fury

  • The Curmudgeon
  • 213
In that case you can use http://www.hard-light.net/wiki/index.php/Ai_profiles.tbl#.24smart_primary_weapon_selection:.
As long as the weapon is otherwise primary compatible, the AI will use the weapon even if it has huge flag.

There's also equivalent flag for secondaries.

 
These are already set to yes in my aiprofile table, but the turrets with "Huge" flag set on capship still won't fire at small ships... It's not related to primary or secondary selection as it is mainly for capship big laser turrets...

 

Offline Fury

  • The Curmudgeon
  • 213
What? But that's completely different from what you posted originally. Make up your mind.

  
That's exactly what I was asking it was just mispelled, instead of also useable by AI on small ships, I should have said useable by AI to also target small ships...sorry