FANDOM


Disallow running in certain places
This tutorial was written by IceGod64. Please give credit.

This tutorial is related to the following pages:

Click here for more tutorials!


In Pokémon essentials, whether the player is allowed to run is decided by the MetaData setting "Outdoor". For a gen III styled game, this is still insufficient however, becuse in the offiical generation III titles, the player could also run in caves, but not so in essentials. It's even more incorrect for generations after 3, because there you could run nearly everwhere. Following this tutorial, you will be able to set whether running is allowed on a certain map by a new metadata entry of the map.

Our mission begins in the script section Walk_Run. Search in the def pbCanRun? for the below (Should be around line 27)

   (
    pbGetMetadata($game_map.map_id,MetadataOutdoor) ||
    ($PokemonEncounters && $PokemonEncounters.isCave?)
   ) &&

Change that to:

   (
    !pbGetMetadata($game_map.map_id,MetadataBanRunning) ||
    ($PokemonEncounters && $PokemonEncounters.isCave?)
   ) &&

This tells the game to look for the metadata setting "BanRunning" and if it is NOT true, allow the player to run. However, this Metadata doesn't exist, we will have to implement it. Go to Pokemon_Map and find the following around line 289:

 MetadataOutdoor=1
 MetadataEscapePoint=2
 MetadataShowArea=3
 MetadataBicycle=4
 MetadataBicycleAlways=5
 MetadataHealingSpot=6
 MetadataWeather=7
 MetadataMapPosition=8
 MetadataDiveMap=9
 MetadataDarkMap=10
 MetadataSafariMap=11
 MetadataSnapEdges=12
 MetadataDungeon=13
 MetadataBattleBack=14
 MetadataMapWildBattleBGM=15
 MetadataMapTrainerBattleBGM=16
 MetadataMapWildVictoryME=17
 MetadataMapTrainerVictoryME=18

At the end of this, add a new line "MetadataBanRunning=19"(without quotes). Then, scroll down a little further to Module PokemonMetadata. Add a new line before the "}" that looks like this:

  "BanRunning"=>[19,"b"],

Next, go to PokemonEditor, and search for "LOCALMAPS=[" without the quotes. Imediately after that, you will get a list of Metadata setting contained in []. Creat a new line after

  _INTL("Default ME played after winning a Trainer battle on this map.")],

and paste this code:

  ["BanRunning",BooleanProperty,
   _INTL("If true, the player is not allowed to run on this map.")],

Now, you will be able to run the game, and change the setting however you want in the in-game editor. The game will remember the setting too, of course.

The next step is to make the editor.exe reflect these changes. This is simple enough to do, but takes a little know how. To start, save and close RPGMaker XP, savng your project if you have not done so. Go to the folder oy your project/data. In that folder, find the file "scripts.rxdata" and rename it to something you will remember, I named it "scripts2.rxdata". After that, find "EditorScripts.rxdata" and rename it to "scripts.rxdata". Now, open your project.

When you open up the scripts section, it will look very different from before, because you are now editing the editor through your project. Go to Pokemon_Map and find the following around line 289:

 MetadataOutdoor=1
 MetadataEscapePoint=2
 MetadataShowArea=3
 MetadataBicycle=4
 MetadataBicycleAlways=5
 MetadataHealingSpot=6
 MetadataWeather=7
 MetadataMapPosition=8
 MetadataDiveMap=9
 MetadataDarkMap=10
 MetadataSafariMap=11
 MetadataSnapEdges=12
 MetadataDungeon=13
 MetadataBattleBack=14
 MetadataMapWildBattleBGM=15
 MetadataMapTrainerBattleBGM=16
 MetadataMapWildVictoryME=17
 MetadataMapTrainerVictoryME=18

At the end of this, add a new line "MetadataBanRunning=19"(without quotes). Then, scroll down a little further to Module PokemonMetadata. Add a new line before the "}" that looks like this:

  "BanRunning"=>[19,"b"],

Next, go to PokemonEditor, and search for "LOCALMAPS=[" without the quotes. Its around line 3437. Immediately after that, you will get a list of Metadata setting contained in []. Creat a new line after

  _INTL("Default ME played after winning a Trainer battle on this map.")],

and paste this code:

  ["BanRunning",BooleanProperty,
   _INTL("If true, the player is not allowed to run on this map.")],

Now, you will be able to run the game, which is currently the editor. I would reccomend doing so just to make sure you got these steps right. If it works, then good job, you got it working!

Now, the only left to do is go back into your projects /data folder, and rename "scripts.rxdata" back to "EditorScripts.rxdata", and rename your original "scripts.rxdata" file back from whatever you named it to. Be careful about the spelling. Now, you can use either the editor or your game to allow or disallow running on each map. Running is allowed when Metadata BanRunning is anything but true, including nil. Please credit IceGod64 if you use this tutorial, and thank you.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.