The Sporum - The Official Spore Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to forum index 

NOTE: The Sporum is migrating to EA’s Answers HQ forum environment. The Sporum is currently in Read-Only mode and will remain so for a period of time. For more information about the move and the new location, please see this post

Quick Guide to Advanced AI  XML
Forum Index » Spore Galactic Adventures
Author Message
MaxisCactus

Civilized Sporeon

Joined: 09/05/2008 20:28:29
Messages: 2826
Offline

Quick Guide to Advanced AI

How creatures carry out advanced behavior

You can think of a creature as constantly reading your instruction list from top to bottom. The first line it reads that it can perform is what it will do, even if that means interrupting something it was already doing.

For example, say a creature has two lines: attack player and idle (dance). If the creature can perform the first line, that is, if it can see the player and attack, it will do so. If not, it will carry out the second line, dance, which it can always do. Should the player move into sight of this creature, the first instruction will take priority and interrupt the dance.

That’s pretty much all there is to it, except conditions. Conditions like “if carrying staff” add additional requirements which must be met in order to carry out that action.


Action Reference

Attack: attack the specified targets, moving if necessary. The attacker must be aware of the target.

Shoot: Like attack, but the attacker won't move to attack.

Threaten: Like attack, but the attacker will warn the target first.

Flee: Run away from a target if it attacks. Because flee requires an attacker, there is only one condition, "when attacked by." If you just want creatures to avoid a certain other type of creature, try combining a movement behavior with the "when aware of" condition.

Pick up: If not holding anything, pick up the specified item. The creature must be aware of an item in order to pick it up. Note that when a creature attacks something, it will drop whatever it is holding to free itself up for combat. It is therefore a good idea to make attacks more important than pick-ups (higher in the list) to prevent the creature from getting confused as to whether it should attack or pick up.

Give: If holding the item, give it to the target. The creature must be aware of the target.

Emote: The creature expresses the specified emotion, once. Because emote is played only once, it requires those conditions that won't cause it to keep happening. If you wish to express an emotion continuously, try using idle instead. When using the "first time seen" condition, the creature will turn toward that thing before emoting, making it useful for greetings.

Idle: The creature expresses the specified emotion until interrupted by a higher-priority behavior. It is good to have an idle without conditions at the bottom of the list to be the action the creature takes if all else fails.

Wander: Just like the basic wander setting, this will use the wander zone set on each creature to move about in.

Patrol and move to: Just like the basic versions. All your patrol and move-to actions will share the same set of patrol points. Move to will only happen once, after which all move-to actions will be ignored.

Additional Notes:

Awareness
It is not necessary to use the “aware of” condition unless it is different from the target of the action. For example, “pick up stick if aware of stick” is the same as “pick up stick”. Awareness is built into attack, give and pick up. Follow is an exception, it’s more like tracking something.

First Sighting
First sighting means the first time a creature sees something. The most obvious use is “emote greet when first sighting player”. This will cause the creature to wave once the first time it sees the player, but not upon subsequent sightings of the player.



This message was edited 3 times. Last update was at 08/18/2009 19:03:19

[WWW]
Jomeaga

Civilized Sporeon

Joined: 12/07/2008 21:31:34
Messages: 3640
Location:
Look behind you, again, again, again, I'm still behind you, again, again, again, again...*you fall*

Offline

