Jump to content

Learning how to hack FE7. Need help!


Xenomic
 Share

Recommended Posts

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 AI
CHAI 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.event

EventPointerTable(0x06,Pointers) //points to prologue


ORG 0xD80000

Pointers:
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_events
POIN Location_events
POIN Misc_events
POIN TrapData TrapData
POIN Good Bad Pherae Matt //Each one of these go into their own section as shown below
POIN Opening_event Ending_event

Good:
UNIT Lyn_t LynLord Lyn_t Level(5, Ally, 1) [6,6] [14,14] [Durandal, Elixir, IronSword, Speedwings] NoAI
UNIT Empty

Bad:
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 Empty

Pherae:
UNIT Hector HectorLord Hector Level(30, Ally, 1) [0,0] [0,0] [Rapier] NoAI
UNIT Empty

Matt:
UNIT Matthew Thief Matthew Level(30, NPC, 1) [0,5] [0,8] [ironSword, Vulnerary, RedGem] NoAI
UNIT Empty

Turn_events:
OpeningTurnEvent(Opening_event) //loads opening event, NEVER TOUCH
TurnEventPlayer(0x0,Opening_event,1) //Each of these separate events are used to determine what happens on either that player's or enemy's turn
TurnEventPlayer(0x0,Eliwoodarrives,2) //For example, on the player's second turn, this would make the event "Eliwoodarrives" happen, and only once
TurnEventEnemy(0x0,Matthewarrives,5)
TurnEventEnemy(0x0,BattaAttack,6)
END_MAIN

Character_events: //this is for talking and stuffs.
CharacterEvent(0x1,EliwoodBatta, Lyn_t, Matthew) //Eliwood and Batta //talk it out!
END_MAIN

Location_events:
END_MAIN

Misc_events:
CauseGameOverIfLordDies
//AREA 0x13 Kalosattack [20,11] [29,18] If Unit goes past these coordinates, activates event
DefeatBoss(Ending_event) //If the boss is beaten, you go to the next chapter
END_MAIN

Opening_event:
LOU1 Good //Loads units
ENUN
LOU1 Bad
ENUN //This means it'll wait for the code to run.
OOBB
ENDA

Ending_event:
MoveToChapter(0x01) //Move to chapter 1
ENDA


EliwoodBatta:
Tex1 0x0A8E //The convo part 1
MUS1 0x0042 //Plays "Together we Ride" in the middle of the convo
MORETEXT 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 ALWAYS
TurnAlly(Matthew) //turns Batta into a good guy
ENDA


Eliwoodarrives: //This loads up Hector's sprite and character data
TEX1 0x8AE
REMA
LOU1 Pherae
ENUN
ENDA

Matthewarrives: // This loads up Matthew's sprite and character data
TEX1 0x8B1
REMA
LOU1 Matt
ENUN
ENDA

BattaAttack: //This changes enemy's AI
CHAI 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] = NoAI
ENDA

//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
//ENDA


TrapData:
ENDTRAP


MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: ????????

Link to comment
Share on other sites

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 by Agro
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...