Battlers instead of Spritesets in the Menu?

Discussion in 'RGSS Script Requests' started by Arkane609, Jul 27, 2014.

  1. Arkane609

    Arkane609 Apprentice Member

    Messages:
    145
    Likes Received:
    35
    Location:
    *Insert witty psuedo-location here*
    First Language:
    Tagalog
    As the title suggest, is there an available script for this? I've been looking everywhere for this. Its practically the only script I need left before I can start with messing with the events. If there's no script for this, is there any alternative? I've seen different projects change the spriteset to facesets, though. I tried to change one to make it show battlers but it ended up crashing everytime I go to the menu. I decided to scrap that, lol. But yeah, I'd really REALLY appreciate it if there is such a script. :c

    Thanks.
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,955
    Likes Received:
    11,615
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    ??? The game does not show battlers in the menu - it shows faces. You would need a script in order to show sprites instead of faces.


    What size are your battlers? Have you decided how you want all the menu screens to be rearranged to accommodate the larger images?
     
    #2
  3. Arkane609

    Arkane609 Apprentice Member

    Messages:
    145
    Likes Received:
    35
    Location:
    *Insert witty psuedo-location here*
    First Language:
    Tagalog
    I'm confused. I thought these were the sprites:

    [​IMG]

    And the battlers are the pictures representing the sprites during battles? In anycase, maybe I could use the script for the faces and substitute the faces with battlers? I know such script exists but all my searches ended up in dead websites, and 404's.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,699
    Likes Received:
    6,600
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Edit:


    OK, misunderstanding - both Shaz and I thought you were talking about Ace...
     
    Last edited by a moderator: Jul 27, 2014
    #4
  5. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,744
    Likes Received:
    4,181
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP
    Guys, Arkane is using RMXP, which has as standard sprites in the menu. ^^;
     
    #5
  6. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    Arkane, it's fairly easy to swap in the battlers, but the battler graphics are bigger than the standard character sprites. So, if you want to use battlers you'll need to either redesign the layout of the menu so that they can fit or use smaller versions of the battler graphics. The default characters are 32*48 pixels, while most battlers are about 150*200. 

    EDIT: This should show what I'm talking about

    [​IMG]
     
    Last edited by a moderator: Jul 27, 2014
    #6
    Arkane609 likes this.
  7. Arkane609

    Arkane609 Apprentice Member

    Messages:
    145
    Likes Received:
    35
    Location:
    *Insert witty psuedo-location here*
    First Language:
    Tagalog
    Resizing them isn't really a problem. Though, how'd you do that? I'm so jelly right now. D:
     
    #7
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    37,955
    Likes Received:
    11,615
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Oh, sorry. That explains everything.


    The sprites are 32x48 pixels. If you can reduce or crop your battlers to about the same size, you can just insert those images and not have to make any other changes to the script for layout.


    I don't have XP with me right now, but I suspect it's pulling the sprite from the top left corner of the spritesheet, so there WOULD be a small script change to make it take the image from somewhere else.
     
    #8
  9. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    Ok, so the class Window_MenuStatus calls the method "draw_actor_graphic" which lives in the class Window_Base since other windows call it as well (like Window_Status). All I did was define my own version of that method in the Window_MenuStatus class so that way it calls the custom one.

    class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # * Draw Graphic # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_graphic(actor, x, y) bitmap = RPG::Cache.battler(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 end 
    By default the x and y coordinates passed to the method are the centered x coordinate and the bottom y coordinate of the available space, so like this...

    ----------

    |           |

    |           |

    |           |

    ---x,y---

    So, when you go to draw you should slide your x to the left by half the sprite width, and slide your y up by the full sprite width.

    Also Shaz is correct, the orignal method pulls the sprite from the top left corner of the sheet. If you look in the code above, you'll see I commented out "/4". That's what cuts the spritesheet down. Obviously, I also changed it to pull in the battler rather than the character sprite, and that was done by changing "RPG::Cache.character" to "RPG::Cache.battler". If you need more help figuring this out, let me know.
     
    Last edited by a moderator: Jul 29, 2014
    #9
    Arkane609 likes this.
  10. Arkane609

    Arkane609 Apprentice Member

    Messages:
    145
    Likes Received:
    35
    Location:
    *Insert witty psuedo-location here*
    First Language:
    Tagalog
    By default the x and y coordinates passed to the method are the centered x coordinate and the bottom y coordinate of the available space, so like this...

    ----------

    |           |

    |           |

    |           |

    ---x,y---

    So, when you go to draw you should slide your x to the left by half the sprite width, and slide your y up by the full sprite width.

    Also Shaz is correct, the orignal method pulls the sprite from the top left corner of the sheet. If you look in the code above, you'll see I commented out "/4". That's what cuts the spritesheet down. Obviously, I also changed it to pull in the battler rather than the character sprite, and that was done by changing "RPG::Cache.character" to "RPG::Cache.battler". If you need more help figuring this out, let me know.
    Ah, there we go! It works now! Thanks a ton! Now I can start the events and stuff!
     
    #10
    MobiusXVI likes this.

Share This Page