Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: origin on May 10, 2010, 09:03:51 am

Title: AI not continuing to attack
Post by: origin on May 10, 2010, 09:03:51 am
In some missions I made, when I tell a ship to engage the enemy it will attack an enemy ship for a short while and then just fly around aimlessly, if I again say engage he will attack but only for a short while or until his target is destroyed and then just putters around until he gets killed.

Any ideas?
Title: Re: AI not continuing to attack
Post by: Dilmah G on May 10, 2010, 09:06:02 am
What type of ship are we talking here? Is it cruiser class or over?
Title: Re: AI not continuing to attack
Post by: Sushi on May 10, 2010, 09:16:52 am
What goals do you give the ship in FRED?
Title: Re: AI not continuing to attack
Post by: origin on May 10, 2010, 09:31:50 am
This is a 2 ship patrol, they are both fighters in the same wing.  The wing consists of the player ship and a wingman.  The intial orders are either nothing or attack all ships the outcome is the same for either order.

The ships fly to a way point and then encounter the enemy.  At this point the scenario that I discussed in the first post plays out.
Title: Re: AI not continuing to attack
Post by: General Battuta on May 10, 2010, 09:34:21 am
Nobody's issuing any disarm or disable orders, are they?
Title: Re: AI not continuing to attack
Post by: origin on May 10, 2010, 09:45:26 am
Nobody's issuing any disarm or disable orders, are they?

Nope
Title: Re: AI not continuing to attack
Post by: origin on May 10, 2010, 09:54:38 am
I guess it was me.  I was trying to use a new ai class by putting a new ai in an ai.tbl in my data folder but it is apparently screwing up the ai.  I switched the ai from mine to a captain and it worked fine.  Hmmm wonder what I did wrong?
Title: Re: AI not continuing to attack
Post by: The E on May 10, 2010, 10:11:21 am
Without seeing the tbls you used, it's kinda hard to tell.
Title: Re: AI not continuing to attack
Post by: origin on May 10, 2010, 10:26:41 am
Here is the table.  It is loaded in the mod/data/tables.  I just increased the evasion because I really don't want them to die.

;   ai.tbl

; This file specifies AI class behavior for each skill level.
; We have five skill levels: Trainee, Rookie, Hotshot, Ace, Insane.
; (We should come up with better names.)
; We have a virtually unlimited number of AI classes.  If you add a new AI class and
; you get an execution error about too many classes, increase MAX_AI_CLASSES, defined
; in ai.h.  On Jan. 30, 1997, MAX_AI_CLASSES = 50.

#AI Classes

;$accuracy:      0..100   how accurately this ship fires its lasers
;$evasion:      0..100   how effective this ship is at evading
;$courage:      0..100   how likely to chance danger to accomplish goal
;$patience:      0..100   how willing to wait for advantage before pursuing goal

;            trainee   rookie   hotshot   ace      insane

$Name:         Coward
$accuracy:      0.8   0.85   0.9   0.95   1.0
$evasion:        40,      50,      60,      80,      100
$courage:      50,      50,      50,      50,      50
$patience:      40,      50,      60,      80,      100

$Name:         None
$accuracy:      0,      0,      0,      0,      0
$evasion:      0,      0,      0,      0,      0
$courage:      0,      0,      0,      0,      0
$patience:      0,      0,      0,      0,      0

$Name:         Lieutenant
$accuracy:      0.2      0.2      0.3      0.4      0.4
$evasion:      0,      10,      20,      30,      40
$courage:      0,      10,      20,      30,      40
$patience:      0,      10,      20,      30,      40

$Name:         Captain
$accuracy:      0.3      0.3      0.4      0.5      0.5
$evasion:      0,      10,      20,      30,      40
$courage:      10,      20,      30,      40,      50
$patience:      10,      20,      30,      40,      50

$Name:         Major
$accuracy:      0.4      0.4      0.5      0.6      0.6
$evasion:      10,      20,      30,      40,      50
$courage:      20,      30,      40,      50,      60
$patience:      20,      30,      40,      50,      60

$Name:         Colonel
$accuracy:      0.5      0.5      0.6      0.7      0.7
$evasion:      30,      40,      50,      70,      90
$courage:      30,      40,      50,      70,      90
$patience:      30,      40,      50,      70,      90

$Name:         General
$accuracy:      0.6      0.6      0.7      0.8      1.0
$evasion:      40,      50,      60,      80,      100
$courage:      40,      50,      60,      80,      100
$patience:      40,      50,      60,      80,      100

$Name:         ConfedA
$accuracy:      0.3      0.3      0.4      0.5      0.5
$evasion:      20,      30,      40,      50      60
$courage:      10,      20,      30,      40,      50
$patience:      10,      20,      30,      40,      50

$Name:         ConfedB
$accuracy:      0.5      0.5      0.6      0.7      0.7
$evasion:      40,      50,      60,      80,      100
$courage:      30,      40,      50,      70,      90
$patience:      30,      40,      50,      70,      90

#End
Title: Re: AI not continuing to attack
Post by: Sushi on May 10, 2010, 11:41:37 am
Are you using any other mods? Messing with object types, for example, can have all sorts of AI repercussions.
Title: Re: AI not continuing to attack
Post by: origin on May 10, 2010, 11:54:27 am
Are you using any other mods? Messing with object types, for example, can have all sorts of AI repercussions.

Not sure what you mean by messing with object types.  I am using my own ships, textures and backgrounds.  All the other modifications besides the ai.tbl are done with .tbm tables.
Title: Re: AI not continuing to attack
Post by: Dragon on May 10, 2010, 12:02:00 pm
Try reverting the evasion to what it was originally.
There are better ways to prevent wingmen from dying and too high evasion may be causing awkward behavior.