Xenomic Posted December 30, 2013 Share Posted December 30, 2013 Ok, so I've recently started trying to learn how to hack FE7 (I'd really like to do FE8 but I think I should stick with 7 for now. Just hope that one day manaketes will be easy to do in 7 ;__; ). I've started with eventing (because I always start with the harder ones!) and I generally understand how Units and Turn_events work. The only thing I'm trying to learn here with UNITs and Turn_events is how to change AI, which doesn't seem like it should be hard.... However, I am having a weird problem here. Bad:UNIT Batta Berserker Batta Level(30, Enemy, 1) [8,8] [8,8] [ironAxe, DelphiShield] GuardTile Here, I have a Batta who is supposed to sit there and do nothing unless you're next to him, right? TurnEventEnemy(0x0,BattaAttack,6) In my turn events, I have this set so that on the enemy's 6th turn, it'll run BattaAttack. BattaAttack: //This changes enemy's AICHAI Batta AttackInRange ENDA And here, it's supposed to change Batta's AI from GuardTile to AttackInRange (I'm making cliff notes for myself, as you can tell by the //. If anyone can help me with making cliff notes on various things, that'd be great and help me learn a lot faster). However, despite having someone else test this and it working fine for him (Batta apparently does his thing of chasing after and attacking whoever is in range of him on the 6th turn), he...will not move ever for me. I do not know why. Is there something wrong with my Event Assembly?? Is there some other code that's interfering somehow? I don't know! The entire document, for those curious. This isn't meant to be anything but cliff notes and experimenting with eventing to make sure I can understand this, in the event that maybe, MAYBE, someday I'll make my own hack (if I have a team only though...): //Made by markyjoe1990 of Youtube//Modified by Nintenlord#define DISABLE_TUTORIALS#include EAstdlib.eventEventPointerTable(0x06,Pointers) //points to prologueORG 0xD80000Pointers:POIN Turn_events // 0x0 is good for turn events. For other events, start at 0x6 and go up. Up to 65 events will be reset per chapter. 0x3 is Victory. 0x2 is Boss Death.POIN Character_eventsPOIN Location_eventsPOIN Misc_eventsPOIN TrapData TrapDataPOIN Good Bad Pherae Matt //Each one of these go into their own section as shown belowPOIN Opening_event Ending_eventGood:UNIT Lyn_t LynLord Lyn_t Level(5, Ally, 1) [6,6] [14,14] [Durandal, Elixir, IronSword, Speedwings] NoAIUNIT EmptyBad:UNIT Batta Berserker Batta Level(30, Enemy, 1) [8,8] [8,8] [ironAxe, DelphiShield] GuardTile //AttackInRange = If target is in range, will make AI target them. NoAI = Chases after enemies of other side. Guard = Unit will not move, but will attack those in range. PursueWithoutHeed = . 0x00 for those without items.UNIT EmptyPherae:UNIT Hector HectorLord Hector Level(30, Ally, 1) [0,0] [0,0] [Rapier] NoAIUNIT EmptyMatt:UNIT Matthew Thief Matthew Level(30, NPC, 1) [0,5] [0,8] [ironSword, Vulnerary, RedGem] NoAIUNIT EmptyTurn_events:OpeningTurnEvent(Opening_event) //loads opening event, NEVER TOUCHTurnEventPlayer(0x0,Opening_event,1) //Each of these separate events are used to determine what happens on either that player's or enemy's turnTurnEventPlayer(0x0,Eliwoodarrives,2) //For example, on the player's second turn, this would make the event "Eliwoodarrives" happen, and only onceTurnEventEnemy(0x0,Matthewarrives,5)TurnEventEnemy(0x0,BattaAttack,6)END_MAINCharacter_events: //this is for talking and stuffs.CharacterEvent(0x1,EliwoodBatta, Lyn_t, Matthew) //Eliwood and Batta //talk it out!END_MAINLocation_events:END_MAINMisc_events:CauseGameOverIfLordDies//AREA 0x13 Kalosattack [20,11] [29,18] If Unit goes past these coordinates, activates eventDefeatBoss(Ending_event) //If the boss is beaten, you go to the next chapterEND_MAINOpening_event:LOU1 Good //Loads unitsENUNLOU1 BadENUN //This means it'll wait for the code to run.OOBBENDAEnding_event:MoveToChapter(0x01) //Move to chapter 1ENDAEliwoodBatta:Tex1 0x0A8E //The convo part 1MUS1 0x0042 //Plays "Together we Ride" in the middle of the convoMORETEXT 0x0A8F //Text part 2!! WITH NOTHING THAT MAKES IT SEEMS LIKE THE CONVO STOPPED!! WOW!!!REMA //Clears all portraits and BGs, use after a convo ALWAYSTurnAlly(Matthew) //turns Batta into a good guyENDAEliwoodarrives: //This loads up Hector's sprite and character dataTEX1 0x8AEREMALOU1 PheraeENUNENDAMatthewarrives: // This loads up Matthew's sprite and character dataTEX1 0x8B1REMALOU1 MattENUNENDABattaAttack: //This changes enemy's AICHAI Batta NoAI//CHAI Batta AttackInRange Looks for specific character to change AI//CHAI [15,5] [0x0,0x0,0x0,0x0] sets it so that it looks for the coordinates instead of specific character. [0x0,0x0,0x0,0x0] = NoAIENDA//Kalosattack://CHAI Arch NoAI//CHAI Proto NoAI//CHAI Issuls NoAI//CHAI Poly NoAI//CHAI Terra NoAI//CHAI Krisars NoAI//CHAI Boney NoAI//CHAI [39, 13] NoAI//ENDATrapData:ENDTRAPMESSAGE Events end at offset currentOffset//The map for this chapter is at offset: ???????? Quote Link to comment Share on other sites More sharing options...
Agro Posted December 30, 2013 Share Posted December 30, 2013 (edited) Hi Xenomic, a topic actually exists for event questions, so for future reference, please pop your event queries in there instead. As for the events themselves, I did pick up an (unrelated) issue: Tex1 0x0A8E //The convo part 1 You'll want to change this to TEX1. Now, back to the question at hand: I hate to tell you that unfortunately in FE7 CHAI does not work the way one would expect it to and in fact it may not work at all. I don't believe any known way of making CHAI work properly exists for now--perhaps you could try a workaround like having a conversation with a background and then reloading Batta with the AttackInRange AI before fading back to the map instead? Edited December 30, 2013 by Agro 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.