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

Script: Visible Overworld Wild Encounter

  • 22
    Posts
    10
    Years
    • Seen Nov 24, 2023
    your script is wonderful, does it work with alternative forms?
     
  • 308
    Posts
    4
    Years
    your script is wonderful, does it work with alternative forms?

    Well, I'm not quite sure what you mean with alternate forms and actually I don't know how you implemented that alternative versions of pokemon. But I would say the following:

    As long as your alternative form of your pokemon has
    * its own entry in \PBS\pokemon.txt and
    * an overworld sprite placed in the folder \Graphics\Characters and named by the same number as the entry in pokemon.txt
    it will work. Of course, your alternative form has to be set as an encounter on some map in PBS\encounters.txt.

    If you implemented alternative forms in another way, then we have to look on how you did that first.
     
    Last edited:
  • 22
    Posts
    10
    Years
    • Seen Nov 24, 2023
    I mean, when testing the script using pokemon with multiple forms, only the default form appeared, shellos is an example.
     

    Zeak6464

    Zeak #3205 - Discord
  • 1,101
    Posts
    11
    Years
    I mean, when testing the script using pokemon with multiple forms, only the default form appeared, shellos is an example.

    You will need to edit this section of the code to allow for Alt forms

    "s" this looks for a shiny pokemon

    character_name is the pokemon number or name

    Code:
    # use shiny-sprite if probability & killcombo is high or shiny-switch is on
        $PokemonTemp.catchcombo=[0,0] if !$PokemonTemp.catchcombo
        if $game_switches[SHINY_WILD_POKEMON_SWITCH]==true
            character_name = character_name+"s"
            shinysprite=true
        elsif ($PokemonTemp.catchcombo[0]>=CHAINLENGTH && $PokemonTemp.catchcombo[1]==encounter[0])
          if rand(SHINYPROBABILITY)<$PokemonTemp.catchcombo[0]
            character_name = character_name+"s"
            shinysprite=true
          end
        end
     
  • 308
    Posts
    4
    Years
    Also I tested now and... Why give me a little bit lag? Is it possible to "fix" that? Or only if I change my laptop/hardware? :o

    Again, amazing script! Congratz!

    After spawning and despawning of the overworld encounters we have to update the spriteset. Therefor, I used

    $scene.disposeSpritesets
    $scene.createSpritesets

    in the method "increase_steps" and in "spawnEvent(x,y,encounter)". I would say that this way of updating the sprites causes your lag. If you or anyone else finds a better solution for updating the spriteset (which probabily exists) we can reduce some lag. Any suggests are welcome.

    As mentioned above there is some lag coming from the way how the character_sprites are updated. However, I changed some code to reduce this lag. you can find the new code in the following spoiler section:

    Spoiler:
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    As mentioned above there is some lag coming from the way how the character_sprites are updated. However, I changed some code to reduce this lag. you can find the new code in the following spoiler section:
    Am mobile right now but did you improve the code to check the sprite OW when form>0?
     
  • 308
    Posts
    4
    Years
    I mean, when testing the script using pokemon with multiple forms, only the default form appeared, shellos is an example.

    Okay, I understand. Infact, you can already battle different forms of a pokemon. Shellos is a bad example for that since the form of shellos depends on the region. But if you take for instance unown then you can infact battle against different forms. However, the overworld sprite does not coincide with the form in battle. This will take some time to find a work around.

    If anyone knows how to get the form of a pokemon in the script or how to set up the form of a pokemon for instance in the method pbWildBattle defined in Script PField_Battles please let us know. It will save us some time.

    EDIT: Since Version 1.1 support for alternative forms is included.
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    As mentioned above there is some lag coming from the way how the character_sprites are updated. However, I changed some code to reduce this lag. you can find the new code in the following spoiler section:
    Zeak and I are talking about it in PokeCommunity Discord. Join with us! :D
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    As mentioned above there is some lag coming from the way how the character_sprites are updated. However, I changed some code to reduce this lag. you can find the new code in the following spoiler section:

    Spoiler:

    Unfortunately your last script give us an error:
    Spoiler:
     
  • 308
    Posts
    4
    Years
    Unfortunately your last script give us an error:

    Thank you for your remark. I missed to include the following getter function above:
    Code:
    class Scene_Map
      attr_reader :spritesets
    end

    I will also change the code in the post above to present a complete one. It should work now.
     
  • 308
    Posts
    4
    Years
    I mean, when testing the script using pokemon with multiple forms, only the default form appeared, shellos is an example.

    Okay, I understand. Infact, you can already battle different forms of a pokemon. Shellos is a bad example for that since the form of shellos depends on the region. But if you take for instance unown then you can infact battle against different forms. However, the overworld sprite does not coincide with the form in battle. This will take some time to find a work around.

    If anyone knows how to get the form of a pokemon in the script or how to set up the form of a pokemon for instance in the method pbWildBattle defined in Script PField_Battles please let us know. It will save us some time.

    I have made a whole new version of the script.
    NEW FEATURES:
    - supports alternative forms of pokemon
    - less lag

    You can find the new version in the following spoiler section. I will also update my very first post here.
    Spoiler:

    Feel free to test it. I would be glad if someone could also test double encounters and roaming encounters.
     
    Last edited:
  • 220
    Posts
    9
    Years
    Nice script. But, can you make it compatible with WOLFPP TallGrass Script? Here: https://www.pokecommunity.com/showthread.php?t=421411
    I'm using his script and when i go to the tallgrass, it's kinda glitchy to the eye of the player. XD And it works fine with pokeradar. Another thing, with this script, we only battle the overworld pokemon that pops up from the grass instead walking in the grass?
     
  • 308
    Posts
    4
    Years
    Nice script. But, can you make it compatible with WOLFPP TallGrass Script? Here: https://www.pokecommunity.com/showthread.php?t=421411
    I'm using his script and when i go to the tallgrass, it's kinda glitchy to the eye of the player. XD

    I followed the instructions in https://www.pokecommunity.com/showthread.php?t=421411 and I tested it. I couldn't figure out what you meant by "it's kinda glitchy to the eye of the player." Can you make a gif of that phenomenon. Moreover, does this glitch also appear without using my visible overworld wild encounter script? I would guess so. And if it does then it is very important that you post your gif in https://www.pokecommunity.com/showthread.php?t=421411

    And it works fine with pokeradar. Another thing, with this script, we only battle the overworld pokemon that pops up from the grass instead walking in the grass?

    Nice to hear that it works with pokeradar. However, it has some strange behaviour right now. Using the pokeradar will show the grass rustle animation as usual and no spawning of pokemon. Now, if you enter one of the tiles with that rustle animation, then there is no instant battle but the pokemon will spawn in range of the player. So you have to move to that pokemon for the battle and for continuing the "pokeradar combo count."

    Is that okay? Well, it felt not that bad playing that way. Or should the pokeradar behave different? Keep the pokeradars behaviour as in vanilla, i. e. with instant battle on the rustling grass and without spawning pokemon? Or should pokemon immediatley spawn after using the pokeradar? And if so, how many pokemon should spawn, only one pokemon or one on every rustling grass?
     
  • 220
    Posts
    9
    Years
    Forget about the grass animation part. I just removed your script and the "graphic thing glitchy" don't came from your script.

    About Pokeradar: When i use it, the pokeradar pokemon appears in the world with the normal encounters. So, no issues about this part either.

    When you are with trainer partners: The game crashes when you "talk" to the overworld pokemon, which it will transforms automatically in wild double battles. In other words. Your script crashes in double battles against wild pokemon.
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    When roaming, Entei appears normally but if I try to battle against, give me this error:
    Spoiler:


    Also, I just edited this in 'Settings' script:
    Code:
    RoamingSpecies = [
       [:LATIAS, 30, 53, 0, "Battle roaming"],
       [:LATIOS, 30, 53, 0, "Battle roaming"],
       [:KYOGRE, 40, 54, 2, nil, {
           2  => [21,31],
           21 => [2,31,69],
           31 => [2,21,69],
           69 => [21,31]
           }],
       [:ENTEI, 40, 55, 1, nil, {
           5  => [5]
           }]
    ]
     
  • 308
    Posts
    4
    Years
    When roaming, Entei appears normally but if I try to battle against, give me this error:

    Same but with the default latios

    I did some stupid mistake. I started at index 1 in the array $PokemonGlobal.roamEncounter instead of index 0. My bad.

    To correct it. Find this code
    Code:
          #[i,species,poke[1],poke[4]]
          parameter1 = $PokemonGlobal.roamEncounter[1].to_s
          parameter2 = $PokemonGlobal.roamEncounter[2].to_s
          parameter3 = $PokemonGlobal.roamEncounter[3].to_s
          $PokemonGlobal.roamEncounter[4] != nil ? (parameter4 = '"'+$PokemonGlobal.roamEncounter[4].to_s+'"') : (parameter4 = "nil")

    and replace it by this code
    Code:
          #[i,species,poke[1],poke[4]]
          parameter1 = $PokemonGlobal.roamEncounter[0].to_s
          parameter2 = $PokemonGlobal.roamEncounter[1].to_s
          parameter3 = $PokemonGlobal.roamEncounter[2].to_s
          $PokemonGlobal.roamEncounter[3] != nil ? (parameter4 = '"'+$PokemonGlobal.roamEncounter[3].to_s+'"') : (parameter4 = "nil")

    For simplicity, here the complete code in the following spoiler section:

    Spoiler:


    Please let me know if the script works now on roaming encounters.
     
    Last edited:
  • 308
    Posts
    4
    Years
    When you are with trainer partners: The game crashes when you "talk" to the overworld pokemon, which it will transforms automatically in wild double battles. In other words. Your script crashes in double battles against wild pokemon.

    Thank you for your remark. The crash is caused by the following line in the script
    Code:
    def pbDoubleWildBattle(species1,level1,species2,level2,gender1,form1 = nil,gender2 = nil,form2 = nil)

    Replacing this line by
    Code:
    def pbDoubleWildBattle(species1,level1,species2,level2,variable=nil,canescape=true,canlose=false,gender1 = nil,form1 = nil,gender2 = nil,form2 = nil)
    will remove the problem. For simplicity, here the complete code in the following spoiler section:

    Spoiler:
     
  • 62
    Posts
    6
    Years
    • Seen Aug 11, 2022
    I would like to make an exception for the legendary Pokémon.
    I wish they would not appear in overworld mode but only in the grass.
    And I'd like that during the double encounters, there is only one Pokémon and not two.
    To make it more realist.
    (I use this method because I have both type of wild encounter in my game. Normal encounter and overworlds encounter as you mentioned in INSTANT_WILD_BATTLE_PROPABILITY

    Thanks in advance and I continue to enjoy your awesome scripts.
     

    #Not Important

    All hail the wishmaker
  • 910
    Posts
    4
    Years
    I would like to make an exception for the legendary Pokémon.
    I wish they would not appear in overworld mode but only in the grass.
    And I'd like that during the double encounters, there is only one Pokémon and not two.
    To make it more realist.
    (I use this method because I have both type of wild encounter in my game. Normal encounter and overworlds encounter as you mentioned in INSTANT_WILD_BATTLE_PROPABILITY

    Thanks in advance and I continue to enjoy your awesome scripts.

    That would be a very easy way of solving the roaming legendaries error
     
    Back
    Top