Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: lilbrudder917 on October 17, 2009, 01:07:53 pm

Title: [XP] Project CMS
Post by: lilbrudder917 on 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




Screenshots

Can look something like this...: ShowHide
(http://img266.imageshack.us/img266/7989/type2o.png)

... to this.: ShowHide
(http://img12.imageshack.us/img12/7097/type1ifyes.png)



Demo

OUTDATED: Here (http://www.filefactory.com/file/a0h6649/n/Project_CMS_zip)


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




Author's Notes

All known bugs have been fixed. If you find any, please post them so I can (try to) fix them.
Title: Re: [XP] LilBrudder917's CMS
Post by: Calintz on October 17, 2009, 01:09:07 pm
This is very beautiful ...
A very well made script for one man games.
Title: Re: [XP] LilBrudder917's CMS
Post by: C.C. rOyAl on October 17, 2009, 01:44:47 pm
i love it!

*powers up!*
Title: Re: [XP] LilBrudder917's CMS
Post by: G_G on October 17, 2009, 02:09:27 pm
Very nice *lv's up*
Title: Re: [XP] LilBrudder917's CMS
Post by: lilbrudder917 on October 17, 2009, 02:15:05 pm
Thanks, everyone, but you do know if you close the menu and try to open it again, it'll crash, right? ... Or is it just mine?
Title: Re: [XP] LilBrudder917's CMS
Post by: Calintz on October 17, 2009, 02:15:57 pm
Then you might want to fix that ...
Title: Re: [XP] LilBrudder917's CMS
Post by: lilbrudder917 on October 17, 2009, 02:31:03 pm
QuoteIntroduction
This is my first script, it's a One-Man CMS with several windows you can configure to be on or off. There's some bugs with it, but I'm not good enough with scripts yet to know what's causing them, such as where you can only open the Menu once, and if you close it, and try to open Scene_Menu again, Game.exe will crash. (If anyone can help me with this, it'd be appreciated and I'll add you to the authors/credits &thanks list)


QuoteInstructions

It's basically plug, configure, and play, excluding the fact that you can only open it once.


QuoteCompatibility

Incompatible with other CMSs.
Also pretty much incompatible with itself. Dunno why.


QuoteAuthor's Notes
Please do not move this to the Script Database! It is incomplete and has a flaw that I am trying to fix.


I'm trying, it's just I have no idea what causes it.

EDIT: I still don't know what causes it, but it's not just went you go back to Scene_Menu, it's whenever you call a new Scene after Scene_Menu, but not when you call a Scene FROM Scene_Menu.

EDIT2: I found it... I don't know WHY exactly it was happening, but I found out WHAT was doing it... You cannot use the map as the background with this script anymore, otherwise the Game.exe will crash. Fixing first post now.
Title: Re: [XP] LilBrudder917's CMS
Post by: Blizzard on October 17, 2009, 04:43:47 pm
Database'd.
Title: Re: [XP] LilBrudder917's CMS
Post by: G_G on October 17, 2009, 06:44:07 pm
Quote from: lilbrudder917 on October 17, 2009, 02:31:03 pm
QuoteIntroduction
This is my first script, it's a One-Man CMS with several windows you can configure to be on or off. There's some bugs with it, but I'm not good enough with scripts yet to know what's causing them, such as where you can only open the Menu once, and if you close it, and try to open Scene_Menu again, Game.exe will crash. (If anyone can help me with this, it'd be appreciated and I'll add you to the authors/credits &thanks list)


QuoteInstructions

It's basically plug, configure, and play, excluding the fact that you can only open it once.


QuoteCompatibility

Incompatible with other CMSs.
Also pretty much incompatible with itself. Dunno why.


QuoteAuthor's Notes
Please do not move this to the Script Database! It is incomplete and has a flaw that I am trying to fix.


I'm trying, it's just I have no idea what causes it.

EDIT: I still don't know what causes it, but it's not just went you go back to Scene_Menu, it's whenever you call a new Scene after Scene_Menu, but not when you call a Scene FROM Scene_Menu.

EDIT2: I found it... I don't know WHY exactly it was happening, but I found out WHAT was doing it... You cannot use the map as the background with this script anymore, otherwise the Game.exe will crash. Fixing first post now.


You werent disposing the map spriteset I bet. Because I made a cms thats customizable like your's but not as advanced and theres an option to use map.

So I'm sure you werent disposing it is all.
Title: Re: [XP] LilBrudder917's CMS
Post by: lilbrudder917 on October 17, 2009, 06:47:55 pm
That's probably the case, I know I didn't dispose it, but it worked when I put it in originally, even without the disposal. It only crashed once it was finished.

I'll add it in again with the disposal and see if it works.

EDIT: Yeah, that was it. I'll add it with the next update.

Update: v2.0 is up.