Vlue 271 Posted April 28, 2012 (edited) 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 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 August 5, 2012 by Vlue 1 Share this post Link to post Share on other sites
Galv 1,387 Posted April 28, 2012 Very handy and just what I was looking for. Works perfectly and easy to use - thanks for this! 1 Share this post Link to post Share on other sites
RiskBreaker 1 Posted May 30, 2012 (edited) 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 May 30, 2012 by RiskBreaker Share this post Link to post Share on other sites
Tsukihime 1,489 Posted May 30, 2012 Cause it's his line height. Share this post Link to post Share on other sites
Vlue 271 Posted May 30, 2012 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
Chaos17 31 Posted May 30, 2012 A menu like will be nice. Share this post Link to post Share on other sites
Chaos17 31 Posted May 30, 2012 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
RiskBreaker 1 Posted May 30, 2012 (edited) 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. 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 May 30, 2012 by RiskBreaker Share this post Link to post Share on other sites
Tsukihime 1,489 Posted May 30, 2012 (edited) 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 May 30, 2012 by Tsukihime 1 Share this post Link to post Share on other sites
Vlue 271 Posted May 31, 2012 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. 1 Share this post Link to post Share on other sites
RiskBreaker 1 Posted May 31, 2012 (edited) 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 May 31, 2012 by RiskBreaker Share this post Link to post Share on other sites
Vlue 271 Posted May 31, 2012 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
RiskBreaker 1 Posted May 31, 2012 (edited) Aha! Those few lines have cleared up more than you can imagine up in my brain . 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 May 31, 2012 by RiskBreaker 1 Share this post Link to post Share on other sites