Jump to content
Tigerbite

Yanfly Status Menu/Drawing Actor Sprite

Recommended Posts

Maybe it's the 5am talking, but I'm having a hard time changing the window sizes.

Here's the link: http://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-status-menu/

 

I would like to get rid of the top bar/window (where the biography is shown) and extend the 2 below it (to the top of the screen). Zzzz

 

-edit-

Flaming Hot chips got me going.  Figured it out.  Had to replace a few lines before I could delete the box.  ~_~

 

-edit2-

Didn't feel like making a new topic, but how do I go about drawing a character sprite?  And can you draw it in it's walking/animated form in the status menu?

:D

Edited by Tigerbite

Share this post


Link to post
Share on other sites

-edit2-

Didn't feel like making a new topic, but how do I go about drawing a character sprite?  And can you draw it in it's walking/animated form in the status menu?

:D

 

Sure no problem :), please credit myself (CT_Bolt) Jaysynn, & of course Yanfly

Script Download: Click Here

I just patched the script I posted here to work with YEA - Status Menu

 

 

Edit:

If you just want the YEA - Status Menu to have the (animated) character sprite you can use this:

 

 

# Title: YEA - Status Menu Character Sprite Add-On
# Author: CT_Bolt
# Date: March 17, 2013

# YEA - Status Menu
# Author: Yanfly
# Date: December 26, 2011

# Customization Options
module Customization
  ANIMATE    = true
  SPEED      = Graphics.frame_rate / 7.5
  FRAME_SKIP = 1
  DIRECTION  = 0
end

$imported = {} if $imported.nil?

if $imported["YEA-StatusMenu"]
  class Window_StatusActor < Window_Base
    attr_reader   :frame
    attr_reader   :frame_counter
    
    alias :my_initialize :initialize
    def initialize(x, y)
        @frame = 1
        @frame_counter = 0
      my_initialize(x, y)
    end
    
    alias :my_update :update
    def update
        if Customization::ANIMATE
          @frame_counter = @frame_counter + 1
          if @frame_counter >= Customization::SPEED
            @frame_counter = 0
            @frame = @frame + Customization::FRAME_SKIP
            if @frame > 2
              @frame = 0
            end
            refresh
          end
        end
        my_update
      end
    
    def refresh
      contents.clear
      return unless @actor
      draw_character(@actor.character_name, @actor.character_index, 50, 70, @frame)
      draw_actor_simple_status(@actor, 108, line_height / 2)
    end
    
    
    def draw_character(character_name, character_index, x, y, frame = 1)   
        return unless character_name
        bitmap = Cache.character(character_name)
        sign = character_name[/^[\!\$]./]
        if sign && sign.include?('$')
          cw = bitmap.width / 3
          ch = bitmap.height / 4
        else
          cw = bitmap.width / 12
          ch = bitmap.height / 8
        end
        n = character_index
        src_rect = Rect.new((n%4*3+frame)*cw, (ch * Customization::DIRECTION)+(n/4*4)*ch, cw, ch)
        ret_rect = Rect.new(x - cw, y - ch * 2, cw * 2, ch * 2)
        contents.stretch_blt(ret_rect, bitmap, src_rect)
    end
    
  end
end

 

 

Let me know how it works for ya. ;)B)

Edited by CT Bolt

Share this post


Link to post
Share on other sites

Well I've already customized YEA's Status menu quite a bit, so I can't just plug in your script (because it overwrites a lot of my stuff.)

So I tried picking at it and adding just what I needed and plugging it into YEA's Status Menu script, but I kept getting a bunch of errors XD

I was able to get the sprite on it, just not animated :P

Edited by Tigerbite

Share this post


Link to post
Share on other sites

Well I've already customized YEA's Status menu quite a bit, so I can't just plug in your script (because it overwrites a lot of my stuff.)

 

So I tried picking at it and adding just what I needed and plugging it into YEA's Status Menu script, but I kept getting a bunch of errors XD

I was able to get the sprite on it, just not animated :P

 

Oh my... ok, well send me your modified YEA - Status Script... that would be the easiest way I could help. ;)

 

Edit:

Modified and sent back. :D

Edited by CT Bolt

Share this post


Link to post
Share on other sites

Well I've already customized YEA's Status menu quite a bit, so I can't just plug in your script (because it overwrites a lot of my stuff.)

 

I've seen you ask a lot of questions related to YEA's Status Menu and this seems to come up a lot. If you're using a modified version of the script, then let people know in your opening post. People aren't mind readers, and the fact that it's modified is pertinent information.

Share this post


Link to post
Share on other sites

I've seen you ask a lot of questions related to YEA's Status Menu and this seems to come up a lot. If you're using a modified version of the script, then let people know in your opening post. People aren't mind readers, and the fact that it's modified is pertinent information.

 

Yeah it's really never a good idea to modify the script directly... instead create your own script & overwrite/alias what you need.

Edited by CT Bolt

Share this post


Link to post
Share on other sites

Problem (or request) has been solved (or taken care of) by the awesome CT Bolt.  :)

 

@Ocedic.  Will do, I didn't know it was as complicated as that.  I thought it would've been something similar to draw_actor_face.  >.<

Share this post


Link to post
Share on other sites

Problem (or request) has been solved (or taken care of) by the awesome CT Bolt.  :)

 

Glad to help out. Would you like me to separate your code from the original YEA's Status Menu?

I could probably do that (fairly easily)... it might make it easier to work with. ;)

Share this post


Link to post
Share on other sites

Completely up to you.  :P

I just mush stuff together and hope no errors come out :D

 

lol, ok. Well I might end up doing that ;) , who knows (if I can find time... still trying to complete my St. Patricks day demo on time... as in today ;)).

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×