Denjuu Encounter data is difficult to hack...

Discuss anything related to hacking ROMs of the Telefang games here.
User avatar
Sanqui
Posts: 736
Joined: Sun Dec 16, 2007 12:25 am

Re: Denjuu Encounter data is difficult to hack...

Post by Sanqui »

Very nice tutorial, but thank you SO MUCH for the overworld/antena tree tileset!!
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Denjuu Encounter data is difficult to hack...

Post by Blaziken257 »

Well, that tileset is separate from Denjuu encounter data. It has to do with acre data. The reason why I posted the tilesets is because of the grass/water thing with wild Denjuu...
User avatar
Sanqui
Posts: 736
Joined: Sun Dec 16, 2007 12:25 am

Re: Denjuu Encounter data is difficult to hack...

Post by Sanqui »

Ooh, ooh, all the tilesets are there! I know they have nothing to do with encounter data, I need them for something different. Thank you a lot for ripping those!
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Denjuu Encounter data is difficult to hack...

Post by Blaziken257 »

I still need to rip a few, actually... but that reminds me, I gotta make a tutorial for that...

Anyway, let's get back on topic here pretty soon...
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Denjuu Encounter data is difficult to hack...

Post by Blaziken257 »

Yeah... so I figured out the encounter pointers every map in the game. As I predicted, the order of all the maps is the same order as their index numbers. Basically, each value here specifies which group of Denjuu should appear. To find the group of Denjuu, just take the value, multiply it by $05, then add it to $1D56EE to find the Denjuu that should appear in that acre.

0x03E487-0x03E4C6 = Overworld map (Top left quadrant)
0x03E4C7-0x03E506 = Overworld map (Top right quadrant)
0x03E507-0x03E546 = Overworld map (Bottom left quadrant)
0x03E547-0x03E586 = Overworld map (Bottom right quadrant)
0x03E587-0x03E5C6 = Antenna trees* (Top left quadrant)
0x03E5C7-0x03E606 = Antenna trees* (Top right quadrant)
0x03E607-0x03E646 = Antenna trees* (Bottom left quadrant)
0x03E647-0x03E686 = Antenna trees* (Bottom right quadrant)
0x03E687-0x03E6C6 = Toronko Village Water Station
0x03E6C7-0x03E706 = Marts/Houses?**
0x03E707-0x03E746 = Kurinon Cave - Floor 1
0x03E747-0x03E786 = Kurinon Cave - Floor 2
0x03E787-0x03E7C6 = Craft Laboratory
0x03E7C7-0x03E806 = Dementia's Mansion
0x03E807-0x03E846 = Tripa Antenna Tree Cave - Floor 1
0x03E847-0x03E886 = Tripa Antenna Tree Cave - Floor 2
0x03E887-0x03E8C6 = Tripa Antenna Tree Cave - Floor 3
0x03E8C7-0x03E906 = Tripa Antenna Tree Cave - Floor 4
0x03E907-0x03E946 = Tripa Antenna Tree Cave - Floor 5
0x03E947-0x03E986 = Peperi Mountain - Floor 1
0x03E987-0x03E9C6 = Peperi Mountain - Floor 2
0x03E9C7-0x03EA06 = Peperi Mountain - Floor 3
0x03EA07-0x03EA46 = Peperi Mountain - Floor 4
0x03EA47-0x03EA86 = Peperi Mountain - Floor 5
0x03EA87-0x03EAC6 = Kakutos Relic - Floor 1
0x03EAC7-0x03EB06 = Kakutos Relic - Floor 2
0x03EB07-0x03EB46 = Kakutos Relic - Floor 3
0x03EB47-0x03EB86 = Kakutos Relic - Floor 4
0x03EB87-0x03EBC6 = Kakutos Relic - Floor 5
0x03EBC7-0x03EC06 = Kakutos Relic - Floor 6
0x03EC07-0x03EC46 = Kakutos Relic - Floor 7
0x03EC47-0x03EC86 = Kakutos Relic - Floor 8
0x03EC87-0x03ECC6 = Burion Relic - Floor 1
0x03ECC7-0x03ED06 = Burion Relic - Floor 2
0x03ED07-0x03ED46 = Burion Relic - Floor 3
0x03ED47-0x03ED86 = Burion Relic - Floor 4
0x03ED87-0x03EDC6 = Burion Relic - Floor 5
0x03EDC7-0x03EE06 = Burion Relic - Floor 6
0x03EE07-0x03EE46 = Burion Relic - Floor 7
0x03EE47-0x03EE86 = Burion Relic - Floor 8
0x03EE87-0x03EEC6 = Burion Relic - Floor 9
0x03EEC7-0x03EF06 = Human World - Main Area?**
0x03EF07-0x03EF46 = Human World - Antenna Tree?**
0x03EF47-0x03EF86 = Human World - Unused Buildings?**
0x03EF87-0x03EFC6 = ??? (Unused?)
0x03EFC7-0x03F006 = ??? (Unused?)
0x03F007-0x03F046 = Room with second D-Shot?**
0x03F047-0x03F086 = Room with Palm Sea Antenna Tree switch?**
0x03F087-0x03F0C6 = Sanaeba Laboratory - Floor 1
0x03F0C7-0x03F106 = Sanaeba Laboratory - Basement 1
0x03F107-0x03F146 = Sanaeba Laboratory - Basement 2

