Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: halcyony2k on June 25, 2013, 10:27:06 am

Title: +Weapon Range
Post by: halcyony2k on June 25, 2013, 10:27:06 am
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?
Title: Re: +Weapon Range
Post by: Fury on June 25, 2013, 12:28:22 pm
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.
Title: Re: +Weapon Range
Post by: halcyony2k on June 25, 2013, 12:50:32 pm
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?
Title: Re: +Weapon Range
Post by: Fury on June 25, 2013, 12:53:50 pm
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.
Title: Re: +Weapon Range
Post by: SypheDMar on June 25, 2013, 01:30:49 pm
I don't get the explanation. If max sets the maximum limit, why isn't AI firing at 800 and only at 400?
Title: Re: +Weapon Range
Post by: Fury on June 25, 2013, 01:38:43 pm
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?
Title: Re: +Weapon Range
Post by: halcyony2k on July 08, 2013, 01:30:59 pm
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."
Title: Re: +Weapon Range
Post by: Droid803 on July 08, 2013, 04:44:07 pm
version?
might want to mantis it then, sounds like a bug.
Title: Re: +Weapon Range
Post by: halcyony2k on July 09, 2013, 12:31:44 am
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.
Title: Re: +Weapon Range
Post by: Arpit on July 09, 2013, 02:10:24 am
Go to ai_profiles.tbl (http://www.hard-light.net/wiki/index.php/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.
Title: Re: +Weapon Range
Post by: AdmiralRalwood on July 09, 2013, 06:48:42 am
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 (http://www.hard-light.net/forums/index.php?topic=83318.0).
Title: Re: +Weapon Range
Post by: halcyony2k on July 15, 2013, 10:50:28 pm
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.