RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Five-Person CMS

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 88
Back with RMVX!
Well, I've made my first script: a Five-Person CMS. It requires basic RGSS knowledge to set up the commands to the side. Has twelve slots for various feature such as Bestiaries, Party Switchers, ect. The screenshot below shows "Load" in the command list, but I took it out due to a minor bug. I also moved "Save" and "Exit" to the bottom of the command list.

Screenshot:


Script:

font:
Code: [Select]
#----------------------------------------------------------------
# Font Adjustment
# Put above ALL other scripts.
# Required for Five-Person CMS.
#----------------------------------------------------------------

  # This variable determines the default font type
  $defaultfonttype = "Tahoma"
  # This variable determines the default font size
  $defaultfontsize = 16

Window_MenuStatus
Code: [Select]
#==============================================================================
# ? Window_MenuStatus
#------------------------------------------------------------------------------
# ???????????????????????????????????
#==============================================================================
# CMS by Irgna.
#----------------------------------------------------------------

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 480, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype  # "Main" window font
    self.contents.font.size = $defaultfontsize
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 70
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 40, y + 70)
      draw_actor_name(actor, x, y + 8)
      draw_actor_class(actor, x + 144, y + 8)
      draw_actor_level(actor, x, y + 24)
      draw_actor_state(actor, x + 90, y + 24)
      draw_actor_exp(actor, x, y + 40)
      draw_actor_hp(actor, x + 236, y + 24)
      draw_actor_sp(actor, x + 236, y + 40)
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 70, self.width - 32, 80)
    end
  end
end

Scene_Menu:
Code: [Select]
#==============================================================================
# ? Scene_Menu
#------------------------------------------------------------------------------
# ???????????????????
#==============================================================================
# CMS by Irgna.
#----------------------------------------------------------------

class Scene_Menu
  #--------------------------------------------------------------------------
  # ? ?????????
  #     menu_index : ?????????????
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def main
    # ????????????
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Extra Slot"
    s6 = "Extra Slot"
    s7 = "Extra Slot"
    s8 = "Extra Slot"
    s9 = "Extra Slot"
    s10 = "Extra Slot"
    s11 = "Save"
    s12 = "Exit"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12])
    @command_window.index = @menu_index
    # ??????? 0 ????
    if $game_party.actors.size == 0
      # ?????????????????????
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # ????????
    if $game_system.save_disabled
      # ?????????
      @command_window.disable_item(4)
    end
    # ????????????
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # ?????????????
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    # ?????????
    @location_window = Window_Location.new
    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
    @location_window.dispose
    # ????????
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    # ????????
    @command_window.update
    @gold_window.update
    @status_window.update
    # ??????????????????: update_command ???
    if @command_window.active
      update_command
      return
    end
    # ???????????????????: update_status ???
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (??????????????????)
  #--------------------------------------------------------------------------
  def update_command
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ??????????
      $scene = Scene_Map.new
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ??????? 0 ??????????????????????
      if $game_party.actors.size == 0 and @command_window.index < 4
        # ??? SE ???
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # ???????????????????
      case @command_window.index
      when 0  # ????
        # ??  SE ???
        $game_system.se_play($data_system.decision_se)
        # ???????????
        $scene = Scene_Item.new
      when 1  # ???
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ???????????????????
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # ??
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ???????????????????
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # ?????
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ???????????????????
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 10  # ???
        # ????????
        if $game_system.save_disabled
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ??????????
        $scene = Scene_Save.new
      when 11  # ?????
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ????????????
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????????????)
  #--------------------------------------------------------------------------
  def update_status
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ??????????????????
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ???????????????????
      case @command_window.index
      when 1  # ???
        # ???????????? 2 ?????
        if $game_party.actors[@status_window.index].restriction >= 2
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ??????????
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # ??
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ?????????
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # ?????
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ????????????
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end

Window_Location:
Code: [Select]
#----------------------------------------------------------------
# Made by Blizzard, edited by Irgna.
# Required for Five-Person CMS.
#----------------------------------------------------------------

class Window_Location < Window_Base
 
  def initialize
    super(160, 416, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Location:")
    self.contents.font.color = normal_color
    self.contents.draw_text(68, 0, 448, 32, $game_map.name)
  end
 
end
#==============================================================================
# Scene_Title
#==============================================================================

class Scene_Title

  alias main_storm_cms_later main
  def main
    $map_infos = load_data("Data/MapInfos.rxdata")
    for key in $map_infos.keys
      $map_infos[key] = $map_infos[key].name
    end
    main_storm_cms_later
  end
 
end

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

Instructions:
Create a new script above all other scripts called "font" and paste the first script in it. Replace "Window_MenuStatus" and "Scene_Menu" with their respective scripts above. Create a new script above Main called "Window_Location" and paste the final script in it. Edit "Scene_Menu" to include any
PROPERTY OF TEABAG!!! ALL HAIL TEABAG!!!

**
Rep:
Level 87
The Leaf
I'm not exactly the greatest scripter, I"m actually just learning the basics and I would like to know how to add options where in one of the "Extra Slot" spaces, (Party Switcher, etc)
Beauty exists so that someone can tarnish it... Love exists to be lost...Innocence exists to be stolen... Souls exist to be corrupted...

****
Rep:
Level 88
Back with RMVX!
Ok, it's actually very simple. First, in the area that has a list of the options (s1="Items", s2="Equip", ect.), change the name of one of the "Extra Slot"s to whatever you want (Bestiary, Party, ect.), MAKE SURE YOU KEEP THE "" AROUND THE NAME. now go dow towards the bottom of the script, line 159, paste this script there:

Code: [Select]
      when 4  # ?????
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ????????????
        $scene = Scene_Load.new


Change "$scene = Scene_Load.new" to the call script command for the feature. That should do the trick. Also, change the "4" to the option MINUS 1 (e.g. "s1" would be "0", "s2" would be "1", ect.).
« Last Edit: March 27, 2007, 01:35:24 AM by Irgna »
PROPERTY OF TEABAG!!! ALL HAIL TEABAG!!!

**
Rep:
Level 87
The Leaf
Beauty exists so that someone can tarnish it... Love exists to be lost...Innocence exists to be stolen... Souls exist to be corrupted...

****
Rep:
Level 88
Back with RMVX!
np, btw, i love your sig
PROPERTY OF TEABAG!!! ALL HAIL TEABAG!!!