Announcement

Collapse
No announcement yet.

Mod Options Menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mod Options Menu

    This is a script that allows modders to have their own option menu for whatever they might think of
    Click image for larger version  Name:	1.png Views:	0 Size:	123.8 KB ID:	3561Click image for larger version  Name:	2.png Views:	0 Size:	195.1 KB ID:	3562
    * Note the shown options in the first pic doesn't follow with the base script, they are just examples. The base script is just blank except for the "Go Back"

    ***For Players***
    If you are just here to get the menu for a mod that uses it, simply download ModMenu v2.zip and install as usual

    Install instructions:
    1. Unzip this file into your /HaremCollector_vxxx folder
    2. Play the game and enjoy the mod

    ***For Modders***
    If you are here to use this script to have an option for your mod. You can either dowload the Menu_Addon guide.txt for an explanation or continue reading here:

    Code:
    #--------------------------------------------------------------------------
    # Adding a command to the menu. Is required to have the option show up
    # @COMMANDS.push(:symbol)
    # symbol = Has to be a unique symbol but you can name it whatever you want.
    # it must be identical to the variable/switch symbol you choose.
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    # Adding a variable option to the menu use the following syntax
    # @CUSTOM_VARIABLES[:symbol]=[variable, "Name", Colour1, Colour2, min, max,
    # "Help description"]
    # symbol = Has to be a unique symbol but you can name it whatever you want.
    # it must be identical to the command symbol you choose.
    # variable = Is the ID of the variable you wanna change.
    # Name = Is option text you want to show up in the menu.
    # Colour1 = Is the color of the start of the slider.
    # Colour2 = Is the color of the end of the slider.
    # min = minimal value of the variable.
    # max = maximum value of the variable.
    # Help description = Is the help text that will show up when hovering over.
    #
    # NOTE: When choosing color for the slider you have to put in a number to choose the color. Here's a chart for which number correlates to which color
    #  Click image for larger version  Name:	Unavngivet.png Views:	0 Size:	54.6 KB ID:	3564
    #--------------------------------------------------------------------------
    
    #--------------------------------------------------------------------------
    # Adding a switch option to the menu use the following syntax
    # @CUSTOM_SWITCHES[:symbol][Switch, "Name", "Off Text", "On Text",
    # "Help Description"]
    # symbol = Has to be a unique symbol but you can name it whatever you want.
    # it must be identical to the command symbol you choose.
    # Switch = Is the ID of the switch you wanna change
    # Name = Is option text you want to show up in the menu
    # Off Text = What the off option should say
    # On Text = What the on option should say
    # Help description = Is the help text that will show up when hovering over
    #--------------------------------------------------------------------------
    
    class Window_SystemOptions < Window_Command
     alias alias_name add_modded_commands #<--- alias_name must be unique
     def add_modded_commands
     @COMMANDS.push(:symbol)
     alias_name #<--- must be the same alias_name as the above alias_name
     end
    
     alias alias_name add_modded_variables #<--- alias_name must be unique
     def add_modded_variables
     @CUSTOM_VARIABLES[:symbol]=[variable, "Name", Colour1, Colour2, min, max,
     "Help description"]
     alias_name #<--- must be the same alias_name as the above alias_name
     end
    
     alias alias_name add_modded_switches #<--- alias_name must be unique
     def add_modded_switches
     @CUSTOM_SWITCHES[:symbol][Switch, "Name", "Off Text", "On Text",
     "Help Description"]
     alias_name #<--- must be the same alias_name as the above alias_name
     end
    
    end
    You are free to include the ModMenu script itself in your mod, I however suggest not doing so, because I might update or bugfix the original code, so if you included it in yours, you would have to update aswell or your mod would revert it back. Instead I'd suggest just refering people to this page instead

    ***Credits and Special Thanks***
    Special thanks and credits to Yanfly for the script
    • although this is a heavily modifed version of his script, to allow for modding and removing unneeded options (as they are already available in the base game options menu). He did create the original script for which I used the framework
    • Link to original script: https://yanflychannel.wordpress.com/...ystem-options/
    Attached Files
    Last edited by RomeoPapa; 04-07-2021, 08:59 AM.

  • #2
    v2 Changelog
    The Mod Options will now also show up on the title screen

    Comment

    Working...
    X