bungatepijalan Moe Princess
Posts : 1487 Thanked : 30 Engine : Multi-Engine User Skill : Intermediate Type : Developer
Trophies
Awards: | Subyek: [XP] Alissa's Quest CMS 2011-07-31, 23:38 | |
| Alissa's Quest CMS Version: 1.0 Type: Custom Menu System PengenalanCMS (custom menu system) ini menambahkan menu Quests di bagian Main Menu. Quests digunakan untuk melihat misi-misi yang telah dilaksanakan/belum. - Spoiler:
sori kalo ini sederhana amat tapi ...dibuat dengan segera atas rikues di: https://rmid.forumotion.net/t4427p10-request-cms-dong-master-tolongin#70336 dengan tujuan cuma latihan scripting buat ngamplas skill scripting alissa yang udah karatan
Petunjuk & PemasanganDi 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:
https://i.imgur.com/BaAKg.png
DemoLink: http://www.media*fire.com/?eomaunf7863yf6f ScriptQuest 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
Terakhir diubah oleh bungatepijalan tanggal 2011-08-01, 00:35, total 1 kali diubah | |
|
Ikeringer Novice
Posts : 250 Thanked : 3 Engine : Multi-Engine User Skill : Beginner Type : Mapper
| Subyek: Re: [XP] Alissa's Quest CMS 2011-08-01, 00:02 | |
| YAy .... 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 !! | |
|
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30 Engine : Multi-Engine User Skill : Intermediate Type : Developer
Trophies
Awards: | Subyek: Re: [XP] Alissa's Quest CMS 2011-08-01, 13:00 | |
| @^
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:
Trus.. ada tambahan lagi: kendalanya quest gak akan disimpan saat Save, jadi kl mo nge load, bakal cacad dah sori masi bingung caranya (ato mungkin musti bikin text file khusus...?!)
Btw, screenshot added, cekidot! | |
|
Bcyborg21 Novice
Posts : 204 Thanked : 1 Engine : RMVX Skill : Advanced Type : Artist
| Subyek: Re: [XP] Alissa's Quest CMS 2011-10-07, 06:15 | |
| , di semprnain yag ..... | |
|
Sponsored content
| Subyek: Re: [XP] Alissa's Quest CMS | |
| |
|