AOE1 to AOE2 AI Converter

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
Post Reply
User avatar
MrElephant
Swami
Posts: 127
Joined: Sun Dec 20, 2020 6:28 am

AOE1 to AOE2 AI Converter

Post by MrElephant »

Hello All,

For the past several weeks, a friend (WWMB) and myself have been working on a new tool. As you may have guessed by the title- it is a tool that converts AOE1 scripts to AOE2 scripts. There are so many good scripts for AOE1. It was sad seeing them sit in the corner not being used. No more! With this utility- you can convert the aoe1 per and ai files into the new aoe2 per files.

How to use:

1. Choose your version- either AoE2 DE (standard) or AoE2 RoR (Return of Rome)- note this doesnt mean Rise of Rome..
2. Click the open button
3. Navigate to your AOE1 script directory. Note- please make a backup of your script before you start playing around with the tool. Select your per, or your ai file (you can only convert one file at a time).
4. You should see your data populate on the left under the AOE1 name.
5. Now you have to select your options under the checkbox included under the options button. This is how you want to convert your file. Every checkbox except "Change Important SNs" and "Add Resource SNs" relate only to ai files. The two checkboxes previously mentioned only relate to .per files. This is important. Don't choose the options that relate to the opposite file type.
6. After you are finished choosing your checkbox options, hit either the "Convert AI" or "Convert Per" depending on what file type you selected at the beginning. You should see data populate in the right box under AOE 2.
7. Save your file using the save icon, or just copy the contents of the second box into notepad (notepad++ whatever). Make sure to save it as a per file!
8. Copy your original ai file and new per file into your age of empires directory-
For DE it is- C:\Program Files (x86)\Steam\steamapps\common\AoE2DE\resources\_common\ai for standard DE
For Return of Rome- C:\Program Files (x86)\Steam\steamapps\common\AoE2DE\modes\Pompeii\resources\_common\ai

Return of Rome Only:

9. Convert your AI file first, and include that data at the top of your newly created per file. Convert your aoe1 per data, and paste it below the data you already converted in the newly created file.

Options:
1. Create 5 rams/trebs- this is obvious. It creates 5 rams/trebs. These units weren't available in aoe1. Note- this is only for standard DE.
2. Build farms in dark- In aoe 1 you couldnt create farms until after the market was built in feudal. Click this option if you want this optional support. Note- this is only for standard DE.
3. A/B Camps and Farms. This is the auto build camps and farms option- which was an option in the per files of aoe1.
4. Auto Build Houses. Another pretty clear option- this will allow the ai to auto build houses if the .ai file didnt have houses in its build order in aoe1
5. Delete Scout on Start. This will be controversial. AOE1 didnt have scouts. By selecting this option, you'll delete the scout at the beginning of the game. Note- this does not delete an eagle scout. Note- this is only for standard DE.
6. Basic Resign Rule- The name is obvious. The rule was taken really from the cpsb documentation with a few modifications.
7. Scale unit count- This multiplies the ai unit and building count by whatever the user sets the value as per age. This is important because the ai will have a greater opportunity to keep up with the 200 population ais of AOE2. A lot of AOE1 older ais only supported 50 population.
8. Change Important SNs. These are the SNs Leif stated should be changed on his AI wiki. It is highly recommended this is used, but doesnt have to be the case.
9. Add Resource SNs. AIs and Per files didnt necessarily have the gold, food, wood, and stone SNs. These were sometimes controlled by the engine in AOE1. If you see your ai doesnt have the food, wood, gold, and stone SNs- please select this option.

Major Update 5June2023- Large and Extra large were replaced with the scale function. Temporary units are now accounted for. And now the tool allows for Return of Rome! (old version below)

New Update 13Jul2023- Software includes an AI file generator and PER file generator. There are also a couple new options for loom and trade cart to be researched- if you are choosing to convert to standard DE. An additional option regarding the hoplite line is included- please read the instructions for additional details.

Update 17Nov2023- Armored Elephant Line update plus mule carts are included. (old version below)

And that about covers it. In theory, you could make a completely new ai using this tool, and convert it to play AOE2. Please use Martin Strum's tool for the per files of AOE1. Any .ai file should be able to be converted. If a tool is needed, I highly recommend Stoyan Ratchev's aoe1 tool. Links can be provided upon request. Edit: Please find the aoe1 tools here http://aoe.heavengames.com/siege/AIandP ... ndex.shtml

