How to make custom .aip files work

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
Post Reply
User avatar
Bogdan
Posts: 74
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine

How to make custom .aip files work

Post by Bogdan »

Hi everyone! I've already discuss this theme in other topic, but I think it's something other people could be interested in.
I know there's a way to use custom .aip in scenario with command

Code: Select all

AI_ChangePersonality(playerID, "bully.aip");
However, I can't find the way to make this work as there's no obvious place for custom aips. I tried to put .aip file in different Documents\Empire Earth II folders and also in Empire Earth 2 Gold Edition\aips, but it never worked; the scenario continues to use Skirmish_Default.aip every time.

Nevertheless, there's a scenario in Unofficial Patch, which uses (or tries to) custom aips. It's "Survival Egypt" in EE2X. I've found this in its code:

Code: Select all

AI_ChangePersonality(4, "/EE2X/run/AIPS_EE2X/Skirmish_Default.aip");
AI_ChangePersonality(4, "/EE2X/run/AIPS_EE2X/Skirmish_Hardest.aip");
AI_ChangePersonality(2, "/EE2X/run/AIPS_EE2X/Skirmish_Default.aip");
AI_ChangePersonality(2, "/EE2X/run/AIPS_EE2X/Skirmish_Hardest.aip");
So I put .aip file in Empire Earth 2 Gold Edition\aips and tried

Code: Select all

AI_ChangePersonality(5, "/EE2/run/AIPS/myfile.aip");
but, unfortunately, no result. May be this command is only suitable for EE2X or may be AI_ChangePersonality doesn't work at all. May be there's other way to control AI behaviour? Does anyone know?


User avatar
Dr.MonaLisa
High Representative
Posts: 7670
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: How to make custom .aip files work

Post by Dr.MonaLisa »

Have you tried to use:
AI_ChangePersonality(4, "Skirmish_Default.aip");

(without the "/EE2X/run/AIPS_EE2X/" path)?

I never used custom aips so can't help much. Hopefully someone else would know it.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

User avatar
Bogdan
Posts: 74
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine

Re: How to make custom .aip files work

Post by Bogdan »

Nope.. Because scenario is already using Skirmish_Default, by default. I’ve used my own aip’s name, of course, but it didn’t work.

User avatar
calsch03
Posts: 27
Joined: 04 Dec 2015, 11:24
Location: The Netherlands
Contact:

Re: How to make custom .aip files work

Post by calsch03 »

Hello Bogdan,

I've messed around with aip's in the past. The aip's have to be placed in the Empire Earth 2 Gold Edition\aips or for the expansion AIPS_EE2X folders.
Aip files are a bit tricky to get to work and to be honest, they don't work well for survival Egypt as the AI don't build most buildings.

I've get it to work in a hobby project. I've modified the aip for the three kingdoms scenario so the ai would use builders instead of civilians.
In the script the aip must be called like this:
Screenshot_1.png
Screenshot_1.png (8.8 KiB) Viewed 37 times
If you use aip's, it's very important that you use the following setting in the map editor. The AI script has to be set on None, otherwise your aip doesn't work.
Some aip's require a specific civilisation like mine, but that's not for every aip script.
Screenshot_2.png
Screenshot_2.png (50.83 KiB) Viewed 37 times
I've also been working on a campaign. For that I've used the Skirmish aip. I've combined it with the civilization aip and some aggressive military aip's, this works a lot better than just the skirmish aip and it feels a lot more like the skirmish AI. You can try and add the Hardest.aip to this if you want, but for me this wasn't necessary as the AI was already good enough for the first mission. ;)
Screenshot_3.png
Screenshot_3.png (5.81 KiB) Viewed 37 times
Feel free to ask if you have any more questions.

User avatar
Bogdan
Posts: 74
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine

Re: How to make custom .aip files work

Post by Bogdan »

Thank you for your help! The answer was really just lying on the surface. Now, after I set map editor right, I can finally use my .aip file.

Unfortunately, there's now an error message every time AI capturing a territory:
Unhandled Exception.png
Unhandled Exception.png (6.44 KiB) Viewed 27 times
Mona, may be you know what it's all about?

User avatar
Dr.MonaLisa
High Representative
Posts: 7670
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: How to make custom .aip files work

Post by Dr.MonaLisa »

No, it's somewhere near:
nonononono.PNG
nonononono.PNG (97.15 KiB) Viewed 22 times
There are AI related functions close this part of the code, but it's never possible to detect what's wrong by the EIP address.

You could load a default AI script and see if still crashes. If it doesn't, then there must be an error in the new file you created. So then, long time need to be spent to detect what exactly causes it. This is how EE2 scripting works :/

Btw. thanks calsch03, for detailed guide!
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

User avatar
Bogdan
Posts: 74
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine

Re: How to make custom .aip files work

Post by Bogdan »

Default .aips work fine. Ok, thank you, I’ll try to make .aip file with the minimum changes compared to the default one.

User avatar
Bogdan
Posts: 74
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine

Re: How to make custom .aip files work

Post by Bogdan »

Hm, looks like the game is still crashes with an .aip file with no changes compared to the Skirmish_Default one.
So I think there's no way to load custom .aip with no issues, default files only

Post Reply

Return to “EE2 files, modding, maps, testing, etc.”