|
| script error | |
| | Pengirim | Message |
---|
aidilriski Senior
Posts : 643 Thanked : 2 Engine : Multi-Engine User Type : Mapper
| Subyek: script error 2012-05-20, 13:30 | |
| om sekalian, saya gak tahu kenapa, tapi kok skrip quest log nya Sthrattoff buat xp kok error ya? ini skrinsutnya ini juga skripnya - Spoiler:
- Code:
-
#============================================================================= # Quest Log Screen #----------------------------------------------------------------------------- # ** Version 2.3 # ** Original by Sthrattoff #============================================================================= # Description : # This script enables the ability to show current active quest.
# Features : # EXTREMELY SIMPLIFIED! Now the script is just about 150 lines length including comments. # Unlimited amount of quest can be added. # Use variable to mark quest's progress.
# Limitation : # Only can store up to 12 progresses per quest.
# History : # Version 1.0 : Initial release. # Version 1.2 : Add "Types" features. # Version 2.0 : Changes in programming style and infinite quest support. # Version 2.2 : Cut the script length to about 150 lines. # Version 2.3 : Add "Quest Progress" bar in exchange of "Types" removal.
# Instruction # Just put this script above main.
# Configuration : # To add a quest, fill these information by using .push # $names.push "Name" # $types.push "Type" # $description.push (["line1", "line2", ..., "Line5"]) # $objectives.push (["onjective1", ..., "objective12"]) # $var_ID.push ID_NUMBER # $end_val.push END_VALUE
# Credits # See the header + Blizzard and Enterbrain #============================================================================= class Scene_Quest # Defines array variables $names = [] $description = [] $objectives = [] $var_ID = [] $end_val = [] # The main process def main @quest_list = Window_Command.new(160, $names) @quest_window = Window_Quest.new @quest_window.x = 160 Graphics.transition loop do Graphics.update Input.update update break if $scene != self end Graphics.freeze @quest_list.dispose @quest_window.dispose end def update @quest_list.update @quest_window.update if @quest_list.active update_quest return end end def update_quest if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end $id = @quest_list.index return end end
class Window_Quest < Window_Base def initialize super(0, 0, 480, 480) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, 0, self.width - 32, 32, $names[$id.to_i].to_s, 1) self.contents.draw_text(0, 192, self.width - 32, 32, "Tugas", 1) self.contents.draw_text(0, 416, self.width - 32, 32, "Proses") self.contents.font.color = normal_color for i in 0..4 self.contents.draw_text(0, i * 32 + 32, self.width - 32, 32, $description[$id.to_i][i].to_s) end a = b = $game_variables[$var_ID[$id.to_i]] if a > 5 self.contents.draw_text(240, (a - 6) * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][a].to_s) else self.contents.draw_text(0, a * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][a].to_s) end self.contents.font.color = disabled_color if b > 0 for j in 0..(b - 1) if j > 5 self.contents.draw_text(240, (j - 6) * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][j].to_s) else self.contents.draw_text(0, j * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][j].to_s) end end end draw_quest_progress(96, 428, self.width - 128) end def update refresh end end
class Window_Base < Window def draw_quest_progress(x, y, w = 200) current = $game_variables[$var_ID[$id.to_i]] ending = $end_val[$id.to_i] bordercolor = system_color outercolor = Color.new(180, 210, 120, 255) midcolor = Color.new(180, 210, 140, 255) innercolor = Color.new(180, 210, 160, 255) emptycolor = Color.new(0, 0, 0, 255) linewidth = (((current * 1.0) / ending) * (w - 2)) emptywidth = ((w - 1) - linewidth) emptyx = ((x + 1) + linewidth) border = Rect.new(x, y, w, 8) emptyline = Rect.new(x + 1, y + 1, w - 2, 6) outerline = Rect.new(x + 1, y + 1, linewidth, 6) midline = Rect.new(x + 2, y + 2, linewidth - 2, 4) innerline = Rect.new(x + 3, y + 3, linewidth - 4, 2) self.contents.fill_rect(border, bordercolor) self.contents.fill_rect(emptyline, emptycolor) self.contents.fill_rect(outerline, outercolor) self.contents.fill_rect(midline, midcolor) self.contents.fill_rect(innerline, innercolor) end end
class Scene_Save < Scene_File alias old_save_data write_save_data def write_save_data(file) old_save_data Marshal.dump($names, file) Marshal.dump($description, file) Marshal.dump($objectives, file) Marshal.dump($var_ID, file) Marshal.dump($end_val, file) end end
class Scene_Load < Scene_File alias old_load_data read_save_data def read_save_data(file) old_load_data $names = Marshal.load(file) $description = Marshal.load(file) $objectives = Marshal.load(file) $var_ID = Marshal.load(file) $end_val = Marshal.load(file) end end
class Scene_Title alias old_new_game command_new_game def command_new_game old_new_game $names.clear $description.clear $objectives.clear $var_ID.clear $end_val.clear end end
class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index size = $names.size for i in 0..size var = $var_ID[i] ending = $end_val[i] if $game_variables[var.to_i] >= ending.to_i $names.delete_at i $description.delete_at i $objectives.delete_at i $var_ID.delete_at i $end_val.delete_at i end end end end
| |
| | | DrDhoom Doomed Zombie
Posts : 629 Thanked : 22 Engine : Multi-Engine User Skill : Intermediate Type : Scripter
| Subyek: Re: script error 2012-05-20, 14:45 | |
| gagal membuat bitmap biasanya gara" terlalu besar quest di game kmu banyak ya? kalo di VX ada script buat fix masalah ini, entah kalo XP | |
| | | aidilriski Senior
Posts : 643 Thanked : 2 Engine : Multi-Engine User Type : Mapper
| Subyek: Re: script error 2012-05-20, 15:10 | |
| Blum Ada quest yg saya buat | |
| | | richter_h Salto Master Hancip RMID
Posts : 1705 Thanked : 30 Engine : Other Skill : Skilled Type : Developer
Trophies
Awards:
| Subyek: Re: script error 2012-05-20, 15:21 | |
| ah ada yang salah sama si Window_Quest coba cari ini - Code:
-
def initialize super(0, 0, 480, 480) self.contents = Bitmap.new(width - 32, height - 32) refresh end dan ganti jadi ini - Code:
-
def initialize super(0, 0, 480, 480) #~ self.contents = Bitmap.new(width - 32, height - 32) refresh end ane ngga bisa tes langsung soale ane cuman punya RMVX sekian. | |
| | | DrDhoom Doomed Zombie
Posts : 629 Thanked : 22 Engine : Multi-Engine User Skill : Intermediate Type : Scripter
| Subyek: Re: script error 2012-05-20, 15:23 | |
| ah iya, error kalo quest nya masih 0... paling ngga harus ada 1 quest yang dibikin @rich: ga ada yang salah sama window_quest bro cmiiw | |
| | | richter_h Salto Master Hancip RMID
Posts : 1705 Thanked : 30 Engine : Other Skill : Skilled Type : Developer
Trophies
Awards:
| Subyek: Re: script error 2012-05-20, 15:31 | |
| - WhiteHopper wrote:
- ah iya, error kalo quest nya masih 0...
paling ngga harus ada 1 quest yang dibikin @rich: ga ada yang salah sama window_quest bro cmiiw hoo jadi minimal kudu ada satu object (maksud ane quest) jadi ngga disangka ngga ada dan 'failed to create bitmap' btw tadi ane cuma hipotesis sekian | |
| | | aidilriski Senior
Posts : 643 Thanked : 2 Engine : Multi-Engine User Type : Mapper
| Subyek: Re: script error 2012-05-20, 16:06 | |
| o iya, naruh questnya dimana, soalnya beda sama yg vx, dan gk dijelasin, apa di script itu? | |
| | | shikami Member 1000 Konsep
Posts : 3744 Thanked : 31 Engine : Multi-Engine User Skill : Beginner Type : Developer
Trophies
Awards:
| Subyek: Re: script error 2012-05-20, 16:58 | |
| - Quote :
- To add a quest, fill these information by using .push
# $names.push "Name" # $types.push "Type" # $description.push (["line1", "line2", ..., "Line5"]) # $objectives.push (["onjective1", ..., "objective12"]) # $var_ID.push ID_NUMBER # $end_val.push END_VALUE
bukannya udah cukup jelas ini ? pake call script ? coba cek di thread aslinya barangkali ada contoh. | |
| | | Sponsored content
| Subyek: Re: script error | |
| |
| | | | script error | |
|
Similar topics | |
|
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
| Latest topics | » [Web Novel] Gloria Infidelis by LightNightKnight 2016-11-17, 21:27
» [Announcement] Forum baru untuk RMID by TheoAllen 2016-08-25, 16:39
» Where I'm Wrong ? by ReydVires 2016-07-24, 16:10
» flakeheartnet's Resources part III by flakeheartnet 2016-07-08, 14:30
» Keira's Art Warehouse by KeiraBlaze 2016-06-28, 19:27
» Theo Core Time System + Bingung by Lockin 2016-06-27, 16:24
» Error Script, Maybe ? by Lockin 2016-06-27, 16:20
» Nusaimoe @ RMID Lounge by Jihad Bagas 2016-06-21, 05:02
» Call Random Battle by Lockin 2016-06-15, 17:04
» Flakeheartnet Resources Part II [come back gift] by flakeheartnet 2016-06-07, 15:51
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|