v20.1 Help with custom evolution? ; ;šŸŒø

This thread pertains to v20.1 of PokƩmon Essentials.

Adrichuwu

Novice
Member
Joined
Jan 13, 2023
Posts
10
Age
22
hello, i've been trying to make it so that when my Mon is burnt, when it levels up it triggers evolution.

This is what I wrote but I didn't get that far, if you were to help me i'd be soooooo grateful! any help please??šŸ˜­

----------------------------------------
GameData::Evolution.register({
:id => :LevelUpBurn,
:minimum_level => 1, # Needs any level up
:level_up_proc => proc { |pkmn, parameter|
next pkmn.level >= parameter && pkmn.status!=PBStatuses::BURN
}
})
----------------------------------------
 

Vendily

Elite Trainer
Member
You almost had it! your code says, evolve if the level is right, and you are NOT burned. So any status but burn (or even no status at all) would allow the evolution.
The other issue is that PBStatuses no longer exists. you can just do :BURN as that's the symbolic id in GameData::Status.
 

Adrichuwu

Novice
Member
Joined
Jan 13, 2023
Posts
10
Age
22
You almost had it! your code says, evolve if the level is right, and you are NOT burned. So any status but burn (or even no status at all) would allow the evolution.
The other issue is that PBStatuses no longer exists. you can just do :BURN as that's the symbolic id in GameData::Status.
So i've been messing with it a bit but I just can't figure out how to make it work properly :CCCC, any suggestions on how the script would have to look like??
(I get this error)
1673628156824.png
 

Adrichuwu

Novice
Member
Joined
Jan 13, 2023
Posts
10
Age
22
I feel dumb for not being able to understand what I'm doing wrong ; ;

I must be doing something wrong cause when I try to level up a mon that is burnt instead of evolving I get this error. This is the code atm...
Ruby:
GameData::Evolution.register({
  :id                   => :LevelUpBurn,
  :level_up_proc        => proc { |pkmn, parameter|
  :parameter            => Integer,
    next pkmn.level >= parameter && pkmn.status==:BURN
  }
})

1673629214870.png
 

Adrichuwu

Novice
Member
Joined
Jan 13, 2023
Posts
10
Age
22
Oh dear, somehow your :parameter has ended up inside your :level_up_proc.
An easy fix at least, just switching those two lines should do the trick.
Feels like we're cracking a huge secret password xDDD

I'm currently getting a new error, I had switched the 2 already and it works, now testing it in the game once I level up and the boi is burnt I get this message.

code looks like this atm:
GameData::Evolution.register({
:id => :LevelUpBurn,
:parameter => Integer,
:level_up_proc => proc { |pkmn, parameter|
next pkmn.level >= parameter && pkmn.status==:BURN
}
})


1673629903337.png


(I'm so sorry for all the bothering :/ )
 

Adrichuwu

Novice
Member
Joined
Jan 13, 2023
Posts
10
Age
22
It's not a bother.
Have you compiled recently? Since we only recently defined the :parameter, the last time you compiled before the edit, it would have saved the parameter as nil. Try and recompile your PBS files.
So, apparently I had to add a number to the LevelupBurn in the PBS files, I recompiled and it works! thank you so much for the patience <3
 
Top