Author Topic: [XP] Project CMS  (Read 10010 times)

Offline lilbrudder917

  • SDK's fault, I swear.
  • Awakened Visionist
  • **
  • Posts: 66
  • LV: 21
  • Gender: Male
  • It's a shroom.
    • View Profile
[XP] Project CMS
« on: October 17, 2009, 07: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

(click to show/hide)
(click to show/hide)

Demo

OUTDATED: Here

Script
Place above Main (and I'm guessing Custom Message Scripts).
Code: [Select]
#==============================================================================
# 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.
« Last Edit: March 06, 2010, 11:48:56 PM by Breloom Trainer Brudder »

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #1 on: October 17, 2009, 07:09:07 PM »
This is very beautiful ...
A very well made script for one man games.

Offline C.C. rOyAl

  • Ethereal Devastator
  • ****
  • Posts: 381
  • LV: 2
  • Gender: Male
  • CP's only concept artist!
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #2 on: October 17, 2009, 07:44:47 PM »
i love it!

*powers up!*
(click to show/hide)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #3 on: October 17, 2009, 08:09:27 PM »
Very nice *lv's up*

Offline lilbrudder917

  • SDK's fault, I swear.
  • Awakened Visionist
  • **
  • Posts: 66
  • LV: 21
  • Gender: Male
  • It's a shroom.
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #4 on: October 17, 2009, 08: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?

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #5 on: October 17, 2009, 08:15:57 PM »
Then you might want to fix that ...

Offline lilbrudder917

  • SDK's fault, I swear.
  • Awakened Visionist
  • **
  • Posts: 66
  • LV: 21
  • Gender: Male
  • It's a shroom.
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #6 on: October 17, 2009, 08:31:03 PM »
Quote
Introduction
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)

Quote
Instructions

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

Quote
Compatibility

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

Quote
Author'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.
« Last Edit: October 17, 2009, 09:00:31 PM by lilbrudder917 »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19906
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] LilBrudder917's CMS
« Reply #7 on: October 17, 2009, 10:43:47 PM »
Database'd.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #8 on: October 18, 2009, 12:44:07 AM »
Quote
Introduction
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)

Quote
Instructions

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

Quote
Compatibility

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

Quote
Author'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.

Offline lilbrudder917

  • SDK's fault, I swear.
  • Awakened Visionist
  • **
  • Posts: 66
  • LV: 21
  • Gender: Male
  • It's a shroom.
    • View Profile
Re: [XP] LilBrudder917's CMS
« Reply #9 on: October 18, 2009, 12:47:55 AM »
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.
« Last Edit: March 06, 2010, 11:49:36 PM by Breloom Trainer Brudder »