5

I started playing AoE after a long time, and now I'm creating a custom map.I want to specify the conditions for victory in my own way.

I don't know how exactly to create custom objectives,but I noticed this feature called "AI scripts".I've heard that games are created using AI,but no idea how to write one here. I want to learn how to use this feature, I may use it in many custom maps.

EDIT: The original question was on AI scripts to achieve making custom objectives, but Lyrical in the comments below clarified that its not AI scripting, but adding "triggers" which would help me here. I think that comment should be considered as correct answer unless someone wants to put a better answer.

3
  • 1
    AI stands for Artificial Intelligence. It is not a programming or scripting language. Mar 21, 2014 at 12:50
  • I know that. My programming experience is limited to solving linear algebraic problems in C and python,and some visual basic. Btw,I don't think I need to learn AI programming in any language from scratch for this game.Some shortcuts would be helpful. Mar 21, 2014 at 12:54
  • 2
    From the sounds of it, you don't want to create a custom AI script. What you want is to add "triggers" to your scenario via the Scenario Editor. aok.heavengames.com is the best resource for everything you need related to creating custom scenarios.
    – Lyrical
    Mar 21, 2014 at 15:36

2 Answers 2

3

It sounds like you want to make a trigger that declares victory for a certain player. To do this, you need to go to the "Triggers" section in the map editor. Here you can set lots of triggers which are mainly used for scenarios. Each trigger has one or more conditions and one or more effects. For the effects to actually happen, all of the conditions must be met. If you want to make custom victory conditions, you need to make what you want to happen in individual "conditions". You then need to make an effect labelled "Declare Victory". You then set the player to who you want to win, when the conditions are met.

Example: You want player 1 to win the game when they kill a certain unit. You need to do the following steps:

  1. Open the Scenario Editor from the Main Menu.
  2. Go to the triggers menu. Click "New" under the triggers box. (Note: you can change properties of the trigger here, such as the name of the trigger and whether it loops or not.)
  3. Click "New Cond" to make a new condition. Set the condition to "Destroy Object". Click "Select Object" and then select the object you want to need to be killed. (Note: by clicking "View Object", you can check if you have selected the right guy.
  4. Click "New Effect" to make a new effect. Set it to "Declare Victory". Set the player to "Player 1".

You're done! Of course, if you want the victory conditions to be different, just change what the condition/s are set to. Most of them are pretty self explanatory, and easy to use. Almost everything I know about the editor I found out myself. It's not too hard to use, but browsing some wikis may help.

1

There is a file on the installation CD, at \DOCS\CPSB.DOC. It is the official guide and the best documentation I know of. If you want a better guide, you should look at The World of AI Scripting: Chapter 1 and Scripting AI for: Age of Empires II.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .