Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: dekal on April 20, 2010, 08:19:52 pm
-
I don't know if this is a bug or a new 'feature' or a personal screw-up but I remember that in Fs2_open 3.6.10 AI fighters (and bombers) were able to fire their secondaries at other fighters as well as capital ships.
But the AI in 3.6.12 RC.1 and now RC.2 just fires lasers at fighters and keeps its missiles for bigger ships (cruisers, corvettes, transports, etc...)
Has anyone else noticed this or am I going crazy :nervous:??
-
I think you're going crazy. You have any mods installed? Try posting your fs2open.log.
-
OK, there is definitely a problem. I made a custom mission involving 2 wings, Terran vs. shivans, depleted their primaries, and filled their secondaries with harpoons and hornets. The mission plays fine but the fighters keep dancing around without launching anything until you get tired and end the mission. I tried the same thing using the debug build and it crashed at the start of the load screen... here's the log.
And for the mod question, I have the mediavps 3.6.10, fsport, fsport mediavps... Although I normally only use the mediavps when playing
[attachment deleted by admin]
-
You wouldn't happen to have difficulty set to very easy? AI will almost never use missiles on very easy.
As for the bug you have a weapon in the mission loadout that is not allowed for player ships. Remove it and you should be able to get by that error.
-
Mmm...difficulty seems to be the problem, when i first tested the mission difficulty was set on easy. But still, you get the same result with medium difficulty (at least with the mission I made to test this) and only on hard and insane levels fighters fire missiles.
I normally play with easy settings but, as I said, AI fired secondaries on easy with the 3.6.10 build. According to the 3.6.12 change log, AI has returned to behave more like retail but I clearly remember missiles when I played freespace 8 years ago :nod:
-
I can confirm this. The AI, friendly or hostile,
virtually never fires fires missiles at other fighters on medium difficulty. AI strikecraft have no problem using missiles against larger ships like freighters, cruisers, etc.
I've observed this playing both my own Fs2 campaign and Silent Threat: Reborn.
This should definately be investigated.
-
I can disconfirm this, at least in Blue Planet. The AI fires missiles freely on Medium.
Bear in mind that this is using Fury's AI, but still.
-
Bear in mind that this is using Fury's AI, but still.
I think it would be helpful to confine discussion to 'vanilla' (mediavps as the only mod) settings. Given that this is an AI-related issue, running a custom AI profile just might invalidate your findings.
I switched from 3.6.12 RC2 back to 3.6.10 and the AI will fire missiles at me. There you go. :p
-
Bear in mind that this is using Fury's AI, but still.
I think it would be best to confine discussion to 'vanilla' SCP (ie mediavps as the only mod) settings.
I switched from 3.6.12 RC2 back to 3.6.10 and the AI will fire missiles at me. There you go. :p
The fact that Fury's AI fires missiles freely indicates that this cannot be purely a codeside issue. It is therefore an important factor.
Running a custom AI profile is exactly what it takes to make these findings critical.
Let us do our jobs.
-
It is not my intent to offend. I should be less cavalier given my inexperience with computer science. By all means, good luck with your job.
If I remember correctly, either RC2 or RC1 included a change to 'move FSO AI closer to retail behavior.' Perhaps something went awry in that commit?
Edited for tone, edited again to reduce pointless nitpicking
-
You're nitpicking, and about a critical piece of information at that. Shush.
Interesting findings. Under 3.6.10 MediaVPs friendly ships will fire missiles but hostiles will not (tested, confirmed on 'Place of Chariots' and 'Love the Treason'.)
With no mod set (no MediaVPs), neither friendlies nor hostiles will fire (tested on the same.)
-
You're nitpicking, and about a critical piece of information at that. Shush.
Yeah, sorry. I'll clean that up.
Interesting findings. Under 3.6.10 MediaVPs friendly ships will fire missiles but hostiles will not (tested, confirmed on 'Place of Chariots' and 'Love the Treason'.)
With no mod set (no MediaVPs), neither friendlies nor hostiles will fire (tested on the same.)
That's strange. You aren't still using Fury's AI, are you? I'm running 3.6.10, retail AI, and both friendly and hostile fighters/bombers use missiles against one another.
-
This is really bizarre. I'm going to guess that some new 3.6.12 feature has changed the handling of retail vs. mediavps vs. Fury AI table data, but it's only a guess.
That's strange. You aren't still using Fury's AI, are you? I'm running 3.6.10, retail AI, and both friendly and hostile fighters/bombers use missiles against one another
I thought the issue here was with 3.6.12. Correct behavior under 3.6.10 isn't surprising.
And of course I'm not using Fury AI.
For reference I'm using the 20100422T-INF_SSE2 Taylor sound build.
-
Now that I think of it since I've been playing SGWP2 I haven't really dealt with fighter missiles either.
-
http://www.hard-light.net/forums/index.php?topic=68190.0
If you haven't used 3.6.11 nightly builds before, AI behavior indeed has changed. AI now behaves more like it did in retail. 3.6.10 (and maybe earlier) had somewhat broken standard AI behavior. You can consult QuantumDelta for specifics.
-
Behavior replicated on 3_6_11r_INF_SSE2-20100131_r5862.
Observed occasional Rockeye fire from hostile fighters (two shots), but far below the rate it should have been at. Saw no fire at all during the opening sequence of Love the Treason, from friendlies or hostiles alike.
-
AI behavior was changed from retail behavior at some point. This resulted in the AI firing all weapons as soon as they could and even if they were not in range. This behavior is in 3.6.10. This was fixed in 3.6.11 and now should act like retail. The lower the difficulty and the lower the AI class position in the table the less missiles have a chance of being fired. The higher the difficulty and the farther down the table the entry is (up to a point) the more likely the AI is to fire up to the point they will always fire.
So to confirm if there is a bug you will need to run the mission with the same difficulty and ai settings with both the retail exe and 3.6.12 RC2.
-
Fook, I can't get at the retail missions as I don't have the CD handy.
Someone else will need to compare.
Also, jesus christ the retail AI is slow and dumb. I want to get out and push the enemy Hercs.
-
What about looking through the AI tables?
-
It's possible that this is genuinely how it's supposed to be on retail. It's been so long that I hardly remember retail Medium.
But good god, I watched the friendlies on '...But Hate the Traitor' go through the entire opening sequence without a single missile shot.
-
Fook, I can't get at the retail missions as I don't have the CD handy.
The HOTU Crack Pack on my FAQ's Downloads Page has a cracked 1.2 exe which should solve that issue.
-
Fook, I can't get at the retail missions as I don't have the CD handy.
The HOTU Crack Pack on my FAQ's Downloads Page has a cracked 1.2 exe which should solve that issue.
Thanks.
Difference confirmed on 'Surrender Belisarius', retail vs. build 5862 no MVPs. Friendly fighters fire Rockeyes on retail, but do not fire them on 5862. On both versions, enemy Hercs will fire some Rockeyes, but much more frequently on retail.
Something broke retail AI.
-
:(
-
Mantised. Hope I did it right.
-
Fook, I can't get at the retail missions as I don't have the CD handy.
The HOTU Crack Pack on my FAQ's Downloads Page has a cracked 1.2 exe which should solve that issue.
Thanks.
Difference confirmed on 'Surrender Belisarius', retail vs. build 5862 no MVPs. Friendly fighters fire Rockeyes on retail, but do not fire them on 5862. On both versions, enemy Hercs will fire some Rockeyes, but much more frequently on retail.
Something broke retail AI.
Unfortunately, there are quite a few places where FSO breaks retail AI. QuantumDelta probably knows the most about the differences. I've investigated a few and have fixed them where I could find/reproduce them.
I'll look into this one ASAP. One important question (posted on Mantis as well) is when exactly this buggy behavior appeared.
-
I use to mantis it already six month ago and i used to find from which build exactly the bug appear.
It seems like everyone is playing on insane around here :nervous:
-
Not me, I can't even beat the game on Hard. Medium is pretty intense. Course it could be the way the AI have behaved in recent years.
-
I only play on Insane on retail, and frankly I've been spending most of my time with Fury's AI recently (as have many others), so that might be why this problem has gone unnoticed for so long. Thank goodness people picked up on it.
-
I use to mantis it already six month ago and i used to find from which build exactly the bug appear.
It seems like everyone is playing on insane around here :nervous:
You're right, you did. It's even assigned to me. :nervous:
-
It has been assigned automatically :p
-
Found the problem: it was a subtle type-casting error introduced when I was doing some AI updates.
The code before:
firing_range = MIN((swip->max_speed * swip->lifetime * (Game_skill_level + 1 + aip->ai_class/2)/NUM_SKILL_LEVELS), swip->weapon_range);
The (broken) code after:
float secondary_range_mult = (aip->ai_secondary_range_mult == FLT_MIN)
? (Game_skill_level + 1 + (3 * aip->ai_class/(Num_ai_classes - 1)))/NUM_SKILL_LEVELS
: aip->ai_secondary_range_mult;
firing_range = MIN((swip->max_speed * swip->lifetime * secondary_range_mult), swip->weapon_range);
The fixed code:
float secondary_range_mult = (aip->ai_secondary_range_mult == FLT_MIN)
? (float)(Game_skill_level + 1 + (3 * aip->ai_class/(Num_ai_classes - 1)))/NUM_SKILL_LEVELS
: aip->ai_secondary_range_mult;
firing_range = MIN((swip->max_speed * swip->lifetime * secondary_range_mult), swip->weapon_range);
Basically, the problem is that the expression involving game_skill_level (and other integer variables) was previously being implicitly cast to float before division because it was multiplied with another float (swip->lifetime). When I moved that expression, that implicit cast from int to float was lost.
This is fixed in trunk rev. 6077, along with a couple of other AI bugs.
-
Uh... good! *hands Sushi a Kelp-flavored Cookie*