Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - lilbrudder917

1
Troubleshooting / Help / [XP] Scripts.rxdata recovery?
August 17, 2020, 03:52:35 pm
Hi. The worst happened to me just now.. while playtesting my project, my system crashed and now all my rxdata files are corrupt. Opening the project in RMXP now says "Failed to load actor data." That would be fine if it was just the actor data but all of them are lost. Scripts.rxdata is the only one I need. Is there any way to salvage this file? I'd be willing to pay a $50 bounty to anyone who can get my work back.

https://drive.google.com/file/d/1HTTsQUx1iAwG2Ez9nxS0fGw9XSJSFRv3/view?usp=sharing
2
Installing RMX-OS on Linux

Setting up our environment
For the purposes of this tutorial, we will be installing RMX-OS on a fresh Vultr instance running a 32-bit version of Ubuntu Server 14.04. You will need to download the ISO here, as Vultr does not natively support Ubuntu 14.04.

Once registered with Vultr, begin by deploying a new Cloud Compute instance. You can choose whichever server location you wish to use.
Spoiler: ShowHide


Make sure to upload and select the Ubuntu 14.04 ISO. Finally, choose a hostname and label - anything works. Then, deploy the server and wait for Vultr to finish up.
Spoiler: ShowHide


Click on the label you gave the server to manage your server, then click on the icon displayed below to view the console in noVNC. This is important because you won't be able to SSH into the machine until Ubuntu is installed. This step can vary a lot, so unless requested, I won't walk you through the steps to install Ubuntu - just make sure you include the OpenSSH package. Follow the steps in this guide if you need help.

Spoiler: ShowHide



Setting up Ruby
This part is easy. We're going to be installing Ruby 1.9.1 through Ruby Version Manager (RVM). To install, SSH into your server and run:

sudo apt-get install software-properties-common libmysqlclient* mysql-client
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
sudo shutdown -r 0

This will install RVM (and other RMX-OS dependencies) and also reboot the server, which is required to actually use RVM. Note that you may have to use the noVNC console again to start the server back up; it will try to reinstall Ubuntu. Press escape and then select "Boot from first disk." When the server starts back up, SSH back into it and run the following command:

rvm install ruby-1.9.1
This will take some time, but will eventually complete. Use the following command to ensure that Ruby was installed correctly.

ruby -v

If you get a Ruby not installed error, try using the following:


rvm use ruby-1.9.1


Getting our files

Next, we need to get RMX-OS and its required files onto the server. We will be using the MRMX-OS version of RMX-OS provided by Aegisrox, though I am unsure if it would make a difference if you used the official Blizzard version. Download MRMX-OS from here or here.

If you do not have an FTP client that supports SFTP, download the Filezilla FTP client here. Open Filezilla and fill in the following settings:

Host: sftp://YOUR SERVER'S IP ADDRESS HERE
Username: THE USERNAME YOU SET UP IN UBUNTU
Password: THE PASSWORD YOU SET UP IN UBUNTU
Port: LEAVE BLANK OR 22

Once connected via SFTP, the default directory will be your home directory. This is a fine spot for MRMX-OS, so create a new directory (perhaps called "game" or something similar) and enter it. Unzip the MRMX-OS zip file and upload the contents of the "MRMX-OS Server" folder into the newly created directory.

Return to your SSH shell and enter the following commands:

gem install mysql
cd ./NAME OF YOUR NEW DIRECTORY/
vi ./RMX-OS.rb

Scroll down to line 72, press Insert to enter insert mode, and replace
require "./bin/#{version}/mysql_api"
with this:
require 'mysql'
Then, press escape and type in :wq, then press enter to write and quit.

Finally, edit your cfg.ini file to point to the MySQL server you will be using. If you need help setting up the MySQL server, I would be happy to continue this guide to include that information as well. But for now, run the following code:
ruby ./RMX-OS.rb

You should get the following warning screen, or something similar:
Spoiler: ShowHide

