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

Scenario Design
Moderated by Suppiluliuma, PhatFish, Fisk, EpiC_Anonymous, Epd999

Hop to:    
Welcome! You are not logged in. Please Login or Register.5 replies
Age of Empires Heaven » Forums » Scenario Design » Getting the AI to Cheat?
Bottom
Topic Subject:Getting the AI to Cheat?
Al_Kharn the Great
Clubman
posted 11-04-18 01:11 AM ET (US)         
I'm working on a scenario that requires some enemy AIs to produce units throughout the game without an economy. In AoK, this is easy to do, whether through triggers or coding the AI to cheat. I cannot figure out how to accomplish this in AoE, however.

I have considered giving the AIs a lot of resources (like 15K+) so that the AI effectively can last a long time, but I have found that the AI takes advantage of this large stockpile to quickly go through the .ai file and train a lot of units. I am also concerned that if a Human Player continues to play for a long time, the enemy AIs will eventually run out of resources and no longer function.

Is there a way to code the AI to receive XXX resources every YYY seconds throughout a scenario? If not, are there ways to code 'pauses' into the .ai file so that an AI with a large starting stockpile of resources trains units at a slower pace? Or is there some other solution?

Thank you.

Filthydelphia Creations
Tristan & Iseult ~ 1st Place (tied), 2014 Historical Scenario Design Contest
City of Peace ~ 2nd Place, 2014 Minigame Competition
Dragon's Head, Serpent's Tail ~ 2nd Place, 2016 Defend the Spot Competition
Ragnar's Raids ~ 2nd Place, 2016 Historical Scenario Design Contest
Complete Campaign Collection
AuthorReplies:
chab
Clubman
posted 11-04-18 08:30 AM ET (US)     1 / 5       
write a dedicated AI file for you computer player.
In this AI file, don't put TC, villagers, etc, just put the military units you want the AI player to train.
You might also try to disable the PER number "sn auto build houses", and put a certain number of houses in AI file (that will limit the population).

Otherwise, RockNRor does provide a trigger to do this (give resources to a player).
Al_Kharn the Great
Clubman
posted 11-04-18 10:20 AM ET (US)     2 / 5       
Thank you for your reply. I am using the Definitive Edition so cannot use RockNRor. I am confused about your recommendations otherwise. I have made my own AI with only lines to train units. The problem is the AI trains all these units and becomes OP because of their huge resource stockpile. I want to limit their resources to a discrete flow over time (like 500F,500G every 10 minutes) to force breaks in the unit production. These AIs will have no villagers.

Is that possible? I apologize if I misunderstood your recommendation but it doesn't sound like it will do what I want.

Filthydelphia Creations
Tristan & Iseult ~ 1st Place (tied), 2014 Historical Scenario Design Contest
City of Peace ~ 2nd Place, 2014 Minigame Competition
Dragon's Head, Serpent's Tail ~ 2nd Place, 2016 Defend the Spot Competition
Ragnar's Raids ~ 2nd Place, 2016 Historical Scenario Design Contest
Complete Campaign Collection
chab
Clubman
posted 11-04-18 01:53 PM ET (US)     3 / 5       
if AI does not have any villagers it can't build houses.
Just give it only a few houses so it won't be able to train more units.
Al_Kharn the Great
Clubman
posted 11-05-18 11:38 PM ET (US)     4 / 5       
Wasn't quite the answer that solved my problem, Chab, but I appreciate your post because you got me thinking on the right track! I combined less houses and military buildings (in DE, the AI is great about simultaneously using military buildings to train units, something I don't believe the AI was ever capable of doing in the original version) with a .per file that was a bit less aggressive. It's much better. Thanks, Chab!

For those curious, I'm working on a campaign set in ancient China during the Uprising of the Five Barbarians that weakened the Jin Dynasty.

Filthydelphia Creations
Tristan & Iseult ~ 1st Place (tied), 2014 Historical Scenario Design Contest
City of Peace ~ 2nd Place, 2014 Minigame Competition
Dragon's Head, Serpent's Tail ~ 2nd Place, 2016 Defend the Spot Competition
Ragnar's Raids ~ 2nd Place, 2016 Historical Scenario Design Contest
Complete Campaign Collection

[This message has been edited by Al_Kharn the Great (edited 11-05-2018 @ 11:38 PM).]

PhatFish
Mr. Beta
posted 11-10-18 11:12 AM ET (US)     5 / 5       
It's great to see we're getting more content for DE Good luck and have fun designing, and let us know if you have any more questions.

Edit: wow that was fast lol. Your new campaign is ready to be downloaded!

[This message has been edited by PhatFish (edited 11-10-2018 @ 11:18 AM).]

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

Hop to:    

Age of Empires Heaven | HeavenGames