Update 8Dec2023- Walls updated with strategic-number 304 (SNgatetypeforwall) - This is needed for gates now in Return of Rome
Link in this post- download/file.php?id=6933

Update 22Dec2023
1. If the spearman button is clicked in standard DE conversion- academies will be
converted to barracks instead of castles.
2. The issue of spearmen to elite teutonic knight instead of pikemen/halbs has been corrected
3. Fixed an issue with mills in standard DE conversion
4. Included opening files and printing inside the per/ai maker parts of the application. No need to copy paste data now.
5. Defconsts listing is now included. You do not need to copy and paste from an exterior file list anymore for Return of Rome if converting.
6. A fresh new background has been included to make the tool look more professional!
7. Tutorials have been added under the AI and PER file generators plus the tech tree and attributes have been added
8. Tech trees and Civ attributes from original posters from Ensemble are included with permission from CoT. This will allow users to check their build orders, and make sure everything looks accurate when building custom AIs.

This is a very cool update to the converter. Each AI will now have their own custom gathering rate closer to the original game instead of a hard-coded Default ai's gathering rate from the original game. In addition to that- the following changes were made. WWMB and I are very excited about this release of the converter, and hope to see new scripters, and old guys as well making old style ais play on the modern game. 🙂

Other Updates (21Aug2024):
Gathering rates closer to the original. Each AI is individualized in having a custom gathering plan similar to what they had in AoE1.
Missing and Prototype SNs added to the PER file generator.
Blacksmith will be added when an armor or attack upgrade is converted from AoE1 to DE. (base techs only)
Lumber-camp issue fixed for some AIs at start of game.
Added atonement when redemption is researched for AoE2 DE.
Added the Legionary unit for AIs as an option for Romans. If a non-Roman civ is chosen- the regular militia line is used.
Replaced fishing ship with the ID (13) instead for DE. If AIs were combined into one file, the engine wouldnt train ships because it was pulling the wrong ID from Return of Rome...
Palisade wall fix where the code would generate an error in line where non-retrainable walls were converted.
Teutonic-Knight was replaced with the unique-unit-line, so additional unique units could be used.

Final Update (10Oct2024):
As you all know, I have retired from the community. However, a few final thoughts were bothering me- so figured an update was needed for these small things.
For the delete scout button- I have updated to include the eagle warrior line now. I know not many of you use this button, but it was needed.
For the knight-line, the Savar upgrade has been included now as well when the lines are converted.
And that's all!

Past Final Update?! (25Oct2024)
With the Battle for Greece coming out, it became apparent I had to separate the old from the new. Included in the tool is an AoK conversion utility. You can now
convert an AOE1 ai to AOK or AOC, which will not include any userpatch commands (to help mining camp placement), or units for DE.

Had a slight issue with the unique unit upgrade- which I added

This does not mean I will include anything for Battle for Greece, we will have to see

It should be noted the tool does not distinguish between AOK and AOC, so units will be exact. If you go past 50 villagers, the tool will not reduce for AOK, and the same goes for 100 and AOC.

Update 13Nov2024:

New Experimental Feature! An aoe2 to return of rome AI converter is now included. You can convert your old favorite AI to now play Return of Rome. Each file has
to be converted individually. If the file is a sub-file, please hit the "sub directory PER file" button. All files should remain organized as they were originally intended.


Note- this feature is very experimental. Your ai that you are converting may need additional assistance to become fully converted. Not all commands may be converted properly at this time! Converted AoE2 AIs should not be expected to play at the same level as on standard aoe2.
Heavy DUC ais will be harder to convert. This tool aims to help you convert AIs, and is not an excuse to be lazy.

Please remember- this tool requires Net Framework to use. The version this software is based on is .NET 6.0
This has been tested on Windows 7, 10, and 11. Many users have said they could get this software to run. However, some users have stated they have experienced issues. This could be caused by having a different version of Net Framework installed.

If you convert another individual's script, and upload it to the forum, please reference the original author. Otherwise, show us what you are making by including it on this thread! That's all for now.



