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

Scenario Design
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.3 replies
Age of Mythology Heaven » Forums » Scenario Design » At last an AI that i find useful.
Topic Subject:At last an AI that i find useful.
posted 14 March 2003 01:06 PM EDT (US)         
First of all,pardon me if this is mentioned anywhere else,but since i didn't notice anything like that i will proceed .

I recently had some nice ideas about my future maps,but it would be too hard to implement them without a proper AI.Without an AI all you can do is RPGs or B&D scenarios.The best you can do is simulate an AI with triggers like Army Deploy,Army move etc,but that has limited potential.

So,i decided to do some searching and testing of the AI's that were used for the main campaign and i had some very nice results(at least for me).

The first scenario that got my interest was the first of the egyptian campaign.Remember the one that the player had to dig a pile in order to find the Guardian's sword?Well,in that scenario the computer builds nothing.It just attacks.

So,i used the enemy's player AI in a testing scenario of mine.It's not actually only the AI,it's a combination of the AI(scn14p2.xs) and a AI Func. effect.
I placed some units and buildings of mine in different parts of the map and many units of the CPU.Then i set the AI to scn14p2.xs for the CPU and added a trigger with a timer condition and an AI Func. effect.In the AI function letterbox i wrote spawn.In the parameter letterbox i left the default value which is 0.(The ES designers also used 1 or 2 but i'm not exactly sure why.)

The CPU's behaviour is then like this:

  • At first it stays idle.
  • Some seconds after the trigger fires it attacks with all available units.
  • The CPU attacks only at places that are either visible or scouted for it.It doesn't scout though.But it can spot units that were visible when the trigger fired,even if the units move to a different place that is not visible to the CPU.It kinda has their LOS permanently.Like it casted Spy to all of them.
  • If the CPU finds more enemies while moving to a place it will eventually attack them too.
  • The CPU will stop only when all of its units(which it posessed when the trigger was fired) are dead or when it has no more enemy units/buildings in its LOS or scouted.
  • If a new army is deployed for the CPU after the trigger was fired,then it will stay idle until the trigger fires again.

    In a few words with this combination of scn 14.xs AI and AI Func. effect,if the CPU spots you it will almost instantly hunt you to death.I think it could be useful in many circumstances.

    Have fun designing .

    P.S.I'm almost sure there are other AIs in the game that could be useful.They just need someone to find them .

    [This message has been edited by kan_apo (edited 03-14-2003 @ 01:10 PM).]

  • AuthorReplies:
    posted 14 March 2003 04:57 PM EDT (US)     1 / 3       
    Glad you found it useful.

    If I remember that scenario correctly, we used the parameter in the AI func to indicate in which of the three canyons the new units had been spawned. If you look in the script for the function that's called by the aiFunc, it should do a check for 0, 1 or 2 and then structure a query based on one of three spawn points.

    posted 15 March 2003 05:04 PM EDT (US)     2 / 3       

    Thank you for sharing your findings, and I don't remember this has ever been mentioned before =). I have a question about the AI function:

    how did you know spawn is one of the available functions? Is there a list of all the functions and what they do?

    posted 16 March 2003 07:11 PM EDT (US)     3 / 3       
    No,i'm afraid i'm not aware of such list.I just loaded the 14th scenario and checked the triggers there .
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames