The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: &&&&&&&&&&&&& on March 12, 2013, 11:32:50 PM

Title: [RMVXA] Question about stat placement
Post by: &&&&&&&&&&&&& on March 12, 2013, 11:32:50 PM
I was wondering how the placement of stats was determent.

All I can find is ~

Code: [Select]
draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2)

It looks like it just draw all the stats at once. Is there a way to change the locations of the individual stats?

I want to change it from this -
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi109.photobucket.com%2Falbums%2Fn52%2Fdreamslayer7%2Fmenubefore_zps6ae488a9.png&hash=cec4ef5495665dd9abe38b654708ab39994338d5)
to this something like this-
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi109.photobucket.com%2Falbums%2Fn52%2Fdreamslayer7%2Fmenuaftermaybe_zps4a4593c9.png&hash=b9ff46272d774142528d47bae029ccaf58e801be)
Title: Re: [RMVXA] Question about stat placement
Post by: p3king on March 13, 2013, 07:08:16 PM
Hi!

You need to take a look at Window_Base.
The "draw_actor_simple_status" method is defined there:

Code: [Select]
  def draw_actor_simple_status(actor, x, y)
    draw_actor_name(actor, x, y)
    draw_actor_level(actor, x, y + line_height * 1)
    draw_actor_icons(actor, x, y + line_height * 2)
    draw_actor_class(actor, x + 120, y)
    draw_actor_hp(actor, x + 120, y + line_height * 1)
    draw_actor_mp(actor, x + 120, y + line_height * 2)
  end

But be a bit careful. As the method is defined in Window_Base it is most probably used in many other windows as well. I´m still new to the maker so I don´t know where exactly.

If you want to change the look for only the main menu status window you could define your own method to draw the values and call that instead of draw_actor_simple_status.

Hope this helps :)
Title: Re: [RMVXA] Question about stat placement
Post by: LoganF on March 13, 2013, 07:47:35 PM
Alternatively, because that method is in the Window_Base class, if you wanted to have this method only change the way that Window_MenuStatus behaves, you can redefine this method (using the same method name) in the Window_MenuStatus class itself, instead of adding a new method in Window_Base. This will let other classes that inherit from Window_Base behave in the default way, and have Window_MenuStatus (and any classes which inherit from Window_MenuStatus) to behave somewhat differently.

If, on the other hand, you wanted to make sure that all simple_status calls (such as the one that Window_Status will call) to also have the hp and mp bars side by side, you would probably be better redefining the method in Window_Base instead.

What method you do use, really depends on the overall goal.
Title: Re: [RMVXA] Question about stat placement
Post by: &&&&&&&&&&&&& on March 14, 2013, 06:14:56 AM
Thank you.
You both help me a lot. ^_^

I'll try out both, and see which one I prefer.

:3
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi109.photobucket.com%2Falbums%2Fn52%2Fdreamslayer7%2Ffinishedmenuedit_zpsc599b48d.png&hash=648ee36774b9003910e29e50a3fc2dda0d3a5bf0)

I like the new placement, but it still feels like it missing something. ~_~