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

[Custom Feature Question] How to Combine Evolution Methods?

1
Posts
5
Years
    • Seen Jul 12, 2021
    Hi all. I'm not new to pokemon essentials, I've been toying around for years but I'm getting down to actually making a game. I have some questions about evolution. I'm running v17.2

    I want to make pokemon that evolve with items through trade (Onix-Steelix with metal coat) evolve through one of the following methods:

    Level and held item - Onix evolving to Steelix at upon level up at lvl32 or higher so long as it's holding metal coat

    Level and use an item - I changed pokemon.txt and metal coat in the debug menu so that onix can evolve to steelix when using metal coat on it, but there's no level restriction.

    Level and Custom item - I followed instructions to implement my own item (Omnistone) into the game. It "simulates the energy normally put off by pokemon trades". Esentially, it activates evolution normally activated by trading (magmortar from holding magmarizer, etc) While the item shows up and I can select the use option, it has no effect. I assume I'd have to put it in pokemon.txt, but how would I combine the use of it with the need to hold an item or a specific level? I used the Linkstone tutorial by FL, who made Pokemon Island, on essentials wiki, but the section of the script it says to modify has changed since that tutorial was put up, and I wasn't able to finagle it to work.

    I suppose it's not the most essential. I could, of course, balance it so that players don't get the items til their pokemon should be of a certain level, so they don't have a level 5 Slowking, or something ludicrous.

    Or perhaps, a script for an npc that checks the first pokemon in your party to see if you have a pokemon that evolves from an item, and only giving it out at that level?

    Any help is greatly appreciated :)
     

    Ego13

    hollow_ego
    311
    Posts
    6
    Years
  • Oh boy that is some interesting stuff. I really hope though that the amount of mons you would want to use these evolution methods on is quite small. Soo here is my solution to it.
    First you need to define new evolution methods. I called them ItemLevel, ItemUseLevel and UseHold. So add them to the list:
    Code:
      ItemLevel         = 31
      ItemUseLevel      = 32
      UseHold           = 33
    They formerly were Custom1, Custom2 and Custom3. You just rename them.
    THen right under it you find
    Code:
    EVONAMES
    There you just rename Custom1 etc. again. so it should look like this:
    Code:
    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",
         "LevelDay","LevelNight","LevelDarkInParty","LevelRain","HappinessMoveType",
         "ItemLevel","ItemUseLevel","Custom3","Custom4","Custom5"
      ]

    Change the evolution parameters to look like this
    Code:
     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
         1,1,1,1,5,   # LevelDay, LevelNight, LevelDarkInParty, LevelRain, HappinessMoveType
         2,2,2,1,1    # Custom 1-5
      ]


    Okay then after that go all the way down to
    Code:
    #===============================================================================
    # Evolution methods
    #===============================================================================
    and find
    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

    change Custom1 to look like this:
    Code:
    when PBEvolution::ItemLevel
        if pokemon.item==level && (isConst?(pokemon.species,PBSpecies,:ONIX) && pokemon.level>=32)
          return poke 
        end
    Short explanation: it checks if the pokemon holds the item specified in pokemon.txt. In order to set the requiered level you need "pokemon.level>=32", the part with Onix is limiting the level cap to Onix. You could as well remove it and have the required level be 32 for every pokemon with this evolution method.
    If you want to have different Pokemon with different levels for this method you can expand it like this:
    Code:
    when PBEvolution::ItemLevel
        if pokemon.item==level &&( (isConst?(pokemon.species,PBSpecies,:ONIX) && pokemon.level>=32) ||  (isConst?(pokemon.species,PBSpecies,:MAGIKARP) && pokemon.level>=99))
          return poke 
        end

    after that go further down to
    Code:
    def pbMiniCheckEvolutionItem(pokemon,evonib,level,poke,item)
    and add this
    Code:
    when PBEvolution::ItemUseLevel
        return poke if level==item && (isConst?(pokemon.species,PBSpecies,:ONIX) && pokemon.level>=32)
      when PBEvolution::UseHold
        return poke if level==item && pokemon.item==getConst(PBItems,:RARECANDY)
    make sure that it goes before
    Code:
    end
    return -1

    For ItemUseLevel we have the same parameters as in ItemLevel

    For UseHold you could also limit the items to a certain species if you want
    We also want to make sure that the held item is consumed after the evolution )leave this part out if you don't want that)
    Go find
    Code:
     elsif evonib==PBEvolution::TradeItem ||
                   evonib==PBEvolution::DayHoldItem ||
                   evonib==PBEvolution::NightHoldItem

    and add
    Code:
    ||
                   evonib==PBEvolution::UseHold

    DONE!
    You can now set the evolution methods in pokemon.txt

    You might be wondering if it wouldn't be easier if you can just set all the parameters in the pokemon.txt. Yes it would if it wasn't for the fact that you would need to edit the compiler and the whole evolution check methods to get this extra info. Doing all this work would only make sense if you have a lot of pokemon to evolve with this method.
     
    37
    Posts
    7
    Years
    • Seen Jan 21, 2021
    Hey, I appreciate the guide you laid out. I'm using v16; what if anything would I need to do differently in comparison? I plan to use the three methods outlined in addition to Happiness+Item (not sure if you have advice on scripting that as well?).

    Thanks for any assistance.
     

    Ego13

    hollow_ego
    311
    Posts
    6
    Years
  • Hey,

    as far as I can tell there are no differences in this script to version 16, so you should be able to imlement everything just as described.

    If you want to have an evolution method that requieres happiness and a held item, your condition would look somewhat like this
    Code:
    when PBEvolution::ItemHappiness
        if pokemon.item==level && return poke if pokemon.happiness>=220

    You still have to set up the method of course
     
    37
    Posts
    7
    Years
    • Seen Jan 21, 2021
    Thanks a ton. Do you have an idea how I would go about scripting evolution methods for Level+Time of Day, Leveling up while poisoned, and Leveling up and then fainting in the same battle?
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Thanks a ton. Do you have an idea how I would go about scripting evolution methods for Level+Time of Day, Leveling up while poisoned, and Leveling up and then fainting in the same battle?

    To poison evolution, below you need level and status poison:
    Code:
      when PBEvolution::Poisoned
        return poke if pokemon.level>=level && pokemon.status==PBStatuses::POISON

    To faint evolution, below you need level and you can try:
    Code:
      when PBEvolution::Fainted
        return poke if pokemon.level>=level && pokemon.fainted?

    To make a Level + Time of Day, check how i made to Lycanroc, here.

    All of them will be '1' in 'EVOPARAM'.
     
    Last edited:
    1
    Posts
    3
    Years
    • Seen Nov 21, 2023
    Thank you this was very helpful. I can't figure out how to make a pokemon evolve using a stone while its holding an item. An example being that I want a pokemon to evolve by a fire stone, but only if its holding a charcoal. Thank you!
     
    37
    Posts
    7
    Years
    • Seen Jan 21, 2021
    To poison evolution, below you need level and status poison:
    Code:
      when PBEvolution::Poisoned
        return poke if pokemon.level>=level && pokemon.status==PBStatuses::POISON

    To faint evolution, below you need level and you can try:
    Code:
      when PBEvolution::Fainted
        return poke if pokemon.level>=level && pokemon.fainted?

    To make a Level + Time of Day, check how i made to Lycanroc, here.

    All of them will be '1' in 'EVOPARAM'.

    Thank you. The Poison evolution method worked, but not the Fainted one. Whenever the Pokemon I specified that evolution method for leveled up, I got the following error message:

    Exception: NoMethodError

    Message: undefined method `fainted?' for #<PokeBattle_Pokemon:0xf37ff08>

    Pokemon_Evolution:896:in `pbMiniCheckEvolution'

    Pokemon_Evolution:999:in `pbCheckEvolution'

    Pokemon_Evolution:998:in `pbCheckEvolutionEx'

    Pokemon_Evolution:987:in `each'

    Pokemon_Evolution:987:in `pbCheckEvolutionEx'

    Pokemon_Evolution:998:in `pbCheckEvolution'

    PItem_Items:318:in `pbChangeLevel'

    PItem_ItemEffects:759

    PItem_ItemEffects:754:in `call'

    Event:150:in `trigger'

    -----

    Any ideas how to script it properly? I'm flexible on the exact method, as long as it involves the Pokemon fainting in battle.
     
    Back
    Top