Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-12-05 00:12:07

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 286/649

Trainer blackouts

Another question from the yet--famous tysonrss who loves asking questions. Todays topic is Trainer blackouts!

No I'm not talking about the "0000" byte. But when I programmed my trainers and lose I end up back at home. This doesn't happen when fighting a Gym Leader, only the regular trainers. Does there have to be some code at the end?


Pokemon Blue DX is reborn!

Offline

#2 2011-12-05 01:16:40

Ben
Member
From: South Korea
Registered: 2010-10-16
Post 159/161

Re: Trainer blackouts

I thought it went by the last pokemon center you healed at. Or am I wrong? Usually when I lose it's by the last place you healed...

Offline

#3 2011-12-05 01:37:38

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 287/649

Re: Trainer blackouts

I thought so too, apparently it doesn't now. I have a hunch, and maybe it would be because the trainers used may be from the opposite region. But I doubt it. I don't understand it at all...


Pokemon Blue DX is reborn!

Offline

#4 2011-12-05 01:44:40

Tauwasser
Member
Registered: 2010-10-16
Post 243/448

Re: Trainer blackouts

The map you will be teleported to is saved when you enter a PokéCenter. IIRC, this is determined as follows: You enter a Map with the PokéCenter tileset, IIRC 0x06, from a Map with permissions either set to 0x01 or 0x02. All other maps will not be stored.
You can also programmatically set the blackout map, just like it is done for Hero's house when you first enter it. This is why you end up there in the first place.

cYa,

Tauwasser

Offline

#5 2011-12-05 02:03:02

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 288/649

Re: Trainer blackouts

Where do I set these permissions sir? My tileset for Pokecenter is different, but it shouldn't matter.


Pokemon Blue DX is reborn!

Offline

#6 2011-12-05 07:14:18

Miksy91
Member
Registered: 2010-10-16
Post 648/2,311

Re: Trainer blackouts

It does matter, pokecenter tileset must be 06 (unless you want to automatically set blackout maps).

Offline

#7 2011-12-05 07:39:29

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 291/649

Re: Trainer blackouts

No I mean my tilesets are different, meaning I used different Pokecenter tiles but it's still assigned to 06.


Pokemon Blue DX is reborn!

Offline

#8 2011-12-05 21:07:28

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 292/649

Re: Trainer blackouts

I still need help figuring this out...


Pokemon Blue DX is reborn!

Offline

#9 2011-12-05 21:20:21

Tauwasser
Member
Registered: 2010-10-16
Post 244/448

Re: Trainer blackouts

Hi,

the permission byte is the second byte in the primary map header.

I also looked it up again. The routine is at 00:239B. Basically, when changing maps (via warp) the source map must have permissions set to 0x01 or 0x02. The destination map must have permissions set to 0x04, 0x06 or 0x07 and tileset must be 0x06. Then the destination map will be retained as the blackout map.

I venture to guess that you have the wrong permissions if you did not touch the tileset id.

cYa,

Tauwasser

Offline

#10 2011-12-05 21:38:52

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 293/649

Re: Trainer blackouts

Um..are you sure?

I set the seond byte different'y and the map area had trees everywhere. I checked the Pokecenters and it says 04 but regular places look different when I change that second byte...

It's possible your 256 tile patch caused this...

It would be nice if I knew the tileset structure(or the primary header structure?) so that I knew where permissions, lighting byte and others were..

Last edited by tysonrss (2011-12-05 22:10:07)


Pokemon Blue DX is reborn!

Offline

#11 2011-12-06 00:42:52

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,078/3,474

Re: Trainer blackouts

I've never run into this problem with his tileset patch. I don't think I've ever run into it to be honest, so I'm not really sure.

Offline

#12 2011-12-06 00:52:14

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 294/649

Re: Trainer blackouts

No it's not the patch. I checked a clean rom and the headers are almost identical.


Pokemon Blue DX is reborn!

Offline

#13 2011-12-06 02:35:52

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 295/649

Re: Trainer blackouts

Actually sorry about that you guys. My mistake was that when using GoldMap, I mistook the secondary header offset as the promary since it doesn't show it. Johto Map does. And I saw it set to 03, for Route 3 that is. So does that have to be changed?

The structure is like this.

25 00 00 00 00 00 00 00 00 25

The 6th byte being the music data, 7th being lighting byte.

But the 2nd byte is NOT permissions. I'm out of ideas.

