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

Chance of finding an alternate form of a pokemon?

11
Posts
15
Years
    • Seen Jan 9, 2016
    Hi!

    I'm making a game using Pokémon Essentials and I want the players to have the feeling of encountering some rare pokémon that aren't legendaries. For example, I'd like the player to have 1% of chance to find a Golem with magma on it's body if it's on a Volcano, or 1% of chance to find an Evil Cleffairy (like a fusion between Clefairy and Gengar) if it's on a haunted forrest. How can I do that?

    Thank you very much!
     
    226
    Posts
    8
    Years
    • Seen Jul 19, 2023
    You first have to create your rare Pokemons.
    Then just add them in the encounters.txt file, if you put it at the last line you will have a 1% chance of encounter.
    "Defining a species" and "Encounters" pages on the wiki should help you :)
     
    4
    Posts
    8
    Years
    • Seen Jan 31, 2016
    Hi! I'm having a similar problem, although too different to use the same answer.
    In my Pokémon game, there's a place where you can find wild Unown. I'm trying to find a way to make it so that only certain forms of Unown appear in a room.
    I know how to make it restricted to one form, however multiple forms are more difficult. If each Unown form was a separate Pokémon in the PBS, I could simply use the Encounters to fix it.

    Can anyone help?
     
    11
    Posts
    15
    Years
    • Seen Jan 9, 2016
    You first have to create your rare Pokemons.
    Then just add them in the encounters.txt file, if you put it at the last line you will have a 1% chance of encounter.
    "Defining a species" and "Encounters" pages on the wiki should help you :)

    Hi!

    First of all, thank you for your reply! (:

    So, I read both articles and learned how to make it via an event, like using "form=1" instead or "makeShiny" in:
    Code:
    Events.onWildPokemonCreate+=proc {|sender,e|
      pokemon=e[0]
      if $game_switches[31]
        pokemon.makeShiny
      end
    }

    But I can't make it work like a wild encounter, because I can't make the "pokemon.form=1" in the encounters.txt file, for example. I know how to create a new pokemon and a new form.

    To be more specific, I can't make a Spiky-Eared Pichu be a wild encountered pokemon.

    Also, sorry my bad spelling. I'm Brazilian.
     
    824
    Posts
    8
    Years
  • What you actually want to do is define this in Pokemon_MultipleForms

    Using your example, let's say you want 10 out of every 100 Pichus to be Spiky-eared.

    Code:
    MultipleForms.register(:PICHU,{
    "getFormOnCreation"=>proc{|pokemon|
       next 1 if rand(100)<10
       next 0
    },
    })
     
    11
    Posts
    15
    Years
    • Seen Jan 9, 2016
    What you actually want to do is define this in Pokemon_MultipleForms

    Using your example, let's say you want 10 out of every 100 Pichus to be Spiky-eared.

    Code:
    MultipleForms.register(:PICHU,{
    "getFormOnCreation"=>proc{|pokemon|
       next 1 if rand(100)<10
       next 0
    },
    })
    Hi! Dude, it's almost exactly what I want! I mean, I want, for example, that a Spiky-eared Pichu can only be found at a 1/10 rate on a specific map. But in another map, the rate can be 3/10. It's just an example, of course.

    Thank you so much!

    PS: Congratulations for Pokemon Entropy. When I was looking for other Pokemon games that used alternate forms, immediately thought in Pokemon Entropy and the pokeminorities, delta, albino and shadow Pokemon.
     
    824
    Posts
    8
    Years
  • Hi! Dude, it's almost exactly what I want! I mean, I want, for example, that a Spiky-eared Pichu can only be found at a 1/10 rate on a specific map. But in another map, the rate can be 3/10. It's just an example, of course.

    Thank you so much!

    PS: Congratulations for Pokemon Entropy. When I was looking for other Pokemon games that used alternate forms, immediately thought in Pokemon Entropy and the pokeminorities, delta, albino and shadow Pokemon.

    Pokeminorities aren't actually alternate forms XD. They're more akin to shinies, meaning they can stack on top of forms. But..

    If you search Giratina in the MultipleForms code, you'll see how to ask for maps.
     
    11
    Posts
    15
    Years
    • Seen Jan 9, 2016
    Pokeminorities aren't actually alternate forms XD. They're more akin to shinies, meaning they can stack on top of forms. But..

    If you search Giratina in the MultipleForms code, you'll see how to ask for maps.

    Oops! My bad! Haha!

    I tried to learn something from Giratina's entry in Pokemon_MultipleForms, but as far as I know, it's form changes on the specified maps. What I wanted was to have a chance of a wild pokemon being an alternative form, for example. I even tried to make a switch that would get the pokemon's alternate form and put me in a wild battle with it, but no success. I'm finding myself out of escape, but I didn't wanted to make the alternate forms being new pokémon rather than new forms...
     
    824
    Posts
    8
    Years
  • Okay, you noticed how Giratina checks where he is - doesn't matter why he checks it - right? Using a function to ask what map you're on. Then checking if that map is in a specified list. Now imagine, what if the output of the "is the current map in the list?" question isn't a form, but a ratio of how likely that form is to appear.

    (I'm trying to change up my helping style. Trying to point you in the right direction rather than outright give you the answer. If that doesn't work, tell me.)
     
    11
    Posts
    15
    Years
    • Seen Jan 9, 2016
    Okay, you noticed how Giratina checks where he is - doesn't matter why he checks it - right? Using a function to ask what map you're on. Then checking if that map is in a specified list. Now imagine, what if the output of the "is the current map in the list?" question isn't a form, but a ratio of how likely that form is to appear.

    (I'm trying to change up my helping style. Trying to point you in the right direction rather than outright give you the answer. If that doesn't work, tell me.)
    It's the best form of help I could get, but you'll have to be patient. haha

    Well, I'm really bad at scripting, I just know how to edit a thing or two. I just changed font colors and corrected syntax problems, for example. My strong point is design, but I'm really trying to learn scripting.

    Replying, I noticed how Giratina checks it and I can see the logic point of how the script should be. My worst problem is about this output. I mean, even through events I couldn't change the form of the wild pokemon i'd battle (I tried with Arceus). What I did was:
    > Script to "if variable [XX] is 6 > the pokemon form should be 6" (using Arceus as a example)
    > Event changing "variable [XX] to 6" and battling a wild Arceus.

    I'm not very afraid of scripting, I know a little bit o java and PHP, but - I don't know why - I'm having many issues with RGSS.

    Thanks!
     
    824
    Posts
    8
    Years
  • You tried with Arceus, which is hardcoded to have its form dependant on its item. Unless you changed the wild Arceus's held item it'll always be base form. On the other hand, Pichu isn't hardcoded.
     
    11
    Posts
    15
    Years
    • Seen Jan 9, 2016
    Hi again!

    I've been studying a lot of RGSS and my main difficulty now is to set a battle against a wild pokemon in determined form. I tried many combinations of 'pokemon.form=1'/'poke.form=1' and 'pbWildBattle(PICHU,20)'. I see that probably I'm trying something complicated to solve a simple task, but I really can't figure out what to do. :/
     
    188
    Posts
    9
    Years
    • Seen Jan 21, 2024
    You can use Pokemon_MultipleForms to set an alternative form for the encounter. If said Pokémon is one that is found in its usual form elsewhere, I would suggest using a switch or the map ID for the conditional check.
     
    Back
    Top