*This is kind of weird that antenna trees have the same encounter data as the rest of the overworld, considering that you can't find wild Denjuu in antenna trees. No, it's not even possible in the Palm Sea antenna tree, even with the water surrounding the tree. And I even tried to hack grass in it, but nothing would happen even if I ran in the grass for a long time.
**The data in these locations are blank, with all values of 00 (which is the first group of Denjuu), and as far as I know, it isn't possible to find wild Denjuu in these areas in any way. However, judging from the order that the maps are stored internally, these are probably the locations that the data is for.

By the way, for anybody who wants to play around with this and test it to see all of this for yourself, there are two useful GameShark codes you can play with to go to anywhere you want:

01xx04C9 - Warp to any map you want. Replace xx with any value on this list.
01xx06C9 - Go to any coordinate you want. Replace xx with the coordinate you want:

Code: Select all

     1  2  3  4  5  6  7  8
   +--+--+--+--+--+--+--+--+
 1 |00|01|02|03|04|05|06|07|
   +--+--+--+--+--+--+--+--+
 2 |08|09|0A|0B|0C|0D|0E|0F|
   +--+--+--+--+--+--+--+--+
 3 |10|11|12|13|14|15|16|17|
   +--+--+--+--+--+--+--+--+
 4 |18|19|1A|1B|1C|1D|1E|1F|
   +--+--+--+--+--+--+--+--+
 5 |20|21|22|23|24|25|26|27|
   +--+--+--+--+--+--+--+--+
 6 |28|29|2A|2B|2C|2D|2E|2F|
   +--+--+--+--+--+--+--+--+
 7 |30|31|32|33|34|35|36|37|
   +--+--+--+--+--+--+--+--+
 8 |38|39|3A|3B|3C|3D|3E|3F|
   +--+--+--+--+--+--+--+--+
Oh and I think this information is enough for a tool now. Now I just gotta find what determines whether an acre has Denjuu everywhere or just in grass/water...

Oh and one last thing! Since the Denjuu Arrive Phrase text comes right after the last group of Denjuu (last group of Denjuu is from 1D5883-1D5887; the Denjuu Arrive phrases start at 1D5888), you cannot add more groups without screwing up the arrive text. Unless you find the pointer for the arrive text and move it (keeping in mind that there's more text after that, too). So you can only modify the existing Denjuu groups, not add any new ones! Oh well.

If you're confused about any of this, let me know!

EDIT: I at least found the arrive text pointer so you can probably add more Denjuu groups if you want. The pointer is from $162A5-162A6. The value is 88 58, so it points to 0x1D5888. I'm not sure how the game knows to point to bank $75 (0x1D4000-1D7FFF), though... And of course, there's still text under the Denjuu arrive phrases (the attack phrases, some weird seemingly unused text, personalities, and status effects)...
User avatar
andwhyisit
Site Admin
Posts: 1197
Joined: Fri Dec 14, 2007 9:24 pm

Re: Denjuu Encounter data is difficult to hack...

Post by andwhyisit »

Blaziken257 wrote:Oh and one last thing! Since the Denjuu Arrive Phrase text comes right after the last group of Denjuu (last group of Denjuu is from 1D5883-1D5887; the Denjuu Arrive phrases start at 1D5888), you cannot add more groups without screwing up the arrive text. Unless you find the pointer for the arrive text and move it (keeping in mind that there's more text after that, too). So you can only modify the existing Denjuu groups, not add any new ones! Oh well.

If you're confused about any of this, let me know!

EDIT: I at least found the arrive text pointer so you can probably add more Denjuu groups if you want. The pointer is from $162A5-162A6. The value is 88 58, so it points to 0x1D5888. I'm not sure how the game knows to point to bank $75 (0x1D4000-1D7FFF), though... And of course, there's still text under the Denjuu arrive phrases (the attack phrases, some weird seemingly unused text, personalities, and status effects)...
Ah, good ol' bank 75. I'll take a good look at it as soon as I am able.
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Denjuu Encounter data is difficult to hack...

Post by Blaziken257 »

OK, awesome. Just for reference:

Denjuu arrive phrases are from 1D5888-1D6367.
Denjuu attack phrases are from 1D6368-1D6E47.
There's this weird unused text from 1D6E48-1D7927 that I don't think has any purpose.
Denjuu personality text is from 1D7928-1D7987.
Status effect text is from 1D7988-1D79C7.
After that, it's all blank until the end of the bank (at 1D7FFF).
Therefore, if you want to have more groups of Denjuu, you have to move all the above data further into the ROM.

The good news is that you'll have room to do it. Using an extreme case, if you want 256 groups of Denjuu (there's 82 right now, so that's ample), then the Denjuu data needs to go from 1D56EE-1D5BED, as opposed to 1D56EE-1D5887. That means you need to push everything else ahead by $366 bytes. Fortunately, this is still enough to fit everything else in bank $75, as you'll still have some bytes left over at the end (the status text data will end at 1D7D2D, which means you'll still have $2D2 bytes of room left). But of course, 256 groups is way too ample, but still, if someone wants that many, then there's enough room for it.
User avatar
andwhyisit
Site Admin
Posts: 1197
Joined: Fri Dec 14, 2007 9:24 pm

Re: Denjuu Encounter data is difficult to hack...

Post by andwhyisit »

Well a good way to save space is to cut down on the arrival text. I think my biggest goal at the moment would be to learn how to control character limits and reposition data within bank 75.
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Denjuu Encounter data is difficult to hack...

Post by Blaziken257 »

Well, you don't really need it. Not to mention that some Denjuu have long arrival texts. Unless you're thinking of using pointers for every arrival text.

Also, if you plan to go about doing this, this should be separate from the translation hack, as Denjuu encounters and text are two different things.
Post Reply