Advertiser Content
Seen May 30th, 2019
Posted May 20th, 2019
6 posts
61 Days
So I'm new to scripting (I only rlly have experience with bits of java with my computer programing class) so i tried to find tutorials to help me. I want to add two evolution ways: one by levelling up a pokemon during a sandstorm (Named Dusteon), and one by having a pokemon level up while holding a specific held item (many more eeveelutions). I followed one tutorial, and I went over to the Pokemon_Evolution scripting and changed custom 1 and custom 2 to:
LevelSandstorm = 31
HoldItem = 32


I then scrolled down and changed values, this is what it looked like:

1,2,1,1,1 # LevelSandstorm, HoldItem, Custom 2-5

I scrolled further down and wrote this code (where it told me to put it):

when PBEvolution::LevelSandstorm
if pokemon.level>=level
if $game_screen && (PBFieldWeather==PBFieldWeather::Sandstorm || PBWeather==PBWeather::SANDSTORM);


when PBEvolution::HoldItem
if ((pokemon.item==level) &&((isConst?(pokemon.species,PBSpecies,:IGNEON)) || (isConst?(pokemon.species,PBSpecies,:AIREON))|| (isConst?(pokemon.species,PBSpecies,:CORRUPTEON))|| (isConst?(pokemon.species,PBSpecies,:MARBELLEON)) || (isConst?(pokemon.species,PBSpecies,:BERYLLEON)));


I even added this part a bit lower just to be sure:

when PBEvolution::HoldItem
return poke if level==item && ((isConst?(pokemon.species,PBSpecies,:IGNEON) || (isConst?(pokemon.species,PBSpecies,:AIREON)|| (isConst?(pokemon.species,PBSpecies,:CORRUPTEON)|| (isConst?(pokemon.species,PBSpecies,:MARBELLEON) || (isConst?(pokemon.species,PBSpecies,:BERYLLEON)));

However, I keep getting script errors. The program we use in class specifies what is wrong with the code (ie: Unknown variables, incorrect use of data types, etc), however idk exactly what script errors mean? I don't even know what these variables or commands mean ;w; Can somemone help me through this?
Seen May 30th, 2019
Posted May 20th, 2019
6 posts
61 Days
line 33
LevelSandstorm = 31
line34
HoldItem = 32
line 62
1,2,1,1,1 # LevelSandstorm, HoldItem, Custom 2-5
line 219
when PBEvolution::LevelSandstorm
line 220
if pokemon.level>=level
line 221
if $game_screen && (PBFieldWeather==PBFieldWeather::Sandstorm || PBWeather==PBWeather::SANDSTORM);
line 922
when PBEvolution::HoldItem
line 923
if ((pokemon.item==level) &&((isConst?(pokemon.species,PBSpecies,:IGNEON)) || (isConst?(pokemon.species,PBSpecies,:AIREON))|| (isConst?(pokemon.species,PBSpecies,:CORRUPTEON))|| (isConst?(pokemon.species,PBSpecies,:MARBELLEON)) || (isConst?(pokemon.species,PBSpecies,:BERYLLEON)));
I also forgot:

line 39
EVONAMES=["Unknown",
line 40
"Happiness","HappinessDay","HappinessNight","Level","Trade",
line 41
"TradeItem","Item","AttackGreater","AtkDefEqual","DefenseGreater",
line 42
"Silcoon","Cascoon","Ninjask","Shedinja","Beauty",
line 43
"ItemMale","ItemFemale","DayHoldItem","NightHoldItem","HasMove",
line 44
"HasInParty","LevelMale","LevelFemale","Location","TradeSpecies",
line 45
"LevelDay","LevelNight","LevelDarkInParty","LevelRain","HappinessMoveType",
line 46
"LevelSandstorm","HoldItem","Custom3","Custom4","Custom5"
The error was happening at 922. it also still happened without the ; at the end. Does that help?

Ego13

hollow_ego

Male
Larua Region
Seen 6 Hours Ago
Posted 8 Hours Ago
289 posts
2 Years
Hi,

Essentials/RMXP by itself is telling you exactly what line causes the error in it's error message and what kind of error it is. If you could show us this message it would make it easier for us to help you
Looking for spriters to help with

Pokemon Hollow on pokecommunity.com

Vendily

Female
Seen 56 Minutes Ago
Posted 1 Hour Ago
896 posts
3.9 Years
The sandstorm evo method is very similar to the already implemented rain evo, so that would be a great place to start.
when PBEvolution::LevelRain
    if pokemon.level>=level
      if $game_screen && ($game_screen.weather==PBFieldWeather::Rain ||
                          $game_screen.weather==PBFieldWeather::HeavyRain ||
                          $game_screen.weather==PBFieldWeather::Storm)
        return poke
      end
    end
Now we don't need to worry about PBWeather, because that's for in battle weather, and pokemon can't evolve in battle.
when PBEvolution::LevelSandstorm
    if pokemon.level>=level
      if $game_screen && ($game_screen.weather==PBFieldWeather::Sandstorm)
        return poke
      end
    end
That'll do the trick. There's a lot to learn from the default scripts, so it's a good idea to always give a quick look at stuff that's similar to what you want.
CTRL + SHIFT + F lets you search all script sections at once, making tracking down what you are looking for way easier!

Vendily

Female
Seen 56 Minutes Ago
Posted 1 Hour Ago
896 posts
3.9 Years
Oh no, I am so sorry, looks like the LevelRain evo method is also wrong. $game_screen.weather is what we call to switch the weather. We want $game_screen.weather_type

So sorry.

Advertiser Content