• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Scripting Question] National Dex requires that mon to evolve like in FRLG inspiration

  • 53
    Posts
    12
    Years
    So I had a script for my fangame which I never released on my Gen 1 game with the script or Switch which prevent certain species from evolving if not having the Nationaldex ,you know the Crobat and Blissey dilema now I was looking around in my old backup of my project to update it to V20.1 but that .rb file I cant find where it could be I have check if it is in PokemonUtilites
    But I am very very sure its one of the switches since I havent worked on my project in a longtime the script may be lost since moving all of it to the new version or beter I would appriate it.
    .


    Spoiler:


    Edit:I have found it but the thing is will it be easier to bind it to a switch for an option for the player to pick if they want the old experience something like that.
     
    Last edited:
    DONT_CARE_ABOUT_DEXES = 69

    Code:
    def check_evolution_internal
      return nil if egg? || shadowPokemon?
      return nil if hasItem?(:EVERSTONE)
      return nil if hasAbility?(:BATTLEBOND)
      species_data.get_evolutions(true).each do |evo| # [new_species, method, parameter, boolean]
        next if evo[3] # Prevolution
    	unless $game_switches[DONT_CARE_ABOUT_DEXES]
          if !$player.pokedex.unlocked?(-1)
            if Settings::USE_CURRENT_REGION_DEX
              region = pbGetCurrentRegion
              region = -1 if region >= dexes_count - 1
              next if !pbAllRegionalSpecies(region).include?(evo[0])
            else
              has_dex = false
              $player.pokedex.dexes_count.times do |i|
                dex_list_to_check = (i == $player.pokedex.dexes_count - 1) ? -1 : i
                next if dex_list_to_check == -1
                next if   !$player.pokedex.unlocked?(i)
                if pbAllRegionalSpecies(i).include?(evo[0])
                  has_dex = true
                  break
                end
              end
              next unless has_dex
            end
    	  end
        end
        ret = yield self, evo[0], evo[1], evo[2] # pkmn, new_species, method, parameter
        return ret if ret
      end
      return nil
    end
     
    Back
    Top