Jump to content



Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  Oblivion Knight : (26 February 2024 - 11:30 AM) Whoa I can edit a typo. The technology.
@  Oblivion Knight : (26 February 2024 - 11:29 AM) Obligatory message.
@  Elwood : (02 January 2024 - 04:19 AM) Happy New Year!!!
@  Aaron : (13 February 2023 - 09:19 PM) I'm still out here alive. If you remember me, I hope you're doing well!
@  Aaron : (13 February 2023 - 09:09 PM) 2023 and this place is still up huhh
@  Elwood : (05 January 2023 - 07:58 AM) Ah a Christmas greeting from Wolfie! Even if I saw it way late Merry Christmas and Happy New Year to everybody!
@  Cero : (31 December 2022 - 09:27 PM) Man that bot went crazy
@  Whitewolf8 : (24 December 2022 - 10:02 AM) I return once more on the eve of Christmas to haunt you all again!... Mainly Elwood. Hello!
@  Elwood : (25 November 2022 - 04:58 AM) A bot! Ah the nostalgia!
@  Elwood : (02 November 2022 - 02:30 PM) Yo ho ho ho! Thar be the white wolf!
@  Whitewolf8 : (24 October 2022 - 12:29 AM) Well, blimey it's been a while. Hoy there! If anyone's still alive here anyway.
@  Valke : (21 April 2022 - 12:12 PM) im taking the 2nd shout of 2022 😂
@  Elwood : (03 March 2022 - 10:12 PM) Mwuhahaha! The first shout of 2022 is mine!
@  Fire Blazer : (12 November 2021 - 05:22 PM) *also stretches arms a little*
@  xcrash1998 : (07 November 2021 - 08:42 PM) "streches arms"
@  Ezra : (07 May 2021 - 05:20 AM) Maybe I'll pop on the discord soon
@  Fire Blazer : (01 April 2021 - 08:08 PM) Aaaaaaand done~ :P
@  xcrash1998 : (29 March 2021 - 08:52 AM) I guess we are one more post away from counting to 2500
@  Fire Blazer : (10 March 2021 - 11:39 PM) but I have bad memory and can't remember ;(
@  Elwood : (15 February 2021 - 10:23 AM) I'd like to but I've told you about my issues with discord before.

Photo

Event Hacking Elaborations


  • Please log in to reply
1 reply to this topic

#1 Mariobro3828

Mariobro3828

    Great Member

  • Members
  • PipPipPipPipPipPip
  • 151 posts
  • Location:Oklahoma
  • Interests:Drumming (Rudimental), Hanging out with friends, games (of course :P)

Posted 07 February 2009 - 07:19 AM

*Under Construction*

The purpose of this is to help you understand better the intricacies of event hacking, in a very simplified way.


Now, before you read this guide, I suggest you obtain some common knowledge on event hacking. At least read Arch's guide to chapter construction, as well as the FE7 Event assembler language readme that comes with the event assembler. You don't have to understand it per se, as of course this guide is supposed to elaborate on some of the more confusing concepts.

Anyways, let's get started.


First off, remember that template you found in Arch's guide? I'm going to give you an even more complete one that will hopefully save you some more work.


QUOTE
POIN @Turn_events //Turn-based Events
POIN @Character_events //Character-based Events
POIN @Location_events //Location-based Events
POIN @Misc_events //Misc events
POIN @Ballista @Ballista //ballista data for normal and hard mode (in that order)
POIN (Pointer) (Pointer) (Pointer) (Pointer) //enemy data for 4 modes
POIN (Pointer) (Pointer) (Pointer) (Pointer) //ally data for 4 modes
POIN @Opening_event @Ending_event //Pointer to opening and ending scenes

@Turn_events
//Put turn events here
TURN 0x00 @Opening_event [01,00] 0x0 0x00
CODE $00

@Character_events
//Put character events here
CODE $00

@Location_events
//Put location events here
CODE $00

@Misc_events
//Put miscelanious events here
CODE $00

@Ballista
//Put ballista data here
CODE $00

@Opening_event
//Put your opening event here
ENDA //(or ENDB if you have a preparations screen planned)

@Ending_event
//Put your ending event here
ENDA


Note the CODE $00. This basically just adds a bunch of zeroes to the code to indicate the end of that section. This is pretty vital iirc.

So is the first turn event pointing to the opening event. I couldn't seem to get it to load any other way, so I'm assuming this is completely necessary.


Event Identifier Numbers

So, I see the question "how do I know which event number to use?" asked a lot. Well, really, you have quite a few choices. But be careful, and follow these guidelines:

1. Don't use the same event number twice, unless you want that certain event to disable another event or visa versa. But this can also be done with the ENUF code, but whatevs. Oh, also, 0x00 can be used as many times as you want.

