Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → PokeYellow's Max_Level does't function properly - How to fix?

#1 2016-05-08 19:58:20

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

PokeYellow's Max_Level does't function properly - How to fix?

Hey I compiled a copy of Pokemon Yellow recently. One of the things (Maybe the only thing) I changed was the max level at the first line of this ASM: https://github.com/pret/pokeyellow/blob … stants.asm

Weirdly enough, Rare candies work on level 100 and shows how much exp it needs the go to the next level, instead of just "0" but when I go to battle, after gaining the exp, it goes back to Lv 100 like in the unmodified versions of R/B/Y...

So, how can I fix this? I want to be able to level up to ~200 because I hate the original level cap :/

Any help would be nice :D

Offline

#2 2016-05-08 20:38:04

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,316/3,505

Re: PokeYellow's Max_Level does't function properly - How to fix?

Since Pokeyellow isn't as far along as Pokered, there are probably some instances that still have a hard-coded value instead of using the Max Level constant. You would need to either wait until those routines are tracked down and updated, or track them down yourself and update them.

You could start by searching for that constant in both Pokered and Pokeyellow, and if you see a routine that shows up in the search results in Pokered but not in Pokeyellow, try going to the appropriate routine and seeing if you can find the value so you can replace it.

Since Max Level was originally 100, that might show up as $64, because that is 100 in hexadecimal.

Offline

#3 2016-05-08 20:40:03

daMoose52
Member
Registered: 2014-11-14
Post 65/108
Website

Re: PokeYellow's Max_Level does't function properly - How to fix?

There's probably a check in the battle routine that "corrects" the level if it exceeds 100, and the check may not have had its value swapped to a variable.
I'd read through the code for the battle finale, experience awarding, and level up and evolution check, look for anything that compares to or sets to "64" (100, hexidecimal)


Pokemon: Project Neo A Pokemon hack 15 years in the making...

Offline

#4 2016-05-08 22:02:43

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

Re: PokeYellow's Max_Level does't function properly - How to fix?

Okay, thanks for the info guys.

I searched Pokeyellow for '64' and came up with the following things that MIGHT fix it...

- Home.asm : Line 4042 (ld a, $64) A couple of lines down further it even mentions something about Level calcultion
- Engine/experience.asm : 158 (db $65,$8F,$64,$8C ; medium slow: 6/5 n^3 - 15 n^2 + 100 n - 140) Basically has to do with exp growth ; I don't think it's the culprit.

I then searched for 'level' and only one new thing came up, but don't think it matters

- Main.asm : Line 738 (CalcLevelFromExperience: ; 58d99 (16:4d99))

Finally I searched EXP and didn't come across anything new.

I assume the first option is the correct one? If so, I want to change the Max_Level to 250. I'd need to change it to $FA correct?

Offline

#5 2016-05-08 22:07:44

daMoose52
Member
Registered: 2014-11-14
Post 66/108
Website

Re: PokeYellow's Max_Level does't function properly - How to fix?

If you have the max level defined as a constant, you might as well change it to that~

You'll want to watch those areas for commands like "cp $64", which is "Compare a to $64 (100)", which would be a check or "ld a, $64" which is "load value $64 to a", which would reset the level.


Pokemon: Project Neo A Pokemon hack 15 years in the making...

Offline

#6 2016-05-08 22:14:48

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

Re: PokeYellow's Max_Level does't function properly - How to fix?

daMoose52 wrote:

If you have the max level defined as a constant, you might as well change it to that~

You'll want to watch those areas for commands like "cp $64", which is "Compare a to $64 (100)", which would be a check or "ld a, $64" which is "load value $64 to a", which would reset the level.

I don't follow. Are you saying I should change it to 250 (FA), or were you warning me about the possible side effects of changing the 100 to 250?

Okay so I changed that value and it lowered PIkachu's (and maybe other pokemon's) stats harshley. At level 100, he had like 87 speed, 35 defense etc

Last edited by jastolze (2016-05-08 22:28:29)

Offline

#7 2016-05-08 22:28:09

daMoose52
Member
Registered: 2014-11-14
Post 67/108
Website

Re: PokeYellow's Max_Level does't function properly - How to fix?

Neither; if you have the level cap set to a constant, like MAX_LEVEL, change any resulting finds from a hard value ($FA) to MAX_LEVEL.

Might as well change them to a value to test, but if you confirm it might as well set it to MAX_LEVEL or whatever so that you can tinker with it later and not have to hunt down each instance.


Pokemon: Project Neo A Pokemon hack 15 years in the making...

Offline

#8 2016-05-08 22:29:06

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

Re: PokeYellow's Max_Level does't function properly - How to fix?

Okay so I changed that value and it lowered PIkachu's (and maybe other pokemon's) stats harshley. At level 100, he had like 87 speed, 35 defense etc

Offline

#9 2016-05-08 22:30:24

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

Re: PokeYellow's Max_Level does't function properly - How to fix?

What would that Max_Level script look like in asm? What exactly should I put?

Offline

  • Index
  • → Help/Question
  • → PokeYellow's Max_Level does't function properly - How to fix?

Board footer

Powered by FluxBB