View Single Post
  #4    
Old April 29th, 2008, 07:23 AM
poccil
Trainer
 
Join Date: Jan 2007
Gender:
Nature: Adamant
For the first problem, nothing needs to be done; just assume that more than eight badges
is possible.

For the second problem, follow the directions below.

First, create a new script section with the following code.

Code:
class RegionalStorage
  def initialize
    @storages=[]
  end
  def [](i)
    if !@storages[i]
      @storages[i]=PokemonStorage.new
    end
    return @storages[i]
  end
end

def pbPokemonStorage
  if $PokemonStorage
    mappos=!$game_map ? nil : pbGetMetadata($game_map.map_id,MetadataMapPosition)
    if !mappos
      return $PokemonStorage[i]
    else
      return $PokemonStorage[mappos[0]]
    end
  end
  return nil
end
In the script sections PokemonUtilities, PokemonStorage, PokemonDebug, and
PokeBattle_Battle, replace all instances of "$PokemonStorage" with "pbPokemonStorage".

In the script section PokemonLoad, modify line 243 by replacing this:

Code:
    $PokemonStorage=PokemonStorage.new
with this:

Code:
    $PokemonStorage=RegionalStorage.new
The change will take effect only if the game is restarted or the save file is deleted.

In order for this to work, the region for every map must be explicitly set in the visual
editor (editor.exe).
__________________
Peter O, of The Ultimate Pokemon Center (Pokemon Essentials, Donate money to restore my page)