Great guide, I`d use it if GA didn`t crash and all my creatures weren`t gone -.-

[WWW] [MSN]
mchmt55116

MouthBreather

Joined: 09/13/2008 15:26:19
Messages: 610
Location:
Any specific position or point in physical space.

Offline

Thanks for the confirmation of this so quickly MaxisCactus!

[WWW]
prog1thefencer

Civilized Sporeon

Joined: 01/18/2009 15:51:47
Messages: 1367
Location:
The surface of the sun

Offline

Thanks Maxis!

[WWW]
ZeekSlider

Civilized Sporeon

Joined: 09/12/2008 10:59:43
Messages: 1191
Offline

I must be doing something wrong, because even with this great guide, the behavior AI is not acting the way I want it to.

Oh well, I'll figure it out... maybe...

ZeekSlider's Spore Blog - Expanded creation descriptions and exclusive content not shared on Spore.com

Number of Spore Re-Installs: 8
Most Recent Re-Install: 16/05/2011
Reason for Re-Install: Constaint crashing due to lack of use?? Possibly...
MaxisCactus

Civilized Sporeon

Joined: 09/05/2008 20:28:29
Messages: 2826
Offline

ZeekSlider wrote:I must be doing something wrong, because even with this great guide, the behavior AI is not acting the way I want it to.

Oh well, I'll figure it out... maybe...


Always check the acts to make sure you're editing in the correct act.

Also, there is a known bug which Advanced Behavior is broken when setting health percents. The health options seem to switch in the editor if you go into test mode.

-MC


[WWW]
ZeekSlider

Civilized Sporeon

Joined: 09/12/2008 10:59:43
Messages: 1191
Offline

I'm just having difficulties exchanging items between NPCs and the player.

Maybe I should go into the Spoffit Calculator adventure and take some notes as to how those behaviors are set up. When my brain has rested.

ZeekSlider's Spore Blog - Expanded creation descriptions and exclusive content not shared on Spore.com

Number of Spore Re-Installs: 8
Most Recent Re-Install: 16/05/2011
Reason for Re-Install: Constaint crashing due to lack of use?? Possibly...
MaxisGamer

Developer

Joined: 09/12/2008 23:38:03
Messages: 28
Location:
Emeryville, CA

Offline

Make sure you set one of the advanced behavior to be "Receive". NPCs won't receive items you give them unless they have this behavior. If you look at the default behaviors for all five default sets (peaceful, neutral, mindless, etc), you will see that they all have "Receive" just above Wander.
brenboy

Microbe

Joined: 06/30/2009 17:22:57
Messages: 10
Location:
Home

Offline

How do I use Advanced AI?
ZeekSlider

Civilized Sporeon

Joined: 09/12/2008 10:59:43
Messages: 1191
Offline

MaxisGamer wrote:Make sure you set one of the advanced behavior to be "Receive". NPCs won't receive items you give them unless they have this behavior. If you look at the default behaviors for all five default sets (peaceful, neutral, mindless, etc), you will see that they all have "Receive" just above Wander.
I figured that part out, but I'm trying to figure out how to make the NPCs give the player something after they got the item they were suppose to get. Can't figure that part out, so now all my NPCs will automatically give the player the item they are holding instead of trading out.

And FYI, Receive is above Give in the priority order.

ZeekSlider's Spore Blog - Expanded creation descriptions and exclusive content not shared on Spore.com

Number of Spore Re-Installs: 8
Most Recent Re-Install: 16/05/2011
Reason for Re-Install: Constaint crashing due to lack of use?? Possibly...
Falthron

Multicellular

Joined: 11/05/2008 22:44:49
Messages: 360
Location:
I'm Everywhere.... and Nowhere.... I'm just here.....

Offline

You should also mention the way to get into the Advanced AI
When I first heard of it I was thinking, "There is advanced AI?"

But I had no idea how to get to it.


I'm back from the great beyond
Ryuujin

Civilized Sporeon

Joined: 09/23/2008 01:44:21
Messages: 3672
Location:
In your subscriptions

Offline

How do I use Advanced AI?


Hold ctrl and click on one of the standard AI behaviours,and it'll open a rollout window and add an additional AI icon in the form of a ying-yang sign. To add tothe stack, click the "Idle" entry and choose a new action. To remove, click the bar in the stack and pull it out the window.

This message was edited 1 time. Last update was at 07/02/2009 03:11:56


MaxisGamer

Developer

Joined: 09/12/2008 23:38:03
Messages: 28
Location:
Emeryville, CA

Offline

ZeekSlider wrote:
MaxisGamer wrote:Make sure you set one of the advanced behavior to be "Receive". NPCs won't receive items you give them unless they have this behavior. If you look at the default behaviors for all five default sets (peaceful, neutral, mindless, etc), you will see that they all have "Receive" just above Wander.
I figured that part out, but I'm trying to figure out how to make the NPCs give the player something after they got the item they were suppose to get. Can't figure that part out, so now all my NPCs will automatically give the player the item they are holding instead of trading out.

And FYI, Receive is above Give in the priority order.


If I'm understanding your problem, just specify which object you want to give in the advance UI panel (you can specify which object to give, and who to give it to). The NPC will only give you that particular item if it's holding it.
Prometheus09

Civilized Sporeon

Joined: 09/10/2008 01:40:23
Messages: 1279
Location:
USA

Offline

Ah, MaxisCactus, never have I been blessed by such an angel! Woot! Thanks for the guide... the Advanced AI was cool, but there were some things I definitely did not intuitively get.

Thanks again.

Galactic Adventures... looks like it's going to be another non-tanned summer!
Prometheus09's Profile
[WWW]
ZeekSlider

Civilized Sporeon

Joined: 09/12/2008 10:59:43
Messages: 1191
Offline

MaxisGamer wrote:
ZeekSlider wrote:
MaxisGamer wrote:Make sure you set one of the advanced behavior to be "Receive". NPCs won't receive items you give them unless they have this behavior. If you look at the default behaviors for all five default sets (peaceful, neutral, mindless, etc), you will see that they all have "Receive" just above Wander.
I figured that part out, but I'm trying to figure out how to make the NPCs give the player something after they got the item they were suppose to get. Can't figure that part out, so now all my NPCs will automatically give the player the item they are holding instead of trading out.

And FYI, Receive is above Give in the priority order.


If I'm understanding your problem, just specify which object you want to give in the advance UI panel (you can specify which object to give, and who to give it to). The NPC will only give you that particular item if it's holding it.
Which it does, but it always does it BEFORE the NPC receives what I am trying to give it.

Basically, the behavior I'm trying to do is this:

NPC receives item A while holding item B
After receiving item A, NPC gives item B to player

What ends up happening is this:

Player walks into awareness range with item A, and NPC automatically gives item B to player.

Gave up on it and started working on the finishing touches of my first adventure, which I found out is so detailed it crashes my processor. Guess I need a new computer.

ZeekSlider's Spore Blog - Expanded creation descriptions and exclusive content not shared on Spore.com

Number of Spore Re-Installs: 8
Most Recent Re-Install: 16/05/2011
Reason for Re-Install: Constaint crashing due to lack of use?? Possibly...
 
Forum Index » Spore Galactic Adventures
Go to:   
 
Powered by JForum 2.1.8 © ( EA Dev Build 2018-08-14 15:53:40 ) JForum Team