Last edited by tysonrss (2011-12-06 03:31:39)


Pokemon Blue DX is reborn!

Offline

#14 2011-12-06 03:32:43

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,079/3,474

Re: Trainer blackouts

I'd try changing it and see if it helps. If not, you can always change it back and try something else!

Offline

#15 2011-12-06 03:33:28

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 296/649

Re: Trainer blackouts

I updated the post...


Pokemon Blue DX is reborn!

Offline

#16 2011-12-06 07:33:46

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 303/649

Re: Trainer blackouts

Okay, I'm getting really fustrated here. Let me break it down now since I further understand.

Viridian City has a permission's byte of 01--indicating that it's a town.

PokeCenter of Viridian City has a byte of 06--indicating it's a passage(this was a test, because inside did not work[there are 2 inside values--both failed])

Well I died on purpose in Viridian Forest which has the indoor setting. But that shouldn't even matter anyway since there is no Pokecenter there.

As you said Tauwasser. The destination map(pokecenter) has to have 0x6 tileset, which it does and its type value has to be 0x4, 0x6 or 0x7. It does contain both.

Viridian City has to have 01 or 02, indicating that it's a town or route respectively--which it does...and NOTHING!! It still sends me home! is this because my position is set in Pallet instead of New Bark? Unlike other hackers who start at New Bark, I started in a different location. Do you think this could be the reason?

Last edited by tysonrss (2011-12-06 07:34:55)


Pokemon Blue DX is reborn!

Offline

#17 2011-12-06 17:39:02

Miksy91
Member
Registered: 2010-10-16
Post 650/2,311

Re: Trainer blackouts

I should be able to take a look at this next weekend.

P.S
It's always possible that asm, that determines the blackouts, has gone somehow wrong.
Have you been storing copies of the hacked rom?

*I've ~200 copies of dark future with each having some new changes compared to each other.

Offline

#18 2011-12-06 18:42:36

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 304/649

Re: Trainer blackouts

Well, I have 2 backups from when I just finished Oak's script and inserted Pokemon Tower tiles.

Than I have a backup where the actual rom is that I back up occasionally. So going back to the others...is a no no.

Anyway, I mislooked over it but I think I know what the problem is. I think I read on Tauwassers doc that fly data and blackout data are connected. And well...since I moved all of Kanto over to Johto there are no fly positions!

Mateo...I need your help with that MAN!


Pokemon Blue DX is reborn!

Offline

#19 2011-12-06 19:12:53

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,080/3,474

Re: Trainer blackouts

I believe there is a tutorial on editing fly data. If not, I'll have to write one.

But basically you would just go to the start of the fly table and change the johto ones to the map bank/number for the kanto maps and fix the locations.

Sorry that setbacks like this keep happening mate. Its been quite a while since I copied everything over like that, so I forget sometimes about things like this until something like this reminds me of them.

Offline

#20 2011-12-06 19:24:46

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 305/649

Re: Trainer blackouts

It;s fine dude.

I'm at the peak anyway and the flying positions don't sound so complicated.

*Note: On an original Silver rom...Viridian's Pokecenter has a fly position located INSIDE. What's up with that?


Pokemon Blue DX is reborn!

Offline

#21 2011-12-06 21:24:01

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 306/649

Re: Trainer blackouts

Thanks to Miksy's tutorial, my fly data/blackouts work fine now.

Thank you everybody for your help with this one.


Pokemon Blue DX is reborn!

Offline

#22 2011-12-06 23:29:12

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,081/3,474

Re: Trainer blackouts

You know, I'm not really sure why there would be a fly location inside. That's kind of odd, but I'm sure it serves some purpose I haven't thought of. But glad Miksy's tutorial was helpful and you got everything squared away.

Offline

#23 2011-12-06 23:57:02

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 309/649

Re: Trainer blackouts

Mateo wrote:

You know, I'm not really sure why there would be a fly location inside. That's kind of odd, but I'm sure it serves some purpose I haven't thought of. But glad Miksy's tutorial was helpful and you got everything squared away.

It's possible it was just a remaining one from Kanto. Remeber that Mt.Moon in the old games had a Pokecenter. Gold/Silver it didn't. So it's possible that fly data once belonged to Mt.Moon.


Pokemon Blue DX is reborn!

Offline

#24 2011-12-07 02:18:50

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,083/3,474

Re: Trainer blackouts

Could be!

Offline

Board footer

Powered by FluxBB