Jump to content
Vlue

Actor Stat Window

Recommended Posts

Actor Stat Window v 1.0

By V.M. of D.T.

 

Introduction

Show's a fancy window with actor stats in it! (There's a screen shot)

 

Features

- Fancy window with actor stats (Fanciness not guaranteed)

 

Screenshots

 

 

MENUFACE.png

It's not actually Midnight (Unless it is) so ignore that.

 

 

 

How to Use

Put script in, then use the script calls:

@varname = W_Merc.new(actor id)

@varname.dispose

 

Examples:

@mew = W_Merc.new(1)

Random Event Stuff

@mew.dispose

 

 

Script

Convenient Pastebin: Here

Care to go the extra mile? Click here: Here

 

FAQ

None!

 

Credit and Thanks

- By V.M. of D.T.

- Free to use in any project with credit given

 

Author's Notes

Worried some people might not get how to use it! Oh well.

Edited by Vlue

Share this post


Link to post
Share on other sites

This is a good script, however in this line;

self.z = 255

 

What is the function of this line and also, I am a complete noob so please reply in a way that someone who knows nothing of ruby will understand.

 

Also, why is the value of WLH specifically 24?

Edited by RiskBreaker

Share this post


Link to post
Share on other sites

z determines the order of which elements are drawn on top of each other, so that's just there to make sure it's on top of other things

Tsuki got the other answer, 24 is my Window Line Height, specifically 24 just because that is the default line height

Share this post


Link to post
Share on other sites

Crap, I forgot a word : "this".

I think some people wil be please if you made a menu (the display) like you did with the statut.

Share this post


Link to post
Share on other sites

Alright, I understand the .z(255) part, however, I still don't know the magic you used behind

 

super(5,5, [96x2]-WLH, [96+WLH]x7)

 

I know that you are sending the numbers ( 5,5, [96x2]-WLH, [96+WLH]x7 ) to the window_base class to create a new window but my question is why would you choose to do this:

 

96x2 - WLH

 

96- WLF*7

 

what is the point of this math? what does it do? why not just say for example width = 230, height = 240, (I know this is not representative of the actual window)

 

And also how is this WLH measured exactly? is it relative to the window or the screen. I've attached a screenshot to help you understand my question.

 

post-11346-0-12217200-1338419979_thumb.png

 

Thanks again for the script it's awesome, I just want to understand what it does completely before I add implement put it to use.

Edited by RiskBreaker

Share this post


Link to post
Share on other sites

There is no real difference.

 

You can say 24, 48, 120, 144, ... if you want.

Or you can use constants instead and simply provide an offset.

 

What if you changed the size of the screen? What if you went from 640x480 to 1280x960? Instead of having to change every number cause you hardcoded it for a small window, you just have to change the constants to reflect a larger window.

 

Dimensions should be defined relative to each other, not absolute although performance-wise it's faster to just hardcode everything..

 

But in the end, it saves you a whole lot of work if you decide to change various properties like window size.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Pretty much what Tsuki said.

Constants and ease of use mostly, quite used to WLH from VX.

It's actually a height of 264, while there's only 10 lines to display, the contents portion of the window you can draw in is smaller then the actual width and height of the window. (Apparently by 12 pixels on each side, I didn't remember I figured that out...)

 

WLH is measured relative to anything, it's just a value I'm using to set up lines, line one goes on y0, line two y24(WLH), line three y48(WLH * 2) so on. The x, y values for window contents however is measured by window and not screen. Window x, y values are measured by screen.

 

 

Share this post


Link to post
Share on other sites

There is no real difference.

 

You can say 24, 48, 120, 144, ... if you want.

Or you can use constants instead and simply provide an offset.

 

What if you changed the size of the screen? What if you went from 640x480 to 1280x960? Instead of having to change every number cause you hardcoded it for a small window, you just have to change the constants to reflect a larger window.

 

Dimensions should be defined relative to each other, not absolute although performance-wise it's faster to just hardcode everything..

 

But in the end, it saves you a whole lot of work if you decide to change various properties like window size.

Ok I get why Vlue did not place hard numbers in there as you say, and I understand that the part about putting sizes relative to each other as the code adjusts to different aspect ratio and resolution environments, but I still do not know the logic behind the choice of number he used. Here let me restate my question;

96x2 - WLH #---- 96? Where do you think up this number from? Why multiply by 2 and then subtract WLH?
96- WLH*7 #----- Again 96? What is the point/rational/thinking behind subtracting specially WLH*7?

 

Pretty much what Tsuki said.

Constants and ease of use mostly, quite used to WLH from VX.

It's actually a height of 264, while there's only 10 lines to display, the contents portion of the window you can draw in is smaller then the actual width and height of the window. (Apparently by 12 pixels on each side, I didn't remember I figured that out...)

 

WLH is measured relative to anything, it's just a value I'm using to set up lines, line one goes on y0, line two y24(WLH), line three y48(WLH * 2) so on. The x, y values for window contents however is measured by window and not screen. Window x, y values are measured by screen.

Thanks, I understand that it's inside the window and the line draw positions. Can you explain why you chose those numbers the way you did though? It would help if you could explain why you write this in your code;

96x2 - WLH #---- 96? Where do you think up this number from? Why multiply by 2 and then subtract WLH?
96- WLH*7 #----- Again 96? What is the point/rational/thinking behind subtracting specially WLH7?

Edited by RiskBreaker

Share this post


Link to post
Share on other sites

96 is the size of the face graphic

For width I was lazy and just gave it a random width of twice the size of the face graphic minus a WLH and it worked out. Woot.

Height is actually 96 + WLH*7, not '-'. Gives a height of the face graphic + 6 lines + one more line to compensate for the border.

Share this post


Link to post
Share on other sites

Aha! Those few lines have cleared up more than you can imagine up in my brain :D . 96 is the size of a face graphic? I did not know that. Thanks for the elaboration Vlue, I will try not nag you too much as I move on to your other scripts and try to make sense of those.

 

Again, thanks for the script, it's wonderful, exactly what I need!

Edited by RiskBreaker

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted