Age of Empires II: Definitive Edition

Age of Empires II: Definitive Edition

View Stats:
This topic has been locked
Vanceslas Nov 25, 2020 @ 8:33am
Ai script error
Whenever I want to play against ai I have this error.
Ai isnt attacking. Even in extreme difficulty. It creates army however never attacks.


Error
Player 2
File:Promisory/Buildings.per2
Line:2851
ERR2005: Invalid identifier
ERR:2004 Invalid identifier
Missing identifier: Rushprep-cost

I found that line but i have no idea what to do?!

Verified files nothing changed.
No mod.
CD and HD AIs arent giving any error.

Thanks.
Originally posted by Enigma:
It would seem the script in the file 'buildings.per' at 'Steam\steamapps\common\AoE2DE\resources\_common\ai\Promisory' calls for constants which aren't defined:

- 'rushprep-cost'
- 'fiprep-cost'
- 'flushprep-cost'
- 'boomprep-cost'

You can replace all those entries with numbers.
Based on 'customConstants.per' I used 385, 435, 460 and 285 respectively.
A text editor with the 'replace all' functionality is prefered here.

It seems it is a specific amount of wood at which the ai decides to go for a certain strategy like castle-rush or booming.

You will still get an error after this about the 'watch-tower-building'.
Replacing all those entries with 'watch-tower' will fix it.

The game should start without an error message and the AI will start its normal routine: build 2 houses, gather sheep, etc.

I haven't tested a full game though, the watch tower can become a problem later on.

ps.
- Tested integrity of the install -> did nothing.
- Deleted buildings.per, const.per and CustomConstants.per, then ran integrity check. -> did nothing.
I tried to put the fixed file in a mod but that doesn't work somehow.
< >
Showing 1-8 of 8 comments
FTWO Nov 25, 2020 @ 8:40am 
Is this in a Custom Scenario or Skirmish we're talking here?
Vanceslas Nov 25, 2020 @ 8:48am 
Both.
I tried many combinations.
I hosted online game with ai opponent error
My friend hosted I joined him no error.
Tried custom scenarios error
Skirmish error
mountainllama17 Nov 25, 2020 @ 8:35pm 
I'm getting the exact same error, for all types of Skirmish I've tried (standard maps, custom scenarios), various settings and difficulty levels.
Land Navy Dec 3, 2020 @ 7:35pm 
This is also occurring for me as well. Doesn't matter what map I choose, difficulty level, whether it's a customer scenario or normal, the mode, population, speed, or any other factor. If I try to play any type of game with AI in it, the error pops up and the AI does nothing. The issue began occurring after the most recent update and the hotfix did not fix it. At this point, I can not play the game outside of online with humans or campaigns. Considering my favorite thing to do in AoE is to make custom maps and enjoy large-scale battles on them in a free for all with AI, it has really dampened my enthusiasm for the game...

I have tried verifying file integrity, uninstalled and reinstalled, and ensured all of my software and hardware components had their most up to date drivers and patches. I am not really sure what else to specifically try, but I hope this is at least something that is being looked at.

My system is a Windows 10 Version 20h2
I7 7700k
GTX 1080
16GB ram
Samsung 960 SSD

If I need to go into more detail about my system specs, drivers, and other info I can provide a log if necessary.
A developer of this app has indicated that this post answers the original topic.
Enigma Dec 6, 2020 @ 5:39pm 
It would seem the script in the file 'buildings.per' at 'Steam\steamapps\common\AoE2DE\resources\_common\ai\Promisory' calls for constants which aren't defined:

- 'rushprep-cost'
- 'fiprep-cost'
- 'flushprep-cost'
- 'boomprep-cost'

You can replace all those entries with numbers.
Based on 'customConstants.per' I used 385, 435, 460 and 285 respectively.
A text editor with the 'replace all' functionality is prefered here.

It seems it is a specific amount of wood at which the ai decides to go for a certain strategy like castle-rush or booming.

You will still get an error after this about the 'watch-tower-building'.
Replacing all those entries with 'watch-tower' will fix it.

The game should start without an error message and the AI will start its normal routine: build 2 houses, gather sheep, etc.

I haven't tested a full game though, the watch tower can become a problem later on.

ps.
- Tested integrity of the install -> did nothing.
- Deleted buildings.per, const.per and CustomConstants.per, then ran integrity check. -> did nothing.
I tried to put the fixed file in a mod but that doesn't work somehow.
Last edited by Enigma; Dec 6, 2020 @ 5:40pm
General_Rückzug Dec 9, 2020 @ 7:42am 
I have the same error, after the last update the AI no longer works, it doesn't even build anything.

Bayner Dec 20, 2020 @ 3:44am 
Originally posted by Enigma:
It would seem the script in the file 'buildings.per' at 'Steam\steamapps\common\AoE2DE\resources\_common\ai\Promisory' calls for constants which aren't defined:

- 'rushprep-cost'
- 'fiprep-cost'
- 'flushprep-cost'
- 'boomprep-cost'

You can replace all those entries with numbers.
Based on 'customConstants.per' I used 385, 435, 460 and 285 respectively.
A text editor with the 'replace all' functionality is prefered here.

It seems it is a specific amount of wood at which the ai decides to go for a certain strategy like castle-rush or booming.

You will still get an error after this about the 'watch-tower-building'.
Replacing all those entries with 'watch-tower' will fix it.

The game should start without an error message and the AI will start its normal routine: build 2 houses, gather sheep, etc.

I haven't tested a full game though, the watch tower can become a problem later on.

ps.
- Tested integrity of the install -> did nothing.
- Deleted buildings.per, const.per and CustomConstants.per, then ran integrity check. -> did nothing.
I tried to put the fixed file in a mod but that doesn't work somehow.


This worked for me.
Thanks for posting!
Land Navy Dec 20, 2020 @ 6:19pm 
Originally posted by Enigma:
It would seem the script in the file 'buildings.per' at 'Steam\steamapps\common\AoE2DE\resources\_common\ai\Promisory' calls for constants which aren't defined:

- 'rushprep-cost'
- 'fiprep-cost'
- 'flushprep-cost'
- 'boomprep-cost'

You can replace all those entries with numbers.
Based on 'customConstants.per' I used 385, 435, 460 and 285 respectively.
A text editor with the 'replace all' functionality is prefered here.

It seems it is a specific amount of wood at which the ai decides to go for a certain strategy like castle-rush or booming.

You will still get an error after this about the 'watch-tower-building'.
Replacing all those entries with 'watch-tower' will fix it.

The game should start without an error message and the AI will start its normal routine: build 2 houses, gather sheep, etc.

I haven't tested a full game though, the watch tower can become a problem later on.

ps.
- Tested integrity of the install -> did nothing.
- Deleted buildings.per, const.per and CustomConstants.per, then ran integrity check. -> did nothing.
I tried to put the fixed file in a mod but that doesn't work somehow.


I gave this a try and unfortunately it started throwing a different error that caused the AI to disappear completely from the map.

I did find the comment about the AI following a set routine and building two houses intriguing, So, I ended up modifying one of my custom maps and gave every player two houses to start the game with. This seems to have solved the error entirely but it does change the dynamic of the game a bit. Especially if you were trying to practice on ladder maps.

As a temporary solution you can modify existing scenario's and just give each player two houses. Obviously not a perfect fix, but if Enigma's method doesn't resolve it for you, this method will at least give you the ability to play.
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Nov 25, 2020 @ 8:33am
Posts: 8