Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → Just started Rom Hacking Gold, Have a question about Event Data

#1 2012-08-20 06:27:12

theoblivinator
Member
From: Iowa
Registered: 2012-08-20
Post 1/98

Just started Rom Hacking Gold, Have a question about Event Data

Hello everyone, I'm Joshua. I just started my first rom hack of Gold today and wanted to start rather simply.

My first goal is to add a duplicate of this npc is New Bark Town.

WhatIWant.png

Following the steps outlined in this topic here is what I got done.

From GoldMap I got the following information for New Bark Town:

- Secondary address: $094E11 (25:4E11)

- Map data address: $0ACDB5 (2B:4DB5)

- Event data address: $120366 (48:4366) which really is since the pointer is backwards (48: 6643)

If I understand correctly the pointer "66 43" points to offset $120366 and that is where the event data for New Bark Town Starts.

In my Hex Editor I went to offset $120366 and could find the event data for New Bark Town. Then I searched the rom for an area to write my new event data. The offset I found was $1225A0 (48:65A0). This is where I need to re-write all the event data for New Bark Town, and include the data for my duplicate fat man.

So that's what I did. Here is the data that I copy/pasted, then added my new data for my duplicate fat man.

00 00 04 03 06 01 18 05 05 0D 01 18 06 0B 03 01
18 08 0D 0B 01 18 09 00 08 01 00 16 40 00 00 00
09 01 00 41 40 00 00 04 08 08 00 C8 40 05 0B 00
CB 40 03 03 00 CE 40 0D 09 00 D1 40 04 29 0C 0A
03 01 FF FF 00 00 6F 40 FF FF 3A 0D 10 04 10 FF
FF A0 00 9B 40 FF FF 04 06 07 09 00 FF FF 00 00
9E 40 BD 06 3A 0D 10 04 10 FF FF A0 00 9B 40 FF
FF

The red is what I believe to be the data for the duplicate fat man.

After that I replaced the pointer in New Bark Town's secondary header for the event data from "66 43" to "65 A0"

Next I went back into Gold Map, entered the event data, repositioned all the warps, triggers, signposts, and people, and positioned the new fat man on the map like this, along with his data.

goldmapwhatIdid.png

At this point I thought I was done. I started up my rom and I get a very glitchy opening that looks like this before it freezes. There are some rather strange sounds that play too.

error1.png

error2.png

error3.png

error4.png

Additionally whenever I try to view any of the other maps in New Bark Town, such as Elm's lab, I get an error message "There seems to be an error in the event data. Events will not be loaded".

My questions is what went wrong? I know that is kind of broad, but I explained the steps I took in detail so hopefully someone will be able to point out my mistake. I believe I either forgot the hex edit something, perhaps part of a script is missing. Maybe I forgot to do something entirely.

Please forgive my ignorance if is it something very simple, this is my first time doing a rom hack and any help/advice would be appreciated.

Offline

#2 2012-08-20 06:39:14

Miksy91
Member
Registered: 2010-10-16
Post 1,038/2,308

Re: Just started Rom Hacking Gold, Have a question about Event Data

You know what, you did everything else fine expect for the fact you wrote the pointer in big-endian form although it should be little-endian. In other words, change 65 A0 to A0 65 but that shouldn't change a thing about how that bug came up. Having a "glitchy" pointer for the event data won't affect anything else expect the event data of that map.

I tried to find a solution according to what you said to this problem but there is none. What must have happened though is that you've somehow "succeeded" in modifying part of the game's code while repointing the event data and re-writing it in blank space.

If you haven't done anything else yet, you could just get another clean rom and do what you did here with it and it should work fine.
If you have though, see this thread about patch files: http://hax.iimarck.us/topic/335/

Last edited by Miksy91 (2012-08-20 06:41:42)

Offline

#3 2012-08-20 06:55:26

stag019
Idea Killer
Registered: 2011-01-05
Post 189/630

Re: Just started Rom Hacking Gold, Have a question about Event Data

I don't know who you are or how to solve your problem, but I like that you thoroughly and clearly explained your problem. I hope you stay around this community a while.


You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.

Offline

#4 2012-08-20 07:42:34

koolboyman
Member
Registered: 2010-10-16
Post 81/203

