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

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: AI Goals in Standard AI?
posted 04-03-07 01:16 PM CT (US)   
I was wondering if the Standard AI contains any goals and if so, what they are.

I did try looking through the gamedata_x1 file but it's quite hard to read since it's so large.

Thanks,
Hamish

Replies:
posted 04-03-07 06:51 PM CT (US)     1 / 3  
you are nuts, i have seen the ai file.

For certain reasons (violation of CoC, over 100+ goals that i saw, and yeah violates the CoC to name a few) I will not post the goals


CRAZEDMANIAC
The Ever Changing Maze Progress: 73%
Download the new beta here!

Proud member of DGDN
posted 04-03-07 09:23 PM CT (US)     2 / 3  
There are two meanings to the word "goal" when talking about AIs.

The first meaning is used within the AI itself. A "goal" is basically a variable that can be set by the scripter and then tested. They mean nothing in themselves. For example, you might script something like

(defrule
        (unit-type-count-total archer > 1)
=>
        (set-goal 1 1)
        (disable-self)
)

In which case the AI would set goal "1" to a value of "1". It could then be tested, for example:

(defrule
        (goal 1 1)
=>
        (train archer)
)

In which case the ai would continually try and train an archer, as long as goal "1" retained a value of "1". Ignore what CRAZEDMANIAC said about "100+" goals, the system will only support up to 40 goals, after which you can use "doctrine" in exactly the same way.

 

The other meaning of "goal" would be in the trigger sense; that is, sending a trigger effect "AI Script Goal." I'm not sure why Ensemble Studios decided to use the word "goal" here, as it has nothing whatsoever to do with the type of "goal" mentioned above.

This type of (trigger) goal works like so. Select an "AI Trigger X" (with X being a number between 1 and 256). It doesn't matter which player you select under "source player"; it gets sent to every AI.

Having sent the signal to the AI using the "AI script goal" effect, you then need some script in the AI like:

(defrule
        (event-detected trigger X)
=>
        (acknowledge-event trigger X)
        (train-archer)
)

Which would have the AI train an archer (if possible) every time you fired that trigger. Unlike AI signals (ie, from the AI to the game), the "AI Trigger X" can be used over and over again.

 

Anyway, the short answer is that if you meant "goals" in the first sense, then the Standard AI has quite a few goals, but who cares. If you meant in the second sense, then no, the Standard AI does not contain any goals.

A suggestion, Hamish: perhaps you could try searching the forums before posting a new topic. You would have found your answer.

Regards,

Dave.


Don't post if you haven't checked this thread.
I am a card-carrying Tsunami Studios member. | Macbeth | Install Script Tutorial | Nineteen Years... | Put a timer in your scenario!
Piece By Piece (2) Progress Bar: | █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ | Download it now!

[This message has been edited by Dave_Earl (edited 04-04-2007 @ 07:36 AM).]

posted 04-04-07 03:49 AM CT (US)     3 / 3  
I meant goals as in the second sense, and, thank you for your reply Dave_Earl, I will take more care in searching the forum before I post.

CRAZEDMANIAC, I did not understand your reply and I do not think you understood my question.

[This message has been edited by Hamish (edited 04-04-2007 @ 03:51 AM).]

Age of Kings Heaven » Forums » Scenario Design and Discussion » AI Goals in Standard AI?
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames