Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-06-03 17:33:18

jastolze
Member
Registered: 2013-01-13
Post 53/112

Removing the Level 100 Cap in Gen 2 Games

Hi, I'm trying to figure out if it's possible to remove the Level Limit in Gen 2.

I know you can easily go past that level with a hack and then by using rare candies. But I mean by Leveling up from 100 to 101, all the way to 255 (No rare candies involved)

I'm very new to rom hacking, but I would like it if someone could be patient enough to teach me how to do this. (I assume with a hex editor)

Oh, and please don't question why I want to do this. I have my reasons.

Also, if it is possible (Which I'm almost certain it is) I'd like to have an idea of how much work and understanding I'll need of the game in order to pull this off.

If you're planning on helping me understand, please be very specific. Like I said before, I'm very new to this :)

Thanks!

P.S: I apologize if this has been asked before. I didn't find anything gen 2 related when it comes to this.

Offline

#2 2014-06-04 05:38:25

Kumar
Member
From: UNOVA
Registered: 2013-03-18
Post 335/383
Website

Re: Removing the Level 100 Cap in Gen 2 Games

actually its possible to level up a pokemon using a hex editor by using ff as level byte it will make the pokemon level up to 255 and causing nearly infinite hp.
if you have to remove the cap you will have to change some pointers and other bytes i don't know them now but i will try to figure.

Offline

#3 2014-06-04 13:58:24

jastolze
Member
Registered: 2013-01-13
Post 54/112

Re: Removing the Level 100 Cap in Gen 2 Games

Kumar wrote:

actually its possible to level up a pokemon using a hex editor by using ff as level byte it will make the pokemon level up to 255 and causing nearly infinite hp.
if you have to remove the cap you will have to change some pointers and other bytes i don't know them now but i will try to figure.

I'd appreciate that Kumar. I would love to level my PKMN up to 255 and make trainers PKMN even more difficult.

Oh and for Pokemon like Chansey/Blissey I would probably just lower their base HP so it doesn't cause an error.

Last edited by jastolze (2014-06-04 14:00:22)

Offline

#4 2014-06-04 14:36:22

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 198/411
Website

Re: Removing the Level 100 Cap in Gen 2 Games

All I know is that there's something that makes the "exp to next level" field display '0' when the Pokemon's reached level 100. There are two routines related to leveling up (one for rare candy and one for exp in battle) that compare the current level to 100 in order to do their stuff. However, while experience growth can be capped earlier by changing those cp instructions to for example cp 80 or cp 50, changing them to 255 won't still allow pokemon to raise past level 100. I remember this because I've worked with experience capping in my hack, making pokemon stop growing at different levels depending on the badges obtained. However, I only made Pokemon to stop growing earlier than level 100.

In short, there's something else that limits the experience growth at level 100 and I'm not aware what it is. But at least these two cp instructions I was talking about need to be changed to cp ff, that's for sure:
https://github.com/kanzure/pokecrystal/ … .asm#L1355
https://github.com/kanzure/pokecrystal/ … .asm#L7503

Last edited by Crystal_ (2014-06-04 14:39:32)

Offline

#5 2014-06-04 15:23:13

jastolze
Member
Registered: 2013-01-13
Post 55/112

Re: Removing the Level 100 Cap in Gen 2 Games

Crystal, as mentioned before, I'm a newbie when it comes to all of this. So, how would I modify things with ASM? Do I need a program? I saw that $64 on that second link you posted, and I know that 64 in Decimal is 100, so if I change that from 64 to FF that wouldn't be enough? I don't really care about rare candies at this point either. They're a cheap way to win and people just abuse it. So, focusing on the EXP Growth rate for a moment: Are you saying that a Hex editor alone won't be enough to modify the level cap? Because I'd rather use a HE as opposed to Assembly if I could. I'm really psyched about changing this.

Here's another possible option. In my hack, I could start off by changing that one thing in the core.asm link to FF. Then, since level 100 is set to "0" more exp to advance, maybe I could make the Starter Pokemon Level 105 and All wild Pokemon 100 Levels above what they normally are, in addition to Trainers. That way,  I never run into the "0" more EXP to advance thing. I've seen in Red Version that there is a formula for each particular level (like Level 150 is an extremely high amount of EXP to level up, like a quarter of a million).

The only question is, would it still revert back to level 100 after I raise a level?

Again, I've probably gone wrong somewhere here, but...

Offline

#6 2014-06-04 17:23:17

Miksy91
Member
Registered: 2010-10-16
Post 2,116/2,305

Re: Removing the Level 100 Cap in Gen 2 Games

It won't be as simple as that. If it was, somebody else would have already implemented it in a hack.

There is some kind of routine that restricts your pokemon from gaining more experience when they reach lv100 and along with that, another routine that tells the game that pokemon can't exceed lv100 (in other words, the amount of exp you have for a pokemon at lv100 is the maximum exp that pokemon can have).

