Move base power data.

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

Re: Move base power data.

Post by Blaziken257 »

First of all, I'd like to thank Kimbles for posting the base powers for the moves in the Telefang 1 Translation Topic. If it weren't for her, I probably would have never found this data!

Anyways, I found the data for base power. Actually, it's not just base power. It's the value for whatever numerical value is necessary for the move. So, for moves that do damage, this IS base power, but for moves that have other uses, the values have other purposes. For example, for moves that raise stats, these values determine how much the stat rises. For healing moves, they determine how much the move heals. And so on.

And the offsets? Well, they're located from $9CB28-$9CBB1. There's just one byte for every move. And it's in the same order as the index numbers. Which makes the move you're looking for easy to find.

Obviously, the data that determines whether a move does damage, raises a stat, heals, inflicts a status effect, is located somewhere else. This is probably somewhere near the data, judging from the weird patterns around this data.

And I experimented with the data, and I found some weird results. Raising a base power too high can cause overflow and cause attacks to do very low damage. Think of Marowak's Thick Club in Pokémon. How high, though? Well, it seems that a base power gets added to the Denjuu's Attack stat to determine damage. And for stat boosting moves, it seems that this value is added to the respective stat as well. And another random variable whose sole purpose is to do random damage is also added as well. If this value exceeds 255, then it loops to 0. Here's some tests I did to demonstrate:

- I used a Level 56 Cryptoburn (which had 100 Attack) (I just picked a random Denjuu to use) fighting a bunch of Level 60 Oshes over and over, tweaking the powers of various moves. I have no idea whether or not the species of the Denjuu taking a hit makes any difference, or the Defense for that stat for that matter, but I decided to use the same Denjuu every time to eliminate the possibility of confounding results (i.e. if you fight different Denjuu, how do you know that's not a variable affecting the results?)

First, I hacked Assault's power ($9CB84) to different values to see what would happen. I didn't use any stat boosters here (though I did later on, as you will see). If Oshe ever used Protect to boost its Defense, I would no longer fight it, because that may affect the results.

When taking the data, I disregarded critical hits, because that also may have confounded the data.

On my first trial, I hacked Assault to be 152 power. At level 56, it has 100 Attack. 100 + 152 = 252, which is close to 256. So no worries of overflow, right? I noted 10 attacks and how much damage they did:

149
152
148
151
153
153
148
150
153
153

Not too surprising. Next, I hacked Assault to be 153 power. 100 + 153 = 253. Here's 10 more attacks and their damage:

150
7
7
153
153
7
148
145
4
4
147

Wait, what? How does it do very little damage half the time? Well, there apparently is a random variable that adds to the Attack stat even more. A few times, it made it past 255, which means that this random variable can reach at least 3.

Now hacking Assault's power to 154 (which will have an effective attack of 254):

149
2
5
151
152
7
7
153
3
4

You can see even more cases of 1-digit damage here.

Now with Assault's power of 155 (giving an effective Attack of 255):

7
7
7
7
152
2
148
2
2
2

Very rarely did it do high damage.

Now with Assault's power of 156 (which will have an effective Attack of 256, which loops to 0):

6
7
7
7
7
7
5
5
7
7

Consistent low damage. Not too surprising.

Now, my second experiment. I set Assault's power to 0, and now I hacked Invigorate's "base power" (i.e. how much points the Attack increases by) instead ($9CB63). Like the last experiment, I did multiple trials with different values to see different results.

In this run, I used Invigorate once, and ONLY once in every battle.

First, I made Invigorate's power 149. This means that, when used, the user's attack will increase by 149. So Cryptoburn's Attack will be 100 + 149 = 249. Since I hacked Assault's power to be 0, then its power will not add it further. Now, my first run:

148
152
150
152
148
153
150
152
153
153

Not too surprising.

Now with Invigorate's "power" at 150 (which will make Cryptoburn's Attack 250 after one use):

153
149
7
153
151
153
152
153
152
152

The thing I found surprising about this is that when Assault's power was at 152 or below, it did high damage every time. Now, Invigorate's power is 150 (which is LESS than 152!), and now it's overflowing. Either this is just random chance, or Invigorate seems to have some extra variable in there or something.

Now here's what happened when Assault's power was 151 (supposedly making Cryptoburn's attack at 251 after one use):

7
153
148
153
7
153
153
150
153
152

At 152 (supposedly making Cryptoburn's Attack at 252 after one use):

7
7
4
144
153
152
148
7
7
153

Now at 153:

151
5
151
5
153
6
152
153
6
6
6

Now at 154:

2
2
6
6
6
148
7
7
7
7

Now at 155:

153
6
7
7
7
7
7
7
7
7

Finally, at 156:

4
4
4
4
2
2
4
2
2
2

You can see a pattern here. The higher it is, the more likely it is to overflow! Therefore, if you ever hack moves (or stats), be careful not to make them too high.

This begs the question, though: Is there a limit to how many times you can use a stat booster? In Pokémon, there is a limit of 6. But I don't think I've ever seen a limit in this game. And if that's the case, then it's possible to make a stat overflow without any hacking! I hope this doesn't happen to someone who is careless...

Kanzou has the highest Attack in the game, which is 169, which is significantly below 255. So even if there is no limit, then it will take a while to overflow. Still, if there isn't a limit, then be careful how many times you use a stat booster...
User avatar
Sanqui
Posts: 736
Joined: Sun Dec 16, 2007 12:25 am

Re: Move base power data.

Post by Sanqui »

Wow, even more information. Great work, Blaziken!

I hope Swampert22 will add this to his program XD
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Move base power data.

Post by Blaziken257 »

Thanks!

I think that, knowing Swampert22, he would make another program. After all, he makes lots of tools for different things. And I still need to find more information on move data, like the animation, and most importantly, what makes it do damage, boost a stat, inflict a status effect, heal, and so on.

And unfortunately, I haven't found it yet. That data right before the move powers is actually the Denjuu stat growth, believe it or not. And in fact, the power for the first move (which is actually an unused dummy move) is actually the last byte for stat growth, which is the growth of Teletel's Denma Defense. So go figure.

I tried corrupting the entire bank ($9C000-$9FFFF), but I didn't really get far. I first corrupted from $9C000-$9C714 (this was everything in the bank before the stat growth, which as I said is right next to the move base powers), but there wasn't much related to moves. Some moves seemed to miss more often, but that may have been just luck. Some weird things that happened that weren't related to moves were that a lot of Denjuu were missing when I tried to select them for battle, and that experience growth was very erratic.

Then I corrupted from $9CBB2-$9FFFF (this was everything in the bank after the move power data) and nothing much happened, other than some moves being much more powerful.

Oh well.

EDIT: I corrupted $68000-$6FFFF and unless a move missed, it would either crash the game or cause the game to hang (with the music still playing). Though, when I looked at the data, I couldn't find any pattern anywhere, so I'm guessing it's assembly code.
Post Reply