Welcome to Age of Mythology Heaven
Welcome
Downloads Home
Review Guidelines
Main site
Forums
Code of Conduct
Help
Search

Advanced Search
AI Files
Home
New Releases
New Reviews
New Comments
Top-Rated

Submit File
Browse Categories
New Files

AI Files » Scenario AI for The Titans 1.4

Download File Post Review Post Comment

Scenario AI for The Titans 1.4

Author File Description
Madsen
File Details
Version: AoM: The Titans

I have experienced that this AI's water transport does not work on all maps. It seems that these transport plans are quite buggy. Sometimes it will still work if you let it build its own docks and its own transport boats. But then again, there is no garentee. I am very sorry for this, if it did not work.

This AI is designed to let the scenario designer modify this AI with the help of the 'AI Func' trigger-effect.

- To activate/start the AI, you must use the Trigger effect,
'AI Func', and type in 'start'. This is case sensitive, so it won't work if the
wrong letters are capitalized.

The main function of this AI (and the reason I put it out in the first place) is that it can transport on water maps,
which I have seen around in posts and threads that many people can't get to work. Though water transport isn't a garentee,
it still works on some maps.


++++++++++++++++++++++++++++++++++++++++++++++++++++++
Installation
++++++++++++++++++++++++++++++++++++++++++++++++++++++

Place the 'Scenario AI 1_4' folder and the 'aomxai100 scenai 1_4.xml' file in your AoM 'ai2' folder. The file you must use to start the AI is scenailoader.xs.
It's usually in: "C:\Program Files\Microsoft Games\Age of Mythology"

Place the scenaiTrigger.xml in your AoM 'trigger2' folder.

++++++++++++++++++++++++++++++++++++++++++++++++++++++

//! --------------------- !\\
Need-to-know-basics
//! --------------------- !\\

- When I speak of UnitID in this thread...
To see it, go to the editor, and go into the objects tab and click the Object Info button. A screen pops up. If you select an object or unit, it will tell you its ID(in numbers), its display name and its name(in numbers). Now pay attention, whenever I mention a unit's ID in this thread, I refer to the name in numbers that you can see on the popup window. The name is the one you want.

- Functions with toggles
All the toggle functions have an on and off value. It's the same for every toggle - 1 means on and 0 means off.

\\! --------------------- !//

-----------------------------------------------
Functions
-----------------------------------------------

-'start' : The most important one. This is what make the AI do everything it does normally, and no function should come before this one.
-'setupWalls' : This tells the AI to immidietly start building walls around it's main base.

-'attackToggle' : Toggle AI attacks on or off.
-'gatherRelicsToggle' : Toggle relic gathering. Off by default.

-'hate' : You tell the AI who to focus its attacks on. Insert the player number in the parameter in AI Func.

-'attackNow' : Make the AI set up an attack plan right away. It will wait in a maximum of 20 seconds to gather the military units. You can use the parameter to control if it should retreat. 0 = don't retreat, 1 = retreat, 2 = random. This will also make it attack even if the attacks are turned off. This is made so you can control when and why it should attack with triggers. But be careful of using this too often as the plans will stack, and the next will launch as soon as the first has finished.

-'scoutToggle' : Toggle scouting on or off. On by default, but may still not scout for some reason - for that, toggle it on with a trigger.

-'protectStrong' : The AI will protect a selected unit with 80% of military (insert its ID in the parameter). Note units in a protect plan cannot participate in an attack.

-'protectMed' : Same as above, but with 50% of military is protecting.

-'protectWeak' : Same as above, but with 25% of military is protecting.

-'protectOff' : Turn off all the protection plans.

-'forceFish' : Force the AI build a dock and train transports and fishing ships.

-'setCustomDefendPos' : Sets the place where the AI should defend. Normally it's in its base, but with this you can modify it. Insert the ID of the cinematic block where you want the new location in the parameter.

-'buildSettlement' : Input UnitID of the settlement.

-'setMainBaseRadius' : Input: radius. Note this will delete all bases so use before creating any new ones (actually it deletes all bases and then create a new main one with the radius given).

-'spreadBuildingToggle' : Tower plans spread the buildings out more.

-'baseCreateLarge' : Creates a base and all units within a range of 60 will defend the area. Input is the unitID of the cinematic block. This counts for all baseCreates: if you want to specify the amount of units there should be in the base, you need to have them in the area when you define the base.

-'baseCreateMed' : Creates a base and includes all units within a range of 40.

-'baseCreateSmall' : Creates a base and includes all units within a range of 20.