LINKS INCLUDED ON THIS DIRECT POST ARE OLD VERSIONS- SEE MOST RECENT POST FOR UPDATED VERSIONS!
(Current Version 1Dec2024:download/file.php?id=7175)
Attachments
AOE1 to AOE2 AI Converter 17Nov2023v2.zip
Old Version
(179.03 KiB) Downloaded 229 times
AOE1 to AOE2 AI Converter 5Jun2023.zip
Very OLD version!!!
(148.46 KiB) Downloaded 287 times
AOE1 to AOE2 AI Converterv1 13Oct2022.zip
ANCIENT!!!!
(111.24 KiB) Downloaded 331 times
Last edited by MrElephant on Sun Dec 01, 2024 11:37 am, edited 50 times in total.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

arandi
Swami
Posts: 102
Joined: Sat Oct 02, 2021 5:56 pm

Re: AOE1 to AOE2 AI Converter

Post by arandi »

Sadly I can't try this tool since I don't have AoE1 but it sounds amazing! How about a showcase stream one day? ;) Well done guys!

User avatar
MrElephant
Swami
Posts: 127
Joined: Sun Dec 20, 2020 6:28 am

Re: AOE1 to AOE2 AI Converter

Post by MrElephant »

Sure, can certainly do that. I don't know if WWMB will join me, but we can show off the software- and maybe a couple converted ais :)

I should note you don't need aoe1 to use this tool, just your aoe1 ai/per files.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 127
Joined: Sun Dec 20, 2020 6:28 am

Re: AOE1 to AOE2 AI Converter

Post by MrElephant »

I have updated the program, and included it attached. There are several updates-

1. Basic boar hunting has been included. Important in AoE1, and provides extra food in AoE2.
2. Walls- some ais in AoE1 liked to make walls. This didnt function correctly in the first version of the tool. I've updated the program, so you should see walls being built now.
3. Better Gathering SNs- Inside the first release of the tool, a very basic SN resource gathering percentage was provided, if the user's .per file didnt include these figures. Now a very much improved version of the percentages is provided. It is based upon the prototype Default per file with a few very minor adjustments. Thanks to promi for stating how the AoE1 formula calculated the totals. This is not perfect. However, I am satisfied with the result, and a lot of time has been spent thinking about this.
4. Very minor- but some user friendly option buttons are included at the top. The "New" button, "Cut", and "Copy" button work with all parts of the program. The "Print", "Paste", and "Undo" feature only works with the AOE2 textbox. I thought these were niceties all users would like to have.

Also, have included an updated version of the examples. The AIs were much stronger with updated SN gathering percentages. Check out Egypt Ultimate for the walls example.

Side note- WWMB's AoE1 AI, Elrond, is included in the examples! Check it out!
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 127
Joined: Sun Dec 20, 2020 6:28 am

Re: AOE1 to AOE2 AI Converter

Post by MrElephant »

WWMB and I have worked on the tool- and now it has some major updates and Return of Rome support!
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 127
Joined: Sun Dec 20, 2020 6:28 am

Re: AOE1 to AOE2 AI Converter

Post by MrElephant »

Converter tool now has some additional major updates including items for walls and mule carts that were added some time ago.

Still looking for feedback whenever possible for the tool. Have received some odd feedback of users experiencing issues under windows 11, but waiting for others to test and see.

As always- looking for others to post their custom AIs they have converted to this thread :)

Edit:
Secretly placing the 23Aug2024 version in here just in case anyone wants it- but I didnt want to bump the entire thread for the 10Oct2024 post.
Attachments
AOE1 to AOE2 AI Converter 23Aug2024.zip
OLD
(6.33 MiB) Downloaded 36 times
walls fixed.png
walls fixed.png (4.68 MiB) Viewed 6680 times
AOE1 to AOE2 AI Converter 8Dec2023.zip
OLD!
(179.13 KiB) Downloaded 249 times
Last edited by MrElephant on Thu Oct 10, 2024 4:11 pm, edited 2 times in total.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 127
Joined: Sun Dec 20, 2020 6:28 am

Re: AOE1 to AOE2 AI Converter

Post by MrElephant »

Hello- this is my Christmas present to the community this year- an update to the converter. The following has been updated.

