• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: Creating the best possible level curve system

Blah

Free supporter
1,924
Posts
11
Years
So I've been working on level curving and completely slacking on everything else I promised to do.

Before I start my explanation, let me first iterate that this thread's purpose is to achieve an ASM solution to the level problem.

Goal:
Create an algorithm which calculates appropriate level of wild and trainer and given Pokemon factoring in trainer's party, and Pokemon species which we are encountering.
- No exploits should be present (i.e, if I made this average level, and had a lvl 1 Pidgey in the team)
- Eliminate pointless grinding (Should not have to grind to catch up to lvl curves, and it's pointless to try)
- System should not eliminate the need to capture and train Pokemon
- Opponent's party size taken into account.
- Should be expandable, and have many "disable" switches

Let me now explain the motivations behind each of these goals I think are reasonable.

- No exploits should be present (i.e, if I made this average level, and had a lvl 1 Pidgey in the team)
Not really any explanation to be had here. If the level calculation has an easily exploitable hole it needs to be redone completely. We should never rely solely on a single algorithm. Whether you use average party level or max party level or anything like this, as a single algorithimn, you will always find some hole. The idea is to come up with an "if else" style level generator where both the algorithms cover for each other's "exploit-case".

- Eliminate pointless grinding (Should not have to grind to catch up to lvl curves, and it's pointless to try)
This is kind of the purpose of a level generator. We want to make sure the player doesn't feel like they should have to grind levels on the grass to progress further into the game. I think that level grinding is actually a boring exploit in the current system which allows for easy game play. Something that someone has suggested to be was an exp regulator to go with the level curving, so that you don't really get any exp for grinding levels in a pointless fashion (but how would you do that if at all?)

- System should not eliminate the need to capture and train Pokemon
Say you have a group of level 24-25 Pokemon. You raise one up to be level 30. Now the wild Pokemon you find would be higher level than the rest of your party. You could go into the wild and capture a whole new party of Pokemon which are higher level than yours, and rise/repeat the process until lvl 100. Effectively, you've only grinded 1 Pokemon to get a team full of fully leveled ones. This kind of issue arises if the curving system out scales your team. We need to think of a way to counter this.


- Opponent's party size taken into account.
So if I fight a trainer with 1 Pokemon, I believe that this trainer's Pokemon should be higher level than fighting another trainer with 4 Pokemon. With a curving system, it becomes very difficult to progress through the game when you have to face streaks of trainers with large Pokemon party pools (since they are the same level range as your party). Visits to the PC would happen often, we need to figure out a good algorithmn to tone down these levels too if there is a large party which you must face

- Should be expandable, and have many "disable" switches
Obviously, you may want certain trainers or Pokemon to have a static level. For example, I may want a legendary to be set at level 50.


Ideas:

Average level: Get the average level of top 3 leveled Pokemon in your party, and use that level
Exploit: The one trick pony route. Have one high level Pokemon, and the rest low leveled. Any form of average levels has this issue

Max level: Get the max level and minus (0-5) from it.
Exploit: None. But you lose to need to capture and train your own Pokemon when wild Pokemon out level them due to the calculations with max Pokemon level

My idea: Base stats level cap + Max level
Basically, use the Pokemon's base stat total to determine a maximum level in which it can be in the wild.

Base stat (0-220): Level range: 0-15 ; use max level to determine. So if max level > 15 +5 then we get these Pokemon as lvl 15
Base stat (220 -320): Level range 10-30 ; use max level to determine
Base stat (320-420); Level range 25-40 ; use max level to determine
Base stat (420-500); Level range 35-60; use max level to determine
Base stat (500+); Level range 45-100 ; use max level to determine

Do you have any ideas to make this better? Maybe ideas of a better algorithm? The idea is to balance Pokemon throughout the game, Pokemon given to you and Pokemon you find. Both.
 

Criminon

Forever Spriting
265
Posts
11
Years
FBI, I'm loving where you're going with this.

"Average level: Get the average level of top 3 leveled Pokemon in your party, and use that level
Exploit: The one trick pony route. Have one high level Pokemon, and the rest low leveled. Any form of average levels has this issue"

I think the average level is a good idea and has merit, but it needs more rules to be effective.


1. If you have two or more pokemon in your party, it averages the highest and the lowest and it ignores the rest. (ignoring eggs) This should promote a healthy party. Using a high level would ultimately give out a low xp gain if the opponent's pokemon was a lower level. Disabling this rule for boss / gym fights would ensure that the player wouldn't be able to cheat the system by blowing through the entire game with a lvl 1 and a high level. You could also make it so all pokemon gain xp per battle (favoring lower levels), so the system would eventually level everything out. (or get it close)

2. Give random encounters and battles RNG. Whatever number it lands on shouldn't be the same number that you see constantly while playing. You should still make it so there is a bit of give and take. Some should be under your level even if you have a party with the same levels. At the same time, some should be higher.

"Max level: Get the max level and minus (0-5) from it.
Exploit: None. But you lose to need to capture and train your own Pokemon when wild Pokemon out level them due to the calculations with max Pokemon level"

1. Alternatively you can make it so when capturing wild pokemon, it takes into account your lowest level pokemon in the party and bases the capture rate off of that. This should solve the capture a team of wild pokemon technique.

"My idea: Base stats level cap + Max level
Basically, use the Pokemon's base stat total to determine a maximum level in which it can be in the wild."

Could you go into more detail about this?
So your idea makes it so current pokemon tables for where they are found is erased or ignored, and it focuses solely on the level in which your pokemon are? So if my max level is some number it would give me pokemon with certain base stats in any areas?

If I'm understanding this correctly it would mean that we would get weird pokemon in snowy regions, water, etc.
 

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023
Say you have a group of level 24-25 Pokemon. You raise one up to be level 30. Now the wild Pokemon you find would be higher level than the rest of your party. You could go into the wild and capture a whole new party of Pokemon which are higher level than yours, and rise/repeat the process until lvl 100. Effectively, you've only grinded 1 Pokemon to get a team full of fully leveled ones. This kind of issue arises if the curving system out scales your team. We need to think of a way to counter this.
Actually, this is the system i'm going to use (with some notable differences). All depends on what you want to do with your rom.
Probably i'll use the normal distribution to generate levels, changing only the mean but not the variance.

Every system with an average value is exploitable.
 

Blah

Free supporter
1,924
Posts
11
Years
FBI, I'm loving where you're going with this.



I think the average level is a good idea and has merit, but it needs more rules to be effective.


1. If you have two or more pokemon in your party, it averages the highest and the lowest and it ignores the rest. (ignoring eggs) This should promote a healthy party. Using a high level would ultimately give out a low xp gain if the opponent's pokemon was a lower level. Disabling this rule for boss / gym fights would ensure that the player wouldn't be able to cheat the system by blowing through the entire game with a lvl 1 and a high level. You could also make it so all pokemon gain xp per battle (favoring lower levels), so the system would eventually level everything out. (or get it close)
Oh I remember the exp curve thing now. Basically,
if pokemon_level > generated_level + 5: exp = 0
It should solve the level grind of the single Pokemon! My only problem with this is if I go in a route with 3 Pokemon, and I capture a fresh one, I'm forced to train it so my other Pokemon get exp (atleast until the next PC). I think a solution would be to allow the player to deposit a Pokemon into the PC in the OW (but not withdraw, because obviously depositing and withdrawing from the PC heals the Pokemon). I'll consider this approach somewhat more as well.

2. Give random encounters and battles RNG. Whatever number it lands on shouldn't be the same number that you see constantly while playing. You should still make it so there is a bit of give and take. Some should be under your level even if you have a party with the same levels. At the same time, some should be higher.
I disagree about higher levels in most cases. If your Pokemon are lower level than what you are fighting, you're gonna have a bad time most of the time. Imagine a trainer with 5 Pokemon, and you get bad luck. You'd face 5 Pokemon who are higher than your team (if it's been a long route or forest, you'll likely lose this battle). That's the thing about balancing levels based on trainer's team number too. I'm seeing no problems doing this for wild Pokemon if the capturing process is harder.

Could you go into more detail about this?
So your idea makes it so current pokemon tables for where they are found is erased or ignored, and it focuses solely on the level in which your pokemon are? So if my max level is some number it would give me pokemon with certain base stats in any areas?

If I'm understanding this correctly it would mean that we would get weird pokemon in snowy regions, water, etc.
So the hacker sets a list of Pokemon through their mapping program. From there, we generate a level based on the highest level'd Pokemon (call this number "X"). Then again, depending on the species's base stats we're about to encounter we generate a numbers "Low" and "Max" which indicate the level range the Pokemon should be found (so no more Elite level 90 rattata's in the wild if you get to that point in the game, and no level 3 Charizard, if you somehow manage to get past things with cheats or something). There the math is:
Code:
X = highest_lvl_party_pkmn - random(0, 5)
level = 1
If X > Max:
	#if the maximum level a pkmn can be based on stats is lower then our generated level set it to max
	#Escapes case with level 90 rattata from system
	level = Max
elif X < Min:
	#if the minimum level a pkmn can be based on stats is higher than our generated lvl, set it to min
	#Escapes case with level 5 Lugia from system
	level = Min
else:
	#generated 
	level = X
This is what I currently have implemented, from there I have an "override" switch for certain battles. In my eyes this is the best level generation system, because it balances the game by itself. If you're level 10 and you're encountering level 20s, that means the system has determined that the minimum level of pkmn in that area should be level 20s. The hacker should go back to the drawing board and redo the wild Pokemon in the area, because clearly having Pokemon with 370+ base stats at level 10 in the wild is a bad idea. But, no, it does not generate a custom set of Pokemon for the area.

I'm thinking of mixing this in with an exp reduction/bonus system to erase the "one high leveled" trick, and reduce level grinding too.
 
58
Posts
8
Years
  • Age 31
  • Seen Jan 7, 2017
If you can release the full code, that will be very great.
Reading Jambo51's D&N switching wild pokemon may help, because it provided the offset of the functions loading the species and level. :)
 

Blah

Free supporter
1,924
Posts
11
Years
If you can release the full code, that will be very great.
Reading Jambo51's D&N switching wild pokemon may help, because it provided the offset of the functions loading the species and level. :)

It wasn't really hard to find a hook location which effected all Pokemon :o

I'll post what I have, sure. Though obviously I'm making revisions to make it better as of current time. So this code is bound to change.

Hook:
Spoiler:


Average lvl:
(which is actually max lvl - (0-5)
Spoiler:


And stat based levels:
Spoiler:
 
Last edited:
33
Posts
10
Years
  • Age 28
  • Seen Sep 23, 2022
That is freaking beautiful. It almost makes me want to hack FR but I'm kinda busy right now.

I'm actually curious about how it will deal with Gym Leaders. Sure, you could use that awesome Level Checker ASM, but what about the custom movesets?
 
Back
Top