-'setResponseDistance' : Sets the attack response distance. Input: distance.


-'waterMapToggle' : Sets if this is a water map or not. On default it is on, but on some land maps with water surroundings, the AI may act oddly. You should use it only in the case of this or anything alike.

-'allowForwardBaseToggle' : Toggle if it is okay to build a forward base. There is one side-effect however: As the AI normally uses attack goals, which cannot take units from other plans, it will not attack normally. You will need to call functions that uses attack plans, like attackNowNum or attackNowp1ercent, to make it attack. The only downside of using attack plans is that it won't use god powers, like underworld passage, to its advantage.

-'deleteAllDefendPlans' : Deletes all defend plans. Input is different. 1 if you want it to reactivate the main defend plan, 0 if not.

-'unitsInAreaProtectUnit' : All units in the range of 20 of the target unitID (the input) will protect the unitID. Well actually, it counts how many military units there are in a range of 20, and then adds the correct number of units. If using this more than once, you should have them activated atleast two seconds apart from each other to avoid unexpected results.

-'pSetPriority' : Sets the priority of the plan that iis just about to be activated (if you have an effect 'AI Defend Plan' in a trigger, this must be called before that effect for it to work).

The following effects have the advantage of being used in a trigger, that I scripted for you.
-'patrolSetPoint1' : Sets a patrol point. Input is the unitID (cinematic block) of the point.
-'patrolSetPoint2' : Same as above. You can set up to 10 points to patrol.
-'patrolSetPoint3' : And it goes on...
(...all the way to)
-'patrolSetPoint10' : Which sets the tenth point.
-'patrolExecuteLand' : Sets up the patrol for land use. Input is how many units.
-'patrolExecuteNaval' : Sets up the patrol for naval use. Input is how many units.

-----------------------------------------------
//////////////////////////////////*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+
What the AI does
//////////////////////////////////*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+

- It doesn't resign, so you can make your triggers handle that.
- It transport units from it's own island to it's enemy. Well it should - but it doesn't work on some maps.
- It will remain still untill 'start' is called.
- It does not gather relics unless you call the AI Func function: 'gatherRelicsOn'.
- It doesn't send chat messeges.
- It build towers to defend its town.

//////////////////////////////////*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+/*-+

Other.

//////////////////////////////////



Update 1.1
(august 21., 2012)

It's been a long time since I touched these files, but I'll try to get back on track.

- The AI now has its own files instead of borrowing the files from the default AI. This will make it easier/possible to make more complex functions. The files are in folders and the file to select is the scenailoader.xs. Also added an .xml file to make it possible to use it in multiplayer.

- There's a new function: -'playerToHate' : You tell the AI who to focus its attacks on.




Update 1.2
(October 13., 2012)


- Renamed some of the commands or compressed them (for example attackOn and attackOff are now combined to attackToggle).

- Renamed 'playerToHate' to 'hate'.

- Renamed 'gatherRelicsOn' to 'gatherRelicsToggle'.

- New functions:
- 'scoutToggle'
- 'forceFish'
- 'setCustomDefendPos'
- 'protectStrong'
- 'protectMed'
- 'protectWeak'
- 'protectOff'



Update 1.3
November 29., 2012



New functions:

-'buildSettlement' : Input UnitID of the settlement.
-'setMainBaseRadius' : Input: radius. Note this will delete all bases so use before creating any new ones (actually it deletes all bases and then create a new main one with the radius given).
-'spreadBuildingToggle' : Tower plans spread the buildings out more.
-'baseCreateLarge' : Creates a base and all units within a range of 60 will defend the area. Input is the unitID of the cinematic block. This counts for all baseCreates: if you want to specify the amount of units there should be in the base, you need to have them in the area when you define the base.
-'baseCreateMed' : Creates a base and includes all units within a range of 40.
-'baseCreateSmall' : Creates a base and includes all units within a range of 20.
-'setResponseDistance' : Sets the attack response distance. Input: distance.



Update 1.4
February 2., 2013



* New functions:

-'waterMapToggle' : Sets if this is a water map or not. On default it is on, but on some land maps with water surroundings, the AI may act oddly. You should use it only in the case of this or anything alike.
-'allowForwardBaseToggle' : Toggle if it is okay to build a forward base. There is one side-effect however: As the AI normally uses attack goals, which cannot take units from other plans, it will not attack normally. You will need to call functions that uses attack plans, like attackNowNum or attackNowp1ercent, to make it attack. The only downside of using attack plans is that it won't use god powers, like underworld passage, to its advantage.
-'deleteAllDefendPlans' : Deletes all defend plans. Input is different. 1 if you want it to reactivate the main defend plan, 0 if not.
-'unitsInAreaProtectUnit' : All units in the range of 20 of the target unitID (the input) will protect the unitID. If using this more than once, you should have them activated atleast two seconds apart from each other to avoid unexpected results.
-'pSetPriority' : Sets the priority of the plan that is just about to be activated (if you have an effect 'AI Defend Plan' in a trigger, this must be called before that effect for it to work).

