Change Pictures belonging to the Resolution

● ARCHIVED · READ-ONLY
Started by Gothic Lolita 10 posts View original ↗
  1. I use the resolution script change from that demo:
    https://www.dropbox.com/s/t7cbovis1s5ru2f/Venka's%20Bestiary.exe?dl=0

    Now my request is, if it's possible to make a script, that loads the picture belong to the chosen resolution.

    Kinda like:
    1280x720 => Title1280x720

    640x480 => Title640x480

    Same would go for battlebacks, because else I would have a black bar in the right and down of it.
    Or I would have too huge pictures for lower resolutions.

    But mostly it is for the title screen an other option is to make all things stretched to maximum.
    It would be okay, to use hashtags or there is still eventing needed, not bad at this. 
    Hope someone can help and if I forgot something to tell, let me know. ;) (\s/)
  2. Could do something like...

    module SelRes  def self.graphic_prefix    return "_#{Graphics.width}x#{Graphics.height}" endendAnd then you could use the script call

    SelRes.graphic_prefixwhich would return a string like so...

    "_1024x608"Which you could then use somehow in determining the correct picture to show. :)

    Also, you should just link to a script rather than posing it. A lot of scripters really dislike that (myself included) cause it can lead to people having all kinds of variations of the script, none of which are up to date.. :p
  3. Thank you for the quick answer and I'm really sorry for that.

    But I couldn't find the original post on the internet.
    Got this one from a demo I downloaded from here.

    Also I'm pretty dumb when it comes to scripts.

    I put the first in the script list in a new extra slot, then added the graphics to the picture folder like:
    Background
    Background_640x480

    Background_1920x1200

    Then I used the script call "SelRes.graphic_prefix" in an event.

    Before I done that, I showed a picture and the other time I tried it the oppossite way.

    So shown it after the script call, but only showed me the picture I picked.

    Am I doing something wrong?

    I found a solution to the picture show command, simply add:
    Var 1 = Graphics.width

    Var 2 = Graphics.heigth

    But I still have problems with Menu pictures and title screen. Because that wouldn't work for those I guess. :/
  4. Yea, for those kinda pictures you would have to manually change everything..

    If you where able to change all the graphics to have all possible sizes that they could be, you could just autoadd the prefix onto every image as its being loaded, then you dont need to manually prefix everything..

    something like this (for each graphic type you need)

    Code:
    module Cache  def self.battler(filename, hue)    load_bitmap("Graphics/Battlers/", filename + SelRes.graphic_prefix, hue)  endend
  5. I would use the same approach that dekita suggests.


    Make hi-res versions of every image, then have the engine figure out what to use.


    Sure, your project will almost double in size, but this is a much more scalable solution.
  6. The error would be cause of a missing '(' after the word 'battler' in the method definition. That was my fault and I fixed the code above when I noticed it. you must grabbed the snippet before I fixed it :)
     
  7. Copied the new one in an empty slot and made the graphics named like above posted. But it seems not working.
    Still only shows the original sized one. :/
  8. idk what that could be.. providing you done it right, it should work. Unless some other script is overwriting the changes you are making.
  9. Well, figured the error out with your help, thank you. ;)
    But if I use that lines:

    Spoiler
    module SelRes

      def self.graphic_prefix

        return "_#{Graphics.width}x#{Graphics.height}"

      end

    end

     

    module Cache

     

      def self.battler(filename, hue)

        load_bitmap("Graphics/Battlers/", filename + SelRes.graphic_prefix, hue)

      end

      

      def self.title1(filename, hue)

        load_bitmap("Graphics/Titles1/", filename + SelRes.graphic_prefix, hue)

      end

     

      def self.title2(filename, hue)

        load_bitmap("Graphics/Titles2/", filename + SelRes.graphic_prefix, hue)

      end

     

     end

     

     

    But get now that error:

     

    error2_zps86f80511.png

     

     

    The other error is:
    "Unable to find file:
    Graphics/Battlers/_1920x1200

    Named the graphics:
    Bat
    Bat_640x480

    Bat_1920x1200

     

    I used the Bat in the editor for the enemy. (\s/)

     

    Tried it in a clean new project, now I get this error from the attachment. /)
    This problem is solved and the topic can be closed by moderator. Got help from Venka with this problem. :) (\s/)error.png