Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 03/09/08 12:03

coool
Member
From: China Haikou
Registered: 02/12/08

why didn't ai fight?

I add some charaters ,

I see this here:
http://wiki.oni2.net/OBD:BINA/OBJC/CHAR
0x1D0  int16  00 00  0  patrol path ID (reference to the Patrol_Path.BINA file) 
0x1D2  int16  00 00  0  combat ID (reference to the Combat.BINA file) 

I think "patrol" is unnecessary,it makes ai walk here and there.so I change it to 00 00,I think it will not patrol ~and change all charater like this.

but when the begining of game,AIs are like sleeping,didn't fight at all only standing there,even they were hurted.

than wait for a long time,they move and fight ...I don't know why,I change the "patrol" to 00 00 only,and didn't change others

the bosses(Muro,Barabus,Mukade)are all 00 00 here,but they don't sleep~what's the difference?
or there's another reason?

Offline

#2 03/09/08 18:03

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: why didn't ai fight?

coool: Was it all the AI's that didn't move or some moved first, then others later.  Also, are you playing a large number of characters at the same time?

Please post your script and BINACJBOCharacter.oni file.

Offline

#3 03/09/08 23:03

coool
Member
From: China Haikou
Registered: 02/12/08

Re: why didn't ai fight?

if I playing a large number of characters at the same time,so the AIs can't move?

yes I playing a large number of characters that time,..

Offline

#4 03/09/08 23:03

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: why didn't ai fight?

coool: How many?  I had a something similar happen to me with my Good vs Evil 3.  I had 30 characters, but when it started, some of the characters did not move, but as characters were eliminated then they got into the fight.

Offline

#5 03/10/08 00:03

coool
Member
From: China Haikou
Registered: 02/12/08

Re: why didn't ai fight?

Now I add less charaters in the game,I  only add 8 AIs this time. some AIs are not move all the same...but the time they got into the fight become shorter~

And i see the charater's head like a square...

e...now oni crashed often...when I playing for some time,it suddenly crashed,not in the begining...

adding too much charaters will let oni crashed?but I only add 11 charaters to level 19,I think it isn't much...
and in the game what I'm playing,there's only 8 AIs...omg...what's the mistake...problems come one by one...

Last edited by coool (03/10/08 00:03)

Offline

#6 03/10/08 12:03

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: why didn't ai fight?

coool, please calm down and try to report your problems to us more systematically.
We are not you, so you have to explain what you do and what you see very clearly.
The weirder your problem, the more careful you should be when describing it to us.
Of course we can all WTF and OMG about it together, but that's not the goal, right?
There's a lot of ways to mess up Oni, and you're making it hard for us to guess smile

OK. When setting things to 0 it's good to remember what meaning the 0 has.
You think that a 0 patrol ID is equivalent to no patrol ID at all. That is not so.
Actually, it's the -1 value that's interpreted as a no-ID, and 0 is a valid ID.

And there is a patrol path in level19 with the patrol ID 0, called patrol_00.
It's roughly equivalent to the following set of scripting commands:

ai2_makeignoreplayer shpadoinkle 1
ai2_setmovementmode shpadoinkle run
chr_dontaim shpadoinkle 0
ai2_movetoflag shpadoinkle 52 setfacing
patrolscript0054 shpadoinkle

("shpadoinkle" being the name of whatever character follows the patrol path)
(I'm not sure the name is actually passed to the patrolscript0054 function)
patrolscript0054 can be found in compound.bsl and looks like this:

func void patrolscript0054(string ai_name)
{
    dprint doalarm
    ai2_doalarm A_Sb7 1
}

As for the patrol_00 path, it's assigned to A_Sb7 in this function:

func void run1(string ai_name)
{
    dprint run1
    ai2_doalarm A_Sb7 1
    ai2_dopath A_Sb7 patrol_00
#    ai2_setjobstate A_Sb7
}

called when you attack the Strikers guarding the entrance.
As you can see, it's a bit overkill, but it works fine in Oni.

There can be several problems with telling several AI to do patrol_00
First, if the target flag is behind a locked door or such, the AI will freeze...
Second, if the target is far away, this may overload the pathfinding cache.
In any case, you should be very careful when giving patrol paths to the AI.
All the more careful as 0 is a valid patrol path ID, not a no-patrol setting.

Now, it is true that the characters from the final fight have a 0 patrol ID.
But, the reason why they never try to reach flag 52 is their alert level.
Patrol paths are only activated at the minimal alert level (0=lull).
The alert level of the final fight characters is always at least 1=low.
That's why the 0 patrol ID is not a problem for them (or the bosses).

Also, when messing around with patrol paths, it helps to use ai2_showpaths=1

Last edited by geyser (03/10/08 12:03)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#7 03/11/08 04:03

coool
Member
From: China Haikou
Registered: 02/12/08

Re: why didn't ai fight?

"-1 value that's interpreted as a no-ID"

so a no-ID makes an AI not patrol?

but how should i change it? I'm sure it can't be "0-1 00" : )


