You must be logged in to post messages.
Please login or register

Modding and Scripting
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.7 replies
Age of Mythology Heaven » Forums » Modding and Scripting » admiral X AI....crash..
Topic Subject:admiral X AI....crash..
posted 30 April 2006 10:37 AM EDT (US)         
hi.. i downloaded admiral X AI from here:

and when i play with 2 or more (AI) then the game just crashes an i get some memory error.
the sound is still there but the game itself freezes and i have to restart the game or PC.

what do you suggest i do?
and is the ai project outdated or dead?


I could really use some help here guys :\

..:: Give a guy a gun, he thinks he's Superman. Give him two and he thinks he's God ::..

[This message has been edited by Sprocket (edited 05-01-2006 @ 07:46 AM).]

posted 04 May 2006 12:15 PM EDT (US)     1 / 7       
I have stopped working on the Admiral AI's a long time ago.
I am aware of the crash issue but honestly I am as clueless as you about it. If I remember correctly, I did not see crashes in "small" games with like 2 admiral players though.
Believe me, I spent days, if not weeks, trying to locate the reason for the crashes. I am almost sure that it's a memory allocation issue. But since you cannot allocate memory directly from AI script level, it's a problem somewhere deeper in AoM.
Sorry I could not help you with some practical tips, I wish I knew the reason for the crashes myself

[This message has been edited by kalus (edited 05-05-2006 @ 05:59 AM).]

posted 24 November 2006 03:42 PM EDT (US)     2 / 7       
Hi guys!

Since I'm making a new mod for AoM:TT with a modified version of Georg Kalus' Admiral AI, I found that he added some code (a sky passage transport plan) to Oranos' sky passages which leads to a memory allocation error in the file admiralbasics.xs in verifyVinlandsagaBase.
If you open the file admiral.xs you will find the following code at the end of the buildSkyPassages rule:

int transportPUID=kbTechTreeGetUnitIDTypeByFunctionIndex(cUnitFu nctionWaterTransport, 0);
int skyPassagesTransport=createTransportPlan("Sky Passage Trans",
kbAreaGetIDByPosition(kbBaseGetLocation(cMyID, kbBaseGetMain(cMyID))),
false, transportPUID, 80, kbBaseGetMain(cMyID));
if ( skyPassagesTransport >= 0 )
aiPlanAddUnitType(skyPassagesTransport, kbTechTreeGetUnitIDTypeByFunctionIndex(cUnitFunctionBuilder, 0), 1, 1, 1);
aiPlanSetVariableBool(skyPassagesTransport, cTransportPlanMaximizeXportMovement, 0, true);
aiPlanSetRequiresAllNeedUnits(skyPassagesTransport, true);
aiPlanSetActive(skyPassagesTransport, true);

If you either remove that code or comment it out by putting
/* before the code
*/ after the code
you shouldn't experience any more crashes, at least not with Oranos as an AI opponent.

I actually only had problems with Oranos as an AI opponent, the game runs absolutely stable even with 8 AI players on my PCs. If you have crashes with other AI opponents as well, I would need more info about your system configuration and a crash log file.

[This message has been edited by Loki_GdD (edited 11-24-2006 @ 06:56 PM).]

posted 26 November 2006 08:39 PM EDT (US)     3 / 7       
Just out of curiosity, what exactly leads you to the assumption that exactly this piece of code is the source of all evil?
posted 27 November 2006 01:48 PM EDT (US)     4 / 7       
Hi Georg!

I don't know if that piece of code is the source of all evil but
a) I only got memory allocation errors with Oranos AI players
b) the RTS3banglog.txt hinted at verifyVinlandsagaBase which is called in AdmiralAI at the end of the buildSkyPassages rule
c) that piece of code is not in the buildSkyPassages rule of the default AI
d) after removing/commenting out that piece of code I didn't experience any more crashes

I actually don't think that the code itself is the problem, but since it's called at the end of the already lengthy buildSkyPassages rule which will test the target area groups up to 18(!) times with a "for loop", the verifyVinlandsagaBase seems to lead to the memory allocation problems as it loops up to 3 times through the border areas.

posted 28 November 2006 10:24 AM EDT (US)     5 / 7       
Good job, Loki Sounds reasonable.
I thought that I have seen Admiral crashing with non-Orananos players too, but maybe the god of my Admiral players was just a piece of evidence I overlooked

[This message has been edited by kalus (edited 11-28-2006 @ 10:25 AM).]

posted 28 November 2006 02:22 PM EDT (US)     6 / 7       
Hi Georg!

Up to now I've never experienced any crashes with the admiral AI (or my modded version of it) without Oranos AI players.
If other people should have crashes with other AI players as well, I'm willing to search the cause of those crashes, but as long as there are no other (reproducible) reports of crashes, I consider the code mentioned before to be the main reason for the crashes.

posted 19 January 2007 04:13 PM EDT (US)     7 / 7       
Unfortunately, I was wrong. Atlantean AI Players cause crashes on transport maps. Since I rarely play transport maps, I didn't realize that. I've tried to find the cause of these crashes but I couldn't find the problem. It's strange because it only happens wit Atlantean AI players. Then I checked the original AoM:TT AI: If you have more than 2 Atlantean AIs even the original one will crash. I guess there's something wrong in the hardcoded part of the AI. I can only recommend not using Atlantean AI players on water maps.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Mythology Heaven | HeavenGames