Extra Menu Window

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Rikifive, Jul 9, 2015.

  1. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    [​IMG]
    Version 1.3
     
    [​IMG]
    This script creates a simple window with custom information in main menu.
    Variables, playtime, location etc. can now be displayed in menu.
     
    [​IMG]
    > Display variables, playtime, location and many more in main menu.
    > Set as many *items* displayed as you want! There are 4 examples by default, you can customize them or add even more!
    > You can set the text color, value color, icons and their position.

    > You can disable the default gold window.
     
    [​IMG]

    [​IMG]
    [​IMG]
     
    [​IMG]
    To setup your thing you need to configure the *item*, which is shown in the second screenshot.
    The rest of instructions are in the script.
     
    [​IMG]
    Extra Menu Window 1.3
    - Older versions -
     
     
    [​IMG]
    For both COMMERCIAL and NON-COMMERCIAL projects.
    Crediting me (Rikifive) in your game would be appreciated.
     
    [​IMG]
    Version 1.3
    - Added option to center text/value when not using icons.- Moved "Font Settings" to "Main Settings".

    Version 1.2
    - Added option that disables the default Gold Window in Menu.
    - Fixed the resolution of the window lines.
    Version 1.1
    - Changed refresh rate of playtime. (thanks to DigiDeity)
    Version 1.0
    Initial Release
    [​IMG]
    Written by: Rikifive
    Thanks to DigiDeity and ♥SOURCE♥ for helping with this script.
     
    Last edited by a moderator: Jul 23, 2015
    #1
  2. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    Nice script, I'd love to use this, but shouldn't this overwrite the default gold window? It's strange how it essentially displays gold twice, once in the window this script provides and again in the default gold window.
     
    Last edited by a moderator: Jul 9, 2015
    #2
  3. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    In this script I put the gold for example, it can be disabled / replaced.

    But yes, you're right I was thinking about that earlier, I'll do an option for that later. ~thanks for suggesting. =)

    As for now I did a small update. (thanks to DigiDeity)

    [​IMG]

    Updated script to version 1.1

    ~ changed refresh rate of Playtime.

    [​IMG]

    Here you go, hope everything will be OK. =)

    [​IMG]

    Version 1.2

    - Added option that disables the default Gold Window in Menu.
    - Fixed the resolution of the window lines.
     
    Last edited by a moderator: Jul 25, 2015
    #3
  4. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    Yes, that's better. But I'm having another problem of sorts, I suspect it's a very minor compatibility issue with Blackmorning's Base Script. For some reason (probably Blackmorning's Base Script) the text on the extra menu window is bolded. I think this may be because Blackmorning's Base script, by default, bolds all the text on the status part of the menu on the right, but it's strange how it causes the extra menu window to become bolded because I disabled the bold. (And kept the italicized class names)

    http://i.imgur.com/vO4jTFH.png (this is my menu so you can see)

    If you can't fix this, it's fine, I can live with it, albeit with possible running out of room if you have 3 digits of the rarer currency but I'm just bringing it to your attention.
     
    Last edited by a moderator: Jul 10, 2015
    #4
  5. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    Have you tried changing font options in my script?
    You can set font bold, size, outline and shadow.
    The font options are located between main options and the *items*.
    I forgot to change font settings after testing and I left font bold on by default.
    I know that script is messy and options are all over the place.
    [​IMG] (25.07.2015) = Updated and options are more clearly placed.
     
    Also I noticed you're not using icons in some *items* and the text is kinda not centered / draw near border.
    [​IMG] (25.07.2015) = Also my fault, but actually gave me an idea.
    I didn't think about not using icons. I will add text centering when not using them later.
    And I will move font options to Main Settings.
    AND I forgot to change default icons back to normal after testing... =P
    I'll fix everything tomorrow.
     
    [​IMG]
    That's weird... Have you tried moving that script below the Blackmorning's Base Script.?
    [​IMG]
    I checked that and it's not caused by Black's script. I've put both scripts in new project and disabling bold in my script worked...
    I don't know why is this happening...
     
    [​IMG] (10.07.2015)
    [​IMG]
    Version 1.3
    - Added option to center text/value when not using icons.
    - Moved "Font Settings" to "Main Settings".
     
    Last edited by a moderator: Jul 25, 2015
    #5
  6. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    Ah, I did not know you could set the bold and stuff on your script. I think that might fix it. As for the icons, I realized you could set the icons right after I took the screenshot but I didn't see the point in updating my screenshot to show the icons since it was such a small change. Unfortunately I'll be away from home for the next few days so I won't be able to try changing the bold setting yet, but I think that was probably the problem. Thank you! I'll let you know if there's another problem.
     
    Last edited by a moderator: Jul 11, 2015
    #6
    Rikifive likes this.
  7. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    I realized you didn't have icons, because I forgot to change default ones. And that's right it wasn't important, but it suggested me a little improvement. =) 

    I also updated the script and now the font settings are with the other options so it's easy to configure and also I fixed some little issues. (default options)  =)
     
    Last edited by a moderator: Jul 11, 2015
    #7
  8. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    Okay I would have responded earlier but I've been having issues with my computer.

    Yes, it worked! Thanks for the help. 

    I have one more question of sorts for this script.

    Instead of displaying the current location, I changed it so it shows a second variable, the chapter number. (My game has 6 chapters, plus a prologue)

    Thing is, I don't know how to make it say "Prologue" instead of "Chapter [variable] when the variable is 0.

    Here's a screenshot so you know what I mean. 
    http://41.media.tumblr.com/9e333b4f970c4b1a3f384e0c5dd3c360/tumblr_nrypewxowj1t7qzlpo1_1280.png

    What would I need to change to make it say "Prologue" when the variable is 0? What I mean is, it also replaces "chapter." So it would simply say Prologue, no chapter, no variable. But when the variable is 1, it'll say Chapter 1.
     
    Last edited by a moderator: Jul 25, 2015
    #8
  9. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    I'll look into that... I'll try few things...
     
    [​IMG]

    Yes, that is possible, you just need to add a condition.

    Add more lines near value like this:

    [​IMG]
    Variable will be replaced by "Prologue" when (for example) variable [13] is 0, otherwise it will draw a variable value. =)

    [​IMG]

    It is even possible to make it say different words depending on variable:

    for example 

    when 0 = something

    when 1 = other something etc...

    [​IMG]

    Sorry, I forgot to remove "chapter" word, but basically you need to make the same thing for the text:

    make

    Code:
    if $game_variables[13] == 0text = ""elsetext = "Chapter"end
     
    Last edited by a moderator: Jul 25, 2015
    #9
  10. Sixth

    Sixth Veteran Veteran

    Messages:
    2,132
    Likes Received:
    801
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Or you can just simply store the string itself in the variable during the game with eventing, and not the chapter numbers.

    You can do that by using the "Script" event command, and enter this:

    $game_variables[13] = "Chapter 1"#or$game_variables[13] = "Prologue"Rikifive's script will handle the drawing automatically that way, so you can just put $game_variables[13] there and that's it.Cool script, Rikifive!
     
    #10
  11. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    Why, thank you!

    I'm really glad, that I managed to create *working* script with my poor scripting skills. xD

    Scripting is really fun, but it can be complicated sometimes ~ I like doing maths etc. though. <- you don't need much scripting experience for that. =P
     
    #11
  12. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    [​IMG]

    I tried doing that and it repeated the time, can you tell me what I did wrong?

    This is what I did to the code

    [​IMG]

    bear with me because I have no idea what I'm doing when it comes to scripting so I'm sorry if I seem stupid.
     
    #12
  13. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    I'm not sure why it repeated the time, since it's not in that part of script... Have you used script call or something? Or post the whole script, because that's weird...

    Oh and I see you used "text" twice, change that to values (after if).

    Yes, that may be it.

    You used text twice:

    First it changes to "Chapter"

    then it again changes text to another word based on variable - there is no change in value, so the previous value (from item 1) passes to this (the next one).

    It should look like this:

    EDIT:

    * CORRECTED VERSION*

    #===========================[ ● Item 2 Setup ]===============================# enable = true # Enable this item? (Location by default) if enable # DO NOT TOUCH position = 3 # Sets the position of this item if $game_variables[5] == 0 text = "" # no text if variable = 0 else text = "Chapter" # word used when variable =/= 0 end t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right) t_red = 35 # Set the color of text displayed t_grn = 160 # ~ t_blu = 220 # ~ if $game_variables[5] == 0 value = "Prologue" # when var = 0 else value = $game_variables[5] # displays variable when its =/= 0 end v_align = 1 # Sets the value alignment (0 - left; 1 - center; 2 - right) v_red = 255 # Set the color of value displayed v_grn = 210 # ~ v_blu = 170 # ~ icon = 0 # ID of the displayed icon. iconpos = 0 # Sets the position of icon (0 - left; 1 - right) center = true # Center text/value? (use when icon is not used)
    ~ OR ~

    if you want do set that manually anytime using script call, you can do this: (As Sixth said)

    #===========================[ ● Item 2 Setup ]===============================# enable = true # Enable this item? (Location by default) if enable # DO NOT TOUCH position = 3 # Sets the position of this item text = "" # Sets the displayed text, leave "" to disable text t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right) t_red = 35 # Set the color of text displayed t_grn = 160 # ~ t_blu = 220 # ~ value = $CHAPTER v_align = 1 # Sets the value alignment (0 - left; 1 - center; 2 - right) v_red = 255 # Set the color of value displayed v_grn = 210 # ~ v_blu = 170 # ~ icon = 0 # ID of the displayed icon. iconpos = 0 # Sets the position of icon (0 - left; 1 - right) center = true # Center text/value? (use when icon is not used)
    and use script calls in events putting for example:

    $CHAPTER = "Prologue"

    then later,

    $CHAPTER = "Chapter 1"

    then,

    $CHAPTER = "any text etc. here"

    (with quotes)

    etc. etc.
     
    Last edited by a moderator: Aug 5, 2015
    #13
  14. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    I copy and pasted what you put but now I'm getting this error

    [​IMG]

    I pasted here the entire Item 2 setup segment of the script I have

    #===========================[ ● Item 2 Setup ]===============================#  enable = true # Enable this item? (Location by default)

      if enable # DO NOT TOUCH

      position = 3 # Sets the position of this item

      if $game_variables[5] == 0

      text = "" # no text in variable = 0

      else

      text = "Chapter" # word used when variable =/= 0

      t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right)

      t_red = 255 # Set the color of text displayed

      t_grn = 210 # ~

      t_blu = 170 # ~

      if $game_variables[5] == 0

      value = "Prologue" # when var = 0

      else

      value = $game_variables[5] # displays variable when its =/= 0

      v_align = 1 # Sets the value alignment (0 - left; 1 - center; 2 - right)

      v_red = 255 # Set the color of value displayed

      v_grn = 210 # ~

      v_blu = 170 # ~

      icon = 0 # ID of the displayed icon.

      iconpos = 0 # Sets the position of icon (0 - left; 1 - right)

      center = true # Center text/value? (use when icon is not used)

     

      ##############################################################################

      self.contents.font.color = Color.new(t_red,t_grn,t_blu)

      if center

      self.contents.draw_text(0, -48 + 24 * position, wid + 24, hei, text, t_align)

      else # normal

      self.contents.draw_text(24 - 24 * iconpos, -48 + 24 * position, wid, hei, text, t_align)

      end # if CENTER_TEXT

      self.contents.font.color = Color.new(v_red,v_grn,v_blu)

      if center

      self.contents.draw_text(0, -48 + 24 * position, wid + 24, hei, "#{value}", v_align)

      else # normal

      self.contents.draw_text(24 - 24 * iconpos, -48 + 24 * position, wid, hei, "#{value}", v_align)

      end #if CENTER_TEXT

      self.contents.font.color = normal_color

      draw_icon(icon, 0 + 112 * iconpos, -24 + 24 * position)

      else # disabled text

      end # if enable

      ##############################################################################
     
    #14
  15. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    That's just me being stupid - there's no end after ifs. How did that happen? ~ Sorry :x

    Here is the corrected version:

    Code:
    enable = true # Enable this item? (Location by default)  if enable # DO NOT TOUCH  position = 3 # Sets the position of this item  if $game_variables[5] == 0  text = "" # no text if variable = 0  else  text = "Chapter" # word used when variable =/= 0  end  t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right)  t_red = 35 # Set the color of text displayed  t_grn = 160 # ~  t_blu = 220 # ~  if $game_variables[5] == 0  value = "Prologue" # when var = 0  else  value = $game_variables[5] # displays variable when its =/= 0  end  v_align = 1 # Sets the value alignment (0 - left; 1 - center; 2 - right)  v_red = 255 # Set the color of value displayed  v_grn = 210 # ~  v_blu = 170 # ~  icon = 0 # ID of the displayed icon.  iconpos = 0 # Sets the position of icon (0 - left; 1 - right)  center = true # Center text/value? (use when icon is not used)
     
    Last edited by a moderator: Aug 5, 2015
    #15
  16. HopeFragment

    HopeFragment H'witch Nerd Veteran

    Messages:
    121
    Likes Received:
    11
    Location:
    New Jersey
    First Language:
    English
    Primarily Uses:
    RMVXA
    Okay, it works perfectly now, thanks for all your help!
     
    #16
    Rikifive likes this.
  17. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    No problem! Glad everything is fine now. =)

    If there'll be any problems/suggestions, let me know. =)
     
    #17
  18. devilbringer450

    devilbringer450 Villager Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    English
    Great script i have been looking for something like this for ever:) but curious is there anyway to keep the gold window where its at an say i wanna move the extra menu stuff to the mid of my screen?
     
    #18
  19. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    677
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    Do you mean leaving the default gold window where it is by default and having that extra window somewhere else without 'gold'?
    To bring the default gold window back and generally disable overwriting of the default methods, just set "OVERWRITE_SCENE_MENU" to false and then just configure the position of the extra window in configuration at the beginning, by changing X and Y positions.

    By the way, now when I look on how I wrote this script... There are so many things to improve, starting from putting options to the module.

    I was such a noob. ( ͡ᵔ ͜ʖ ͡ᵔ )
     
    Last edited by a moderator: Dec 12, 2015
    #19
  20. devilbringer450

    devilbringer450 Villager Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    English
    i figured it out had to disable the gold menu function so it wasn't tied to that window and edit the window base to enlarge it a bit to show 6 things:) seriously though great script been looking everywhere for something that shows in the menu an could track variables now here's a question:) is there anyway to display a small pic at the bottom of the window about the same size as the actors portrait that will change with variables?
     
    #20

Share This Page