Author Topic: AI fires no missles?  (Read 5606 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
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.

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Mantised. Hope I did it right.

 

Offline Sushi

  • Art Critic
  • 211
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:
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
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.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
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.

 

Offline Sushi

  • Art Critic
  • 211
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
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline Sushi

  • Art Critic
  • 211
Found the problem: it was a subtle type-casting error introduced when I was doing some AI updates.

The code before:

Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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.

  

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Uh... good! *hands Sushi a Kelp-flavored Cookie*
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...