==========================================================================
RMX-OS Server v2.0 (using Ruby v1.9.1)
MRMX-OS System Server v1.0
==========================================================================
Loading extensions...
'MOTD.rb' v1.0 loaded and initialized.
'UserLogger.rb' v1.2 loaded and initialized.
--------------------------------------------------------------------------
> Starting TCP Server at '127.0.0.1:54269'...
> Connecting to MySQL database 'rmxosdb'...
Unexpected error occured!
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
./src/SQL.rb:23:in `new'
/home/aov/game/src/SQL.rb:23:in `initialize'
/home/aov/game/src/Server.rb:81:in `new'
/home/aov/game/src/Server.rb:81:in `connect_to_database'
/home/aov/game/src/Server.rb:55:in `start'
./RMX-OS.rb:109:in `main'
./RMX-OS.rb:269:in `<main>'

RMX-OS Server is being terminated...


If you do, then that means that RMX-OS is properly running on Ubuntu, but still requires a SQL database to connect to. Let me know if you found this guide helpful; if anyone needs help setting up the SQL database I'd be happy to assist, but the bulk of the work is done! Pat yourself on the back and treat yourself to something nice.

Edit: Following the same instructions, I was able to get RMX-OS working on Ubuntu Linux 16.04 (64-bit).
3
RMXP Script Database / [XP] Escape-Enabling Skills
March 06, 2010, 01:36:30 pm
Escape-Enabling Skills
Authors: LilBrudder917
Version: 1.1
Type: Special Skill Effect
Key Term: Battle Add-on



Introduction

This script allows the player to use a skill to activate the Escape option in battle.


Features


  • Multiple Escaping Skills
  • Sound to be played if you can Escape
  • Sound to be played if you can't Escape
  • Can change Chances of Activating
  • Can use a Switch to disable Escape Attempts



Screenshots

N/A


Demo

Maybe later.


Script


Spoiler: ShowHide

#==============================================================================#
#                Escape Enabling Spells by LilBrudder917                       #
#                             v1.1 | 3-6-10                                    #
#==============================================================================#
# What it Does:                                                                #
#     +Allows player to use Skills that allow them to activate the             #
#      -Escape option.                                                         #
#                                                                              #
# Features:                                                                    #
#  + Multiple Escaping Skills                                                  #
#  + Sound to be played if you can Escape                                      #
#  + Sound to be played if you can't Escape                                    #
#  + Can change Chances of Activating                                          #
#  + Can use a Switch to disable Escape Attempts                               #
#                                                                              #
# Possibilities for an Update:                                                 #
#  + Different Skills can have Different Chances                               #
#                                                                              #
# Version History:                                                             #
#  + 1.1 : Uses 2 less Global Variables.                                       #
#==============================================================================#
module Escaping_Skills
#------------------------------------------------------------------------------#
#                              Configuration                                   #
#------------------------------------------------------------------------------#
ESCAPE_SKILLS = 81, 82, 83
Escape_Sound   = "031-Door08"
NoEscape_Sound = "045-Push01"
NoEscapeSwitch = 1
Chance = 100
OutOf = 50
#------------------------------------------------------------------------------#
# Script Below : Don't Touch Unless you know what You're Doing                 #
#------------------------------------------------------------------------------#
end

class Scene_Battle

  alias start_escaping main
  def main
    start_escaping
    @ESCAPED = 0
  end

  alias escape_skill make_skill_action_result
  def make_skill_action_result
    escape_skill
      if @active_battler.current_action.skill_id = Escaping_Skills::ESCAPE_SKILLS
        if !$game_switches[Escaping_Skills::NoEscapeSwitch]
          @ESCAPED = rand(Escaping_Skills::Chance)       
          if @ESCAPED <= Escaping_Skills::OutOf
            Audio.se_play("Audio/SE/"+Escaping_Skills::NoEscape_Sound, 100, 100)
            $game_temp.battle_can_escape = false
            @party_command_window = Window_PartyCommand.new
          else
            Audio.se_play("Audio/SE/"+Escaping_Skills::Escape_Sound, 100, 100)
            $game_temp.battle_can_escape = true
            @party_command_window = Window_PartyCommand.new
          end
        end
      end
    end
  end
 
class Window_PartyCommand < Window_Selectable
  alias escape_fix initialize
  def initialize
    escape_fix
    if $game_temp.battle_can_escape
    draw_item(1, normal_color)
    end
  end
end





Instructions

Put below default scripts and above Main. Configure. Play.


Compatibility

May cause incompatibility problems with exotic Battle Systems.


Credits and Thanks


  • Me, for making it, I guess.



Author's Notes

I've had this idea for a while. Finally got around to making it. Enjoy.
4
RMXP Script Database / [XP] TitleSwap
December 30, 2009, 09:46:09 pm
TitleSwap
Authors: LilBrudder917
Version: 1.0
Type: Custom Title
Key Term: Title / Save / Load / GameOver Add-on



Introduction

This script allows the player to change the title screen graphic by pressing an arrow key. Script version of MenuSwap.


Features


  • Allows more than one title screen graphic to be used.
  • Changes by using the arrow keys.



Screenshots

GIF'd: ShowHide



Demo

Click here for it!


Script

Spoiler: ShowHide
#==============================================================================
# TitleSwap by LilBrudder917
# Version 1.0
#------------------------------------------------------------------------------
# Edits Scene_Title. Shouldn't cause serious compatibility issues, though.
#
#  FEATURES:
#   + Allows the player to change the title image using < and > keys.
#
#  HOW TO USE:
#
# Have multiple title images in your Title Folder all beginning with the prefix
# you chose and ending with the number that they will be.
#                                       (title_1 before title_2)
#==============================================================================
#                              CONFIGURATION                                  
#==============================================================================

$TITLEIMG = "title_"             # Title Image Prefix
$TITLELMT = 4                    # Title Image Limit

#==============================================================================
#                               SCRIPT BELOW
#==============================================================================

class Scene_Title
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 
 attr_accessor :title_imgspc
 
 def main
   # If battle test
   if $BTEST
     battle_test
     return
   end
   # Load database
   $data_actors        = load_data("Data/Actors.rxdata")
   $data_classes       = load_data("Data/Classes.rxdata")
   $data_skills        = load_data("Data/Skills.rxdata")
   $data_items         = load_data("Data/Items.rxdata")
   $data_weapons       = load_data("Data/Weapons.rxdata")
   $data_armors        = load_data("Data/Armors.rxdata")
   $data_enemies       = load_data("Data/Enemies.rxdata")
   $data_troops        = load_data("Data/Troops.rxdata")
   $data_states        = load_data("Data/States.rxdata")
   $data_animations    = load_data("Data/Animations.rxdata")
   $data_tilesets      = load_data("Data/Tilesets.rxdata")
   $data_common_events = load_data("Data/CommonEvents.rxdata")
   $data_system        = load_data("Data/System.rxdata")
   @title_imgspc       = 1
   
   # Make system object
   $game_system = Game_System.new
   # Make title graphic
   @sprite = Sprite.new
   @sprite.bitmap = RPG::Cache.title($data_system.title_name)
   # Make command window
   s1 = "New Game"
   s2 = "Continue"
   s3 = "Shutdown"
   @command_window = Window_Command.new(192, [s1, s2, s3])
   @command_window.back_opacity = 160
   @command_window.x = 320 - @command_window.width / 2
   @command_window.y = 288
   # Continue enabled determinant
   # Check if at least one save file exists
   # If enabled, make @continue_enabled true; if disabled, make it false
   @continue_enabled = false
   for i in 0..3
     if FileTest.exist?("Save#{i+1}.rxdata")
       @continue_enabled = true
     end
   end
   # If continue is enabled, move cursor to "Continue"
   # If disabled, display "Continue" text in gray
   if @continue_enabled
     @command_window.index = 1
   else
     @command_window.disable_item(1)
   end
   # Play title BGM
   $game_system.bgm_play($data_system.title_bgm)
   # Stop playing ME and BGS
   Audio.me_stop
   Audio.bgs_stop
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of command window
   @command_window.dispose
   # Dispose of title graphic
   @sprite.bitmap.dispose
   @sprite.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update command window
   @command_window.update
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Branch by command window cursor position
     case @command_window.index
     when 0  # New game
       command_new_game
     when 1  # Continue
       command_continue
     when 2  # Shutdown
       command_shutdown
     end
   elsif Input.trigger?(Input::LEFT)
     if @title_imgspc == 1
       @title_imgspc = $TITLELMT
     else
       @title_imgspc = @title_imgspc - 1
     end
     @sprite.bitmap = RPG::Cache.title($TITLEIMG + @title_imgspc.to_s)
   elsif Input.trigger?(Input::RIGHT)
     if @title_imgspc == $TITLELMT
       @title_imgspc = 1
     else
       @title_imgspc = @title_imgspc + 1
     end
     @sprite.bitmap = RPG::Cache.title($TITLEIMG + @title_imgspc.to_s)
   end
 end
 #--------------------------------------------------------------------------
 # * Command: New Game
 #--------------------------------------------------------------------------
 def command_new_game
   # Play decision SE
   $game_system.se_play($data_system.decision_se)
   # Stop BGM
   Audio.bgm_stop
   # Reset frame count for measuring play time
   Graphics.frame_count = 0
   # Make each type of game object
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
   # Set up initial party
   $game_party.setup_starting_members
   # Set up initial map position
   $game_map.setup($data_system.start_map_id)
   # Move player to initial position
   $game_player.moveto($data_system.start_x, $data_system.start_y)
   # Refresh player
   $game_player.refresh
   # Run automatic change for BGM and BGS set with map
   $game_map.autoplay
   # Update map (run parallel process event)
   $game_map.update
   # Switch to map screen
   $scene = Scene_Map.new
 end
 #--------------------------------------------------------------------------
 # * Command: Continue
 #--------------------------------------------------------------------------
 def command_continue
   # If continue is disabled
   unless @continue_enabled
     # Play buzzer SE
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   # Play decision SE
   $game_system.se_play($data_system.decision_se)
   # Switch to load screen
   $scene = Scene_Load.new
 end
 #--------------------------------------------------------------------------
 # * Command: Shutdown
 #--------------------------------------------------------------------------
 def command_shutdown
   # Play decision SE
   $game_system.se_play($data_system.decision_se)
   # Fade out BGM, BGS, and ME
   Audio.bgm_fade(800)
   Audio.bgs_fade(800)
   Audio.me_fade(800)
   # Shutdown
   $scene = nil
 end
 #--------------------------------------------------------------------------
 # * Battle Test
 #--------------------------------------------------------------------------
 def battle_test
   # Load database (for battle test)
   $data_actors        = load_data("Data/BT_Actors.rxdata")
   $data_classes       = load_data("Data/BT_Classes.rxdata")
   $data_skills        = load_data("Data/BT_Skills.rxdata")
   $data_items         = load_data("Data/BT_Items.rxdata")
   $data_weapons       = load_data("Data/BT_Weapons.rxdata")
   $data_armors        = load_data("Data/BT_Armors.rxdata")
   $data_enemies       = load_data("Data/BT_Enemies.rxdata")
   $data_troops        = load_data("Data/BT_Troops.rxdata")
   $data_states        = load_data("Data/BT_States.rxdata")
   $data_animations    = load_data("Data/BT_Animations.rxdata")
   $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
   $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
   $data_system        = load_data("Data/BT_System.rxdata")
   # Reset frame count for measuring play time
   Graphics.frame_count = 0
   # Make each game object
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
   # Set up party for battle test
   $game_party.setup_battle_test_members
   # Set troop ID, can escape flag, and battleback
   $game_temp.battle_troop_id = $data_system.test_troop_id
   $game_temp.battle_can_escape = true
   $game_map.battleback_name = $data_system.battleback_name
   # Play battle start SE
   $game_system.se_play($data_system.battle_start_se)
   # Play battle BGM
   $game_system.bgm_play($game_system.battle_bgm)
   # Switch to battle screen
   $scene = Scene_Battle.new
 end
end





Instructions

Add title graphics into the Title folder, naming them "title_1", "title_2", and so on, unless you change the image prefix. If some graphics aren't showing in-game, try changing the limit in the script ($TITLELMT is lower than the amount of graphics you have in the folder). Also, if the limit is higher than the amount of graphics in the Title folder, the game will crash when the player tries to change to it.


Compatibility

Shouldn't be any serious compatibility issues, but if there are any, it'd probably be with custom Scene_Titles.


Credits and Thanks


  • Enterbrain



Author's Notes

This is a script version of MenuSwap. They both accomplish the same thing.
5
RMXP Script Database / [XP] Project CMS
October 17, 2009, 01:07:53 pm
Project CMS
Authors: LilBrudder917
Version: 2.0
Type: Custom Menu System
Key Term: Custom Menu System



Introduction
This is my first script, it's a One-Man CMS with several windows you can configure to be on or off. There are also several non-RTP scripts included being used specifically for the CMS.


Features


  • Window_Gold, Window_PlayTime, Window_Steps can all be turned on or off.
  • Window_Notes, a basic script where you can set memos to send to your game players, can be turned on/off.
  • Window_Variable, a basic script that shows a variable, can be turned on or off.
  • Window_RealTime, a script that shows the time on your internal clock, can be turned on or off.
  • Can rename/remove any command
  • Can choose between having no background or a picture as your background.
  • Can have a face image instead of sprite, and if activated and file is missing, sprite will be used as if the option was disabled.
  • Can add your own logo to the bottom right corner of the menu with dimensions close to 150x60.
  • Can move around the text in Window_MenuStatus to your liking.
  • Can move around and resize all windows to your liking.
  • Window_Location, showing the map's name. Can be turned on or off to your liking.
  • Window_RealTime can now be set to be a 24-hour or 12-hour clock (with AM/PM).
  • All of the X and Ys are configurable now, along with window subtitles.
  • New: Doesn't create any Global Variables.
  • New: Window_Notes text is now changed with a Script Call instead of variable change.



Screenshots

Can look something like this...: ShowHide

... to this.: ShowHide



Demo

OUTDATED: Here


Script
Place above Main (and I'm guessing Custom Message Scripts).

#==============================================================================
# Project CMS by lilbrudder917
# Version 2.0
#------------------------------------------------------------------------------
# Overrides Scene_Menu and Window_MenuStatus. Rewrites the "Draw Level" parts of
# Window_Base to change settings.
#
# Version History:
#   2.0 : Now you can change the Window_Notes text with
#   " $game_system.FirstLine = "_" "
#   " $game_system.SecondLine = "_" "
#   " $game_system.ThirdLine = "_" "
#   " $game_system.FourthLine = "_" "
#   " $game_system.FifthLine = "_" "
#==============================================================================
module ProCMS
#==============================================================================
# CONFIGURATION
#==============================================================================

ItemName    = "Inventory"   # Default is Item
SkillName   = "Cast Spell"  # Default is Skill
EquipName   = "Wear"        # Default is Equip
StatusName  = "Status"      # Default is Status
SaveName    = "Save Data"   # Default is Save
EndName     = "Quit Game"   # Default is End Game
CommandW    = 150           # Width of the Command Window
Custom_Map  = false         # If true, you can have a picture as a background.
Map_Picture = "mappic" # If Custom_Map = true, this will be the background.
Facesets    = true          # If true and the face file is missing, the actor's
                                                   #sprite will be used instead
FaceIMG     = "Face"        # Filename for the face image.
FFILETYPE   = ".png"        # Face File Type
CornerLogo  = true          # In the bottom right corner, want a 148x61 icon?
LogoIcon    = "logoicon"    # Name of icon
LogoFType   = ".png"        # Icon File Type
MAXACTORS     = 1             # 1 Seriously Recommended, otherwise you'll need to
                            # do a lot of huge editing.
       

#=============================================================================
# Scene_Menu Window Add-ons
#=============================================================================

MapBG    = true         # If true, the map will be your background
UseNotes = true         # To use Window_Notes, have this true.
UsePTime = true         # To use Window_PlayTime, have this true.
UseRTime = true         # To use Window_RealTime, have this true.
RTHVar = 2               # Variable used for storing hours
RTMVar = 3               # Variable used for storing minutes
RTAPVar= 4               # Variable used for storing AM/PM
RTSVar = 5               # Variable used for storing seconds
TwelClock = true        # 12-Hour Clock if true, false = 24-Hour Clock
UseVar   = true         # To use Window_Variable, have this true.
UseSteps = true         # To use Window_Steps, have this true.
UseGold  = true         # To use Window_Gold, have this true.
UseLoca  = true         # To use Window_Location, have this true.

###############################################################################
#                           Coordinate Controls                               #
#-----------------------------------------------------------------------------#
#    Unless you know what you are doing, I don't recommend touching these.    #
#           These are the display settings of Window_MenuStatus.              #
###############################################################################


ShowName  = true       # Show Actor's Name?
NameX     = 135        # Actor_Name X Position
NameY     = 0          # Actor_Name Y Position
ShowClass = true       # Show Actor's Class?
ClassX    = 128        # Actor_Class X Position
ClassY    = 30         # Actor_Class Y Position
ShowLevel = true       # Show Actor's Level?
LevelX    = 0          # Actor_Level X Position
LevelY    = 139        # Actor_Level Y Position
LevelT    = "Level"    # Custom Title for Level?
ShowState = true       # Show Actor_State?
StateX    = 123        # Actor_State X Position
StateY    = 50         # Actor_State Y Position
ShowHP    = true       # Show HP/MaxHP String?
UseBARS   = nil        # Coming Soon
HPX       = 0          # Hitpoints String X Position
HPY       = 100        # Hitpoints String Y Position
ShowSP    = true       # Show SP/MaxSP String?
SpecX     = 0          # Specpoints String X Position
SpecY     = 125        # Specpoints String Y Position
ShowEXP   = true       # Show Experience String?
ExperX    = 0          # Experience String X Position
ExperY    = 185        # Experience String Y Position
CommandX  = 488        # Window_Command X Position
CommandY  = 0          # Window_Command Y Position
WINNOTES_X= 2          # Window_Notes X Position
WINNOTES_Y= 242        # Window_Notes Y Position
RealTimeX = 488        # Window_RealTime X Position
RealTimeY = 320        # Window_RealTime Y Position
PlayTimeX = 488        # Window_PlayTime X Position
PlayTimeY = 224        # Window_PlayTime Y Position
VariableX = 243        # Window_Variable X Position
VariableY = 66         # Window_Variable Y Position
WStepX    = 243        # Window_Steps X Position
WStepY    = 163        # Window_Steps Y Position
WGoldX    = 243        # Window_Gold X Position
WGoldY    = 2          # Window_Gold Y Position
PLogoX    = 490        # Game_Logo X Position
PLogoY    = 418        # Game_Logo Y Position
WMStatusX = 2          # Window_MenuStatus X Position
WMStatusY = 2          # Window_MenuStatus Y Position
LOCATION_X= 2
LOCATION_Y= 430
VariTitle = "Bank"     # Text in Window_Variable
VariShoNum= 1          # Variable used in Window_Variable
GoldName  = "Gold"     # Currency Name
StepName  = "Steps"    # Text in Window_Steps
PlTiName  = "Play Time"# Text in Window_PlayTime
NoteVName = "Notes"    # Text in Window_Notes
CurTiName = "Time"     # Text in Window_RealTime
LocaName  = "Location:"# Text in Window_Location
end

#-------------------------------------------------------------------------------
# End of Menu Configuration
#-------------------------------------------------------------------------------
class Game_System
  attr_accessor :FirstLine
  attr_accessor :SecondLine
  attr_accessor :ThirdLine
  attr_accessor :FourthLine
  attr_accessor :FifthLine

  alias windownotes_words initialize
  def initialize
   
#-------------------------------------------------------------------------------
# Window_Notes Default Configuration
#-------------------------------------------------------------------------------

    @FirstLine  = "Welcome to the Menu! This Window is called"
    @SecondLine = "the Notes Window! Text automatically aligns"
    @ThirdLine  = "to the right side of the Window, and the"
    @FourthLine = "Window stores up to 5 lines per message!"
    @FifthLine  = " "
    windownotes_words
  end
end

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 240, 240)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 0
      y = 0
      actor = $game_party.actors[i]
      if ProCMS::Facesets == true #Facesets True?
      if FileTest.exist?("Graphics/Pictures/" + ProCMS::FaceIMG + ProCMS::FFILETYPE) #File Exist
      @face_file = ProCMS::FaceIMG + ProCMS::FFILETYPE
      self.contents.blt(x, y, RPG::Cache.picture(@face_file), Rect.new(x, y, 112, 112))
      else #File Not Exist
      draw_actor_graphic(actor, 24, 56)
      end #End File Check
      else #Facesets Else
      draw_actor_graphic(actor, 24, 56)
    end #Faceset End
     if ProCMS::ShowName == true
      draw_actor_name(actor, ProCMS::NameX, ProCMS::NameY)
      end
      if ProCMS::ShowLevel == true
      draw_actor_level(actor, 0, 0)
      end
      if ProCMS::ShowState == true
      draw_actor_state(actor, ProCMS::StateX, ProCMS::StateY)
      end
      if ProCMS::ShowEXP == true
      draw_actor_exp(actor, ProCMS::ExperX, ProCMS::ExperY)
      end
      if ProCMS::ShowClass == true
      draw_actor_class(actor, ProCMS::ClassX, ProCMS::ClassY)
      end
      if ProCMS::ShowHP == true
      draw_actor_hp(actor, ProCMS::HPX, ProCMS::HPY)
      end
      if ProCMS::ShowSP == true
      draw_actor_sp(actor, ProCMS::SpecX, ProCMS::SpecY)
      end
    end
  end

  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
  end
#==============================================================================
# End Window_MenuStatus
#==============================================================================

# Disallowing a Custom Map and the Map for a background.
if ProCMS::MapBG && ProCMS::Custom_Map == true
  print "Both MapBG and Custom_Map cannot be on at the same time! Turning off Custom_Map."
  ProCMS::Custom_Map = false
end



class Game_Party
  $actorsize = ProCMS::MAXACTORS
end

#==============================================================================
# Window Base Level Edit
#==============================================================================
class Window_Base
  def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(ProCMS::LevelX, 160, 32, 32, ProCMS::LevelT, 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(ProCMS::LevelX + 32, 160, 24, 32, actor.level.to_s, 2)
  end
end


#=============================================================================
# Game Party Limit
#=============================================================================
class Game_Party
  def add_actor(actor_id)
    # Get actor
    actor = $game_actors[actor_id]
    # If the party has less than 4 members and this actor is not in the party
    if @actors.size < 1 and not @actors.include?(actor)
      # Add actor
      @actors.push(actor)
      # Refresh player
      $game_player.refresh
    end
  end
 
end

class PCMS_Steps < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 245, 78)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -5, 120, 32, ProCMS::StepName)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 16, 200, 32, $game_party.steps.to_s, 2)
  end
end

#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================

class PCMS_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 245, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    cx = contents.text_size(ProCMS::GoldName).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 180-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(184-cx, 0, cx, 32, ProCMS::GoldName, 2)
  end
end

#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
#  This window displays play time on the menu screen.
#==============================================================================

class PCMS_PlayTime < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 150, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 100, 32, ProCMS::PlTiName)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 100, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#=============================================================================
# End Window_Steps
#==============================================================================

#==============================================================================
# ** Window_Notes by lilbrudder917
#------------------------------------------------------------------------------
#  This window displays custom-made notes made for the menu screen, but
#  can be called anywhere.
#==============================================================================
class Window_Notes < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(240, 20, 485, 190)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, ProCMS::NoteVName)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 350, 32, $game_system.FirstLine, 2)
    self.contents.draw_text(4, 64, 350, 32, $game_system.SecondLine, 2)
    self.contents.draw_text(4, 96, 350, 32, $game_system.ThirdLine, 2)
    self.contents.draw_text(4, 128, 350, 32, $game_system.FourthLine, 2)
    self.contents.draw_text(4, 160, 350, 32, $game_system.FifthLine, 2)
  end
 
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
      refresh
    end
  end

#==============================================================================
# ** Window_Location by lilbrudder917
#------------------------------------------------------------------------------
#  This window displays the map's name.
#==============================================================================

class Window_Location < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 485, 48)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end

  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -10, 120, 32, ProCMS::LocaName)
    self.contents.font.color = normal_color
    cx = contents.text_size(ProCMS::LocaName).width
   
    self.contents.draw_text(cx+30, -10, 120, 32, $game_map.name)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
      refresh
    end
end


  #-------------------------------------------------------------------------
  # * Define Map Title
  #-------------------------------------------------------------------------
    class Scene_Title
      alias locationname main
      def main
        locationname
        $map_infos = load_data('Data/MapInfos.rxdata')
        $map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
    end
  end

    class Game_Map
      def name
        return $map_infos[@map_id]
      end
    end

#==============================================================================
# ** Window_Variable by lilbrudder917
#------------------------------------------------------------------------------
#  This window displays a variable made for the menu screen, but can be called
#  anywhere.
#==============================================================================

class Window_Variable < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 245, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, ProCMS::VariTitle)
    text = "#{$game_variables[ProCMS::VariShoNum]}"
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
      refresh
    end
  end

#==============================================================================
# ** Window_RealTime by lilbrudder917
#------------------------------------------------------------------------------
#  This window displays the time stored on your computer's internal clock,
#  made for the menu screen, but can be called anywhere.
#==============================================================================


class Window_RealTime < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @time_stamp = Time.new
    if ProCMS::TwelClock == true
    $game_variables[ProCMS::RTHVar] = @time_stamp.strftime("%I") # Hour, 12-Hour Format
    $game_variables[ProCMS::RTMVar] = @time_stamp.strftime("%M") # Minutes
    $game_variables[ProCMS::RTAPVar] = @time_stamp.strftime("%p")# AM/PM
    $game_variables[ProCMS::RTSVar] = @time_stamp.strftime("%S") # Seconds
    else
    $game_variables[ProCMS::RTHVar] = @time_stamp.strftime("%H") # Hour, 24-Hour Format
    $game_variables[ProCMS::RTMVar] = @time_stamp.strftime("%M") # Minutes
    $game_variables[ProCMS::RTSVar] = @time_stamp.strftime("%S") # Seconds
    end
    super(0, 0, 150, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 100, 32, ProCMS::CurTiName)
    if ProCMS::TwelClock == true
    text = "#{$game_variables[ProCMS::RTHVar]}: #{$game_variables[ProCMS::RTMVar]}: #{$game_variables[ProCMS::RTSVar]} #{$game_variables[ProCMS::RTAPVar]}"
   else
    text = "#{$game_variables[ProCMS::RTHVar]}: #{$game_variables[ProCMS::RTMVar]}: #{$game_variables[ProCMS::RTSVar]}"
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 100, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
      refresh
    end
  end

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
 
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
  #--------------------------------------------------------------------------
  # * Menu Background
  #--------------------------------------------------------------------------
    if ProCMS::MapBG == true
    @map = Spriteset_Map.new
    end
    if ProCMS::Custom_Map == true
      @sprite = Sprite.new
      @sprite.bitmap = RPG::Cache.picture(ProCMS::Map_Picture)
    end
 
    # Make command window
    s1 = ProCMS::ItemName
    s2 = ProCMS::SkillName
    s3 = ProCMS::EquipName
    s4 = ProCMS::StatusName
    s5 = ProCMS::SaveName
    s6 = ProCMS::EndName
    @command_window = Window_Command.new(ProCMS::CommandW, [s1, s2, s3, s4, s5, s6])
    @command_window.x = ProCMS::CommandX
    @command_window.y = ProCMS::CommandY
    @command_window.index = 0
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    if ProCMS::UseNotes == true
     @mnotes_window   = Window_Notes.new
     @mnotes_window.x = ProCMS::WINNOTES_X
     @mnotes_window.y = ProCMS::WINNOTES_Y
    end
    if ProCMS::UseLoca == true
    @location_window = Window_Location.new
    @location_window.x = ProCMS::LOCATION_X
    @location_window.y = ProCMS::LOCATION_Y
    end
    # Make play time window
    if ProCMS::UsePTime == true
    @playtime_window = PCMS_PlayTime.new
    @playtime_window.x = ProCMS::PlayTimeX
    @playtime_window.y = ProCMS::PlayTimeY
    end
    if ProCMS::UseRTime  == true
    @realtime_window = Window_RealTime.new
    @realtime_window.x = ProCMS::RealTimeX
    @realtime_window.y = ProCMS::RealTimeY
    end
    if ProCMS::UseVar  == true
    @vartime_window = Window_Variable.new
    @vartime_window.x = ProCMS::VariableX
    @vartime_window.y = ProCMS::VariableY
    end
    #Make steps window
    if ProCMS::UseSteps ==true
    @steps_window = PCMS_Steps.new
    @steps_window.x = ProCMS::WStepX
    @steps_window.y = ProCMS::WStepY
    end
    # Make gold window
    if ProCMS::UseGold == true
    @gold_window = PCMS_Gold.new
    @gold_window.x = ProCMS::WGoldX
    @gold_window.y = ProCMS::WGoldY
    end
    if ProCMS::CornerLogo == true

    @image = Sprite.new
    @image.bitmap = RPG::Cache.picture(ProCMS::LogoIcon)
    @image.x = ProCMS::PLogoX
    @image.y = ProCMS::PLogoY
     
    end
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = ProCMS::WMStatusX
    @status_window.y = ProCMS::WMStatusY
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    if ProCMS::MapBG == true
    @map.dispose
    end
    if ProCMS::UseLoca == true
    @location_window.dispose
    end
    if ProCMS::UseNotes == true
    @mnotes_window.dispose
    end
    if ProCMS::UsePTime == true
    @playtime_window.dispose
    end
    if ProCMS::UseRTime == true
    @realtime_window.dispose
    end
    if ProCMS::UseVar == true
    @vartime_window.dispose
    end
    if ProCMS::UseSteps ==true
    @steps_window.dispose
    end
    if ProCMS::UseGold == true
    @gold_window.dispose
    end
    if ProCMS::CornerLogo == true
      @image.dispose
    end   
    @status_window.dispose

  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    if ProCMS::UseNotes == true
    @mnotes_window.update
    end
    if ProCMS::UseLoca == true
    @location_window.update
    end
    if ProCMS::UsePTime == true
    @playtime_window.update
    end
    if ProCMS::UseRTime == true
    @realtime_window.update
    end
    if ProCMS::UseVar == true
    @vartime_window.update
    end
    if ProCMS::UseSteps ==true
    @steps_window.update
    end
    if ProCMS::UseGold == true
    @gold_window.update
    end
    if ProCMS::CornerLogo == true
      @image.update
    end
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 5  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return

    end

      end
    end
  end



Instructions

It's basically plug, (configure if you want), and play.


Compatibility

Incompatible with other CMSs.


Credits and Thanks


  • Enterbrain for the RTP Script



Author's Notes

All known bugs have been fixed. If you find any, please post them so I can (try to) fix them.
6
I'm pretty sure the first one isn't possible, but I'll ask anyway.

1) Is it possible to have the BGM stop when the RMXP game window is inactive and then start where it was again once the window is active again?

2) Is it possible to have all events continue when the RMXP game window is inactive?
(Example: Conditional Branch, every 200 frames, 300 gold is obtained)

If it is, please tell me how, if not, well, then you can't tell me how.
7
Event System Database / MenuSwap
April 29, 2009, 08:29:03 pm
MenuSwap
Version: 1.0
Type: Event System



Introduction

At the moment, the instructions are incorrect; I forgot to add the C Button's use. If you want to use this event correctly, please download the demo.
This event allows you to have multiple menus by pressing an arrow key. Very useful for those who get bored of one Title Menu easily.


Features


  • Changable Titlescreen, without going into the database.
  • When changing screens, the selection stays at the same position.



Screenshots

Doesn't really make sense, just think of pressing a button and getting a new titlemenu.


Demo

Right here!


Instructions
Just make your character(s) start onto an empty map with this as an event:
Spoiler: ShowHide










Credits and Thanks


  • Myself.



Author's Notes

This was my first script, whether it be evented or scripted. Please give constructive feedback.

Requires 2 Variables, 1 map, and a Titleskip Script.
I've seen events like this before, but never saw one allowing you to change the title image- in game.
8
I'm trying to make it so that, once you get a certain amount of jobs done, a variable goes up by one or multiple, and once you get to a certain number in the variables, the Maximum Level goes up. Here is what I have, and I thought it would work, but it didn't:
  case $game_variables[76]
  when 0
  $FINAL_LVL  = 255
  when 92
  $FINAL_LVL  = 371
  when 108
  $FINAL_LVL  = 371
  when 278
  $FINAL_LVL  = 456
  when 451
  $FINAL_LVL  = 700
  else
  $FINAL_LVL  = 200


EDIT: The error message was:
"Script 'Ultimate Levels' line 14: NoMethodError occured.
Undefined method `[]' for nil:NilClass"


I'd really like it if someone could help me with this. I'm not very good with RGSS, but I'm learning.