øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=407.msg5481e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6dcb.htmldelayedslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=407.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6dcb.html.zxø›g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0P.§OKtext/htmlISO-8859-1gzip8:Ö§ÿÿÿÿÿÿÿÿÑHTue, 10 Mar 2020 14:10:23 GMT0ó°° ®0®P®€§²ð®ø›g^ÿÿÿÿÿÿÿÿ*)§ Event Offsets

Author Topic: Event Offsets  (Read 8068 times)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Event Offsets
« Reply #15 on: March 22, 2008, 08:12:18 AM »
When events are called by a map object (such as Edward), are they directly linked to the address of the event? Or are they referenced by index and the addresses stored in a table somewhere?

The reason I ask is that when I tried changing the length of an event (making it longer and pushing everything after it ahead by that many bytes), it worked fine for that event but it would screw up some other events and they wouldn't work (presumably due to the pointers being off due to the change in address). If I knew how to update the pointers based on the new addresses that would allow a lot more freedom for event editing.
Let's dance!

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Event Offsets
« Reply #16 on: March 22, 2008, 08:23:35 AM »
Code: [Select]
86 9362D-936A3 Cecil spinning (visual effect 0B, Exit spell?)
Based on your description, this event has to be when Rosa teleports the party out of Zot back to Cecil's room in Baron before Zot is destroyed by Barbariccia's dying magic. Rosa says something like "Hold On To Me" or whatever and then casts Exit/Teleport.

I looked at the Hex and the routine contains, as you mention, the Exit spell being added to a list. It is List $07 which is Rosa's white magic list.
 
That is the only white magic spell Rosa doesn't naturally learn (Dummied white spells in FF-II notwhithstanding). However it always shows up in her spell list after you rescue her from Zot.

IIRC, Exit is added back when Rosa rejoins.. not during that exact event.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Event Offsets
« Reply #17 on: March 22, 2008, 08:59:55 AM »
Deathlike2: I checked the event scripts, and you're right, it's added during the event of her joining.

Pinkpuff: When events are part of a speech dialog, they are referenced by an index, which looks up the corresponding event in a list. It's probably easier to edit the events than edit the index table (and easier for me to explain). You're correct that the problem you're encountering is the pointers -- the pointers reference the start of the event, so if the starts of the subsequent events are moved, then they won't work properly.

The event pointers come right before the events themselves (FF2us ROM with header: 90200-903FF). The pointers are each 2 bytes -- to find the address that the pointer points to, reverse the two bytes and add 0x90400. For example, if the two bytes of the pointer are [2B 00], then reverse them [00 2B] and add them to [90400]. [90400+002B] = [9042B]. Keep in mind it's all in hex, so you may need a calculator application if you're not good at adding hex values in your head. Or, for a neat little trick, Google's calculator will work with hex values that have the 0x prefix. See example here: http://www.google.com/search?hl=en&q=0x002B+%2B+0x90400&btnG=Search

Just found out now that Google could do that. Coolness!  :whoa:

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Event Offsets
« Reply #18 on: March 22, 2008, 09:20:43 AM »
It is worth point a minor detail. Exit is used is part of the event and executes the animation, but it really isn't "Cecil" that is animated, but whoever the lead character happens to be.

Warp has a weaker animation where the character just puts up their hand... go figure.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Event Offsets
« Reply #19 on: June 29, 2008, 04:56:26 PM »
I was just looking over this today and noticed some things:

Code: [Select]
1F 91229-91234 Unlocking a door (item EF: Key to Baron)
20 91235-91240 Unlocking a door (item EF: Key to Baron) (different character?)
Are you sure one of these isn't the weapon shop and other the door to the waterway?

Code: [Select]
55 92299-922A7 Message EF0A, 10, 11, being poisonedThe barkeep in Mysidia's pub, prior to talking to the elder.

Code: [Select]
5D 9231B-9232B Being turned into a toadA black mage near Mysidia's entrance, prior to talking to the elder.

Code: [Select]
8F 93ABD-93AD1 Message EF05, sound effects 17 then 14, casts Mini on you, message EF06A black mage in Baron's black magic class who fails so bad he ends up casting white magic. :tongue:

Code: [Select]
91 93B05-93B18 Message EF03, Character 8 spins in place, jumps 2 spaces sideways, door opensArgh, I hate this event! Why can't the door just stay open after talking to him? :angry:

Code: [Select]
D4 94FCE-9500A ? Dancer's dance (with Giott's song)Agart's inn.

Code: [Select]
D6 95060-950B8 ? Dancer's dance (with Cecil)Baron, after killing Cagnazzo. If you talk to her from the side in the SNES version she'll push you through the wall - she's stronger than she looks. :laugh:

Code: [Select]
04 90409-9040F Fight battle with 2 Mad Ogres (remove trigger 51)
05 90410-90416 Fight battle with 2 Mad Ogres (remove trigger 52)
F3 96801-96807 Fight battle with 2 Mad Ogres (or Behemoth), Set trigger flag 50 to completed
These were a mystery until I saw the last one. I bet these are the behemoths in Bahamut's cave.

Code: [Select]
FD 96866-9687F Viewing the moon?The telescope in Corio's observatory.

I figured you already knew what most/all of these were, just listed anything that didn't have a location.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Event Offsets
« Reply #20 on: June 29, 2008, 05:59:13 PM »
Thanks for those, I did have some of them, but a few I had never bothered to figure out or confirm. I updated the document with all of those and a few others I had figured out, as well as added my vehicle information and a few other things. I've attached an updated Events document to this post and removed the one from the beginning post. Everyone let me know if there's any other things that you figure out.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Event Offsets
« Reply #21 on: June 29, 2008, 11:20:03 PM »
Getting a Grimoire?... Hmm. I've never seen that...

For a thought, it helps a lot if you "speak" to virtually everything in the game to connect the dots...

The text file is apparently in some friendly Mac format.. at least according to Metapad...

Edit:

0x44 - Tellah leaving party + Damacyan soldier removal.
0x91 - Calbrena/Calcobrena spying and entering Giott's Dark Crystal Chamber
0xF1 - The Smith's Shop
« Last Edit: June 30, 2008, 12:14:48 AM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Event Offsets
« Reply #22 on: June 30, 2008, 12:11:47 AM »
What's wrong with the formatting when you open it? I can probably fix specific things if I know they aren't showing up right.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Event Offsets
« Reply #23 on: June 30, 2008, 12:16:12 AM »
The formatting breaks down post 0x3E in Notepad (not that it's reliable for any text in general. It's not a big deal, but meh, I'm not worried about it.

I added some stuff in an edit...
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Event Offsets
« Reply #24 on: June 30, 2008, 03:26:51 AM »
Quote from: Deathlike2
0x44 - Tellah leaving party + Damacyan soldier removal.

Tellah leaving the party is part of the Tellah/Edward battle and Edward joining event. You're right about the Damcyan soldier, he's the one in the basement. The "person/object 01" moving down 8 spaces is actually the door opening mechanism, which is active from then on. Thanks for the info, I've revised this event to:
"Speaking to fallen soldier in Damcyan's basement, making door mechanism active."

Quote
0x91 - Calbrena/Calcobrena spying and entering Giott's Dark Crystal Chamber

That can't be, because that small piece is within the entire event of 8C (Meeting Giott, Calbrena battle, rejoining Rydia). Unless there's a pause (where you can move your character) in between events, long sequences like that are all one event.

Quote
0xF1 - The Smith's Shop

I left all the shops as their numbers, since you can easily change the shop numbers within the event codes. However, it's a good idea to reference what the shops originally are, so I added the shop name in parantheses. When I get around to it I'll add the other shop names.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Event Offsets
« Reply #25 on: June 30, 2008, 04:13:34 PM »
Some of these messages need some added descriptions... it would be a bit more helpful...
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Event Offsets
« Reply #26 on: June 30, 2008, 06:20:31 PM »
Feel free to go ahead and do that.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Event Offsets
« Reply #27 on: July 05, 2008, 09:43:29 AM »
I've been playing FF4A (for the first time -- thought I should probably play through it, finally), and I figured out what event 91 is. It's when the dwarf in the basement of the dwarf castle opens to the door to the back passageway (next to the Fat Chocobo spot).

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Event Offsets
« Reply #28 on: July 05, 2008, 10:26:15 AM »
Ah, yeah, I thought you knew that. :sad:

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Event Offsets
« Reply #29 on: July 05, 2008, 06:53:18 PM »
Sorry, I meant to (but forgot to) ask you to clarify your response.  :scared: It was one of the few I hadn't come across yet.