1. If the spearman button is clicked in standard DE conversion- academies will be
converted to barracks instead of castles.
2. The issue of spearmen to elite teutonic knight instead of pikemen/halbs has been corrected
3. Fixed an issue with mills in standard DE conversion
4. Included opening files and printing inside the per/ai maker parts of the application. No need to copy paste data now from an exterior application.
5. Defconsts listing is now included. You do not need to copy and paste from an exterior file list anymore for Return of Rome if converting.
6. A fresh new background has been included to make the tool look more professional!
7. Tutorials have been added under the AI and PER file generators plus the tech tree and attributes have been added
8. Tech trees and Civ attributes from original posters from Ensemble are included with permission from CoT. This will allow users to check their build orders, and make sure everything looks accurate when building custom AIs.

Other Updates (21Aug2024):
Gathering rates closer to the original. Each AI is individualized in having a custom gathering plan similar to what they had in AoE1.
Missing and Prototype SNs added to the PER file generator.
Blacksmith will be added when an armor or attack upgrade is converted from AoE1 to DE. (base techs only)
Lumber-camp issue fixed for some AIs at start of game.
Added atonement when redemption is researched for AoE2 DE.
Added the Legionary unit for AIs as an option for Romans. If a non-Roman civ is chosen- the regular militia line is used.
Replaced fishing ship with the ID (13) instead for DE. If AIs were combined into one file, the engine wouldnt train ships because it was pulling the wrong ID from Return of Rome...
Palisade wall fix where the code would generate an error in line where non-retrainable walls were converted.
Teutonic-Knight was replaced with the unique-unit-line, so additional unique units could be used.

Final Update (10Oct2024):
As you all know, I have retired from the community. However, a few final thoughts were bothering me- so figured an update was needed for these small things.
For the delete scout button- I have updated to include the eagle warrior line now. I know not many of you use this button, but it was needed.
For the knight-line, the Savar upgrade has been included now as well when the lines are converted.
And that's all!
Attachments
AOE1 to AOE2 AI Converter 10Oct2024.zip
(6.33 MiB) Downloaded 33 times
ai converter pic.png
ai converter pic.png (657.08 KiB) Viewed 6568 times
AOE1 to AOE2 AI Converter 20Dec2023.zip
Present Version
(7.21 MiB) Downloaded 272 times
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 127
Joined: Sun Dec 20, 2020 6:28 am

Re: AOE1 to AOE2 AI Converter

Post by MrElephant »

Past Final Update?! (25Oct2024)
With the Battle for Greece coming out, it became apparent I had to separate the old from the new. Included in the tool is an AoK conversion utility. You can now
convert an AOE1 ai to AOK or AOC, which will not include any userpatch commands (to help mining camp placement), or units for DE.

Had a slight issue with the unique unit upgrade- which I added

This does not mean I will include anything for Battle for Greece, we will have to see

It should be noted the tool does not distinguish between AOK and AOC, so units will be exact. If you go past 50 villagers, the tool will not reduce for AOK, and the same goes for 100 and AOC

Update 13Nov2024

New Experimental Feature! An aoe2 to return of rome AI converter is now included. You can convert your old favorite AI to now play Return of Rome. Each file has
to be converted individually. If the file is a sub-file, please hit the "sub directory PER file" button. All files should remain organized as they were originally intended.


Note- this feature is very experimental. Your ai that you are converting may need additional assistance to become fully converted. Not all commands may be converted properly at this time! Converted AoE2 AIs should not be expected to play at the same level as on standard aoe2.
Heavy DUC ais will be harder to convert. This tool aims to help you convert AIs, and is not an excuse to be lazy.


Update 1Dec2024

Fixed some stuff regarding civs in the aoe2 to Return of Rome converter. Tiny update here.
Attachments
AOE1 to AOE2 AI Converter 1Dec2024.zip
(6.37 MiB) Downloaded 22 times
AOE1 to AOE2 AI Converter 15Nov2024.zip
(6.37 MiB) Downloaded 34 times
AOE1 to AOE2 AI Converter 25Oct2024.zip
(6.35 MiB) Downloaded 20 times
Author of Charon, Reactionary, Ahulane, and BlackKnight!

Post Reply