• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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