• 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.

Problem with custom evolution methods in v14

Status
Not open for further replies.
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:
    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"
      ]
    and
    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?
     

    mustafa505

    Aeon Developer
    306
    Posts
    14
    Years
  • Have you tried moving v13 PBS files into v14 or considered modifying v14 PBS files atleast? You should either update your script according with v14 PBS files or bring back v13 PBS file.
     
    19
    Posts
    9
    Years
    • Seen Jul 25, 2015
    Have you tried moving v13 PBS files into v14 or considered modifying v14 PBS files atleast? You should either update your script according with v14 PBS files or bring back v13 PBS file.
    I have moved my v13 PBS files over, hence why Sylveon is there.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Maybe you haven't edited one other part which seems to be quite vital.
    Code:
      # 0 = no parameter
      # 1 = Positive integer
      # 2 = Item internal name
      # 3 = Move internal name
      # 4 = Species internal name
      # 5 = Type internal name
      EVOPARAM=[0,     # Unknown (do not use)
         0,0,0,1,0,    # Happiness, HappinessDay, HappinessNight, Level, Trade
         2,2,1,1,1,    # TradeItem, Item, AttackGreater, AtkDefEqual, DefenseGreater
         1,1,1,1,1,    # Silcoon, Cascoon, Ninjask, Shedinja, Beauty
         2,2,2,2,3,    # ItemMale, ItemFemale, DayHoldItem, NightHoldItem, HasMove
         4,1,1,1,4,    # HasInParty, LevelMale, LevelFemale, Location, TradeSpecies
         [COLOR="Red"]1,1,1,1,1,1,1 # Custom 1-7[/COLOR]
      ]
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    As far as I can tell, nothing has changed in the Pokemon.txt PBS files, just the evolution scripts
    Well, hidden abilities were added back in, after being mistakenly removed in a previous version. And Nidoran lost its gender symbol next to its name. And I don't know if there was anything else.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Well, hidden abilities were added back in, after being mistakenly removed in a previous version. And Nidoran lost its gender symbol next to its name. And I don't know if there was anything else.

    A question... If one were to not have hidden abilities in the pokemon.txt, would it matter?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Not if you don't want hidden abilities. It's an optional set of information.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    That's good to know, got people asking me some questions and that was one, since I never had a problem with hidden abilities in my v13 game, I don't quite understand the problem.
     
    19
    Posts
    9
    Years
    • Seen Jul 25, 2015
    Maybe you haven't edited one other part which seems to be quite vital.
    Code:
      # 0 = no parameter
      # 1 = Positive integer
      # 2 = Item internal name
      # 3 = Move internal name
      # 4 = Species internal name
      # 5 = Type internal name
      EVOPARAM=[0,     # Unknown (do not use)
         0,0,0,1,0,    # Happiness, HappinessDay, HappinessNight, Level, Trade
         2,2,1,1,1,    # TradeItem, Item, AttackGreater, AtkDefEqual, DefenseGreater
         1,1,1,1,1,    # Silcoon, Cascoon, Ninjask, Shedinja, Beauty
         2,2,2,2,3,    # ItemMale, ItemFemale, DayHoldItem, NightHoldItem, HasMove
         4,1,1,1,4,    # HasInParty, LevelMale, LevelFemale, Location, TradeSpecies
         [COLOR="Red"]1,1,1,1,1,1,1 # Custom 1-7[/COLOR]
      ]
    I have edited that, not sure if it's right though

    By the way, here are what the evolution methods do, cos I realise I haven't said that yet

    happinessMoveType: Sylveon's evolution, requires the Pokémon to be at least at happiness 220 and have a move of a certain type (which is defined per Pokémon in the PBS file)
    typeDark: Pancham's evolution, requires a dark type Pokémon in the party
    LevelRain: Goomy's Evolution, requires it to be raining on the map the player is in
    LevelDay & LevelNight: Tyrunt and Amaura's evolutions, require it to be day or night respectively.

    Code:
      # 0 = no parameter
      # 1 = Positive integer
      # 2 = Item internal name
      # 3 = Move internal name
      # 4 = Species internal name
      # 5 = Type internal name
      EVOPARAM=[0,     # Unknown (do not use)
         0,0,0,1,0,    # Happiness, HappinessDay, HappinessNight, Level, Trade
         2,2,1,1,1,    # TradeItem, Item, AttackGreater, AtkDefEqual, DefenseGreater
         1,1,1,1,1,    # Silcoon, Cascoon, Ninjask, Shedinja, Beauty
         2,2,2,2,3,    # ItemMale, ItemFemale, DayHoldItem, NightHoldItem, HasMove
         4,1,1,1,4,    # HasInParty, LevelMale, LevelFemale, Location, TradeSpecies
         0,5,0,0,0,1,1 # Custom 1-7
      ]
    end
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Did you try capitalising those two methods which don't begin with a capital letter?
     
    19
    Posts
    9
    Years
    • Seen Jul 25, 2015
    Did you try capitalising those two methods which don't begin with a capital letter?

    Just tried that, now it gives me a slightly different error

    Code:
    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: RuntimeError
    
    Message: Undefined value  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:1611: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'
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Try showing us what you've got. Everything at the top of PokemonEvolution, the appropriate evolution method code further down, and what your PBS file says.
     
    19
    Posts
    9
    Years
    • Seen Jul 25, 2015
    Try showing us what you've got. Everything at the top of PokemonEvolution, the appropriate evolution method code further down, and what your PBS file says.
    I know you didn't ask for all of it, but here is everything remotely relevant.

    PokemonEvolution Script:
    Spoiler:


    Eevee:
    Spoiler:


    Pancham:
    Spoiler:


    Sliggoo
    Spoiler:

    Tyrunt:
    Spoiler:

    Amaura:
    Spoiler:
     
    Last edited:

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Code:
      # 0 = no parameter
      # 1 = Positive integer
      # 2 = Item internal name
      # 3 = Move internal name
      # 4 = Species internal name
      # 5 = Type internal name
      EVOPARAM=[0,     # Unknown (do not use)
         0,0,0,1,0,    # Happiness, HappinessDay, HappinessNight, Level, Trade
         2,2,1,1,1,    # TradeItem, Item, AttackGreater, AtkDefEqual, DefenseGreater
         1,1,1,1,1,    # Silcoon, Cascoon, Ninjask, Shedinja, Beauty
         2,2,2,2,3,    # ItemMale, ItemFemale, DayHoldItem, NightHoldItem, HasMove
         4,1,1,1,4,    # HasInParty, LevelMale, LevelFemale, Location, TradeSpecies
         [COLOR="Red"]0,5[/COLOR],0,0,0,1,1 # Custom 1-7
      ]
    I'm not quite sure how evolutions work anymore, with this new change... But I figure the highlighted part is wrong... Shouldn't the 0 and 5 be the other way round? Also, should those 0's after that be 1's?
    Also:
    Code:
        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  when PBEvolution::[COLOR="red"]Custom6[/COLOR]
    What's Custom6 referring to?
     
    Status
    Not open for further replies.
    Back
    Top