Nicke 150 Posted April 1, 2012 (edited) Variable Hud Version: 1.0a Introduction A simple variable hud where you can show off to the player certain currencies or other values such as acquired gems etc.The choice is yours. Features Easy to use and install. Just like my previous scripts it is quite easy to setup the variable list and test it out. Unlimited variables to show but I suggest you only use around 5-7. Enable/disable the hud by a switch. Easy to positioning the hud as well as change the space beetween the variables. Support for icons. The choice to display a text next to the variable that will act like a vocab. Lag free! And more! Screenshots ScriptGet the script here.UpdatesNone.CreditDo credit me, Nicke, if you are planing on using this script. Thanks.Can be use in a commercial project. Edited January 29, 2013 by Nicke Share this post Link to post Share on other sites
Rinku 3 Posted April 9, 2012 Nice script! Just one thing... The window hud is transparent by default I think. How may I change it to say, a blue window? 27 # HUD = [width, x, y, opacity, skin] 28 HUD = [160, 455, -5, 200, 0, nil] Changing nil will affect the skin/colour of the window, right? I run into errors when I change it to numbers. Help? Share this post Link to post Share on other sites
Ice Nick 3 Posted April 9, 2012 Very nice, was looking for a simple variable hud script. I have a few questions, I want to use it for a time system but im having some trouble. 1) Is there anyway to remove the "x" like 161x herbs? 2) Is there anyway to move the individual hud display so I can put Hour > Minute > Am/PM all on the same line? I thought I could because I saw # VAR_LIST = [variable_id, vocab (nil), icon_index (nil), x, y] x,y? Unless im doing something wrong I put my x,y coordinates but it doesn't change where the line displays. I guess it wont be as simple to create it for Time? I don't see a feature that can show either AM or PM. Share this post Link to post Share on other sites
Ventwig 25 Posted April 9, 2012 XAIL, just noticed, i think you should put a note one how to make the window visible with a background. I've found the answer to Rinku's question, just the co-ordiantes are off. HUD = [160, 405, -5, 200, 200, "Window"] So I was just wondering if you'd like to update the script just to show people that it's possible to make a back. Also, line 27 is missing something # HUD = [width, x, y, opacity, skin] It shows 5 options, but there's actually 6. What's the option between y and opactiy? Share this post Link to post Share on other sites
Nicke 150 Posted April 9, 2012 (edited) Ah yeah, thanks @Anton. The following code @Rinku should display the window with none tranparency: HUD = [160, 405, -5, 200, 255, nil] The missing option for HUD was z and has been updated now: # HUD = [width, x, y, z, opacity, skin] @Ice Nick: I've added so that you can change the amount symbol as you like in the settings now. For the second question I can probably add a feature so it will work for a time system. Edited April 9, 2012 by Niclas Share this post Link to post Share on other sites
Rinku 3 Posted April 9, 2012 Thanks for the help both of you. 1) Is there anyway to remove the "x" like 161x herbs? I think removing (or changing) the x from line 67 will resolve that. Share this post Link to post Share on other sites
Ice Nick 3 Posted April 9, 2012 (edited) Thanks for the help both of you. 1) Is there anyway to remove the "x" like 161x herbs? I think removing (or changing) the x from line 67 will resolve that. Line 67 is # // Method to return the width. Edit found it on line 44! Edited April 9, 2012 by Ice Nick Share this post Link to post Share on other sites
Rinku 3 Posted April 9, 2012 I guess we have slightly different versions, cause my line 44 just has an " end" on it, lol. Share this post Link to post Share on other sites
Ventwig 25 Posted April 9, 2012 One of you probably editted your so that there's more lines (The customization lets you do that) Share this post Link to post Share on other sites
Ice Nick 3 Posted April 9, 2012 One of you probably editted your so that there's more lines (The customization lets you do that) Yeah makes sense lol, I just copied the lastest version and went by that. Is there anyway using this script to achieve that Time system hud? Like can I display AM if its AM and change it to PM when its PM? Share this post Link to post Share on other sites
Ventwig 25 Posted April 9, 2012 As in AM in-game, or AM in real life? Share this post Link to post Share on other sites
Ice Nick 3 Posted April 9, 2012 As in AM in-game, or AM in real life? Am in game. When its midnight to noon, the hud will read... X o'clock AM. From noon to midnight it will read X o'clock PM. Share this post Link to post Share on other sites
Ventwig 25 Posted April 9, 2012 Would the clock tick every second, or would the time change via events, I'll be happy to try scripting this window for you. Share this post Link to post Share on other sites
Nicke 150 Posted April 9, 2012 (edited) @Ice Nick: You could do it like this... First go to the script and add the following: VAR_LIST[0] = [1, "", nil] This will display variable id 1 with no text and no icon. Then you go to the variable page and set the variable to this: This will use Ruby's built in Time class and get the computer time, then it will change the format to only get PM or AM. For more details about setting up different formats look at this page. This will be the result of that: You may need to change the width, height and x, y position for the hud to your needs as well but that is kind of obvious. I'll let you decide where it should be located. Hope that helped! Bah update again, you might need to know that when using a variable you must update it before a value displays. In this particular case the PM/AM wont be updated until you set the variable again, which can be kind of tedious to do. I mean, you have to constantly call the variable with a common event so that it changes to PM/AM correctly. Anyways, just so you know. Edited April 9, 2012 by Niclas Share this post Link to post Share on other sites
Ice Nick 3 Posted April 9, 2012 (edited) Oh sorry maybe I wasnt clear, I have my own time system, to be more specific im using http://www.rpgmakerv...rial-with-demo/ this one. I believe I actually understand, the time only displays PM because well right now its 5PM on my computer. However VAR_LIST[0] = [1, "", nil] using nil causes an error so I have to use 0. How do I change the position of the hud? Right now I have it on 2 lines The hour and then under it PM 9 PM Is it possible to have them next to each other, also I want to right X O'Clock but when I do that it just displays O'Clock PM Dont worry about the O'Clock part I was just testing it, I dont want to use 9 O'Clock but I cant seem to it working regardless. Edited April 9, 2012 by Ice Nick Share this post Link to post Share on other sites
Ventwig 25 Posted April 9, 2012 Nick, I'll be able to script this in a little window on the top-left of the screen if you want. I'm actually checking out the tutourial now Share this post Link to post Share on other sites
Nicke 150 Posted April 9, 2012 (edited) Okay, yeah well do as I did above but include the time system within the variable. As for the nil error I've updated the script *again* which enables you to do nil instead. Sorry for the inconvenience! Edited April 9, 2012 by Niclas Share this post Link to post Share on other sites
Ice Nick 3 Posted April 9, 2012 (edited) Nick, I'll be able to script this in a little window on the top-left of the screen if you want. I'm actually checking out the tutourial now I actually want to figure this one my self or at least try till I fail. However yes that would be perfect So far my problems are, I want to press Q to toggle Hud display, I cant figure this out, I have it to turn on but wont turn off. Moving the variables to show all in a line... Hour:Minutes AM/PM And displaying the correct AM/PM I apologize for posting my time system problems in this thread perphaps we should Private Message to keep Niclas Thread clean. BTW its awesome script Niclas, I can't tell if its broken or I just have no clue to set it up lawl. Edit: Yeah I don't think I can get it the way I want, Anton I could use your help Edited April 9, 2012 by Ice Nick Share this post Link to post Share on other sites
Ventwig 25 Posted April 9, 2012 (edited) I'm not sure how to do it the way you want at all, but after downloading the tutourial, ive gotten this scriplet together. #Wherever you see $game_switches[1] #Change 1 to the switch to turn the hud on/off class Window_MapTime < Window_Base def initialize super(0,0,200,80) @ampm = "AM" if $game_switches[1] == false self.opacity = 0 time_draw end end def time_draw if $game_variables[100] == 1 @ampm = "PM" else @ampm = "AM" end @hours = $game_variables[97] # Hours @mins = $game_variables[96] # Mins @secs = $game_variables[95] #Seconds text = @hours.to_s + ":" + @mins.to_s + ":" + @secs.to_s + " " + @ampm draw_text(0,0,200,40,text) end def update if $game_switches[1] == false contents.clear time_draw end if $game_switches[1] == true self.opacity = 255 end end end class Scene_Map < Scene_Base alias time_draw_on_map_time create_all_windows def create_all_windows time_draw_on_map_time @maptime_window = Window_MapTime.new end end Sorry Niclas for kinda stealing this topic... Edited April 9, 2012 by Anton Share this post Link to post Share on other sites
Ice Nick 3 Posted April 9, 2012 I'm not sure how to do it the way you want at all, but after downloading the tutourial, ive gotten this scriplet together. #Wherever you see $game_switches[1] #Change 1 to the switch to turn the hud on/off class Window_MapTime < Window_Base def initialize super(0,0,200,80) @ampm = "AM" if $game_switches[1] == false self.opacity = 0 time_draw end end def time_draw if $game_variables[100] == 1 @ampm = "PM" else @ampm = "AM" end @hours = $game_variables[97] # Hours @mins = $game_variables[96] # Mins @secs = $game_variables[95] #Seconds text = @hours.to_s + ":" + @mins.to_s + ":" + @secs.to_s + " " + @ampm draw_text(0,0,200,40,text) end def update if $game_switches[1] == false contents.clear time_draw end if $game_switches[1] == true self.opacity = 255 end end end class Scene_Map < Scene_Base alias time_draw_on_map_time create_all_windows def create_all_windows time_draw_on_map_time @maptime_window = Window_MapTime.new end end Sorry Niclas for kinda stealing this topic... Thanks, I sent you a PM Share this post Link to post Share on other sites
EdgeWing 8 Posted April 12, 2012 Can someone help me use this, I want to make the number character's go up by 1 when you receive a gem... Share this post Link to post Share on other sites
Ventwig 25 Posted April 12, 2012 Edge, I'm not entirely sure what you mean by "number's characters" Do you mean like: 1 => 12 or 1 => 2 ? Share this post Link to post Share on other sites
Nicke 150 Posted April 12, 2012 @EdgeWing: What are you trying to do? As I recall everything works for me with the script. Share this post Link to post Share on other sites
alagni 0 Posted May 25, 2012 2) Is there anyway to move the individual hud display so I can put Hour > Minute > Am/PM all on the same line? I thought I could because I saw # VAR_LIST = [variable_id, vocab (nil), icon_index (nil), x, y] x,y? Unless im doing something wrong I put my x,y coordinates but it doesn't change where the line displays. Same issue here, I just can't manage to move my variables (only the general position of the HUD is working). I just want to place all of them in the same line (instead of being placed vertically). Are the x, y options in # VAR_LIST = [variable_id, vocab (nil), icon_index (nil), x, y] simply misplaced or perhaps just unnecessary here ? Share this post Link to post Share on other sites