- 19
- Posts
- 9
- Years
- Seen Jul 25, 2015
Hi, I have been trying to update from v13 to v14 and for the most part, it has been pretty easy, however, I have run into an issue with transferring custom evolution methods.
This is what my custom methods looked like in v13:
This is what the blank template looks like in v14
And my code in v14
and
The problem is that I'm getting this error when I try to start the game
I know its not a problem with my PBS because it worked before in v13, but now it doesn't in v14. Any suggestions?
This is what my custom methods looked like in v13:
Code:
when 26 # happinessMoveType
for i in 0...4
return poke if pokemon.happiness>=220 && pokemon.moves[i].type==level
end
when 27 # typeDark
for i in $Trainer.party
return poke if !i.egg? && (i.type1==17 || i.type2==17) && pokemon.level>=level
end
when 28 # LevelRain
return poke if $game_screen && ($game_screen.weather==1 || $game_screen.weather==2) && pokemon.level>=level
when 29 # LevelDay
return poke if PBDayNight.isDay?(pbGetTimeNow) && pokemon.level>=level
when 29 # LevelNight
return poke if PBDayNight.isNight?(pbGetTimeNow) && pokemon.level>=level
when 31 # Custom 6
# Add code for custom evolution type 6
when 32 # Custom 7
# Add code for custom evolution type 7
end
return -1
end
This is what the blank template looks like in v14
Code:
when PBEvolution::Custom1
# Add code for custom evolution type 1
when PBEvolution::Custom2
# Add code for custom evolution type 2
when PBEvolution::Custom3
# Add code for custom evolution type 3
when PBEvolution::Custom4
# Add code for custom evolution type 4
when PBEvolution::Custom5
# Add code for custom evolution type 5
And my code in v14
Code:
class PBEvolution
Unknown = 0 # Do not use
Happiness = 1
HappinessDay = 2
HappinessNight = 3
Level = 4
Trade = 5
TradeItem = 6
Item = 7
AttackGreater = 8
AtkDefEqual = 9
DefenseGreater = 10
Silcoon = 11
Cascoon = 12
Ninjask = 13
Shedinja = 14
Beauty = 15
ItemMale = 16
ItemFemale = 17
DayHoldItem = 18
NightHoldItem = 19
HasMove = 20
HasInParty = 21
LevelMale = 22
LevelFemale = 23
Location = 24
TradeSpecies = 25
happinessMoveType = 26
typeDark = 27
LevelRain = 28
LevelDay = 29
LevelNight = 30
Custom6 = 31
Custom7 = 32
EVONAMES=["Unknown",
"Happiness","HappinessDay","HappinessNight","Level","Trade",
"TradeItem","Item","AttackGreater","AtkDefEqual","DefenseGreater",
"Silcoon","Cascoon","Ninjask","Shedinja","Beauty",
"ItemMale","ItemFemale","DayHoldItem","NightHoldItem","HasMove",
"HasInParty","LevelMale","LevelFemale","Location","TradeSpecies",
"happinessMoveType","typeDark","LevelRain","LevelDay","LevelNight","Custom6","Custom7"
]
Code:
when PBEvolution::happinessMoveType
for i in 0...4
return poke if pokemon.happiness>=220 && pokemon.moves[i].type==level
end
when PBEvolution::typeDark
for i in $Trainer.party
return poke if !i.egg? && (i.type1==17 || i.type2==17) && pokemon.level>=level
end
when PBEvolution::LevelRain
return poke if $game_screen && ($game_screen.weather==1 || $game_screen.weather==2) && pokemon.level>=level
when PBEvolution::LevelDay
return poke if PBDayNight.isDay?(pbGetTimeNow) && pokemon.level>=level
when PBEvolution::LevelNight
return poke if PBDayNight.isNight?(pbGetTimeNow) && pokemon.level>=level
The problem is that I'm getting this error when I try to start the game
Code:
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError
Message: Incorrect value happinessMoveType in PBEvolution
File PBS/pokemon.txt, section 134, key Evolutions
VAPOREON,Item,WATERSTONE,JOLTEON,Item,THUNDERSTONE,FLAREON,Item,FIRESTONE,LEAFEON,Location,28,GLACEON,Location,34,SYLVEON,happinessMoveType,18,ESPEON,HappinessDay,,UMBREON,HappinessNight,
Compiler:1614:in `checkEnumField'
Compiler:1645:in `csvEnumField!'
Compiler:2323:in `pbCompilePokemonData'
Compiler:2315:in `each'
Compiler:2315:in `pbCompilePokemonData'
Compiler:2313:in `loop'
Compiler:2391:in `pbCompilePokemonData'
Compiler:2297:in `each'
Compiler:2297:in `pbCompilePokemonData'
Compiler:2296:in `each'
I know its not a problem with my PBS because it worked before in v13, but now it doesn't in v14. Any suggestions?