• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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

hey, is there any way to make pokemons use different sprites when they appear in water? I found a resource with pokemon sprites in water and I would really like to be able to use it with this plugin, oh and I'm using the version for essentials v21.1
Indeed, this is possible. I can modify the code such that water encounters use specific water sprites. Can you tell me how these sprites are named? A special "_WATER" ending, in a different water folder, or how are these sprites organised?
 
Hey, big fan of the script and it's working fine. However does anyone know how to turn up the frequency? It takes ages for Pokémon to spawn and if they do it's mostly just one per grass batch
You have following opportunities
  1. Increase the Default spawn range in Pokemon Essentials. For example, increase the encounter rate in your "Encounters.txt" PBS-file. See Pokemon Essentials Dokumentation for details.
  2. Add grass tiles on the map. The chance of spawning increases with each grass tile.
  3. Add addons for the visible overworld wild encounters plugin to your project that modify the encounter rate, such as
    • Automatic Spawning Addon
    • Fixed Spawn Probability Addon
    • Own Minimum Spawn Chance Addon
    • Reroll Spawn Tile Addon
    and change the settings in that scripts as you want.
There might be even more ways to increase the spawning rate.
 
Indeed, this is possible. I can modify the code such that water encounters use specific water sprites. Can you tell me how these sprites are named? A special "_WATER" ending, in a different water folder, or how are these sprites organised?


There are 4 folders with the overworlds inside them, in fact there are only 2 but with the shinys there are 4.
The overowls are divided into two folders: the pokemon that swim in water and the pokemon that "levitate" according to the name of the folder. But I think you can simplify everything in just 2 folders, the overworlds and the shiny ones

here is the resurce link: Overworld Swimming Sprites

t would be awesome if you could add this to the plugin 😊
 
