AI Script Error after 3/14/2024 Update

Launching a Single Player Skirmish game against two bots displays this error:

AI Script Error
Player 2
File: elite wonder rush.per2
Line 2486: ERR2005: Invalid Identifier

The error message can be dismissed by clicking “OK”

The loads and starts, however, the bots are lobotomized. They do nothing but pick berries or walk the same aimless route. They do not build or reproduce and never progress past the Dark Age.

Game build: Version 101.102.42346.0 (#107882) 13720908
Platform: Steam Version 1709846872
Operating System: Windows 10

Hi @CplPunishment
The team is aware of this issue, thank you :slight_smile:

2 Likes

to quote my post on steam:

edit: I did a quick check/test with all AI files. Only HD and CD break.

According to the HD AI, it’s this line:

(set-strategic-number sn-preferred-trade-distance trade-distance)

According to the CD AI, it’s this:

(building-type-count-total mining-camp < mining-count)

Just thought I’d mention it.

edit: I think I see the issue. If you use the new map sizes, it does not get defined.

Temp Solution: So for now, if you use the new map sizes, stick with the normal map sizes for those AI files.

2 Likes

Hi everyone, I´m having the same problem.

Does anyone know if there was any developments regarding fixing this issue?

Thanks!!

the error I hit was when launching a new skirmish against the AI (CD version) on a ludicrous sized map.

AI Script Error
Player 2-8
File: elite wonder rush.per2
Line 2486: ERR2005: Invalid Identifier

I fixed this by modifying the lines in two AI files (make sure you create a copy of those 2 files so you have backup copy, before modifying them), that the error mentions each time a new game gets launched as you perform the below procedure.

at first the error mentioned line 2486. once i’d modified that line in the file, a subsequent line in that same file errored. all of them in “elite wonder rush.per2” located in “C:\Program Files (x86)\Steam\steamapps\common\AoE2DE\resources_common\drs\gamedata_x2”

modifying them all one by one, all of those error lines seemed to have the same thing in common, they were (something-blah < something-wrong). i suspect the something-wrong parameter is not defined properly elsewhere amongst the collection of various AI files, and I have no clue how or where to address that.

instead, i modified each line mentioned in the error, from…
(something-blah < something-wrong)
I changed them to…
(something-blah <= 0)
ie: simply replace the something-wrong parameter with “= 0” after the “<”, and delete the something-wrong parameter)

saved the file, then i re-ran a new skirmish game, a new line number was erroring at a later line number in the file. repeated the same adjustment to that newly mentioned error line. it eventually mentions a second AI file called “elite ai petersen rules.per2” located in “C:\Program Files (x86)\Steam\steamapps\common\AoE2DE\resources_common\drs\gamedata_x2”

so i did the same thing to the error lines in that second AI file as well. I think there were 6-8 lines in total that I had to modify all up in two AI files, to get this working. I’ve only watched AI villagers for a few minutes, and they seem to be acting normally now. thought I’d share this around the community (in case it actually works for a full length skirmish game. about to try one now.

update: just finished a full skirmish, AI seemed to behave normally. starting new games works fine. but if you save your skirmish, and try to load the saved game, it will crash.