Character Status Menu Sprite Size

Discussion in 'RGSS Script Requests' started by Teabone, May 19, 2019.

  1. Teabone

    Teabone Veteran Veteran

    Messages:
    31
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMXP
    Hi all,

    I'm using larger than normal sprites for characters/actors in my game. Which works out pretty great during game play. The only issue i noticed is that when you go to the status menu that displays all the character information the spirtes on this menu are cropped to 32x32. How can I increase this?
     
    #1
  2. hiddenone

    hiddenone Lurker Extraordinaire Moderator

    Messages:
    1,934
    Likes Received:
    4,584
    First Language:
    english
    Primarily Uses:
    RMMV
    @Teabone RGSS Scripts (RMXP) is for sharing scripts that you've written, not for asking for help.

    I've moved this thread to RGSS Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    359
    Likes Received:
    84
    First Language:
    English
    Can you post a screenshot? How large are your sprites? Are you using any custom menus?
     
    #3
  4. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    301
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMXP
    This sounds unusual. By that, I mean the Window_Status class executes the 'draw_actor_graphic' from Window_Base, and that method doesn't crop the characterset.

    'draw_actor_graphic' looks at your characterset, divides it into the typical 4x4 format, and renders one of the four frames of animation regardless of the size of the characterset.

    Would you be using some other method to render your character, or did the draw_actor_graphic method get altered? Those are the only two reasons I can see for your character being cropped to 32x32
     
    #4
  5. Teabone

    Teabone Veteran Veteran

    Messages:
    31
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMXP
    Hi all, in the following image attachments you will see the character on the map (which she is bigger than 32x32) being seemingly cropped. I am going to check back on the animations and see if this might be an issue on my end.


    I've not used any code modifying for actor graphics.
     

    Attached Files:

    #5
  6. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    301
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMXP
    I hate to tell you this, but the two screenshots in my spoilers use the same default 'draw_actor_graphic' and can handle sprites much larger than yours. In the example, I'm using Bill (from The Lycan ABS) and Lily (from Lily's Librams), though I scaled them double in size... 64px wide x 96px tall. No problems.
    mappins.png menuy.jpg

    The only reason why Bill has a crewcut :p is because he's too high up and the 16px border is taking effect.

    This I knew would happen. So again, I say that the 'draw_actor_graphic' looks at your characterset, divides it into the typical 4x4 format, and renders one of the four frames of animation regardless of the size of the characterset. You must have some script hampering this:

    Code:
      def draw_actor_graphic(actor, x, y)
        bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
        cw = bitmap.width / 4
        ch = bitmap.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
      end
    #1: Reads the bitmap
    #2: gets the width (1/4 the width of the bitmap)
    #3: gets the height (1/4th the height of the bitmap)
    #4: set the size of the rectangle to be drawn ( 1/4th the width and 1/4th the height)
    #5: draw the contents of the bitmap onto the screen... x/y coords, and a single frame using the rectangle above

    Simple.

    So yea, something cutting your character off at the knee caps certainly looks like a script is affecting your version of draw_actor_graphic.
     
    #6

Share This Page