hey, is there any way to make pokemons use different sprites when they appear in water? I found a resource with pokemon sprites in water and I would really like to be able to use it with this plugin, oh and I'm using the version for essentials v21.1
You can use sprites for your swimming animations of your spawned pokemon/fakemon now.
Either get the resource you have found "Overworld Swimming Sprites" (at https://eeveeexpo.com/resources/1400/ ) and place its unzipped folders in the "Graphics/Characters" folder of your game file system. Or you place your own sprites for swimming pokemon/fakemon with the usual names conventions in your "\Graphics\Characters\Swimming" folder and your shiny sprites in your "\Graphics\Characters\Swimming shiny" folder of your game file system.

Please try it out and let me know if it works or if there is an error. I cannot test it myself.
 
You can use sprites for your swimming animations of your spawned pokemon/fakemon now.
Either get the resource you have found "Overworld Swimming Sprites" (at https://eeveeexpo.com/resources/1400/ ) and place its unzipped folders in the "Graphics/Characters" folder of your game file system. Or you place your own sprites for swimming pokemon/fakemon with the usual names conventions in your "\Graphics\Characters\Swimming" folder and your shiny sprites in your "\Graphics\Characters\Swimming shiny" folder of your game file system.

Please try it out and let me know if it works or if there is an error. I cannot test it myself.

it worked perfectly! Thanks for the addition!

I'll test some more, if any bugs appear I'll report them here for you. 😉
 
I am using version 21.1, and after pressing F12 to reload the game, encountering Pokémon results in an error. How can I resolve this?I tried using the replacement code from the previous comment, but found that it had no effect.Even when not entering the game in debug mode, but rather playing the final version as a normal player, pressing F12 still triggers the error. I must admit, saving and loading is very important in Pokémon games, as it allows players to efficiently refresh and attempt to encounter shiny Pokémon in stationary spots. I am unsure if you can fix this issue, and it is troubling whether I should abandon this additional script.
 

Attachments

  • [PokeCommunity.com] Visible Overworld Wild Encounter
    报错.png
    39.9 KB · Views: 3
Last edited:
It is possible to make custom terrain tags encounters? like in the flower only appears Flabébé and in the tall grass only skidos? if possible pls show me
 
I am using version 21.1, and after pressing F12 to reload the game, encountering Pokémon results in an error. How can I resolve this?I tried using the replacement code from the previous comment, but found that it had no effect.Even when not entering the game in debug mode, but rather playing the final version as a normal player, pressing F12 still triggers the error. I must admit, saving and loading is very important in Pokémon games, as it allows players to efficiently refresh and attempt to encounter shiny Pokémon in stationary spots. I am unsure if you can fix this issue, and it is troubling whether I should abandon this additional script.
Reinstall, install again and compile again..
 
It is possible to make custom terrain tags encounters? like in the flower only appears Flabébé and in the tall grass only skidos? if possible pls show me
Here,
 
Here,
it doesn't work for me with essentials 21.1, I follow every step in the end only one type of encounter work in the same map
 
* Visible Overworld Wild Encounters Version 20.0.0.5 for PEv20 and PEv21 - by derFischae (Credits if used please) *

UPDATED TO VERSION 20.0.0.5 FOR POKEMON ESSENTIALS V20 and V21.

This script is for Pokémon Essentials v20, v20.1, v21 and v21.1 (for short PEv20 and PEv21).

As in Pokemon Let's go Pikachu/Eevee or Pokemon Shield and Sword wild encounters pop up on the overworld, they move around and you can start the battle with them simply by moving to the pokemon. Clearly, you also can omit the battle by circling around them.

FEATURES
  • Easy Install as Plugin
  • see the pokemon on the overworld before going into battle
  • no forced battling against overworld encounters
  • Supports individual sprites for shiny, female and alternative forms
  • plays the pokemon cry while spawning
  • Overworld pokemon will despawn after some steps
  • you can have instant wild battle and overworld spawning at the same time and set the propability of that in percentage
  • In caves, pokemon don't spawn on impassable Rock-Tiles, which have the Tile-ID 4
  • In water, pokemon won't spawn above other tiles, which made them stuck or walk on ground
  • See "advanced features" and "additional features by add-ons" below for more (e.g. additional animations...)

INSTALLATION
Installation as simple as it can be.
  1. Add Graphics: Either get the resources from Gen 8 Project (broken link removed)
    and install the "Graphics/Characters" folder in your game file system.
    Or you watch in the following spoiler section
    Spoiler:

    [Optional] Add Graphics for Swimming Pokemon: Either get the resource Overworld Swimming Sprites https://eeveeexpo.com/resources/1400/
    and place its unzipped folders in the "Graphics/Characters" folder of your game file system.
    Or you place your own sprites for swimming pokemon/fakemon with the right names in your "\Graphics\Characters\Swimming" folder and your shiny sprites in your "\Graphics\Characters\Swimming shiny" folder.
  2. Add Script: Follow this link https://github.com/VisibleOverworldWildEncounters/V20 and copy the folder "Visible Overworld Wild Encounters - Script" to your "/plugins/" folder.
  3. [Optional] Change Settings: Open the script file in the folder and change the parameters in the settings section therein as you like. Details descriptions about the parameters can be found there as well.
  4. [optional] Install Add-Ons (the folders under "/optional/" in the github repository): There are a lot of Add-Ons and parameter settings for your personal optimal solution. So, Copy Add-Ons in your "/plugins/" folder and edit parameters in settings of that Add-Ons to your liking. Some Add-Ons are incompatible to each other and some Add-On and parameter combinations can produce lag, e.g. a high spawning rate without a spawning cap, or e.g. "NO_OF_CHOSEN_TILES=0" (or too high) when having other scripts like Pokemon Following. So, do not simply include all folders.
  5. Enjoy!

HERE IS THE LINK TO THE VISIBLE OVERWORLD WILD ENCOUNTER SCRIPT AND ADD-ONS
https://github.com/VisibleOverworldWildEncounters/V20

ADVANCED FEATURES
  • Set the size of the area around the player where pokemon can spawn
  • Choose whether encounters occure on all terrains or only on the terrain of the player
  • Allow or forbid water pokemon to spawn on border
  • Set movement of overworld pokemon depending on its properties
  • Choose whether you can battle water pokemon while not surfing or not
  • set steps a pokemon remains on map before despawning depending on pokemon properties
  • You can check during the events :on_wild_species_chosen, :on_wild_pokemon_created, :on_calling_wild_battle ... if you are battling a spawned pokemon with the global variable $PokemonGlobal.battlingSpawnedPokemon
  • You can check during the events :on_wild_species_chosen and :on_wild_pokemon_created if the pokemon is created for spawning on the map or created for a different reason with the Global variable $PokemonGlobal.creatingSpawningPokemon
  • If you want to add a procedure that modifies a pokemon only for spawning but not before battling then you can use the Event :on_wild_pokemon_created_for_spawning

ADDITIONAL FEATURES BY ADD-ONS
  • Additional Animations Add-On
    • manage different appear animations of overworld spawning encounters depending on encounter type and pokemon properties
    • Play animations while PokeEvent is visible on screen, such as a shiny animation
    • See also Animation Resource by TrankerGolD for aggressive encounters, water encounters, and shiny encounters https://www.pokecommunity.com/posts/10395100/
      Spoiler:
  • Aggressive Encounters Add-On
    • introduces aggressive encounters, which are pokemon that chase the player after spawning
    • aggressive encounters may only start to chase if the player comes them to close
    • set the move speed, move frequency and move type of aggressive pokemon
    • aggressive ecounters are restricted to player movements
    • add animations to aggressive encounters. See Additional Animations -Add On and TrankerGolD's animations for aggressive encounters
      at https://www.pokecommunity.com/posts/10395100/ to include spawning animations in your game
  • Different Spawn And Normal Encounters (like in Pokemon Sword/Shield) Add-On
    • Introduces Overworld Encounter Types you can set in your encounters.txt PBS-file.
    • This allows you to define different encounters for overworld spawning and instant battling on the same map.
  • Reroll Spawn Tile Add-On
    • stabilizes the probability of spawning on maps with low grass by choosing another tile if the previous random chosen one does not allow spawning
    • set the maximal number of tiles chosen for spawning in parameter NO_OF_CHOSEN_TILES
    • be careful, it might produce lag with other scripts
  • Restrict Movement Add-On
    • Overworld spawned Grass/Water/Sand/etc encounters move only on Grass/Water/Sand tiles and not leave there terrain
    • You can activate and deactivate the restriction by setting the parameter RESTRICT_MOVEMENT in the settings section of this add-on
  • Max Spawn Add-On
    • Define a maximal limit of spawned pokemon on the overworld at the same time.
    • After reaching that limit MAX_SPAWN no pokemon will spawn until another pokemon despawned.
  • Additional Despawn Methods Add-On
    • Choose to remove PokeEvent distanced on screen from the player with REMOVE_DISTANCED
    • The distance (steps) is edited in DISTANCE_VANISH and DISTANCE_VANISH_SHINY
    • Remove by time chronometer with REMOVE_PROLONGED
    • Use your own overworld spawn chance in VISIBLE_ENCOUNTER_PROBABILITY
  • Own Minimum Spawn Chance Add-On
    • The Spawn probability of the first encounter and later ones are similar.
    • Spawning does not interact with the encounter chance for normal encounters.
    • Increase the average spawning time of pokemon by setting MAX_ENCOUNTER_REDUCED larger than zero in the settings section of this script
  • Fixed Spawn Probability Add-On
    • Define your own overworld spawn chance in Percentage
    • Spawn chance becomes independent from the default PEv20 encounter chance calculator
  • Variable Spawn/Normal Encounter Proportion During Game Add-On
    • You can change the percentage between overworld spawning and normal encounters in story driven events during playthrough
    • You can get and change the current instant battle probability by using getInstantChance and setInstantChance(value) in an event on the map.
  • Automatic Spawning Add-On
    • Choose whether pokemon spawn automatically or only while moving the player
    • Set the speed of automatic spawning
  • Randomized Spawning Add-On
    • It will randomize overworld encounters
  • Ditto Transform Add-On
    • Like in Pokemon Go, transformable Pokemon such as Ditto get the overworld appearence of different species
    • Choose in settings if completely random, set by a list of candidates or set by the map encounters
  • Remove Poke Events on load/save/transfer Add-On
    • Remove overworld encounters on load/save and on map transfer
  • Overworld Lavender Town Ghosts Add-On
    • Shows ghost sprite for overworld encounters
    • full functionality when using additionally the original Lavender Town Ghosts Plugin https://www.pokecommunity.com/threads/lavender-town-ghosts-v18-1.441236/
    • You need to put a graphic, named "ghost.png", in your "/Graphics/Characters/" folder of your project. This graphic is not provided here, but maybe you can easily find some resource, for example search for "shiny missingNo [Ghost Form]".


MODIFICATIONS OF THIS SCRIPT
  • How to add your own new custom overworld encounter types (such as "desert")
    Spoiler:
  • Spoiler:
  • instructions on how to make your own Add-On or to modify an already existing script to make it work with the visible overworld wild encounter script. This includes modifying a pokemon on spawning but not on battling again, by using the events :on_wild_species_chosen, :on_wild_pokemon_created, :on_calling_wild_battle and :on_wild_pokemon_created_for_spawning
    Spoiler:

HELP AND MORE

About Normal Encounters And Overworld Encounters

  • Spoiler: Answer
    Go to the settings section of the visible overworld wild encounter script. There, you have to set INSTANT_WILD_BATTLE_PROPABILITY larger than 0 and lower than 100, for example
    Code:
     INSTANT_WILD_BATTLE_PROPABILITY = 50

  • Spoiler: Answer
    Install the add on "Different Spawn And Normal Encounters - Overworld Encounters Add On"


  • Spoiler: Answer
    Install the add on "Different Spawn And Normal Encounters - Overworld Encounters Add On" and uncomment and modify the method "pbRoamingMethodAllowed(roamer_method)" in that add-on as discribed therein. Also update the roamer-methods of your legendaries in the settings section of Pokemon Essentials.

  • Spoiler: Answer
    Read the spoiler section of "How to add your own new custom overworld encounter types (such as "desert")" in the modifications section.

  • Spoiler: Answer


About Good Spawning Rate
About Modifying Overworld Spawning Pokemon
About Spawn Animations And Appearence
About Move Independent Spawning

  • Spoiler: Answer
    Install the add on "Automatic Spawning - Overworld Encounters Add On"

  • Spoiler: Answer
    Read https://www.pokecommunity.com/posts/10254999/
    Note that the code in the post is for PEv18, but you can probably find out how to translate it for PEv20.
About Restrict Spawning or Movement
  • To stop overworld spawning or normal encounters during runtime via events, install the add on
    "Variable Spawn To Normal Encounter Proportion During Game - Overworld Encounters Add On"


  • Spoiler: Answer
    Let's say, you want to let the script work on no other map than the map with map id 12345678. Then add the following code snippet
    Code:
    alias map_pbBattleOrSpawnOnStepTaken pbBattleOrSpawnOnStepTaken
    def pbBattleOrSpawnOnStepTaken(repel_active)
      return false if $game_map.map_id!=12345678
      return map_pbBattleOrSpawnOnStepTaken(repel_active)
    end
    to the bottom of your visible overworld wild encounters script. Make sure that no other modifications or add-ons of the visible overworld wild encounters script, which you use, overwrite the method "pbBattleOrSpawnOnStepTaken".

  • Spoiler: Answer
    Let's say, you want to let the script work only if the game switch 12345678 is on.
    Then add the following code snippet
    Code:
    alias map_pbBattleOrSpawnOnStepTaken pbBattleOrSpawnOnStepTaken
    def pbBattleOrSpawnOnStepTaken(repel_active)
      return false if $game_switches[12345678]==false
      return map_pbBattleOrSpawnOnStepTaken(repel_active)
    end
    to the bottom of your visible overworld wild encounters script. Make sure that no other modifications or add-ons of the visible overworld wild encounters script, which you use, overwrite the method "pbBattleOrSpawnOnStepTaken".

About Cave Enounters


  • Spoiler: Answer
    Place the following code snippet
    Code:
        #check if tile is passable
        for i in [2, 1, 0]
          tile_id = $game_map.data[x, y, i]
          terrain = $game_map.terrain_tags[tile_id]
          passage = $game_map.passages[tile_id]
          if terrain!=PBTerrain::Neutral
            if passage & 0x0f == 0x0f
              return false
            elsif $game_map.priorities[tile_id] == 0
              break
            end
          end
        end
    right between the two lines
    [code[
    return false if tile_terrain_tag.ice
    return true if has_cave_encounters? # i.e. this map is a cave
    [/code]
    in the method "encounter_possible_here_on_tile?(x,y)" in the visible overworld wild encounter script code ORIGINAL CODE FOR PEv20
    Note that this code snippet might be outdated, since it was originally written for PEv18.
About Overworld Pokemon And Cutscenes
About Saving Overworld Pokemon
About Runtime Errors

OUTDATED ADD-ONS AND MODIFICATIONS OF THIS SCRIPT
In the post https://www.pokecommunity.com/threads/visible-overworld-wild-encounter.429019/post-10203908 you will find add-ons and modifications of this script for PEv18
Moreover, there are various modifications of this script for PEv17.2. under https://www.pokecommunity.com/posts/10202528/
Probably these add-ons and modifications are not completely compatible to PEv20 and there are some bugs due to the update to PEv20. But feel free to test it with PEv20 and feel free to post your bugs.
The list of outdated add-ons and modifications include

CHANGELOG
Spoiler:

[/QUOTE] the method to create new encounters seens to not work in Essentials v21.1
 
it doesn't work for me with essentials 21.1, I follow every step in the end only one type of encounter work in the same map

the method to create new encounters seens to not work in Essentials v21.1

To help you, it would be very useful that you describe what steps you have done to add new encounters. I assume you want to add a new type called flower.
  • What number do you want to use for this TerrainTag?
  • What tile from your map editor do you want to use as the spawning tiles for flower encounters? I would guess it is some kind of flower tile.
  • Did you changed the number of that tile to the same number of the TerrainTag in the tile editor?
  • Did you add flower encounters to your pbs-file? And finally
  • Did you completed step 1 correctly? This means that you added flower encounters correctly to your project as normal encounters. You can test this by deactivating overworld spawning (change the normal to overworld encounter rate to zero or simply remove the script for testing). If you get normal flower encounters on your flower tile, then you completed step 1 successfully.
Unless you did not complete step 1, i.e. to add your custom encounter as a normal encounter for Pokemon Essentials correctly, you should look for help specifically for adding new encounter types to unmodified Pokemon Essentials.
After you had completed that step, then you can reactivate overworld spawning in your project, continue with step 2 and following steps and ask for help for custom ovreworld encounters here.
 
"Is there a way to make wild Pokémon disappear without relying on the number of steps, but rather on time?"
 
I'm using v18 Essentials. When a wild encounter ends, I get this error @derFischae View attachment 170801
Start the Script editor in RPGMakerXP (press F11), open the script "Game_Event" and search for the following line
Code:
def check_event_trigger_touch(x, y)

Usually, it's in line 131 and the you can read
Code:
  def check_event_trigger_touch(x, y)
    return if $game_system.map_interpreter.running?
    return if @trigger!=2
    return if x != $game_player.x || y != $game_player.y
    return if jumping? || over_trigger?
    start
  end
in an unmodified Pokemon Essentials Version 18.1.

I quess, you have modified the code or use any other script, addon or whatever that overwrites the method "check_event_trigger_touch" at that point or at any other point in the whole script. I think so, because your error message locates the method "check_event_trigger_touch" at line 139 instead and says that there is something different in your code, something like $game_player.xm instead of $game_player.x or so.

Do you use any other ressources? Does the code of your method "check_event_trigger_touch" look different? Remove these modifications and your Pokemon Essentials 18.1 should work as usual. Probably, your error message does not come from my "visible overworld wild encounters" script. I suggest, that you can reproduce the error message without my script, by placing moving overworld events on the map in the map editor.
 
Start the Script editor in RPGMakerXP (press F11), open the script "Game_Event" and search for the following line
Code:
def check_event_trigger_touch(x, y)

Usually, it's in line 131 and the you can read
Code:
  def check_event_trigger_touch(x, y)
    return if $game_system.map_interpreter.running?
    return if @trigger!=2
    return if x != $game_player.x || y != $game_player.y
    return if jumping? || over_trigger?
    start
  end
in an unmodified Pokemon Essentials Version 18.1.

I quess, you have modified the code or use any other script, addon or whatever that overwrites the method "check_event_trigger_touch" at that point or at any other point in the whole script. I think so, because your error message locates the method "check_event_trigger_touch" at line 139 instead and says that there is something different in your code, something like $game_player.xm instead of $game_player.x or so.

Do you use any other ressources? Does the code of your method "check_event_trigger_touch" look different? Remove these modifications and your Pokemon Essentials 18.1 should work as usual. Probably, your error message does not come from my "visible overworld wild encounters" script. I suggest, that you can reproduce the error message without my script, by placing moving overworld events on the map in the map editor.
Looks like that fixed it! It did say xm instead of x for some reason. I never touched the code but maybe whoever made GSC Essentials did. Thank you!
 
Is there a way to change IVs of wild encounters or shiny encounters? I would like to make them for normal encounters 15 and higher and for shinys 20 and higher.
Sorry if this has been asked already.
 
Back
Top