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

Problem with dual screen

199
Posts
14
Years
    • Seen Jul 6, 2022
    I use the script of Dual Screen in the current version of the Essential, and the personage does not work out centred on the screen of above.

    Spoiler:


    Spoiler:

    I put in settings:
    DEFAULTSCREENWIDTH = 480
    DEFAULTSCREENHEIGHT = 620
    DEFAULTSCREENZOOM = 1.0
    I do not manage to arrange it. :\
    Does someone know how?
     
    199
    Posts
    14
    Years
    • Seen Jul 6, 2022
    Most pokemon games that use duel screen has the screen 512x784. Each screen has a total height of 384 and the bar in between those heights.

    DEFAULTSCREENWIDTH = 512
    DEFAULTSCREENHEIGHT = 784
    DEFAULTSCREENZOOM = 1.0

    Is not it very big?

    :\
    What is what I have to modify of this?
    #===============================================================================
    # * Dual Screen Script for Pokemon Essentials
    # * By Crazyninjaguy
    # * http://www.planetdev.net
    #===============================================================================
    # If you like this script, please register on my site :)
    # http://www.planetdev.net
    #===============================================================================

    module Graphics
    @@fadeoutvp=Viewport.new(0,0,640,480)
    @@fadeoutvp.z=0x3FFFFFFF
    @@fadeoutvp.color=Color.new(0,0,0,0)
    end

    class Sprite_Picture
    def initialize(viewport, picture)
    @viewport = Viewport.new(0, 0, 485, 665)
    #480,680
    @picture = picture
    @sprite = nil
    update
    end
    end

    module Resolution
    GetWindowPlacement = Win32API.new('user32','GetWindowPlacement',['l','p'],'l')
    GetSystemMetrics = Win32API.new('user32', 'GetSystemMetrics',['i'],'i')
    MoveWindow = Win32API.new('user32','MoveWindow',['l','i','i','i','i','l'],'l')
    FindWindowEx = Win32API.new('user32','FindWindowEx',['l','l','p','p'],'i')
    def self.windowloc(window)
    string = ' ' * 44
    Resolution::GetWindowPlacement.call(window,string)
    windowdetails = string.unpack('L11')
    result = []
    result.push((windowdetails[9] - windowdetails[7]))
    result.push((windowdetails[10] - windowdetails[8]))
    result.push(windowdetails[7])
    result.push(windowdetails[8])
    return result
    end
    end
    class Screen
    def self.center
    window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
    width,height = Resolution.windowloc(window)[0..1]
    screenwidth = Resolution::GetSystemMetrics.call(0)
    screenheight = Resolution::GetSystemMetrics.call(1)
    Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
    end
    def self.resize2(width,height,x,y)
    window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
    screenwidth = Resolution::GetSystemMetrics.call(0)
    screenheight = Resolution::GetSystemMetrics.call(1)
    Resolution::MoveWindow.call(window,x,y,width,height,1)
    end
    def self.move(x,y)
    window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
    width,height = Resolution.windowloc(window)[0..1]
    screenwidth = Resolution::GetSystemMetrics.call(0)
    screenheight = Resolution::GetSystemMetrics.call(1)
    Resolution::MoveWindow.call(window,x,y,width,height,1)
    end
    def self.resize(width,height,center = true)
    window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
    screenwidth = Resolution::GetSystemMetrics.call(0)
    screenheight = Resolution::GetSystemMetrics.call(1)
    if center
    Resolution::MoveWindow.call(window,(screenwidth - width) / 2,(screenheight - height) / 2,width,height,1)
    else
    x,y = Resolution.windowloc(window)[2..3]
    Resolution::MoveWindow.call(window,x,y,width,height,1)
    end
    end
    def self.half(center = true)
    window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
    screenwidth = Resolution::GetSystemMetrics.call(0)
    screenheight = Resolution::GetSystemMetrics.call(1)
    if center
    Resolution::MoveWindow.call(window,(screenwidth - 326) / 2,(screenheight - 272) / 2,326,272,1)
    else
    x,y = Resolution.windowloc(window)[2..3]
    Resolution::MoveWindow.call(window,x,y,326,272,1)
    end
    end
    def self.default
    window = Resolution::FindWindowEx.call(0,0,"RGSS Player",0)
    screenwidth = Resolution::GetSystemMetrics.call(0)
    screenheight = Resolution::GetSystemMetrics.call(1)
    Resolution::MoveWindow.call(window,(screenwidth - 646) / 2,(screenheight / 2) - 273,646,512,1)
    end
    end

    Screen.resize(640,480)

    #----------------------------------------------
    @spacer=IconSprite.new(0, 320)
    @spacer.setBitmap("Graphics/Pictures/spacer")
    @spacer.z = 99999999
    #-----------------------------------------------
     

    DarkShadow21

    Master of dark fire!!
    57
    Posts
    14
    Years
  • change this

    Spoiler:


    to this
    Spoiler:

    and change
    @spacer=IconSprite.new(0, 320)
    at the end of the script to
    @spacer=IconSprite.new(0, 384)

    and set the screen zoom here
    Spoiler:

    to 0.5

    also you would be better to use the duel screen script from Pokemon Essentials DS but still use the 512x784 screen.
     
    199
    Posts
    14
    Years
    • Seen Jul 6, 2022
    Thank you, but I have done all that and it does not work. :'(

    Spoiler:



    And my pokemon goes out on the screen of below instead of the screen of above.

    Spoiler:




    I was using the script of dual screen in the version of 2010 or 2011 and was working perfectly.
    Will it be some problem of the current Pokemon essential?
     
    Last edited:

    FL

    Pokémon Island Creator
    2,452
    Posts
    13
    Years
    • Seen yesterday
    Thank you, but I have done all that and it does not work. :'(

    Spoiler:



    And my pokemon goes out on the screen of below instead of the screen of above.

    Spoiler:




    I was using the script of dual screen in the version of 2010 or 2011 and was working perfectly.
    Will it be some problem of the current Pokemon essential?
    This a problem with this script. Normally the plugins developers that need to follow the main project developers, not the reverse!

    And isn't wrong to use the 480x640 screen.
     
    199
    Posts
    14
    Years
    • Seen Jul 6, 2022
    In the new version of the Pokemon Essential there works the Dual Screen script?
    How can I make it compatible?
     

    venom12

    Pokemon Crystal Rain Relased
    476
    Posts
    17
    Years
    • Age 33
    • Seen Dec 28, 2023
    Yes of course! Just need to edit resolution, game position position of all things in scripts. Its not simple.
     
    Back
    Top