Telefang 2 Denjuu Data.

Discuss anything related to hacking ROMs of the Telefang games here.
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Telefang 2 Denjuu Data.

Post by Blaziken257 »

I found some things since I last posted here. You can read my notes here. Basically, what I found is that the formula for a stat works like this:

gm/128

g = The growth rate for a Denjuu. This is basically a lookup table, with arbitrary values depending on the Denjuu's level. You can find a table here, with values for each level for each group. This is a bit similar to experience groups in Pokémon. In the ROM, as stated before, you can find this starting at 0x4F7DD0 in Power Version. (I haven't looked at Speed Version yet, so I don't know where it is there. It may or may not be in the same place.) In the Denjuu data structure in ROM (starts at 0x4F6BD8 in Power Version and 0x4F68B8 in Speed Version), there are two bytes for each stat, and this is the first byte.
m = A constant multiplier which affects how fast a stat grows. Since this value can range from 0-255, effectively a stat is scaled from anywhere between 0 to 255/128, in multiples of 1/128. After multiplying, the stat is always rounded down. In the Denjuu data structure in ROM, this is the second byte. When I said "it is known that there are different effects for when this value is greater than 0x80" earlier, it turns out that this constant value causes the stat to multiply the number greater than 1 when it is above 0x80 (since it is divided by that number), and multiplies it by a number less than 1 when less than 0x80.

For example, let's look at Rex (Basic)'s HP:

His data is from 4FC704-4FC71A in Power Version and 4FC3E4-4FC3FA in Speed Version. The second byte in this data (4FC705 in Power, 4FC3E5 in Speed) determines which stat group Rex belongs in for HP, and the third byte in this data (4FC706 in Power, 4FC3E6 in Speed) determines how much to multiply the stat by.

As we can see, Rex's HP is in stat group 1. Let's suppose he is at Level 4. According to this, his HP should be 18 at level 4, since he is in group 1. But you also have to multiply it. The next byte is 0xA8, which is 168 in decimal. So you'll have to multiply 18 by 168/128. The result is 23.625, which rounds down to 23. So, Rex's HP will be 23 at level 4.

NOTE: This formula does not take into account evolution items' effects on stats, because they haven't been fully researched yet. But here is what I know:

- In the 36-byte array for Denjuu data structures in RAM, the index number of the item used to evolve the Denjuu appears to be stored in the 34th byte. For example, the first Denjuu's data is from 0x02000000-0x02000027, and the index number of the item will be in 0x02000022.
- A value is stored in the 4th byte (e.g. in 0x02000004) which appears to add to each stat by this constant value. The value appears to be determined from some array starting at 0x102660 in ROM (at least in Power Version). I'm not sure where exactly the game looks (i.e. I don't know what determines the array element here); this appears to be some currently unknown value that is apparently unrelated to the item. Also, this value appears to max out at 70 (decimal).
- Another value is stored in the 13th byte (e.g. in 0x0200000D). The purpose of this is currently unknown. The game also reads from the same array (the one that starts at 0x102660 in ROM), but this time it reads from the byte afterwards. Again, I don't know how the game determines the array element.

Sorry if this is confusing. I'll figure out more later, I guess. Or hopefully someone else might be able to.
Sir Allan Newlight(imported)
Posts: 166
Joined: Wed Dec 24, 2008 7:57 pm

Re: Telefang 2 Denjuu Data.

Post by Sir Allan Newlight(imported) »

Now we must find how to expand that Denjuu Data. This is helpfully. I found that in rom is 55 placeholders <Glitchy denjuu caused by CodeBreaker> After we repoint data It was <I think> Possible to add extra denjuu.
Post Reply