FANDOM


Border option
This tutorial is deprecated. It is no longer relevant to the latest version of Pokémon Essentials.

This tutorial was written by -FL-. Please give credit.

Click here for more tutorials!


Borderscreen
Border

Original border (click in the picture before saving)

This tutorial explains how to put a border option in the game, a little modified feature from Essentials V5 and before. With border and medium screen size (640x480), the fullscreen mode (Alt+Enter) become centered and smooth. You need a 640x480 border image with a 512x384 transparent hole in the center.

At SpriteResizer change:

def pbSetResizeFactor(factor)
  if $ResizeFactor!=factor

to

def pbSetResizeFactor(factor, force=false)
  if force || $ResizeFactor!=factor

At PokemonOptions, after line 'attr_accessor :language' add line 'attr_accessor :border'.

After line '@language = 0 # Language (see also LANGUAGES in script PokemonSystem)' add line '@border = 1' or '@border = 0' if you wish that the border is ON by default.

Before line '# Quote this section out if you don't want to allow players to change the screen' add:

      EnumOption.new(_INTL("Border"),[_INTL("On"),_INTL("Off")],
      proc { $PokemonSystem.border },
      proc {|value|  
       oldvalue=$PokemonSystem.border
       $PokemonSystem.border=value
       if value!=oldvalue
        $ResizeOffsetX = ($PokemonSystem.border==0) ? 64 : 0
        $ResizeOffsetY = ($PokemonSystem.border==0) ? 48 : 0
        pbSetResizeFactor([0.5,1.0,2.0][$PokemonSystem.screensize],true)
        ObjectSpace.each_object(TilemapLoader){|o| next if o.disposed?; o.updateClass }
       end
      }
      ),

In both PokemonOptions and PokemonSystem change every

$ResizeOffsetX=0
$ResizeOffsetY=0

and (only in PokemonSystem)

$ResizeOffsetX=0 #[0,0][$PokemonSystem.screensize]
$ResizeOffsetY=0 #[0,0][$PokemonSystem.screensize]

to (total of 3):

$ResizeOffsetX = ($PokemonSystem.border==0) ? 64 : 0
$ResizeOffsetY = ($PokemonSystem.border==0) ? 48 : 0

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.