Difference between revisions of "Enemy AI"
From Chrono Compendium
Line 47: | Line 47: | ||
− | 00 WW XX YY | + | 00 WW XX YY - wander mode YY is how you wonder, WW animation related? |
02 WW 05 XX YY ZZ - Spell WW, Message ZZ, XX YY for double/triple? | 02 WW 05 XX YY ZZ - Spell WW, Message ZZ, XX YY for double/triple? | ||
07 XX YY ZZ - Become different monster XX using animation YY. ZZ affects keeping HP requires event code | 07 XX YY ZZ - Become different monster XX using animation YY. ZZ affects keeping HP requires event code |
Revision as of 17:43, 1 July 2008
Notes on Enemy AI are currently incomplete; eventually, data will be decoded and added into Temporal Flux for functionality. Enemy AI information will be updated as new stuff comes.
Offsets
Directly from Geiger's Offsets.txt ___________________________________________________________________ 0C8B08 0C8D07 PTR No No Pointers to Enemy AI (local) 6/21/2004 0C8D08 0CCBC8 AI No No Enemy AI 7/14/2003 ___________________________________________________________________
Summary
Enemy AI is split into two sections seperated by the bytes FE FF.
XXXXXXXXXXXXXXX FE FF YYYYYYYYYYYYYYYY
The first section is the normal enemy moves. The second section is the counter section is used if the enemy is hit. Each section has the following layout.
<condition_1> FE <action_1> FE <condition_2> FE <action_2> .... FE <condition_n> FE <action_n>
Each condition is a multiple of 4 bytes. Every 4 bytes is a boolean statement (see below conditions). If there are more than one statements they must all evaluate to true in order to do the corresponding action.
Know Conditions
00 00 00 00 - Normal attack./enemy alive 01 03 00 00 - HP is at 50% or less. 09 00 00 00 - Physical Counter. 10 00 00 00 - Always Counter. 11 00 00 00 - Magical Counter. 15 XX 00 00 - Elemental Counter - 20 Ice, 10 Fire, 80 Lightning, 40 Shadow, 00 Physical. (02 and 04 have been used, only saw them skimming the listings) 1F 04 XX 00 - Is enemy distant (non-zero) or up close (zero)? 20 00 00 00 - Final attack.
Know Actions
00 WW XX YY - wander mode YY is how you wonder, WW animation related? 02 WW 05 XX YY ZZ - Spell WW, Message ZZ, XX YY for double/triple? 07 XX YY ZZ - Become different monster XX using animation YY. ZZ affects keeping HP requires event code 09 XX - Pretend to do attack XX 0A XX YY- - Disable do animation XX display Message YY 0B XX YY 00 ZZ - Set stat type XX, Stat YY, with message ZZ 0C XX YY ZZ - Add stat XX by YY message ZZ 0F XX - Display Message XX 28 XX YY - Change Stat XX by YY
Supplemental Material
From: Offsets (Chrono Trigger)