Author Topic: +Weapon Range  (Read 2048 times)

0 Members and 1 Guest are viewing this topic.

The table wikis say that "+weapon range" is the range you set for the AIs to begin firing. Any adjustments I make don't appear to have any effect on the AI firing range. The AI still fires at the weapons velocity. Is this normal?

 

Offline Fury

  • The Curmudgeon
  • 213
Without +weapon range, range is calculated by multiplying velocity with weapon's time of life. So it's not just velocity. Also note that +weapon range works as maximum weapon range, so anything shorter than that is fair game to the AI.

 
Right, so I have velocity set at 400, lifetime at 2; that was all in the wiki. The range is 400*2=800. I set the +weapon range to 800, loaded the weapon onto the AI and it still only fires whenver it is within 400 meters. Is there another setting I am missing?

 

Offline Fury

  • The Curmudgeon
  • 213
Like I said, +weapon range sets maximum range and anything less is fair game. If you want to set minimum range, you need to use +weapon min range.

 

Offline SypheDMar

  • 210
  • Student, Volunteer, Savior
    • Minecraft
I don't get the explanation. If max sets the maximum limit, why isn't AI firing at 800 and only at 400?

 

Offline Fury

  • The Curmudgeon
  • 213
It should fire anywhere between 1 and 800 meters with or without +weapon range. It probably would be best if he posts full weapon table entry here in code tags. And just to make sure, the problem only appears with this one weapon and not any other weapon?

 
I just finished summer semester finals and haven't had time to get back to this until today. Thanks for the responses though. Initially I didn't make any adjustments to any weapons in the weapons table. I simply noticed that fighters using regular weapons, like the subach HL-7,  begin firing at a range equal to the weapon's velocity rate. When I put the subach HL-7 on capital ships, it fires at the maxium range(velocity*lifetime). I am using regular freespace 2 open with mediavps and no mods. I notice this with every single weapon that fighters use. I attempted to fix this by adding the +weapon range but it doesn't do anything. I can post the weapon table entry when I get home, but it seems unnecessary since this weapon firing behavior remains the same before and after adding the "+weapon range."

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
version?
might want to mantis it then, sounds like a bug.
(´・ω・`)
=============================================================

 
3.6.17. I am using the one that came with the BluePlanet installer package. I am not sure that it is a bug just yet. I think it is just a limitation of the AI that doesn't like to shoot outside a certain set of parameters. I simply thought that by adding +weapon range, it would force the fighters to fire as soon as it is coming into range. There may be other factors that are probably being calculated like movement, and the accuracy in the ai tables. I have only tested this out on moving fighters and turrets so far. If you are holding completely still perhaps it will fire sooner, but this would wouldn't make for fun mission play. I was just curious if anyone else was having the same problem; I really appreciate all the quick feedback.

 

Offline Arpit

  • 27
Go to ai_profiles.tbl.

Check this thing:

Code: [Select]
$AI In Range Time:
FS2 Open 3.6.10:
The delay (in seconds) for the AI to fire its weapons after getting in range.
Syntax: Float list
Default: 2, 1.4, 0.75, 0, -1

This most probably seems to be your problem. Try playing on a higher skill level.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
3.6.17. I am using the one that came with the BluePlanet installer package.
That build has known corruption issues; you should be using a more up-to-date executable.
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.

  
Yeah, I already attempted to modify and edit the AI tables; I tried the harder difficulties already and had no success. If you hold completely still the AI will sometimes open fire with the standard FS2 weapons. If you try and modify the velocity and lifetime, the Fighter AI doesn't like to shoot far distances. It's fine, I am not doing any kind of crazy modding, I am trying to tweak the tables a bit to spice up gameplay.