Author Topic: Enemy AI needs better documentation. (research thread)  (Read 15564 times)

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Enemy AI needs better documentation.
« Reply #15 on: July 02, 2008, 01:02:31 pm »
updated link

(Mauron  maybe you could put the link on the first post here?).  You can now write back to the rom.  It should make investigating much easier.  I did some messing around with 17 and I'd say that waddler and Jlukas are right it's just a percentage chance of being true. 

--JP

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: Enemy AI needs better documentation.
« Reply #16 on: July 02, 2008, 02:01:04 pm »

JLukas I know you and geiger did alot of work on strings, do you have a list of these somewhere?  Something I can copy/paste into the program so I can give them a drop down?  I won't make it editable cause if TF can't already edit the then I'm sure it will soon. 

Also have you noticed where it is pulling the tech index from? If we can go backtrace the index i'll be able to add enemies to the Tech editor relatively easy.

Text strings?  Just look at the list in TF for Battle Enemy Messages.

Not sure what you mean exactly with the tech index.  It's doing a lot of stuff when that byte is read.  The tech index is x3, then subtract what it was before the multiplication, then add CD5526.  Finally, it uses that result as a starting address to read 7 bytes of data.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Enemy AI needs better documentation.
« Reply #17 on: July 02, 2008, 02:13:40 pm »
Hm I'm at work right now but does TF let me just do one batch copy paste?  (It'd save me from having to copy them over one at a time).

As for Tech Index i was hoping maybe it was just an index in the array somewhere that pointed to the actual tech Events (like what my tech editor edits)  SOmething like this

02 49 XX XX SS
 |  Tech Index is 49 |

(SOmehwere else in memory)

         47                             48                                  49                   4A
|   Some enemy Tech  |  SOme Enemy Tech | Crimson Rain Pointer|  | Some enemy Tech|


and then Crimson rain pointer pointed to the events for crimson rain.  If that array exist I could just go to that array and parse each pointer out of it to add to the Tech editor.  So maybe the 7 bytes of data contains the pointer to the events within it? 

CD5526 would be the start of the array I'm guessing?  It may contain more than just a pointer to the events I know that for PC techs there was properties like MP, target etc it could contain that kind of information as well.

--JP



JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #18 on: July 02, 2008, 02:47:00 pm »
Hmm, might be faster to copy text from the Compendium's English script.

CD5526 isn't the only block of data it's using that index for, there's some more blocks, and it could start getting complicated.  I'll look at it some more.


Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
Re: Enemy AI needs better documentation. (research thread)
« Reply #19 on: July 02, 2008, 03:10:07 pm »
04 YY XX ?? ?? - Seems to be another tech command. XX is the tech used, and it didn't do anything when YY was not 02.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #20 on: July 03, 2008, 11:09:53 pm »
Enemy AI editor added.

It's much more useful now.

You can add  conditions/actions.

Move preconditions up and down (any level 0 node).

Copy/Paste functionality same as Tech Editors.

I added the 04 command.

Unfortunately I'm afraid I won't be able to do much researching on this.  I'm counting on the compendium to decode these nodes!  I need to get back to work on CE it's stalling w/o me there.  I encourage people to just use this thing to play around you can probably figure out a node or atleast a property of a node about one per hour and I honestly don't think there's THAT many nodes.  Most of the unknowns are in bosses and they have pretty clear strategies that we can already describe in english.

Pretty soon here CE is going to have to give bosses AI if we have this thing fleshed out we can have a contest for it (same with techs) to add stuff to the game.

--JP

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #21 on: July 04, 2008, 09:26:12 pm »
A large update has been posted to the AI page:

http://www.chronocompendium.com/Term/Enemy_AI.html

Some older information was cleaned up and confirmed.  The total number of Condition and Action commands have been determined as well.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #22 on: July 05, 2008, 01:27:00 am »
Hey I just checked it out it looks great its nice to know there are so relatively few commands ill add this as soon as I get a chance.

