Posted on 02/08/10 @ 12:51 AM (updated 02/18/10
||The Conquerors 1.0c
Created by Leif Ericson by the request of Pears and Rajkumar_q8
Date: 06 Feb, 2010
==== Introduction ====
This AI allows you to detect the following cheats and set up triggers so that you can
penalize the person playing your scenario:
1. Lumberjack (+1000 wood)
2. Cheese Steak Jimmy's (+1000 food)
3. Robin Hood (+1000 gold)
4. Rock On (+1000 stone)
5. How do yoy turn this on (COBRA car cheat)
6. I love the monkey head (fast villager explorer unit)
7. Furious the Monkey Boy
8. To Smithereens (Saboteur unit)
This AI will NOT visibly do anything once it detects that a human player has used a cheat. Instead it will send an AI Signal that you can detect it with a trigger and make whatever effect you want. To learn how to set up the triggers to do this, see the "How the AI Works" section.
==== How to use this AI ====
Place this file, the Cheat Detector.ai file, and the Cheat Detector foldier in the AI
subdirectory in the Age of Empires II folder. Then, open up the Map Editor and choose
your scenario. In your scenario, select one of the computer players (or multiple computer players) and go to the Personality drop down list. Choose "Cheat Detector" from the list. The AI will play for that player.
Also, this AI includes the Immobile Units AI by Zanzard Lothar, so that your units for
this computer player will stay still. If you don't want the Immobile Units AI to be loaded,
change the "YES" to "NO".
If you don't load the Immobile Units AI the computer will act as if you set the AI to
(set-goal LOAD-IMMOBILE-UNITS-AI YES) ;<--- Change the YES to NO if you don't want
(disable-self) ;to load the Immobile Units AI
This AI will also detect for the saboteur unit. However, since these are sometimes placed
in a scenario, I will ask you whether you want the AI to check for the Saboteur unit. If
you place saboteurs in your scenario at the start you don't want the AI thinking someone
(set-goal DETECT-SABOTEURS YES) ;<--- Change the YES to NO if you don't want
(disable-self) ;to detect saboteurs with this AI
Read the next section to know how to make the AI work:
==== How the AI works ====
An AI cannot directly detect when a player cheats by detecting chat messages. An AI only has the ability to detect taunts, such as 1 ("Yes"), 2 ("No"), or 11 ("Laugh"). However, there is an indirect way to detect resource cheats. This AI does this by checking to see player one's score jumps by a large amount in score. If player one's score suddenly increases by 100 (when the player's stockpile increases by 1000 resources), then the AI can detect that player has cheated.
This method will work in RPG or Fixed Force scenarios where the player one's score cannot increase by 100 resources instantly. It is not so reliable in Build and Destroy scenarios where player one's score can increase by 100 or more after researching an expensive research, like paladin.
This AI has code to detect all 8 players, in case there is more than one human player. However, I had an error implementing all the players, so it will only detect resource cheats by player 1 and player 2.
Once the AI detects that a human player has cheated a resource, the AI will send a signal to the scenario which can be detected by a trigger. To do this, make the trigger and set the condition to AI Signal and select the corresponding AI Signal Value:
Lumberjack: AI Signal 1
Cheese Steak Jimmy's: AI Signal 1
Robin Hood: AI Signal 1
Rock On: AI Signal 1
Then you can choose whatever effect you want the trigger to do, such as resigning or
sending a chat message.
Of course, this AI will also detect cheat units such as the COBRA car. When this AI detects one of these cheat units it will send a signal to the scenario just like the resource
cheats. Here are the signals it sends that you will need to choose the AI Signal condition
and set the AI Signal Value to:
COBRA car: AI Signal 2
VMDL: AI Signal 3
Furious the Monkey Boy: AI Signal 4
Saboteur: AI Signal 5
|Author||Comments ( All | Comments Only | Reviews Only )|
Anyone should fix the author's comment , 'cause it's breaking the write field .
I'm very sorry about that. Unfortunately, we can't preview our message before it's submitted. Anyway, I edited the message. it looks a lot better now, doesn't it?
[Edited on 02/18/10 @ 08:54 PM]
It looks good now Leif.
Its a very good idea. This will work really well and improve alot of scenarios.
sorry if i sound kinda noob.
But, are you still able to cheat when "allow cheats" box is not checked?
Usually this Ai works perfectly for me byt recently I've been getting an error message when I test a scenario
File Cheat Detector/Player 1.per
Error5001 File open failed
All of the additional per files included are in the AI folder. Any ideas whats up?