2019-11-21 05:41 EST


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001172FSSCPgameplaypublic2010-11-12 07:23
ReporterAxem 
Assigned Tokarajorma 
PrioritynormalSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.9 
Target VersionFixed in Version3.6.12 
Summary0001172: AI won't use Puncture Secondaries if told to Disable/Disarm
DescriptionIf I order fighters with Puncture Secondaries (like a Stiletto), they won't use it at all if I tell them to Disable or Disarm a ship. Even if I try to force them to use it by using the good-secondary-time sexp.

However if I tell them to attack the ship, they will right away begin to use their Stilettos.
Additional InformationExample mission attached. Beta Wing is armed with Stilettos, but they will attempt to disable to Argo by firing their primaries.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0007316

Goober5000 (administrator)

Is it like this in retail?

~0007317

Axem (reporter)

Yes it is. Same behavior.

~0007318

Goober5000 (administrator)

Then we ought not to change it. We can add an AI profiles flag though.

~0007319

CP5670 (reporter)

Are you sure about this? I have a wing ordered to disable a ship (with add-goal) in one my missions and have seen them firing Stilettos many times.

~0009003

taylor (administrator)

* BUMP *

So, are we going to do anything about this one? It would be nice, if it was something to be fixed, if somebody would actually claim it already.

~0009471

taylor (administrator)

Not going to work on this.

~0010376

chief1983 (administrator)

They do use stilettos when ordered to destroy a subsystem, not when you order them in the mission to disable or disarm though. At least as far as this test mission goes. They should at least be using them when told to disable, since that's just an order to attack the engine subsystems. I'm not sure if stilletos should be preferred for turrets, cause I don't know if they should be more or less effective than other weapons.

~0010378

Goober5000 (administrator)

There are already a few AI profiles flags that modify firing behavior. See if one of them fixes this problem.

~0010567

Goober5000 (administrator)

*bump*

Any news, or shall I close this?

~0010580

chief1983 (administrator)

I never did get around to testing the AI profiles flags, I hoped someone else would since this particular bug never really concerned me, but I do admit it would be nice if it worked for sure, at least with a flag.

~0010847

karajorma (administrator)

Is anyone going to take a look to see if the AI Profile options fix this?

~0010875

Wanderer (developer)

After checking code (r5207) it seems like when mission starts game first unprotects the target ship (aigoals 3351) and then immediately reprotects it (aigoals 2703) as the argo is not a huge ship. And then game repeats the process for all three attackers.

Though as the AI didn't really care of the OF_PROTECTED flag when using primaries they kept shooting at the target ship - it only affected secondaries. I have no idea how such issue should be fixed though.

Also there seems to be rather odd logic in the actual secondary weapon selection criteria (aicode 8649) as the puncture secondaries are preferred only if the target in question is not a big or huge ship, not a bomber and the target subsystem has more than 100 hitpoints. Essentially meaning that they are never preferred.

~0011700

karajorma (administrator)

Hmmmm. I think I've stumbled upon a possible cause of this issue while looking for something else. aicode.cpp line 8811 has this if statement surrounding what looks like the secondary weapon firing code

// Don't fire secondaries at a protected ship.
if (!(En_objp->flags & OF_PROTECTED)) {

I probably won't have a chance to look at this for a couple of days so if anyone else wants to.

~0011701

chief1983 (administrator)

Right, because disable/disarm actually protects too doesn't it. Isn't the disable/protect thing what WCS has been trying to get changed too?

~0011702

karajorma (administrator)

Last edited: 2010-02-19 10:47

Yep, as soon as you choose to disarm a non SIF_HUGE ship it will get protected. WCS already have this changed but it's with an ugly hack which basically turns off that behaviour for every single ship in the mission.

From a quick glance primaries seem to go through aicode.cpp 5769 which checks if an enemy ship is protected and then uses only puncture weapons if the enemies hull is low. If secondary weapons lack a counterpart then it's pretty much explained why they aren't working.

~0012451

The_E (administrator)

Since we have an objecttypes flag to handle this now, I'm marking this as fixed.
+Notes

-Issue History
Date Modified Username Field Change
2006-12-13 13:17 Axem New Issue
2006-12-13 13:17 Axem File Added: _stilettotest.fs2
2006-12-22 01:10 Goober5000 Note Added: 0007316
2006-12-22 09:32 Axem Note Added: 0007317
2006-12-22 15:02 Goober5000 Note Added: 0007318
2006-12-22 16:33 CP5670 Note Added: 0007319
2008-03-21 18:54 taylor Note Added: 0009003
2008-04-04 15:23 taylor Status new => assigned
2008-04-04 15:23 taylor Assigned To => taylor
2008-07-17 12:36 taylor Note Added: 0009471
2008-07-17 12:36 taylor Assigned To taylor =>
2008-07-17 12:36 taylor Status assigned => new
2008-08-06 16:09 karajorma Status new => assigned
2008-08-06 16:09 karajorma Assigned To => karajorma
2008-12-06 18:27 chief1983 Note Added: 0010376
2008-12-06 19:11 Goober5000 Note Added: 0010378
2009-01-19 23:49 Goober5000 Note Added: 0010567
2009-01-20 00:58 chief1983 Note Added: 0010580
2009-04-25 12:26 karajorma Note Added: 0010847
2009-05-09 10:07 Wanderer Note Added: 0010875
2010-02-19 07:12 karajorma Note Added: 0011700
2010-02-19 10:35 chief1983 Note Added: 0011701
2010-02-19 10:46 karajorma Note Added: 0011702
2010-02-19 10:47 karajorma Note Edited: 0011702
2010-11-12 07:23 The_E Note Added: 0012451
2010-11-12 07:23 The_E Status assigned => resolved
2010-11-12 07:23 The_E Fixed in Version => 3.6.12
2010-11-12 07:23 The_E Resolution open => fixed
+Issue History