The following effects have the advantage of being used in a trigger, that I scripted for you.

-'patrolSetPoint1' : Sets a patrol point. Input is the unitID (cinematic block) of the point.
-'patrolSetPoint2' : Same as above. You can set up to 10 points to patrol.
-'patrolSetPoint3' : And it goes on...
(...all the way to)
-'patrolSetPoint10' : Which sets the tenth point.
-'patrolExecuteLand' : Sets up the patrol for land use.
-'patrolExecuteNaval' : Sets up the patrol for naval use.

* New Triggers:
I have included effects which all interact with the AI. I did this because it is easier to implement in a scenario, because they consist of a lot of AI Funcs. These triggers use UNITS (yes, units) to define a location. The location is, abviously, at the unit's location. Therefore it is important that only one unit is selected. The triggers I have made are:

- 'AI Patrol 1-5' : Sets points for a patrol of 1-5 points.
- 'AI Patrol 6-10' : Continues the above trigger to 10.
- 'AI Patrol Execute' : Finally when the points are assigned, this will execute the patrol.
- 'AI Defend Plan' : Creates a defend plan to defend a point.
- 'AI Defend Plan Simple' : A simplified version of the above effect.
- 'AI Wall Circle Plan' : Will build a circular wall around a point.
- 'AI Wall Straight Plan' : The AI will build a wall between the two points.

Testing tools.

- 'AI Func add Command' : Put in a looping trigger. Ingame you can then put the command ingame and activate it with the chat. Say, you want to make player two attack now with a retreat will be "attackNow 2" ([commandName] [player]).
- 'AI Func add Command no Inbuilt CC' : Same as above, only it doesn't have an inbuilt Chat Contains condition.
- 'AI Func add Command with Parameter' : Same as AI Func add Command, but with a parameter to control as well. Say, you want the AI to attack with 70% units: "attackNowPercent 2 70" ([commandName] [player] [parameter]).
- 'Add Note' : Doesn't do anything, but is filled with string parameters to write a comment in a trigger.


If anyone has a cool idea to upgrade this AI, please tell me, and I will do what I can.

Enjoy!

//////////////////////////////////

Pages: [1] 2 » Last »
AuthorComments & Reviews   ( All | Comments Only | Reviews Only )
Madsen
File Author
The file has now been released in one month now. C'mon, people - I want to know what you guys think about this; positive or negative.
TheStalker I can download it and test, I started a water AI thread some time ago. Will let you know then if you are still here after this 6 months....
Madsen
File Author
Yes I'm still here. I'm working on an update, but, since I'm not getting any feedback, I don't know if I should release it.

[Edited on 08/03/11 @ 11:27 AM]

Madsen
File Author
Review, anyone?
FrozenUser12 Maybe you could make the AI build forward bases, send early raiding attacks and make distractions? Anyway, I would like to try this AI on my Scenarios. :)

[Edited on 09/11/11 @ 10:11 AM]

Ingvarr Will try it in one of my scenarios , just one question , does the someone who downloads my file needs , this ai installed for my sceanrio to work normally on his computer ?
Madsen
File Author
If you release a scenario with this AI attached to a player in your scenario, the AI must be installed as well, for the AI to take effect.
Hammerhands SWEET! I have got to try this thing out!
Hammerhands Did i use it wrong? When I used it, on three different civilisations in the same scenario... it was obvious the AI was there... but it wasn't doing much. It sometimes built buildings, built some military units, but wasn't very defensive. They never transported units across water... even though they had a full navy including fishing. They rarely if ever advanced beyong classical, and they took forever to get there.
Madsen
File Author
It has difficulty settings like the standard AI, but if you tested it in Titan, I really don't know. I will take a look at it, if you send the scenario to me.

[Edited on 05/20/12 @ 07:11 AM]

Pages: [1] 2 » Last »

Post Review Post Comment

HGDL v0.8.2

Login
Forum Username:


Password:




Create a new account
Forgot password?
Statistics
Downloads:1,616
Favorites: [Who?]2
Size:145.40 KB
Added:03/12/11
Updated:02/02/13
Recently Updated