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

Starter choices

  • 32
    Posts
    5
    Years
    • Seen May 5, 2025
    Hi everyone, i try to make another form to get a started.

    Spoiler:

    Code:
    Iniciales=[1,4,7,152,155,158,252,255,258,387,390,393,495,498,501,650,653,656,722,725,728,
    810,813,816];
    def pbEleccionInicial
      poke=rand(728)+1;
      level=5;
        if $game_variables[7]<1
    	if Iniciales.include?(poke)
        if Kernel.pbConfirmMessage(_INTL("Quieres a este {1}",PBSpecies.getName(poke)))
        pokes=pbAddPokemon(poke,level);
        $game_switches[3]=true
        $game_variables[7]=1
        else
        Kernel.pbMessage(_INTL("Piensalo muy bien"))
      end
      else
      pbEleccionInicial;
    end
    else
      Kernel.pbMessage(_INTL("Ya obtuviste tu pokemon inicial."))
    end
    
    end
     
    that looks like an inefficient way to do it, the function keeps calling itself till you hit one of the starter numbers, if you have bad rng you could have to keep calling the function hundreds maybe thousands of times, also since u ask player to confirm it's kinda pointless to make it random, it will just be frustrating for the player to keep rolling till he/she gets the pokemon he/she wants
    but if u wanna make it faster / more efficient i think smth like this
    Code:
    poke=Iniciales[rand(24)] ##or Iniciales.length instead of 24
    also seems like its unnecessary to use both a switch and a variable when the variable is just storing 0/1 and not the pokemon id, id just let the switch go and store the pokemon in the variable in case u want to use it later
     
    Back
    Top