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

Scenario Design and Modding
Moderated by Suppiluliuma, PhatFish, Fisk, Epd999

Hop to:    
Topic Subject: Two Questions: Civ AI choices and Tips on AI building
posted 10-07-22 09:29 AM ET (US)   
Hi, I've been bumping around with the advanced genie editor for AOE DE, and having a blast. Turned one civ into a nice sword spamming Sea Peoples civ which was really cool. However, now I have two questions:

1) How does civs select which ai file to use? For my changes i simply went into the civs already existing files and just changed them to what I wanted, but that feels lame. If it is possible to add civs to the game, how would I tell the game to select ai files that work for that civ. Like if I wanted to create the Sea Peoples from scratch instead of modifying the Phoenicians, how would I get them to choose the correct files in RM and DM.

2) How do you make the best ai files? I know how to make the files, but I'd like to expand them so they work better on larger pop limits. Currently they mostly seem to make 31ish vils and no more. Is that the limit to what the cpu can manage easily? I've gotten files to make like 50 but the vils seem to ignore farms and the civ gets quite unweildy and slow.
Example: How many vils should ai players train for each age? How many farms? When I try to have ai train vils equal to numbers I use, the ai tends to be quite slow to age up, so maybe lower numbers are better? Any tips on interesting ai files would be helpful.

[This message has been edited by potdindy (edited 10-07-2022 @ 11:24 AM).]

posted 10-07-22 05:37 PM ET (US)     1 / 4  
The answer is it's hardcoded, and you can't customize any of this.

If you try to change the "vanilla" AI files, it will affect all civs, so you'll probably have many regressions in the gameplay.

But of course this limitation sucks, and that's precisely the kind of customization RockNRor allows.

Maximum units number and strategy improvement/optimisation : RockNRor does that automatically (ajust to the game's max population).

If you modified a specific civilization (let's say Phoenicians - whose civ_id is 7), then you may
- Create a few AI files of your own that correspond to the different strategies Phoenicians may choose (according to their new tech tree in your mod). You should create a few AI files for the 3 map categories : no_water (hills, mountains), much_water (islands...), some_water (others)
- The number of villagers is part of AI files content
- Use the file RockNRor_civs.xml to overload the AI files to use for Phoenicians (so, civ_id 7 in our example).
Here is the configuration for 1 possible AI file for no-water maps, if your AI file name is Phoenicians_nowater1.AI.

<civ id="7">
<rm_aifile mapCategory="much_water" value="data2/Phoenicians_nowater1.AI"/>

You'll find examples in the sample file and in the RockNRor.doc file (included when you download RockNRor)
If you set up this kind of configuration, when starting a RM game, egypt AI players will pick an AI file among the ones you set up here (and no other AI files). That's why you should create several AI files, unless AI will always do the same.
This means, add several "rm_aifile mapCategory" tags for each mapCategory.
Tip: you CAN use "vanilla" AI files here if they fit to the civilization's tech tree.
For example add a line

<rm_aifile mapCategory="much_water" value="data2/PHOENICIA WATER.AI"/>

Farm number are handled automatically by SNMaxFarms, if SNAutoBuildFarms is ON (which is the case, in theory).

You can force SN number values in RockNRor.xml, but you better not "hard-code" everything in there.

<per_number gameType="DM" sn="220" value="3"
(example to limit the number of farms in deathmatch to 3 - SNMaxFarms is 220)
Don't modify .PER files, it's pointless (they are not used in random games)

If you don't want to write AI files, there is a game mode in RockNRor where it automatically generates strategies for all AI players on each game. Strategies are random, but calculated based on player's tech tree and bonuses so that it's using strong units if possible. It's not so bad compared to many "vanilla" strategies... And it does adapt to custom civs (if you changed tech tree, bonus...), unlike "vanilla" strategies. But it may not work perfectly for water maps.

<generateRandomTechTree enable="1"/>

How many villagers in each age, etc : that's your part of the job
Run games, test. Be aware that it depends on how agressive the player might want to be (try to attack quickly, or train more villagers and weaker on defense in early ages)
About farms, but also storage pits, granaries, RockNRor greatly improves buildings placement, especially for farming which becomes much, much more efficient.

Note : RockNRor is best suited for single player games, which seems to be relevant in your case (games with AI players)

Note2 : RockNRor will not make AI be as good as experienced human players... But still it should be far better than vanilla AI in many ways. In particular, it fixes many cases when AI player get more or less stuck (easy example, did you ever see what AI players do after starting building a wonder ? Just nothing, or almost)

I don't have time to help you more, but I hope you'll manage to make your civ play decent strategies.
Don't forget to have a look at the .doc file and configuration samples.

(oops stupid me, didn't see the "DE" mention... Eveything above applies to ROR, not DE)

[This message has been edited by chab (edited 10-07-2022 @ 05:38 PM).]

posted 10-07-22 09:54 PM ET (US)     2 / 4  
Thanks for your reply Chab. That took a ton of thought for which Im thankful. Im shocked to see this place still active.

Your last comment on things not working for DE...rocknror only works on ror?

Your comments on being hardcoded are unfortunate but good to know. Ive gotten the DE ai to change its strats in random map, but dont know how the ai knows which strats to choose

[This message has been edited by potdindy (edited 10-07-2022 @ 10:00 PM).]

posted 10-08-22 09:31 AM ET (US)     3 / 4  
Sorry I saw it was about DE after replying.
I don't know much about DE, they might have changed some behaviors compared to AOE or ROR.

Yes RockNRor is for ROR (patched)
Other non-DE versions of AOE/ROR are supported only for a few features like windowed mode or custom screen resolutions.
posted 10-10-22 06:54 PM ET (US)     4 / 4  
So, Ive gotten the ai to select files that ive made and they seem to work decently. Ive changed the phoenicians to the Sea peoples who spam sword armies in bronze. Also changed the persians to spam archers and cav in bronze to iron and it seems to work well. Civ that create large armies of cheap units are way more fun to watch.

Id like to also to make an indian camal and ele civ but that bring me to a new question.

Is it possible to add new civs to the game? Adding a civ in the genie editor does nothing in game.

There are so many options to add amazing people groups into the game, but currently adding one means removing another.

[This message has been edited by potdindy (edited 10-10-2022 @ 07:02 PM).]

Age of Empires Heaven » Forums » Scenario Design and Modding » Two Questions: Civ AI choices and Tips on AI building
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires Heaven | HeavenGames