View Issue Details

IDProjectCategoryView StatusLast Update
0001172FSSCPgameplaypublic2010-11-12 12:23
ReporterAxem Assigned Tokarajorma  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.9 
Fixed 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.

Activities

2006-12-13 18:17

 

_stilettotest.fs2 (6,193 bytes)

Goober5000

2006-12-22 06:10

administrator   ~0007316

Is it like this in retail?

Axem

2006-12-22 14:32

reporter   ~0007317

Yes it is. Same behavior.

Goober5000

2006-12-22 20:02

administrator   ~0007318

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

CP5670

2006-12-22 21:33

reporter   ~0007319

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.

taylor

2008-03-21 22:54

administrator   ~0009003

* 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.

taylor

2008-07-17 16:36

administrator   ~0009471

Not going to work on this.

chief1983

2008-12-06 23:27

administrator   ~0010376

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.

Goober5000

2008-12-07 00:11

administrator   ~0010378

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

Goober5000

2009-01-20 04:49

administrator   ~0010567

*bump*

Any news, or shall I close this?

chief1983

2009-01-20 05:58

administrator   ~0010580

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.

karajorma

2009-04-25 16:26

administrator   ~0010847

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

Wanderer

2009-05-09 14:07

developer   ~0010875

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.

karajorma

2010-02-19 12:12

administrator   ~0011700

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.

chief1983

2010-02-19 15:35

administrator   ~0011701

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?

karajorma

2010-02-19 15:46

administrator   ~0011702

Last edited: 2010-02-19 15: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.

The_E

2010-11-12 12:23

administrator   ~0012451

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

Issue History

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