2. Don't use extremely high numbers. I don't know exactly where it cuts off, but around 0x30 is where event IDs start becoming permanent, and can only be used once per game as opposed to once per chapter.

3. Be careful you aren't replacing other events with this. For example, some boss quotes seem to be placed at 0x01 (you can use nightmare to change that though) but yeah, make sure you aren't covering those up. If you play through your chapter and something isn't showing up when it should, you should check these things.

4. If you think something should happen more than once, either give it the ID 0x00, or add a ENUT 0xZZ code to the event. This goes especially for houses. It took me a while to identify that the reason it kept going to the ending event after I visited a house in one of my custom chapters was because I didn't make it revisitable.


Where's the text?

So, you want the game to load text, but don't know what you're supposed to put in for 0xZZZZ? Well, this part of the guide will hopefully help clarify that for you.

Now first of all, what can you use to identify what is what in text values? Well, I haven't been editing FE for too long, and so I have no idea how to use the antihuffman patch or the parser, but I do know that Xeld's FEditor makes finding these text values cake.

So yeah, open his editor, go to the text editor, and see that box with the numbers in it below the text? That's the Zs in 0xZZZZ. But, you can't just randomly use any text values in your event. Trust me, I tried using data reserved for support convos. Didn't work out so well.

Anyways, there's a range of data that's usable for events. That range starts around 0x0800 and ends somewhere around 0x1000. But I highly suggest you look at what data you're editing, and think of it in context of the game before just randomly using that number. For example, I would advise against using data reserved for Boss battle convos. But yeah, that's pretty much it on text editing.

Custom Battles

Here's a cool section. So, you want to insert cool custom battles like the one's you've seen in the game? Then look no further, it's custom battles 101! biggrin.gif

So, look in the event assembler language file. You'll see this:
QUOTE
FIGH 0xZZ 0xPP $pointer $code
  ZZ = Attacker
  PP = Defender 
   code = 00000000 normal, controlled fight


Now most of this is pretty straight forward. For the code, I always put 00000000 as it says. I don't know what other kind of fight you can really have, so I don't really mess with it. But, here's the tricky part. There's that pointer. What does it point to? Well, this is where the customization comes in.

Let's look at an example, when Jaffar silences Lelia, an example you should remember:

QUOTE
@Fight
CODE $4B010800
CODE $00800000


Now, let's go backwards and start with the end. Battles should always end with 0x00 0x00 0x80 0x00, or $00800000 (since the latter reverses the bytes). Just know that's an end battle code.

Now, for the actual battle, you'll want to go by this (Remember, the bytes are reversed):
QUOTE
Byte 1-

00 = Hit
01 = Critical
02 = Miss
40 = Poison
80 = Devil

Byte 2-

08 = Silencer
00 = Normal

Byte 3-

80 = End Battle
08 = Defender Attacks
00 = Attacker Attacks
01 = Defender dies?????

Byte 4-

Damage


So, to interpret this, the first byte (since Jaffar is the attacker) is Jaffar's first attack. Since it's 00, the attack is a hit. The second byte is 08, so he uses the famous assassin special move, silencer. The third byte is 01. I'm not quite sure what that means, but it seems to be in turns where the defender dies, so I'm just going to assume it means Lelia is now dead. tongue.gif Fourth byte is the amount of damage, in hex. Yeah, I know 4B (75) is not Lelia's HP, but I forgot how much HP she had, and I was testing this, of course, on Nergal. XD

Extra: Warping

So now, you want character to get from point A to point B, but think walking is for squares? Why walk...when you can warp! cool.gif I'm going to teach you how to make the illusion that the character you want to warp is actually warping. (yeah, there's no actual warp code, just an animation that plays over the character)

First of all though, I don't understand exactly how the REPA (reappear) code works (or rather, have never gotten it to work) so I'm going to use the DISA code to remove the character from the map, then make them reappear using the LOU1 code.

Disappear:
QUOTE
DISA 0xZZ
CODE 0xCC 0x00 0x00 0x00 0xXX 0x00 0xYY 0x00 0x72 0x00 0x00 0x00 0xZZ 0x00 0x00 0x00 0x01 0x00 0x00 0x00

ZZ = Character
  [XX,YY] = Coordinate


Reappear:
QUOTE
LOU1 $pointer
ENUN
CODE 0xCC 0x00 0x00 0x00 0xXX 0x00 0xYY 0x00 0x73 0x00 0x00 0x00 0xZZ 0x00 0x00 0x00 0x01 0x00 0x00 0x00

ZZ = Character
  [XX,YY] = Coordinate


