• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fixed Missing state when using IMPROVE_FIGHT_AI

Tingyun

Corsair
Storm Modder
Using #define IMPROVE_FIGHT_AI to fight bandits in a dungeon with 3 party members (barbados spreighttown dungeon) I seem to constantly be getting an error with this line:

if(ally.chr_ai.tmpl.state != "support")

Here is the error log I think pointing to this line:

RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1251
 
Thanks for mentioning, should be an easy fix. Will post it tomorrow probably.
 
Place in:
PROGRAM\Loc_ai\templates

and please let me know if this fixes things :).
 

Attachments

  • LAi_fight.c
    36.3 KB · Views: 143
Hi Levis!

I think the new file is very good! Haven't got the same error I think.

Should I keep posting future issues with the fight AI here?

I was testing a system I made for giving armor to the AI by running through dungeons, and the enemy kept sheathing their sword even with quite a bit of HP left (I think when crowded up in a corridor), and giving this error:

no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
missed attribute: state
RUNTIME ERROR - file: Loc_ai\templates\LAi_fight.c; line: 1261
no rAP data
 
@Tingyun did you change anything in the file I posted? because line 1261 for me is a line which only contains comments.
 
Didn't change anything at all, though it is possible when I installed the new content fixes I accidentally overwrote the latest fix by you posted above with an earlier version. I will check into this as soon as at my computer later today, and figure out whether I still have the fixed file posted in this thread or overwrote it with another accidentially. :)

Will let you know later today, thanks Levis :)
 
@Levis Yep, it was the baker rifle LA fight code for the new rifle. I should have been more careful merging it. I had lost your earlier fix, so this must have been the same issue you already solved.

Here is a merged LA Fight with both baker rifle and Levis AI fix if anyone wants it.
 

Attachments

  • LAi_fight.c
    36.5 KB · Views: 155
Back
Top