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

Adding a game border

FL

Pokémon Island Creator
2,450
Posts
13
Years
    • Seen yesterday
    PokéCommunity is breaking codes. For copying scripts at PokéCommunity: Click Thread Tools, and then Show Printable Version, and copy that instead.

    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

    Code:
    def pbSetResizeFactor(factor)
      if $ResizeFactor!=factor

    to

    Code:
    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:

    Code:
          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

    Code:
    $ResizeOffsetX=0
    $ResizeOffsetY=0

    and (only in PokemonSystem )
    Code:
    $ResizeOffsetX=0 #[0,0][$PokemonSystem.screensize]
    $ResizeOffsetY=0 #[0,0][$PokemonSystem.screensize]

    to (total of 3)

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

    Attachments

    • borderscreen.png
      borderscreen.png
      9.5 KB · Views: 107
    • border.png
      border.png
      5.8 KB · Views: 66
    Last edited:

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen yesterday
    I've got the border picture in my Graphics/Pictures and also did everything you explained above. But still I can't make it work.
    At PokemonOptions, after line 'attr_accessor :language' add line 'attr_accessor :border'.
    In both PokemonOptions and PokemonSystem change (total of 3)

    Code:
    $ResizeOffsetX=0
    $ResizeOffsetY=0

    and (only in PokemonSystem )
    Code:
    $ResizeOffsetX=0 #[0,0][$PokemonSystem.screensize]
    $ResizeOffsetY=0 #[0,0][$PokemonSystem.screensize]

    to

    Code:
    $ResizeOffsetX = ($PokemonSystem.border==0) ? 64 : 0
    $ResizeOffsetY = ($PokemonSystem.border==0) ? 48 : 0
    I forgot these two steps.
     

    Bowlstir

    Media Arts and Game Development
    199
    Posts
    16
    Years
  • Wow, just great, FL.

    The only thing for me is that the border doesn't appear right away in the game.

    I have to go into controls, then select off for the border (because the default is ON) and when I switch back to ON, that's when the effect takes place. Why is this?

    Overall, this fixed my OCD about the full screen issues, so thank you very much mate.
     

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen yesterday
    Wow, just great, FL.

    The only thing for me is that the border doesn't appear right away in the game.

    I have to go into controls, then select off for the border (because the default is ON) and when I switch back to ON, that's when the effect takes place. Why is this?

    Overall, this fixed my OCD about the full screen issues, so thank you very much mate.
    Strange. With the last change, this should be fixed. Do you have placed 3 of:

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

    Bowlstir

    Media Arts and Game Development
    199
    Posts
    16
    Years
  • Strange. With the last change, this should be fixed. Do you have placed 3 of:

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


    I did do this, but I fixed it because I implemented an automatic full screen script by zeak.

    Now it works fine. Strange. Oh well.
     

    Bowlstir

    Media Arts and Game Development
    199
    Posts
    16
    Years
  • Double posting so FL can update script:

    To initiate the border right away without having to choose from the controls, instead of adding line '@border = 1' change it to '@border = 0' because 0 corresponds to the ON function on initialization.
     
    • Like
    Reactions: FL
    6
    Posts
    7
    Years
    • Seen Jul 20, 2016
    Hello, how to fix the border's bug in the Pokegear ? Thanks
     
    Last edited:

    Pokébook1

    Marene
    114
    Posts
    8
    Years
  • PokéCommunity is breaking codes. For copying scripts at PokéCommunity: Click Thread Tools, and then Show Printable Version, and copy that instead.

    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

    Code:
    def pbSetResizeFactor(factor)
      if $ResizeFactor!=factor
    to

    Code:
    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:

    Code:
          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

    Code:
    $ResizeOffsetX=0
    $ResizeOffsetY=0
    and (only in PokemonSystem )
    Code:
    $ResizeOffsetX=0 #[0,0][$PokemonSystem.screensize]
    $ResizeOffsetY=0 #[0,0][$PokemonSystem.screensize]
    to (total of 3)

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

    Hello, FL! I love your Scripts, if they would work, all scripts I put of yours don't work. That's why my game is that shit it is. Don't worry it isn't just you, the mej makes awesome Scripts, I must say some works., but that Script with the Pokéball, Greatball on Pokemn center don't work for me, all of you works just 4 me its not working. Not to mention that I always click on Show Printable version and copy the Script from there really carefully. Even though I get errors after errors thats why I stopped downloading your Scripts, I don't want to be rude, just saying you should fix your Scripts before putting them online, but the Idea of your scripts are great! really! Maybe there are errors, because the Scripts is just for Windows 10 or for tablets.
     

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen yesterday
    Hello, how to fix the border's bug in the Pokegear ? Thanks
    At PSystem_Utilities script section change the first line 'if !o.disposed? && o.visible' into 'if !o.disposed? && o.visible && (!$ResizeBorder || $ResizeBorder.sprite.bitmap!=o.bitmap)' and, in Sprite_Resizer script section, after line 'class ScreenBorder' add line 'attr_reader :sprite'.

    Hello, FL! I love your Scripts, if they would work, all scripts I put of yours don't work. That's why my game is that **** it is. Don't worry it isn't just you, the mej makes awesome Scripts, I must say some works., but that Script with the Pokéball, Greatball on Pokemn center don't work for me, all of you works just 4 me its not working. Not to mention that I always click on Show Printable version and copy the Script from there really carefully. Even though I get errors after errors thats why I stopped downloading your Scripts,
    Did you tested on a vanilla Essentials? If you test and point every script that isn't work on a vanilla v16.2, I can take a look. My Border script have no meaning now, since V16 Essentials has a default border option.

    I don't want to be rude, just saying you should fix your Scripts before putting them online,
    I fix, but some new Essentials versions break some of my scripts, so when someone points that isn't working, I check and generally fix it.

    ]Maybe there are errors, because the Scripts is just for Windows 10 or for tablets.
    My scripts work regardless of Windows version. I don't know the RPG Maker behaviour on tablets, so none of my scripts are designed for these devices.
     

    Pokébook1

    Marene
    114
    Posts
    8
    Years
  • FL said:
    Did you tested on a vanilla Essentials? If you test and point every script that isn't work on a vanilla v16.2, I can take a look. My Border script have no meaning now, since V16 Essentials has a default border option.
    I'm sorry, I'm not native american/english I just love english of america and I don't know whats Vanilla, I just know Vanilla from cakes/Ice cream etc. Idk what you mean by a vanilla Essentials, usually when a script don't work I delete it entirely and I use to make backups from my game project, so when I change something on other scripts of Essentials and get errors I use to delete everything and use my backup as original.

    FL said:
    I fix, but some new Essentials versions break some of my scripts, so when someone points that isn't working, I check and generally fix it.
    Oh, sorry if I was rude, I love your scripts, I write a list of scripts of you that are working and that aren't working:
    Working Scripts:

    1. Simple HUD fixed (I know you made another and thats fixed by SunakazeKun)
    2. One Screen Day Care Checker (item) works completely good :D
    3. Watch in the Pokégear screen (I used without unreal system, worked good, showed time in real world :D
    4. Wall Clock (Works good really!)
    Scripts that didn't work:

    1. Family Tree (It didn't work)
    2. TM Shop with compatible Icons
    3. Character selection
    4. Adding different Eggs graphics

    Scripts I want so bad! (But I didn't tested)

    • Set the controls screen
    • Family Tree, TM Shop with compatible Icons
    • Character Selection,
    • (later) Pokemon Selection 4 battle frontier
    • Difficult Modes, Diploma
    • All Scripts of your scripts about Minigames
    • Advanced Pokédex
    • Override the weather
    • Don't lose money after loosing a battle
    • Adding different Eggs graphics
    • Storage Checker,
    • I want to "Turn HM moves into items" but in another bag-slot that must be created
    • Register multiple Items at once
    • Pokeball,Greatball,Ultraball etc in Pokémon Center (from Mehj don't work 4 me)
    • Pokemon Party with Pokéballs the pokemon were catched by (idk who created it, it doesn't work 4 me)
    • Pokémon Horoscope, I want it so bad but it doesn't work (I forgot who created it,)
    Sorry its a long list, but I just need this, 4 those scripts that are not from you, I need to talk to the scripters who made it. I actually wanted "Pokémon following" but then I thaught when I use it then the NPC can't follow my playable character... unfortunatly I can't script, I'm bad at this





    My scripts work regardless of Windows version. I don't know the RPG Maker behaviour on tablets, so none of my scripts are designed for these devices.[/QUOTE]
    I use a netbook of acer with Windows 7 (with no personalization) I just don't like windows 8, 10 etc because I tried once and it was too slow, windows 7 is the best for me, I also don't use tablets, no money for those things, my netbook I bought on a second hand shop and its still working, (knocking 3-times on lumber) I hope my netbook works forever because of my game-projects ;_;
     

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen yesterday
    I'm sorry, I'm not native american/english I just love english of america and I don't know whats Vanilla, I just know Vanilla from cakes/Ice cream etc.
    Vanilla Essentials is a clear/untouched Essentials Version. Using a vanilla Essentials, I'm sure that other scripts aren't interfering in mine.

    Scripts that didn't work:

    1. Family Tree (It didn't work)
    2. TM Shop with compatible Icons
    3. Character selection
    4. Adding different Eggs graphics
    1. I gonna wait for V17, since this version very likely will break this script again.
    2. Really, one step was changed in 16.2. Fixed.
    3. Working here. The example character selection doesn't work on right characters since their metadata isn't filled. You can make it works filling these characters metadata.
    4. Deprecated script. This was done for almost 6 years ago, when isn't possible to define custom egg graphics. Maruno Essentials has native support for this features, Manaphy example prove it.
     
    Back
    Top