Avril Lavigne Posted September 14, 2015 Share Posted September 14, 2015 (edited) How do you construct an AI for the unit to go to a specific place? Like the same as Hector chapter 15 (Talons Alight?) where you are to defend the throne. I was wondering how to do this. I disassembled the chapter to figure it out and I'm not really savvy with the AI format that I get when I disassemble a chapter event, and not only that I'm not entirely sure how I would use this AI to target a specific area or person. Please help! Thanks. Edited September 15, 2015 by Avril Lavigne Quote Link to comment Share on other sites More sharing options...
Rickochet Posted September 14, 2015 Share Posted September 14, 2015 Do you mean just using a MOVE command and giving the unit a Guard Ai? Quote Link to comment Share on other sites More sharing options...
Agro Posted September 14, 2015 Share Posted September 14, 2015 (edited) http://feuniverse.us/t/fe7-the-official-ai-documentation-thread/348 Have a read through this thread and see whether or not you can follow on. Essentially, each AI byte corresponds to a pointer within a table. These are located at: Pointer table for primary AI: B98994 (20 entries) Pointer table for secondary AI: B98908 (35 entries) So AI1 0x01 corresponds to the first pointer etc. That pointer goes to a set of data that designates what the AI does. So you need to follow the "pointer trail" as it were to set an AI up to move to a certain location. For example, AI byte 2 is this: 0x13 = Move to \[03,13] (B98718) So you need to go to $B98908 and find the 0x13th pointer within there. Then you go to that address of the pointer and there should be a series of AI commands. You will almost certainly not be able to decipher most of it but somewhere there you'll probably see a pair of bytes that are 03 0B (or 0B 03, I can't remember if they're reversed or not) You would change those bytes to the coordinates you want that AI to go to, then change AI Byte 2 of the character (in your events) to 0x13 Occasionally these AI commands contain yet ANOTHER pointer, which is usually a pointer to a list of characters or classes. (One application of this would be "do not attack all characters listed at $FFFF00".) Crazycolorz5 even made an extension of the event assembler which allows you to piece together your own custom AI. It's definitely work checking out, although I haven't had the opportunity to use it yet. Does that make sense? Edited September 14, 2015 by Agro Quote Link to comment Share on other sites More sharing options...
Avril Lavigne Posted September 15, 2015 Author Share Posted September 15, 2015 (edited) http://feuniverse.us/t/fe7-the-official-ai-documentation-thread/348 Have a read through this thread and see whether or not you can follow on. Essentially, each AI byte corresponds to a pointer within a table. These are located at: Pointer table for primary AI: B98994 (20 entries) Pointer table for secondary AI: B98908 (35 entries) So AI1 0x01 corresponds to the first pointer etc. That pointer goes to a set of data that designates what the AI does. So you need to follow the "pointer trail" as it were to set an AI up to move to a certain location. For example, AI byte 2 is this: 0x13 = Move to \[03,13] (B98718) So you need to go to $B98908 and find the 0x13th pointer within there. Then you go to that address of the pointer and there should be a series of AI commands. You will almost certainly not be able to decipher most of it but somewhere there you'll probably see a pair of bytes that are 03 0B (or 0B 03, I can't remember if they're reversed or not) You would change those bytes to the coordinates you want that AI to go to, then change AI Byte 2 of the character (in your events) to 0x13 Occasionally these AI commands contain yet ANOTHER pointer, which is usually a pointer to a list of characters or classes. (One application of this would be "do not attack all characters listed at $FFFF00".) Crazycolorz5 even made an extension of the event assembler which allows you to piece together your own custom AI. It's definitely work checking out, although I haven't had the opportunity to use it yet. Does that make sense? Hey thanks! I'll let you know soon. I appreciate this. I am kinda busy I'll look at this in a bit. EDIT: Yup, already checked! At B98718 it shows "03 0D" which is essentially "3,13" so I would just edit that and then place it in my characters AI such as "0x00 0x13"? And yeah, I'll check that custom AI thing out. Sorry for the lazy response. Just don't got all that much time to be testing stuff out haha Edited September 15, 2015 by Avril Lavigne Quote Link to comment Share on other sites More sharing options...
Agro Posted September 15, 2015 Share Posted September 15, 2015 that's absolutely correct Quote Link to comment Share on other sites More sharing options...
Avril Lavigne Posted September 15, 2015 Author Share Posted September 15, 2015 that's absolutely correct Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.