Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [XP] Alissa's Quest CMS

Topik sebelumnya Topik selanjutnya Go down 
[XP] Alissa's Quest CMS Empty2011-07-31, 23:38
Post[XP] Alissa's Quest CMS
#1
bungatepijalan 
Moe Princess
bungatepijalan

Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer
Awards:
[XP] Alissa's Quest CMS Vide
Alissa's Quest CMS
Version: 1.0
Type: Custom Menu System


Pengenalan

CMS (custom menu system) ini menambahkan menu Quests di bagian Main Menu. Quests digunakan untuk melihat misi-misi yang telah dilaksanakan/belum.

Spoiler:



Petunjuk & Pemasangan

Di class Quests sudah disediakan fungsi buat manipulasi quest, yaitu: $quests.add_quest(objective) dan $quests.mark_quest(idx,mark). Pada penggunaannya di event, untuk menambahkan quest, gunakan event command (nomor variable nya sesuai kebutuhan anda, untuk menyimpan indeks quest baru):
Code:
@>Script: $game_variables[1] = $quests.add_quest("Sample Quest")
untuk menandai bahwa quest yg diberi 'telah dilaksanakan', gunakan event command:
Code:
@>Script: $quests.mark_quest($game_variables[1],1)

Script nya silahkan taruh diatas "Main"
Btw, kalo ngalamin masalah missing font saat jalanin demo, berarti anda butuh font "Gabriola", atau hilangin bagian di "Main":
Code:
  Font.default_name = "Gabriola"
  Font.default_size = 40



Screenshot
Spoiler:



Demo

Link: http://www.media*fire.com/?eomaunf7863yf6f


Script

Quest CMS - Scene_Quest:
Code:
#==============================================================================
# Alissa's Quest CMS
# for RPG Maker XP
# Version 1.0
#==============================================================================
# Information:
#  This CMS (custom menu system) adds Quests menu, allowing you to see
#  your missions you have to do.
#
#  To add a quest, use event command:
#    @>Script: $game_variables[1] = $quests.add_quest("Sample Quest")
#  To mark the quest as completed (1)/incomplete (0), use event command:
#    @>Script: $quests.mark_quest($game_variables[1],1)
#
# Credit
#  Alissa Liu
#
#==============================================================================

#==============================================================================
# ** Quests
#------------------------------------------------------------------------------
# Quest container class. Refer to "$quests" for the instance of
# this class.
#==============================================================================

class Quests
  attr_reader :quest_name
  attr_reader :quest_mark
  def initialize
    @quest_name = Array.new
    @quest_mark = Array.new
  end
  def add_quest(objective)
    @quest_name.push(objective)
    @quest_mark.push(0)
    return @quest_name.length-1
  end
  def mark_quest(idx,mark)
    @quest_mark[idx] = mark
  end
end

#==============================================================================
# ** Window_Quests
#------------------------------------------------------------------------------
# This class shows quest list in Scene_Quest.
#==============================================================================

class Window_Quests < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 640, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    if $quests.quest_name.length>0
      for i in 0..$quests.quest_name.length-1
        if $quests.quest_mark[i]==1
          mark = "+"
          mark2 = " (completed)"
        else
          mark = "-"
          mark2 = ""
        end
        self.contents.draw_text(0, 32*i, 640, 32, mark+" "+$quests.quest_name[i]+mark2)
      end
    else
      self.contents.draw_text(0, 0, 640, 32, "(Quests not discovered yet)")
    end
  end
end

#==============================================================================
# ** Scene_Quest
#------------------------------------------------------------------------------
#  This class performs Scene_Quest.
#==============================================================================

class Scene_Quest
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    @questit_window = Window_Help.new
    @questit_window.set_text("Quests")
    @quest_window = Window_Quests.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @questit_window.dispose
    @quest_window.dispose
  end
  def update
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(6)
      return
    end
  end
end

Quest CMS - Scene_Menu:
Code:
#==============================================================================
# Alissa's Quest CMS
# for RPG Maker XP
# Version 1.0
#==============================================================================
# Information:
#  This CMS (custom menu system) adds Quests menu, allowing you to see
#  your missions you have to do.
#
#  To add a quest, use event command:
#    @>Script: $game_variables[1] = $quests.add_quest("Sample Quest")
#  To mark the quest as completed (1)/incomplete (0), use event command:
#    @>Script: $quests.mark_quest($game_variables[1],1)
#
# Credit
#  Alissa Liu
#
#==============================================================================

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "End Game"
    s7 = "Quests"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    # 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
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    # 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
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  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
      when 6  # quests
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_Quest.new
      end
      return
    end
  end
end

Quest CMS - Scene_Title:
Code:
#==============================================================================
# Alissa's Quest CMS
# for RPG Maker XP
# Version 1.0
#==============================================================================
# Information:
#  This CMS (custom menu system) adds Quests menu, allowing you to see
#  your missions you have to do.
#
#  To add a quest, use event command:
#    @>Script: $game_variables[1] = $quests.add_quest("Sample Quest")
#  To mark the quest as completed (1)/incomplete (0), use event command:
#    @>Script: $quests.mark_quest($game_variables[1],1)
#
# Credit
#  Alissa Liu
#
#==============================================================================

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # * 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
    $quests = Quests.new
    $scene = Scene_Map.new
  end
end


Credit

  • Alissa Liu


Terakhir diubah oleh bungatepijalan tanggal 2011-08-01, 00:35, total 1 kali diubah
[XP] Alissa's Quest CMS Empty2011-08-01, 00:02
PostRe: [XP] Alissa's Quest CMS
#2
Ikeringer 
Novice
Novice
Ikeringer

Level 5
Posts : 250
Thanked : 3
Engine : Multi-Engine User
Skill : Beginner
Type : Mapper

[XP] Alissa's Quest CMS Vide
YAy .... :FU:
Nica KK, Tapi ini CMS utuh ato cuman tambahan dalam menu doank ??
terus Maksudnya bagian Scene_Menu itu ditaroh dimana ??
Ma'af banyak nanya, dari pada sesat dijalan !! XD :ngacay:
[XP] Alissa's Quest CMS Empty2011-08-01, 13:00
PostRe: [XP] Alissa's Quest CMS
#3
bungatepijalan 
Moe Princess
bungatepijalan

Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer
Awards:
[XP] Alissa's Quest CMS Vide
@^

Bukan CMS utuh, ini cuma tambahan di scene Main Menu, yg namanya 'Quests'
tapi.. menu item 'Quests' jadi menjorok keluar, sori terburu2 gak sempet diperbaiki yg begini

Soal naroh script nya, taroh diatas 'Main' dengan urutannya:
Code:
Quest CMS - Scene_Quest
Quest CMS - Scene_Menu
Quest CMS - Scene_Title

Spoiler:

Btw, screenshot added, cekidot! :v
[XP] Alissa's Quest CMS Empty2011-10-07, 06:15
PostRe: [XP] Alissa's Quest CMS
#4
Bcyborg21 
Novice
Novice
Bcyborg21

Level 5
Posts : 204
Thanked : 1
Engine : RMVX
Skill : Advanced
Type : Artist

[XP] Alissa's Quest CMS Vide
, di semprnain yag ..... :manjat:
[XP] Alissa's Quest CMS Empty
PostRe: [XP] Alissa's Quest CMS
#5
Sponsored content 




[XP] Alissa's Quest CMS Vide
 

[XP] Alissa's Quest CMS

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMXP Scripts-