The CODE for reappear is pretty much the same as the disappear one, but instead of 0x72 it's 0x73. Also, make sure you're only loading one unit and it doesn't move until after the warp animation, or it will look very fake.

Example



But nothing serves converting abstract to concrete like an example. So, to help you understand the structure of event data better, I'm going to provide you with an example.

(Note: This is a crappy example that I made for the purpose of being an example. I do not actually make my chapters this bland and boring and neither should you. But it does serve its purpose. (hopefully))

QUOTE

#org 0x1006870

POIN @Turn_events //Turn-based Events
POIN @Character_events //Character-based Events
POIN @Location_events //Location-based Events
POIN @Misc_events //Misc events
POIN @Ballista @Ballista //ballista data for normal and hard mode (in that order)
POIN @Units2 @Units2 @Units2 @Units2  //enemy data for 4 modes
POIN @Units1 @Units1 @Units1 @Units1 //ally data for 4 modes
POIN @Opening_event
POIN @Ending_event //Pointer to opening and ending scenes

@Turn_events
TURN 0x00 @Opening_event [01,00] 0x0 0x00
TURN 0x03 @Conversation3 [10,10] 00 00
CODE $00

@Character_events
CODE $00

@Location_events
LOCA SHOP @Shop1 [23,29]
LOCA ARMORY @Shop1 [22,29]
CODE $00

@Misc_events
MISC GAME_OVER
MISC Defeat_boss @Ending_event
CODE $00

@Ballista
CODE $00

@Opening_event
MUS1 0x0032
CAM1 [20,23]
LOU1 @Units1 @Units2
ENUN
CURF 0x27
FADI 0x10
BACG 0x05
FADU 0x15
TEX1 0x0800
REMA
ENDA

@Ending_event
FADI 0x10
BACG 0x05
FADU 0x15
MUS1 0x0032
TEX1 0x0801
REMA
MNCH 0x18
ENDA

@Conversation3
FADI 0x10
BACG 0x05
FADU 0x15
MUS1 0x0032
TEX1 0x0802
REMA
ENDA


@Units1
UNIT 0x27 0x42 0x27 0xA1 [10,07] [12,09] 0x3C 0x86 0x6C 0x00 0x00 0x00 0x00 0x00
UNIT Empty

@Units2
UNIT 0x44 0x45 0x44 0xA4 [11,06] [13,08] 0x8E 0x00 0x00 0x00 0x00 0x03 0x00 0x20
UNIT Empty


@Shop1
SHLI 0x01 0x02 0x03 0x04 0x05


Now, you see a bunch of commands in front of you...but you're not sure exactly how it all runs together. So, to further help you understand, I'm going to go through step by step what the script is telling the game to do in each of these instances.

First, when you load the chapter, the game immediately goes to the turn based data, which says to load the opening event to start things off. The opening event starts off by loading the music specified. Then the camera shifts to the specified coordinates (remember that coordinates are counted from the top left corner of the map). Next, a load units command points to the two unit lists, which loads them accordingly. ENUN is added directly after and is necessary to tell the game to stop loading units. A cursor flashes on the character specified (Athos) (Remember, you can also use the coordinate format for CURF as well). Then the screen fades to black at the speed 0x10, loads the specified background while it's black, then fades back in at 0x15 (this prevents the BG from just magically popping up). Then the text is loading. As REMA is specified next, you are returned to the map, and all character mugs fade out. Lastly, the event is ended with ENDA, and player phase one begins.

Anyways, I think you get the idea.

Writing the Data

Now, you have your event ready, but you don't know how to write it. Well, as you should know #org (Offset) should be specified at the top and this will tell the assembler where to write the data. I suggest you either expand the rom, or find a safe free space range to write it in.

Now, all you have to do is repoint the pointer in chapter data pointer table at 0xC9C9CC. You can find which pointer using Nightmare. Remember, for pointers to expanded data, you use 09 as the last byte instead of 08.



Alright, so I'm declaring the thread to be in a permanent state of construction. As in, if you think there's something you're still unsure about basic event hacking, point it out, and I'll see about what I can do to add something.

Also, some of this guide maybe somewhat incoherent, as I wrote it early in the morning. Well, if you can't understand something, don't hesitate to tell me.
user posted image
user posted image

#2 Fire Blazer

Fire Blazer

    You ready?

  • Creator
  • 12,103 posts
  • Gender:Male
  • Location:U.S.A.
  • Interests:Too many to list. =P

Posted 07 February 2009 - 05:50 PM

Awesome guide/tutorial so far, since you wrote it rather early I recommend you read it through as if though you didn't know anything and then fix stuff up as necessary, it can really help. happy.gif

Bblazer2.png

Signature thanks to Shu.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users