Re: Just started Rom Hacking Gold, Have a question about Event Data

stag019 wrote:

I don't know who you are or how to solve your problem, but I like that you thoroughly and clearly explained your problem. I hope you stay around this community a while.

This.  Hope you stick around!

If the entire rom is glitchy, then perhaps instead of overwriting the 00's, you accidentally inserted them which pushed all of the data succeeding the event forward?

Last edited by koolboyman (2012-08-20 07:46:53)

Offline

#5 2012-08-20 08:13:50

Akwa
Member
Registered: 2012-06-14
Post 46/140

Re: Just started Rom Hacking Gold, Have a question about Event Data

Welcome to forums, man.

The manual repointing event data is a nice exercise to learn hex editing, bank and pointer concept though it sometimes is a boring routine. A map editor named Johtomap automatically repoints event data when you change number of events. It doesn't remove the old event data though - I already got so lazy that I don't mind it - there's plenty of room in a bank.

Offline

#6 2012-08-20 17:37:26

theoblivinator
Member
From: Iowa
Registered: 2012-08-20
Post 2/98

Re: Just started Rom Hacking Gold, Have a question about Event Data

Miksy91 wrote:

You know what, you did everything else fine expect for the fact you wrote the pointer in big-endian form although it should be little-endian. In other words, change 65 A0 to A0 65 but that shouldn't change a thing about how that bug came up. Having a "glitchy" pointer for the event data won't affect anything else expect the event data of that map.

I tried to find a solution according to what you said to this problem but there is none. What must have happened though is that you've somehow "succeeded" in modifying part of the game's code while repointing the event data and re-writing it in blank space.

If you haven't done anything else yet, you could just get another clean rom and do what you did here with it and it should work fine.
If you have though, see this thread about patch files: http://hax.iimarck.us/topic/335/

Thanks for the reply. I did try to replace my pointer as "0A 65" but that didn't seem to solve the problem. I also tried your advice about trying to add my event data to an entirely clean rom. I had a little more success.

Now whenever I start a new game I still get the "! woke up" and then it tells me to set the time of day. As soon as I pick the hour the rom restarts and I'm back to the intro, but the colors for the intro are slightly changed. Then I can start a new game again and it just repeats the process, looping from when I select the start hour back to the intro, then to select new game... you get the idea. It is kinda funny though.

I did look at the thread talking about IPS patch files, but I'm unsure how that applies to this situation. Could you explain a little more?

stag09 wrote:

I don't know who you are or how to solve your problem, but I like that you thoroughly and clearly explained your problem. I hope you stay around this community a while.

Haha thanks, I always try to be very clear at what I did and what I'm trying to do, that way it makes it easier for me to get help.

koolboyman wrote:

This.  Hope you stick around!

If the entire rom is glitchy, then perhaps instead of overwriting the 00's, you accidentally inserted them which pushed all of the data succeeding the event forward?.

Thanks and I'm glad to be here. I don't know if the entire rom is glitchy, since I haven't been able to get past the new game option, then setting the hour of the day. I will looking into your advice and see if my data shifted other data down instead of overwriting.

Akwa wrote:

Welcome to forums, man.

The manual repointing event data is a nice exercise to learn hex editing, bank and pointer concept though it sometimes is a boring routine. A map editor named Johtomap automatically repoints event data when you change number of events. It doesn't remove the old event data though - I already got so lazy that I don't mind it - there's plenty of room in a bank.


I have tried Johtomap, but I kept getting an error message everytime I tried to use it, but I think I may have figured out how to fix that. I'll get back to you if I need some more help.

In short I have a few ideas that I'm going to try and see if they fix my problem. If I can't get it to work I'll report back here and see if I could get a few more tips or ideas from you guys.

Thanks for all the responses!

EDIT:

Koolboyman's hunch was correct. When I did a copy past of the data I wanted to duplicate into the new event data table it shifted all the other data forward. What a silly little mistake. I went back to my HEX editor and shifted everything back to where it was in the first place and it worked like a charm. I feel really stupid now but thanks everyone for your help!

Last edited by theoblivinator (2012-08-20 18:03:46)

Offline

  • Index
  • → Help/Question
  • → Just started Rom Hacking Gold, Have a question about Event Data

Board footer

Powered by FluxBB