I don't know how Gamefreak has programmed this in the game but what you would have to do would be re-coding it.
And anything can be done with a hex editor but asm editing is just that as well. Some of the code being used in the game is being used as "asm code" and the rest as "data that the asm code uses". The data is mostly read from all kinds of tables (and reading, and writing, to the tables is handled by asm as well).

So yeah... what you would have to do would be way harder than using a hex editor to change a byte or two, but nothing is impossible. As soon as you know where those routines (that prevent pokemon from "evolving" further from lv100) are located, you can re-program them to not restrict you to lv100 (= asm job).

Offline

#7 2014-06-04 18:18:42

comet
Member
Registered: 2012-04-09
Post 453/672

Re: Removing the Level 100 Cap in Gen 2 Games

If you're using pokecrystal, the gruntwork is done for you. Just change the MAX_LEVEL constant.

https://github.com/kanzure/pokecrystal/ … nts.asm#L1

MAX_LEVEL EQU 255

The only complications are caused by experience. The easiest way to resolve them is to tweak the growth formulas so they're stretched out over 255 levels instead of 100.


If you want to stick with the regular experience rate, there are a couple things to consider.

  • Experience is stored in three bytes, meaning it caps out at 16,777,215 (0xFFFFFF). It barely hits a million exp by level 100, but it's in reach by 245. When it overflows, you lose all your exp. It's not as close as it sounds, either. The last 10 levels amount to another couple million exp. Lengthening the experience curve a bit would go a long way here.

  • A related issue is experience earned in battle. Required exp escalates after level 100 (it's a cubic function). Before that, it doesn't exceed 30k. Since it's a comfortable distance from 16 bits, the required exp is expected to always fit in two bytes. In the 200s, where the required exp is 200k+, it fails to measure the full value, decides you have a lot less experience than you should, and drops 100 levels or so.

  • The exp bar display appears to be miscalculated the same way.

  • Also, the stats screen uses PrintNum to display experience, which doesn't do more than 7 digits by default. It's trivial to add handling for 8, but it's worth noting.

Last edited by comet (2014-06-04 19:35:50)

Offline

#8 2014-06-04 20:08:36

jastolze
Member
Registered: 2013-01-13
Post 56/112

Re: Removing the Level 100 Cap in Gen 2 Games

@ Miksy: I figured it would have been more difficult than I would have hoped.

@Comet: I'm installing cygwin as we speak and have the files from Github. I'll change the MAX_LEVEL EQU thing to about 200, that way, I can see what else needs to be modified. I'll post the results here, k?

Last edited by jastolze (2014-06-04 20:29:22)

Offline

#9 2014-06-04 21:25:21

comet
Member
Registered: 2012-04-09
Post 454/672

Re: Removing the Level 100 Cap in Gen 2 Games

I linked a little prematurely. There are some changes that were just merged in that fill in the rest of the gaps. Run "git pull" to receive them.

Offline

#10 2014-06-04 21:35:01

jastolze
Member
Registered: 2013-01-13
Post 57/112

Re: Removing the Level 100 Cap in Gen 2 Games

Is cygwin suppsed to take hours on end to install? I'm on a pretty beast PC so I don't know why it's taking longer than it did on my older, out of date PC.

Offline

#11 2014-06-04 21:41:44

comet
Member
Registered: 2012-04-09
Post 455/672

Re: Removing the Level 100 Cap in Gen 2 Games

Cygwin has thousands of packages. If you chose to download them all, don't. Only the 5 or so listed are needed.

It will be easier to explain more on irc. https://kiwiirc.com/client/irc.nolimitz … #skeetendo

Offline

#12 2014-06-09 15:39:56

jastolze
Member
Registered: 2013-01-13
Post 61/112

Re: Removing the Level 100 Cap in Gen 2 Games

Alright, I think I'm getting (somewhat) better at understanding this. My question now has to do with this:

NUM_MOVES EQU 4

Can I add a fifth one without corrupting the game? If so, how would the fifth attack display while in battle?

Also, in PokeRed, I had an issue finding the MAX_LEVEL EQU thing. Where would I find that and is it under a different name/value? A lot of the directories and filenames are different from PokeCrystal. Is there a search function I can use on Github?

Thanks!

Offline

#13 2014-06-10 18:42:52

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 199/411
Website

Re: Removing the Level 100 Cap in Gen 2 Games

EQU stands for equivalent and is basically to assign 4 to NUM_MOVES. This means that, wherever you see NUM_MOVES in the dissasembly, it's the same as if it was the number 4. Changing NUM_MOVES EQU 4 to NUM_MOVES EQU 5 won't magically make a fifth move appear in the battle screen. Imagine for example that NUM_MOVES was used in some AI routine that looped NUM_MOVES (that is, 4) times in order to pick the move that he's going to use. By changing '4' to '5', you would just break it. This example is not real, but you get the point about how EQU works.

Offline

Board footer

Powered by FluxBB