Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2013-01-30 22:32:55

SantaDY
New member
Registered: 2013-01-30
Post 1/9

Stop all events, and other things.

Hi Miksy91,

First, I just want to say thank you. You have helped so many beginner hackers with not only the guides you write, but also the video tutorials that you take the time to make. Being a hacking-dummy myself, I hadn't the slightest clue about hacking. Your detailed tutorials tailored toward beginners have done for me what many other hackers couldn't. Thank you so much.

That being said, I do have a few questions about hacking Pokemon Gold. I am trying to make several very specific changes to the game for a project I am making for a class called "Hacks, Mods, and Theories on Video Game Culture." The project is due in a week and I am starting to panic a little bit. Unfortunately, I don't think I have enough time to go through all of your tutorials (don't worry, I will finish watching them once this project is completed). I hope you can answer these questions and help me out.

These are the things I want to do to Pokemon Gold:
1. Remove all characters (mom, trainers, Oak, etc.)
2. Make invisible the image of myself (the main character).
3. Stop all events (auto-talk to Oak when enter lab, must pick starter pkmn, must talk to mom in beginning, etc)
4. Stop all random encounters and Pokemon battles.
5. Remove all items.
6. Get rid of the game introduction (Game Freak logo, Oak speech, etc)

Basically, I want to make a setup where I can load the game, get to the "new game" screen right off the bat, don't listen to Oak, don't choose name etc, and start in my room. From there, the empty landscape of Pokemon is open for free exploration. I can go anywhere I want. Can this be done? How can I accomplish this?

I know this is a long post with many questions, so I would like to thank you again for your patience. You have my sincerest gratitude. Please respond ASAP. Thanks.

Offline

#2 2013-01-30 22:44:51

Miksy91
Member
Registered: 2010-10-16
Post 1,484/2,339

Re: Stop all events, and other things.

SantaDY wrote:

Hi Miksy91,

First, I just want to say thank you. You have helped so many beginner hackers with not only the guides you write, but also the video tutorials that you take the time to make. Being a hacking-dummy myself, I hadn't the slightest clue about hacking. Your detailed tutorials tailored toward beginners have done for me what many other hackers couldn't. Thank you so much.

Nice to hear you have made use of them :)

SantaDY wrote:

That being said, I do have a few questions about hacking Pokemon Gold. I am trying to make several very specific changes to the game for a project I am making for a class called "Hacks, Mods, and Theories on Video Game Culture." The project is due in a week and I am starting to panic a little bit. Unfortunately, I don't think I have enough time to go through all of your tutorials (don't worry, I will finish watching them once this project is completed). I hope you can answer these questions and help me out.

These are the things I want to do to Pokemon Gold:
1. Remove all characters (mom, trainers, Oak, etc.)
2. Make invisible the image of myself (the main character).
3. Stop all events (auto-talk to Oak when enter lab, must pick starter pkmn, must talk to mom in beginning, etc)
4. Stop all random encounters and Pokemon battles.
5. Remove all items.
6. Get rid of the game introduction (Game Freak logo, Oak speech, etc)

Basically, I want to make a setup where I can load the game, get to the "new game" screen right off the bat, don't listen to Oak, don't choose name etc, and start in my room. From there, the empty landscape of Pokemon is open for free exploration. I can go anywhere I want. Can this be done? How can I accomplish this?

I know this is a long post with many questions, so I would like to thank you again for your patience. You have my sincerest gratitude. Please respond ASAP. Thanks.

All of the things you mentioned can be done but some of the questions are about way too simple stuff related to others so I wouldn't really start doing anything like that. What should the project be like?

Also, Im afraid I can't give easy solutions to for removing the gamefreak logo loading and the speech made by Oak there as I have never really tried to skip loading those routines. It may not require much, but then again it might though.
For rest of the things, you can either modify them universally by changing some existing asm routines or just make no people being in maps, no trigger events, making it impossible to encounter wild pokemon in bushes, remove wild pokemon data from caves, towers and "forests" (well Ilex Forest).

Offline

#3 2013-01-30 23:18:57

virus95x
Member
Registered: 2012-04-03
Post 92/225

Re: Stop all events, and other things.

Thanks for substitles, helped me:)

Last edited by virus95x (2013-01-30 23:20:40)

Offline

#4 2013-01-31 04:02:33

SantaDY
New member
Registered: 2013-01-30
Post 2/9

Re: Stop all events, and other things.

Miksy91 wrote:

All of the things you mentioned can be done but some of the questions are about way too simple stuff related to others so I wouldn't really start doing anything like that. What should the project be like?

I want to create an experience where exploration of an empty world is all that is possible. That is why I am insisting that the characters, pkmn, events, and items be removed.

Miksy91 wrote:

Also, Im afraid I can't give easy solutions to for removing the gamefreak logo loading and the speech made by Oak there as I have never really tried to skip loading those routines. It may not require much, but then again it might though.
For rest of the things, you can either modify them universally by changing some existing asm routines or just make no people being in maps, no trigger events, making it impossible to encounter wild pokemon in bushes, remove wild pokemon data from caves, towers and "forests" (well Ilex Forest).

I am currently using some of the tools you presented in your videos to try and achieve some of the desired effects. Specifically, I am using Johtomap to remove people and trigger events in New Bark Town. I have removed/deleted the people and trigger events in Elm's lab using the events editor in Johtomap, but when I enter the lab for the first time, I still automatically walk to where Elm used to be, and Elm's "choose pkmn" speech still appears. Similarly, I also removed mom and trigger event, but the "change clock" speech still appears when I walk down the stairs for the first time. Do you know how I can fix that? Thanks so much.

Offline

#5 2013-01-31 07:36:16

Miksy91
Member
Registered: 2010-10-16
Post 1,485/2,339

Re: Stop all events, and other things.

In addition to what jwibagi said, here's a little bit more efficient way of doing the job;

For disabling all events except for warps, edit the event data of each map using a hex editor and change the three following bytes after the warp data ends to 00. The first one is for trigger events so if there are no trigger events in the edited map, that is already 00 so you can find the location easily. This also disables getting items of course.

For map's script header, change the two bytes in the offset it points to 00's.

For cave wild pokemon, use Harrison's G/S/C wild pokemon editor to edit pokemon data in the wanted cave map, save, and the editor will tell you the offset where that wild pokemon data is. There, change the two first bytes to AA AA for instance (I have used this as "unused space marker" in several occasions in my own hack). Also the data happens to be in the same order in the rom file as the editor shows it in its list - so it should be enough of doing this once and you can easily find all the other cave pokemon data (in the same cave area you're editing) with search function of the hex editor.

These are simply the fastest ways of achieving what you're trying to do.

Last edited by Miksy91 (2013-01-31 07:38:17)

Offline

#6 2013-01-31 08:14:17

comet
Member
Registered: 2012-04-09
Post 109/679

Re: Stop all events, and other things.

Miksy91 wrote:

These are simply the fastest ways of achieving what you're trying to do.

I think dismantling the functions responsible for instantiating npcs would be much faster and less tedious.

Offline

#7 2013-01-31 12:51:00

Miksy91
Member
Registered: 2010-10-16
Post 1,486/2,339

Re: Stop all events, and other things.

comet wrote:

I think dismantling the functions responsible for instantiating npcs would be much faster and less tedious.

That's true but we're talking about a person who doesn't know z80 assembly.
If you don't know how to achieve something "properly", you simply have to be able to go around it somehow and this might be the best solution for doing so.

Last edited by Miksy91 (2013-01-31 12:52:15)

Offline

#8 2013-01-31 13:05:02

Tauwasser
Member
Registered: 2010-10-16
Post 336/452

Re: Stop all events, and other things.

comet wrote:
Miksy91 wrote:

These are simply the fastest ways of achieving what you're trying to do.

I think dismantling the functions responsible for instantiating npcs would be much faster and less tedious.

Yeah, you'd think so. Trust me: it won't be easier. Data is loaded to RAM and then there are a gazillion other little functions that all try to access it in various ways. It's not read from ROM, store in RAM, create NPC data, bam finished.

It's more like read from ROM, store in RAM, read data in an innocent looking palette routine, read data in a confusing movement event routine, read data in collision routine, read data in presenter routine that loads gfx and assigns tile numbers and tile attributes, sometimes reload data from other parts of the ROM, because a certain script started, then reload data from original ROM location, then store in RAM again, rewrite gfx to vram, then rewrite tile and attribute assignments, then make a look-up in the tile exception routine and remap certain gfx to other gfx, because you can, then display stuff for one whole frame, depend on random number to do certain things in the routine where you cannot tell if this will actually ever occur - use a debugger to force it to occur - have the game reset :|

Trust me when I say that I would go with disabling the events using the event data in the map data any day over actually looking which of these thousands of functions I have to edit to make sure events aren't displayed, yet ASM OAM tiles are etc. etc. pp.

cYa,

Tauwasser

Last edited by Tauwasser (2013-01-31 13:05:19)

Offline

#9 2013-01-31 20:15:59

comet
Member
Registered: 2012-04-09
Post 110/679

Re: Stop all events, and other things.

I was pretty tired last night. I agree that mucking around with the drawing routines would be the worst possible solution.

What I really meant was not instantiating the NPCs at all, which is actually only done once.

In Gold's NPC-event init, it grabs the number of NPCs on the map from the map event header and makes that number of NPCs. We only care about the part that gets the number:

ld a, [de]
inc de
ld [$d94e], a ; # of npcs to make

So if we want to never load any NPCs, we want to always load 00 into $d94e. This is of course a very simple change to make:

xor a
inc de
ld [$d94e], a ; always 00

Now NPCs don't load at all. No sprite, no collision, no evidence of their existence at all.

89zUBT0.png

You can do the same thing with map scripts. Sounds simpler to me.

Gold:

GetPeopleEvents: ; 24fe
    push hl
    call $2550 ; grab map event header
    pop de
    ld hl, $d465
; get the number of NPCs to make
    ld a, [de]
    inc de
    ld [$d94e], a
; store our place 
    ld a, e
    ld [$d94f], a
    ld a, d
    ld [$d950], a
; go do stuff with the number of people-events,
    ld a, [$d49e]
    call $2536 ; like creating them
    ...

Crystal:

GetPeopleEvents: ; 0x241f
    push hl
    call $2471 ; grab map event header
    pop de
    ld hl, $d72e
; get the number of NPCs to make
    ld a, [de]
    inc de
    ld [$dc04], a
; store our place
    ld a, e
    ld [$dc05], a
    ld a, d
    ld [$dc06], a
; go do stuff with the number of people-events,
    ld a, [$dc04]
    call $2457 ; like creating them
    ...

Last edited by comet (2013-01-31 20:16:57)

Offline

#10 2013-01-31 22:09:06

SantaDY
New member
Registered: 2013-01-30
Post 3/9

Re: Stop all events, and other things.

comet wrote:

In Gold's NPC-event init, it grabs the number of NPCs on the map from the map event header and makes that number of NPCs. We only care about the part that gets the number:

ld a, [de]
inc de
ld [$d94e], a ; # of npcs to make

So if we want to never load any NPCs, we want to always load 00 into $d94e. This is of course a very simple change to make:

xor a
inc de
ld [$d94e], a ; always 00

Now NPCs don't load at all. No sprite, no collision, no evidence of their existence at all.

I am really a beginner, so this is going to be a noob question. How can I see and edit:

ld a, [de]
inc de
ld [$d94e], a ; # of npcs to make

And also, once this little change to the scrip is done, will all the NPC's disappear from the entire map, or will I have to do this for every town/route?

Offline

#11 2013-01-31 22:18:51

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,249/3,578

Re: Stop all events, and other things.

This change would modify the routine used by every map in the game simultaneously. To edit it with a tool, you would open the rom in an assembly editor (there is one that Jigglypuff made called GbAsmEdit) goto the offset he listed (24FE in Gold) and change the instructions there. Then save and test it out.

Offline

#12 2013-01-31 23:01:17

comet
Member
Registered: 2012-04-09
Post 112/679

Re: Stop all events, and other things.

SantaDY wrote:

I am really a beginner, so this is going to be a noob question. How can I see and edit:

ld a, [de]
inc de
ld [$d94e], a ; # of npcs to make

Get BGB. It has a debugger that will let you edit the ROM in real time and save the changes.

All the menu functions are accessed by right-clicking on the game screen.

YjPLEWw.png

You can get to the debugger in Other -> debugger. This will open up a window that looks like this:

QrFnqYZ.png

The line you want to edit is at 0:2506. Press Ctrl-G and type that in to go to that address.

xI9Bqm5.png

You can start typing in commands and BGB will open a window to show you what you're doing. Press enter when you're done.

So if we type 'xor a' and press enter...

i0kq2vd.png

We've made the change. You can press Ctrl-S to save the ROM, and you can test it out just by resuming the game. This would be a cool example to show your class in itself.

Keep in mind this won't take away any NPCs that are already on the map. You have to leave the map and reenter to show that they disappear.

Offline

#13 2013-01-31 23:55:16

SantaDY
New member
Registered: 2013-01-30
Post 4/9

Re: Stop all events, and other things.

You guys are saints! This is also a great forum. If I have anymore questions, I'll definitely ask you guys about it. I hope you won't mind. Thanks again.

jwibagi wrote:

You can remove events by going to every map's event data and setting the Number of Person Events byte to 0x00. It'll take a while, however.

How do I view and change a map's event data. What program should I use? Can someone post detailed instructions on how to do this?

jwibagi wrote:

Similarly you can disable permanent map changes and first-entry events by setting all of a map's Map Script Header bytes to 0x00.

How do I change and edit a map's Map Script Header bytes?

I am really having a hard time understanding how hex editors and map editors relate. A program like Johtomap has a graphics interface, but hex editors just have numbers and letters. I kind of understand the part about finding the offset of an event in the map editor, then using the offset to find it in the hex editor. But sometimes, one Trigger block in Johtomap corresponds with many sets of letters/numbers in the hex editor. I don't know when the event starts and ends, and what changes to make to which number/letter to create what effects.

I am trying very hard, but this is all very confusing.

Oh, and can someone also explain what a pointer does? (I know I will be laughed at for such a basic question question).

Offline

#14 2013-02-01 03:27:50

SantaDY
New member
Registered: 2013-01-30
Post 6/9

Re: Stop all events, and other things.

jwibagi wrote:

That's alright. The only thing is that it would have been better to ask your questions in a separate Help Thread.

Thanks so much for your help. I really appreciate it. It means a lot to me. This is my first time using a forum like this, so I apologize for not knowing some of its tacit rules. I will definitely give that forum a try.

But before that, I just have one more question. This one is a little less basic and a little more specific.

As I am deleting NPC's using Johtomap, I found that for certain areas of the game (i.e. route 29 - beside hometown), if I delete the NPC's, the game will freeze. It seems that the freezing is not related to which NPC I delete, but rather the number I delete.

Does anyone know what is the cause of this? Is there a way to fix this? How would I go about doing it?

Thanks again.

Offline

#15 2013-02-01 03:53:27

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,251/3,578

Re: Stop all events, and other things.

Yeah, its probably going to be something tied to the script header. Route 29 has one of the "day-of-the-week siblings" and so its script header will call a script to check the day of the week, then hide or show the person accordingly. Since the person it is looking for is no longer there, this is probably why it crashes.

A simple way to get around this problem (or see if it is in fact the problem) is to change the script pointer for that map. If you change the script pointer to be the same as the event pointer, it will load no scripts on that map. (At the start of event data are the bytes x00 x00. When the Script Header is pointed to this same data, it will read this as "0 type 1 scripts, 0 type 2 scripts" and then finish.)

To repoint this, open up the map's "Map Properties" dialoge in Johtomap, copy the data from the box labeled "Event Data", then paste it into the box labeled "Map Script" then apply the changes.

Last edited by Mateo (2013-02-01 03:56:24)

Offline

#16 2013-02-01 23:40:28

SantaDY
New member
Registered: 2013-01-30
Post 7/9

Re: Stop all events, and other things.

Thanks so much guys. I feel that I am obligated to give you an update for all your help. I couldn't figure out how to delete the NPC's in route 29 and have the game not freeze on me using the method you guys suggested, but I found a roundabout way of doing it. I found that Goldmap allows me to hide the NPC's. You guys told me that the one flaw of Johtomap is that it actually delete game data, which can cause a lot of problems for trigger events and crash the game. So I imaging (I could be wrong) that by hiding the NPC's, the player simply can't interact with them, but since they are still there, the game won't crash.

So, for the moment, the route 29 problem is solved. Thanks for all your help. I might ask more questions in the future though. Just know that all of you guys' inputs are hugely appreciated!

Offline

#17 2013-02-02 09:35:19

comet
Member
Registered: 2012-04-09
Post 115/679

Re: Stop all events, and other things.

I can't say I understand why you're using JohtoMap. I've disabled triggers and map scripts using the same method, so you can walk around Johto with no interruptions. You get stuck in Ice Cave though, since there are no boulders.

Last time, we disabled NPCs by writing 'xor a' to 2506 (Crystal: 2427). Fortunately, the other changes are just as simple.

We can disable map scripts by writing 'xor a' to:

Triggers:
24a3 (Crystal: 23c4)
24af (Crystal: 23d0)

Callbacks:
24d1 (Crystal: 23f2)
24dd (Crystal: 23fe)

And tile triggers:

25:681c (Crystal: 25:68ef)

8hkbxiD.png RngHrQH.png FzqX6mR.png RjdU3YM.png

No more boundaries!

Offline

#18 2013-02-02 10:27:16

Miksy91
Member
Registered: 2010-10-16
Post 1,492/2,339

Re: Stop all events, and other things.

Not saying it's annoying me in any way but I think a separate thread should be created for this discussion if there is need to talk about it more.
After all, people would assume to see posts related to the videos in this thread like stuff explained in them that would require further explanation etc.

Offline

#19 2013-02-03 03:38:43

612/703

Re: Stop all events, and other things.

Miksy91 wrote:

Not saying it's annoying me in any way but I think a separate thread should be created for this discussion if there is need to talk about it more.
After all, people would assume to see posts related to the videos in this thread like stuff explained in them that would require further explanation etc.

You’re right. I’ve split this into its own topic.

#20 2013-02-20 21:10:45

SantaDY
New member
Registered: 2013-01-30
Post 8/9

Re: Stop all events, and other things.

I have now removed all the characters and events, but I have another question.
Is there any way of completely deleting the intro to the pokemon game, so that you go straight into the "New Game"/"Continue" screen right after turning on the gameboy? Thanks a lot!

Offline

#21 2013-02-25 20:37:52

SantaDY
New member
Registered: 2013-01-30
Post 9/9

Re: Stop all events, and other things.

comet wrote:

I can't say I understand why you're using JohtoMap. I've disabled triggers and map scripts using the same method, so you can walk around Johto with no interruptions. You get stuck in Ice Cave though, since there are no boulders.

Last time, we disabled NPCs by writing 'xor a' to 2506 (Crystal: 2427). Fortunately, the other changes are just as simple.

And tile triggers:

25:681c (Crystal: 25:68ef)

When I search for 25:681c in bgb by pressing control+G, the program does not respond. It just stays on whatever line it was on before the search. Am I doing something wrong? Thanks.

Offline

#22 2013-02-25 22:24:56

Miksy91
Member
Registered: 2010-10-16
Post 1,534/2,339

Re: Stop all events, and other things.

25:681C is just another way of saying $9681C.
You could easily edit the code in that rom address with a hex editor as well: http://www.zophar.net/fileuploads/2/108 … /z80-1.txt

XOR-operations are between A8 and AF. And AF (XOR (a,) a) is the one you're wanting to use.

Offline

#23 2013-02-26 00:22:49

comet
Member
Registered: 2012-04-09
Post 153/679

Re: Stop all events, and other things.

It should work. If it's not changing the line, could you already be on that line?

Last edited by comet (2013-02-26 00:28:22)

Offline

#24 2013-02-27 02:13:11

Tauwasser
Member
Registered: 2010-10-16
Post 348/452

Re: Stop all events, and other things.

Make sure you don't actually use the search tool instead of the goto tool.
Also, sometimes (in the past; did not happen for me so far with v1.4.1.) there were situations when the keyboard shortcuts would magically stop working after starting BGB. I'd then have to use the context menu to goto manually the first time this happened. Then the keyboard shortcuts would work again.

cYa,

Tauwasser

Last edited by Tauwasser (2013-02-27 02:14:44)

Offline

Board footer

Powered by FluxBB