Jp

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
Re: Enemy AI needs better documentation. (research thread)
« Reply #23 on: July 05, 2008, 01:14:23 pm »
Can the next version switch the enemy listing to hex numbering?

Condition 12 ?? XX ?? - Seems to relate to tech countering only. Tank Head's 12 00 01 00 was triggered when I used Cyclone to attack. Changing XX to 02 triggered it with Lightning.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #24 on: July 05, 2008, 02:10:00 pm »
Sure ill switch it to hex. About 12 it skipped slash?  Wouldn't 02 be slash?

Jp

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
Re: Enemy AI needs better documentation. (research thread)
« Reply #25 on: July 05, 2008, 02:43:13 pm »
Right, the slash attack. I was thinking of the element at first, but you're right, it's the tech index. Proof I should stay in bed while sick.

A couple more conditions:

03 ?? ?? ?? - Relates to movement. Used by Bugger's Attacked by moving object.
0C XX ?? ?? - Status counter. XX: 00 - none, 01 - chaos, 06 - sleep. I haven't checked the others yet.
« Last Edit: July 05, 2008, 03:43:23 pm by Mauron »

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #26 on: July 05, 2008, 03:55:57 pm »
Updated the AI page again.  jsondag, double check the lengths for all Actions.  There's a couple updates like Action 15.  Also, in an older post in this thread I had two Action commands listed as variable length, but it turns out it was a search mistake that returned a Condition length.  There isn't any variable length Actions, yet.

Any Action commands still blank (currently 03, 05, 08, 09, 10, 13, 14) have not yet been found used by a monster, and the lengths of these can't be correctly determined yet.  If you did add any lengths for these from the list in my older post, remove them as I can't be sure they were not Condition lengths instead.

If you do find a monster that has one of those Actions, please post it.
« Last Edit: July 05, 2008, 04:07:54 pm by JLukas »

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #27 on: July 05, 2008, 04:23:03 pm »
Ok I probably won't be able to update till Monday as I'm on vacation for the 4th but ill add all these soon great work everyone.

Jp

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #28 on: July 06, 2008, 01:24:42 pm »
Whoo,

alot has been done unfortunately I still won't have time to update today but expect a pretty large overhaul soon. 

I was thinking about hecran the other night.  I remember he would go down in a stance and wait for you to attack him before he counter attacks.  That made me think there must be a "mode" some sort of link that we are missing.  Looking at Hecran's AI makes me think that 07 01 XX XX must be more than just check if you've been hit once.  I think it might be "if (isInSpecialMode) and you can set "isInSpecialMode" to true and false with the 0D command?  Otherwise he would respond with the Yes Indeed! tech every time.  I think once he hits 50% health he does a number of techs in a row then sets "isInSpecialMode to true.  he then waits for 4 moves before setting it to false.  However if you attack him while isInSpecialmode is true he responds with the Yes Indeed Tech. :



Code: [Select]

//Special Mode
   07 01 00 00 FE (Check times atttacked)
   00 00 06 04 (Wander Mode, set animation?)
   00 00 06 04 (Wander Mode, set animation?)
   00 00 06 04 (Wander Mode, set animation?)
   00 00 06 04 (Wander Mode, set animation?)
      0D 40 18 (Missing link???)
            FE


//actions that lead to setting special mode
01 03 00 00 FE (50% Health)
      02 8A 05 00 00 6A
      02 8A 05 00 00 6A
      02 20 05 00 00 1F
                   0D 04 15  (Missing link??)
                             FE
...

FF

//Special Mode is true
07 01 00 00 FE
   02 51 06 00 00 16 FE (Yes Indeed???)

What do you guys think?  I also want to investigate the animations of Hecran and see which animation is his defense "attack me" stance.  Maybe Wander Mode sets animation on certain occasions.

--JP

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: Enemy AI needs better documentation. (research thread)
« Reply #29 on: July 06, 2008, 01:28:23 pm »
Golem Boss has the same action.  The third byte of the 0D action is a string index.