and I hate the auto-ami in oni(when not use a gun),when I want to run-crouch across an enemy form his left or right,it makes me crouch to him ...so what should i do?

as I aksed so many questions,I think need to post a topic :"coool's questions"  : ) aha~and I'm worried if it's boring that I ask questions so much~

Offline

#8 03/11/08 06:03

m2
Member
Registered: 01/22/07

Re: why didn't ai fight?

but how should i change it? I'm sure it can't be "0-1 00"

"FF FF" = -1

...so what should i do?

Try the script command "chr_auto_aim_dist=0". (pc only)

and I'm worried if it's boring that I ask questions so much

It's not boring. And it keeps the forum alive.

Offline

#9 03/11/08 08:03

coool
Member
From: China Haikou
Registered: 02/12/08

Re: why didn't ai fight?

Thanks.

In my country,there are few people know and play oni,I can't find any place about oni~
so I find here smile

Offline

#10 03/11/08 09:03

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: why didn't ai fight?

Actually, the -1 patrol ID is never used in Oni. Usually they use 0, and then just keep the AI from going into the "lull" alert level (like for bosses and such).
I never tried to specify a -1 patrol ID (or an invalid patrol ID), so I can't guarantee that it will work. It's supposed to work by analogy with the other IDs...
In any case, if the -1 ID doesn't work, you'll set the initial and minimal alert levels to 1=low; that will make your characters as patrol-less as Oni's bosses.

What country are you from, coool? Seen our "coool" Google map? http://oni.bungie.org/community/forum/v … .php?id=28


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#11 03/11/08 11:03

coool
Member
From: China Haikou
Registered: 02/12/08

Re: why didn't ai fight?

Aha,the map is really cool~

I found another member from China~

geyser wrote:

In any case, if the -1 ID doesn't work, you'll set the initial and minimal alert levels to 1=low; that will make your characters as patrol-less as Oni's bosses.

If I set the initial and minimal alert levels to 1=low, what the patrol ID I should set?00 00? or the original?
"set the initial and minimal alert levels to 1=low",is it like this?:

64 00 00 00  01 00 00 00  01 00 00 00(the"64 00 00 00" is ammo filling in percent, initial and minimal alert levels is after it)

but  the 3 bosses are not all like this~For example,barabus and OutroNinja,and their patrol ID are 00 00
and they didn't freeze...Why they are different to other charaters...

Offline

#12 03/11/08 12:03

geyser
Member
From: beyond the veil
Registered: 01/14/07
Website

Re: why didn't ai fight?

"64 00 00 00  01 00 00 00  01 00 00 00" that's correct

"what the patrol ID I should set?00 00? or the original?"
It doesn't matter, because it will never be used anyway.
Usually there's nothing special about the patrol with ID 0.
(I might have to check; maybe sometimes it's a dummy)

"barabus and OutroNinja,and their patrol ID are 00 00 and they didn't freeze..."
1)
The 0 patrol is a completely normal patrol, that doesn't have to "freeze" the AI.
You will only have a problem if you tell the AI to go to an area they can't reach.
So, barabus and OutroNinja just go away from you to some point in the arena.
They would freeze if the patrol was inconsistent with their position in the level.
2)
These bosses don't get much of a chance to go into "lull" anyway: they fight you.
If you die, it won't matter if the boss AI are screwed up by improper patrol paths.

So there's no "general" wisdom about patrol paths. You have to look in every level.
Is there a patrol path with ID 0 in the current level? What does this patrol look like?
If the character has a 0 patrol ID and "lull" initial/minimal alarm levels, question is:
is 0 a suitable patrol for that character? and if not, do we really care if he freezes?

EDIT: The original OutroNinja has patrol ID 1, and barabus has ID 0 only in level2.
The Barabases you actually fight in level3 and level8 both have patrol ID 1 as well.
A lot of characters with patrol ID 0 are dummy characters used in the cutscenes.
Others have their patrol set at runtime (e.g. the droids in the shooting range)...
And a few use the 0 patrol as their actual patrol path. Too lazy to check all that.

Actually, rather than messing with patrol ID 0, I'd try -1 if I were you...

EDIT: I tried -1 (FF FF) and it works like a charm. So, just use the -1 ID.

Last edited by geyser (03/11/08 18:03)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#13 03/12/08 02:03

coool
Member
From: China Haikou
Registered: 02/12/08

Re: why didn't ai fight?

Thanks

FF FF makes AIs no longer freeze

Offline

Board footer

Powered by FluxBB