• Anmelden

1

Montag, 14. Juli 2008, 20:23

Questlog 2.0 wird nicht angezeigt

Servus leute

Ich hab ein problem mit dem Questlogg 2.0... vlt kann mir ja jemand helfen...

Also
so sihts bei mir aus:
Scene_Map:
Spoiler

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
class Scene_Map
  def main
    @spriteset = Spriteset_Map.new
    @message_window = Window_Message.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @spriteset.dispose
    @message_window.dispose
    if $scene.is_a?(Scene_Title)
      Graphics.transition
      Graphics.freeze
    end
  end
  #---------------
  def update
    loop do
      $game_map.update
      $game_system.map_interpreter.update
      $game_player.update
      $game_system.update
      $game_screen.update
      unless $game_temp.player_transferring
        break
      end
      transfer_player
      if $game_temp.transition_processing
        break
      end
    end
    @spriteset.update
    @message_window.update
    if $game_temp.gameover
      $scene = Scene_Gameover.new
      return
    end
    if $game_temp.to_title
      $scene = Scene_Title.new
      return
    end
    if $game_temp.transition_processing
      $game_temp.transition_processing = false
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    if $game_temp.message_window_showing
      return
    end
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      unless $game_system.map_interpreter.running? or
             $game_system.encounter_disabled
        n = rand($game_map.encounter_list.size)
        troop_id = $game_map.encounter_list[n]
        if $data_troops[troop_id] != nil
          $game_temp.battle_calling = true
          $game_temp.battle_troop_id = troop_id
          $game_temp.battle_can_escape = true
          $game_temp.battle_can_lose = false
          $game_temp.battle_proc = nil
        end
      end
    end
    if Input.trigger?(Input::B)
      unless $game_system.map_interpreter.running? or
             $game_system.menu_disabled
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
    if $DEBUG and Input.press?(Input::F9)
      $game_temp.debug_calling = true
    end
 
     #~~~~~~~~~~~~~~~~~~~
    if Input.trigger?(Input::F5)
      $game_temp.questlog_calling = true
    end
    #~~~~~~~~~~~~~~~~~~~
 
    unless $game_player.moving?
      if $game_temp.battle_calling
        call_battle
      elsif $game_temp.shop_calling
        call_shop
      elsif $game_temp.name_calling
        call_name
      elsif $game_temp.menu_calling
        call_menu
      elsif $game_temp.save_calling
        call_save
      elsif $game_temp.debug_calling
        call_debug
      #~~~~~~~~~~~~~~~~~
      elsif $game_temp.questlog_calling
        call_questlog
      #~~~~~~~~~~~~~~~~~
      end
    end
  end
  #--------------------
  def call_battle
    $game_temp.battle_calling = false
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    $game_player.make_encounter_count
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    $game_system.se_play($data_system.battle_start_se)
    $game_system.bgm_play($game_system.battle_bgm)
    $game_player.straighten
    $scene = Scene_Battle.new
  end
  #---------------
  def call_shop
    $game_temp.shop_calling = false
    $game_player.straighten
    $scene = Scene_Shop.new
  end
  #----------------
  def call_name
    $game_temp.name_calling = false
    $game_player.straighten
    $scene = Scene_Name.new
  end
  #---------------
  def call_menu
    $game_temp.menu_calling = false
    if $game_temp.menu_beep
      $game_system.se_play($data_system.decision_se)
      $game_temp.menu_beep = false
    end
    $game_player.straighten
    $scene = Scene_Menu.new
  end
  #------------------
  def call_save
    $game_player.straighten
    $scene = Scene_Save.new
  end
  #-----------------
  def call_debug
    $game_temp.debug_calling = false
    $game_system.se_play($data_system.decision_se)
    $game_player.straighten
    $scene = Scene_Debug.new
  end
  #--------------------
  def transfer_player
    $game_temp.player_transferring = false
    if $game_map.map_id != $game_temp.player_new_map_id
      $game_map.setup($game_temp.player_new_map_id)
    end
    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
    case $game_temp.player_new_direction
    when 2
      $game_player.turn_down
    when 4
      $game_player.turn_left
    when 6 
      $game_player.turn_right
    when 8
      $game_player.turn_up
    end
    $game_player.straighten
    $game_map.update
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    if $game_temp.transition_processing
      $game_temp.transition_processing = false
      Graphics.transition(20)
    end
    $game_map.autoplay
    Graphics.frame_reset
    Input.update
  end
end
zum Lesen den Text mit der Maus markieren

Questlogg:
Spoiler

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
class Scene_Questlog 
  def main 
	@window_header = Window_Questlog_Header.new 
	@window_titles = Window_Questlog_Titles.new 
	description = "" 
	picture = "" 
	if $game_system.questlog.count > 0 
  	description = $game_system.questlog.quests[0].description 
  	picture = $game_system.questlog.quests[0].picture 
	end 
	@window_description = Window_Questlog_Description.new( 
    	description, picture) 
	@index = @window_titles.index 
	@spriteset = Spriteset_Map.new 
	Graphics.transition 
	loop do 
  	Graphics.update 
  	Input.update 
  	update 
  	if $scene != self 
    	break 
  	end 
	end 
	Graphics.freeze 
	@window_header.dispose 
	@window_titles.dispose 
	@window_description.dispose 
	@spriteset.dispose 
  end 
  #-------------------------------------------------------------------------- 
  def update 
	@window_titles.update 
	if Input.trigger?(Input::B) 
  	$game_system.se_play($data_system.cancel_se) 
  	$scene = Scene_Map.new 
  	return 
	end 
	if @index != @window_titles.index 
  	@index = @window_titles.index 
  	@window_description.description = $game_system.questlog.quests[ 
      	@window_titles.index].description 
  	@window_description.picture = $game_system.questlog.quests[ 
      	@window_titles.index].picture 
  	@window_description.refresh 
	end 
  end 
end 
#============= 
class Quest 
  attr_reader :title 
  attr_reader :description 
  attr_reader :icon 
  attr_reader :picture 
  attr_accessor :enabled 
  def initialize(title, description, icon="", picture="") 
	@title = title 
	@description = description 
	@icon = icon 
	@picture = picture 
	@enabled = true 
  end 
end 
#============ 
class Questlog 
  attr_reader  :quests 
  def initialize 
	@quests = [] 
  end 
  #----------- 
  def add(quest, description="", icon="", picture="") 
	return add(Quest.new(quest, description, icon, picture)) unless 
    	quest.is_a?(Quest) 
	i = index(quest.title) 
	return @quests[i] = quest if i != nil 
	#@quests.push(quest) # Quest wird unten eingefügt 
	@quests.unshift(quest) # Quest wird oben eingefügt 
  end 
  #----------- 
  def remove(title) 
	@quests.delete_if{ |quest| quest.title == title} 
  end 
  #----------- 
  def enable(title) 
	set_enabled(title, true) 
  end 
  #----------- 
  def disable(title) 
   set_enabled(title, false) 
  end 
  #----------- 
  def set_enabled(title, enabled) 
	@quests.each do |quest| 
  	quest.enabled = enabled if quest.title == title 
	end 
  end 
  #----------- 
  def count 
	return @quests.length 
  end 
  #------------ 
  def index(title) 
	for i in 0..@quests.length-1 
  	return i if @quests[i].title == title 
	end 
	return nil 
  end 
  #------------ 
  def Questlog.add(title, description="", icon="", picture="") 
	$game_system.questlog.add(title, description, icon, picture) 
  end 
  #------------ 
  def Questlog.remove(title) 
	$game_system.questlog.remove(title) 
  end 
  #------------ 
  def Questlog.enable(title) 
	$game_system.questlog.enable(title) 
  end 
  #------------ 
  def Questlog.disable(title) 
	$game_system.questlog.disable(title) 
  end 
  #------------ 
  def Questlog.set_enabled(title) 
	$game_system.questlog.set_enabled(title) 
  end 
end 
#============= 
class Window_Questlog_Description < Window_Base 
  attr_accessor :description 
  attr_accessor :picture 
  def initialize(description, picture) 
	super(275, 92, 300, 360) 
	self.contents = Bitmap.new(width-32, height-32) 
	self.contents.font.name = $defaultfonttype 
	self.contents.font.size = $defaultfontsize 
	@description = description 
	@picture = picture 
	refresh 
  end 
  #----------- 
  def refresh 
	self.contents.clear 
	if (@picture != nil) && (not @picture == "") 
  	bitmap = RPG::Cache.picture(@picture) 
  	rect =  bitmap.rect 
  	self.contents.blt(width/2-rect.width/2-16, 0, bitmap, rect, 255) 
  	self.contents.draw_formatted_text( 
      	4, rect.height, 270, 328-rect.height, @description) 
	else 
  	self.contents.draw_formatted_text(4, 0, 270, 328, @description) 
	end 
  end 
end 
#============= 
class Window_Questlog_Titles < Window_Selectable 
  def initialize 
	super(65, 92, 210, 360) 
	@item_max = $game_system.questlog.count 
	self.contents = Bitmap.new(width-32, @item_max > 0 ? @item_max*32 : 32) 
	self.contents.font.name = $defaultfonttype 
	self.contents.font.size = $defaultfontsize 
	self.index = 0 
	@column_max = 1 
	refresh 
  end 
  #------------- 
  def refresh 
	self.contents.clear 
	for i in 0...$game_system.questlog.count 
  	quest = $game_system.questlog.quests[i] 
  	y = i*32 
  	self.contents.font.color = quest.enabled ? normal_color : disabled_color 
  	if (quest.icon != nil) && (not quest.icon == "") 
    	bitmap = RPG::Cache.icon(quest.icon) 
    	opacity = quest.enabled ? 255 : 128 
    	self.contents.blt(4, y+4, bitmap, Rect.new(0, 0, 24, 24), opacity) 
    	self.contents.draw_formatted_text(29, y, 150, 32, quest.title) 
  	else 
    	self.contents.draw_formatted_text(4, y, 150, 32, quest.title) 
  	end 
	end 
  end 
end 
#=========== 
class Window_Questlog_Header < Window_Base 
  def initialize 
	super(65, 28, 510, 64) 
	self.contents = Bitmap.new(width-32, height-32) 
	self.contents.font.name = $defaultfonttype 
	self.contents.font.size = 26 
	refresh 
  end 
  #------------ 
  def refresh 
	self.contents.clear 
	self.contents.draw_text(self.contents.rect, "Questlog", 1) 
  end 
end 
#=========== 
class Scene_Map 
  def call_questlog 
	$game_temp.questlog_calling = false 
	$game_player.straighten 
	$scene = Scene_Questlog.new 
  end 
end 
#=========== 
class Game_System 
  attr_reader  :questlog 
  alias init initialize 
  def initialize 
	init 
	@questlog = Questlog.new 
  end 
end 
#=========== 
class Game_Temp 
  attr_accessor :questlog_calling 
  alias init initialize 
  def initialize 
	init 
	@questlog_calling = false 
  end 
end 
#============== 
class Bitmap 
  def draw_shadow_text(x, y, width, height, str, align=0) 
	color = font.color.dup 
	font.color = Color.new(192, 192, 192, 156) 
	draw_text(x+2, y+2, width, height, str, align) 
	font.color = color 
	draw_text(x, y, width, height, str, align) 
  end 
  #---------------- 
  def draw_formatted_text(x, y, width, height, str, align=0) 
	str = str.dup 
	color = font.color.dup 
	bold = font.bold 
	italic = font.italic 
	size = font.size 
	name = font.name.dup 
	#:::::::::: 
	shadow = false 
	underlined = false 
	str.gsub!(/
/) {"\n"} 
	str.gsub!(/\\\\/) {"\00"} 
	str.gsub!(//) {"\01"} 
	str.gsub!(/<\/b>/) {"\02"} 
	str.gsub!(//) {"\03"} 
	str.gsub!(/<\/i>/) {"\04"} 
	str.gsub!(//) {"\05[#{$1}]"} 
	str.gsub!(/<\/color>/) {"\06"} 
	str.gsub!(//) {"\16"} 
	str.gsub!(/<\/shadow>/) {"\17"} 
	str.gsub!(//) {"\20"} 
	str.gsub!(/<\/small>/) {"\21"} 
	str.gsub!(//) {"\23"} 
	str.gsub!(/<\/big>/) {"\21"} 
	str.gsub!(//) {"\24[#{$1}]"} 
	str.gsub!(/<\/size>/) {"\21"} 
	str.gsub!(//) {"\25[#{$1}]"} 
	str.gsub!(/<\/font>/) {"\26"} 
	str.gsub!(//) {"\27"} 
	str.gsub!(/<\/u>/) {"\30"} 
	ix = 0 
	iy = 0 
	while ((c = str.slice!(/./m)) != nil) 
  	if c == "\00" # \\ 
    	c = "\\" 
  	end 
  	if c == "\01" #  
    	font.bold = true 
  	end 
  	if c == "\02" # 
    	font.bold = false 
  	end 
  	if c == "\03" #  
    	font.italic = true 
  	end 
  	if c == "\04" #  
    	font.italic = false 
  	end 
  	if c == "\05" #  
    	str.sub!(/\[(#?[0-9a-z]+)\]/, "") 
    	if $1[0] == 35 
      	col = Color.decode($1) 
    	elsif $1.to_i != 0 
      	col = Window_Base.text_color($1.to_i) 
    	else 
      	col = Color.get($1) 
    	end 
    	font.color = col 
  	end 
  	if c == "\06" #  
    	font.color = color 
  	end 
  	if c == "\16" #  
    	shadow = true 
  	end 
  	if c == "\17" #  
    	shadow = false 
  	end 
  	if c == "\20" #  
    	font.size -= 5 
    	font.size = 1 if font.size < 1 
  	end 
  	if c == "\21" #    
    	font.size = size 
  	end 
  	if c == "\23" #  
    	font.size += 5 
  	end 
  	if c == "\24" #  
    	str.sub!(/\[([0-9]+)\]/, "") 
    	font.size = $1.to_i 
    	font.size = 1 if font.size < 1 
  	end 
  	if c == "\25" #  
    	str.sub!(/\[([A-Za-z0-9\s]+)\]/, "") 
    	font.name = $1 if Font.exist?($1) 
  	end 
  	if c == "\26" #  
    	font.name = name 
  	end 
  	if c == "\27" #  
    	underlined = true 
  	end 
  	if c == "\30" #  
    	underlined = false 
  	end 
  	if c == "\n" 
    	iy += 32 
    	ix = 0 
  	end 
  	#::::::::: 
  	if shadow 
    	draw_shadow_text(x+ix+4, y+iy, 40, 32, c) 
  	else 
    	draw_text(x+ix+4, y+iy, 40, 32, c) 
  	end 
  	w = text_size(c).width 
  	if underlined 
    	fill_rect(x+ix+4, y+iy+text_size("T").height+3, w, 2, font.color) 
  	end 
  	ix += w 
	end 
	#:::::::::: 
	font.color = color 
	font.bold = bold 
	font.italic = italic 
	font.size = size 
	font.name = name 
  end 
end 
#============== 
class Color 
  def Color.get(string) 
	return Color.white if string == "white" 
	return Color.black if string == "black" 
	return Color.red if string == "red" 
	return Color.green if string == "green" 
	return Color.blue if string == "blue" 
	return Color.yellow if string == "yellow" 
	return Color.cyan if string == "cyan" 
	return Color.magenta if string == "magenta" 
	return Color.light_gray if string == "light_gray" 
	return Color.gray if string == "gray" 
	return Color.dark_gray if string == "dark_gray" 
	return Color.pink if string == "pink" 
	return Color.orange if string == "orange" 
	return Color.white 
  end 
  #------------ 
  def Color.decode(hex) 
	return Color.decode(hex[1..hex.length]) if hex[0] == 35 
	hex.downcase! 
	red = hex[0..1].hex 
	green = hex[2..3].hex 
	blue = hex[4..5].hex 
	alpha = hex.length == 8 ? hex[6..7].hex : 255 
	return Color.new(red, green, blue, alpha) 
  end 
  #------------ 
  def Color.white(alpha=255) 
	return Color.new(255, 255, 255, alpha) 
  end 
  #----------- 
  def Color.black(alpha=255) 
	return Color.new(0, 0, 0, alpha) 
  end 
  #---------- 
  def Color.red(alpha=255) 
	return Color.new(255, 0, 0, alpha) 
  end 
  #---------- 
  def Color.green(alpha=255) 
	return Color.new(0, 255, 0, alpha) 
  end 
  #--------- 
  def Color.blue(alpha=255) 
	return Color.new(0, 0, 255, alpha) 
  end 
  #---------- 
  def Color.yellow(alpha=255) 
	return Color.new(255, 255, 0, alpha) 
  end 
  #---------- 
  def Color.cyan(alpha=255) 
	return Color.new(0, 255, 255, alpha) 
  end 
  #---------- 
  def Color.magenta(alpha=255) 
	return Color.new(255, 255, 0, alpha) 
  end 
  #---------- 
  def Color.light_gray(alpha=255) 
	return Color.new(192, 192, 192, alpha) 
  end 
  #----------- 
  def Color.gray(alpha=255) 
	return Color.new(128, 128, 128, alpha) 
  end 
  #----------- 
  def Color.dark_gray(alpha=255) 
	return Color.new(64, 64, 64, alpha) 
  end 
  #----------- 
  def Color.pink(alpha=255) 
	return Color.new(255, 175, 175, alpha) 
  end 
  #----------- 
  def Color.orange(alpha=255) 
	return Color.new(255, 200, 0, alpha) 
  end 
end 
#===================== 
class Window_Base < Window 
  def Window_Base.text_color(n) 
	case n 
	when 0 
  	return Color.new(255, 255, 255, 255) 
	when 1 
  	return Color.new(128, 128, 255, 255) 
	when 2 
  	return Color.new(255, 128, 128, 255) 
	when 3 
  	return Color.new(128, 255, 128, 255) 
	when 4 
  	return Color.new(128, 255, 255, 255) 
	when 5 
  	return Color.new(255, 128, 255, 255) 
	when 6 
  	return Color.new(255, 255, 128, 255) 
	when 7 
  	return Color.new(192, 192, 192, 255) 
	else 
  	return Color.white 
	end 
  end 
end
zum Lesen den Text mit der Maus markieren

Main:
Spoiler

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#==============================================================================
# ** Main
#------------------------------------------------------------------------------
#  After defining each class, actual processing begins here.
#==============================================================================
 
begin
  $defaultfonttype = $fontface = Font.default_name = "Arial"
  $defaultfontsize = $fontsize = Font.default_size = 22
  # Prepare for transition
  Graphics.freeze
  # Make scene object (title screen)
  $scene = Scene_Title.new
  # Call main method as long as $scene is effective
  while $scene != nil
    $scene.main
  end
  # Fade out
  Graphics.transition(20)
rescue Errno::ENOENT
  # Supplement Errno::ENOENT exception
  # If unable to open file, display message and end
  filename = $!.message.sub("No such file or directory - ", "")
  print("Unable to find file #{filename}.")
end
zum Lesen den Text mit der Maus markieren


jetzt hab ich das problem das bei mir wen ich auf F5 klick nix angezeigt wird...

PLZ HELP

THX im vorraus

RTW-93
Bild

2

Montag, 14. Juli 2008, 20:31

Standardantwort:

Hast du noch andere Scripte darunter eingefügt?
Hast du Scene_Map mit diesem Code ersetzt oder zumindest ÜBER Main eingefügt?

3

Montag, 14. Juli 2008, 20:51

XD ja hab ich wie es im skript explorer stand

edit:
Jetzt hab ich SDK rausgenommen und wen ich jetzt F5 drück kommt ne fehlermeldung^^
Bild

4

Mittwoch, 16. Juli 2008, 19:36

3 tage her und immer noch such ich ne lösung also:
*push*
Bild

5

Mittwoch, 16. Juli 2008, 21:50

Standardantwort:

Hast du noch andere Scripte darunter eingefügt?
Hast du Scene_Map mit diesem Code ersetzt oder zumindest ÜBER Main eingefügt?


XD ja hab ich wie es im skript explorer stand

edit:
Jetzt hab ich SDK rausgenommen und wen ich jetzt F5 drück kommt ne fehlermeldung^^


3 tage her und immer noch such ich ne lösung also:
*push*


Ich habe 2 Fragen gestellt und davon wurde nur eine Oder Frage mit "Habs so gemacht wie's da stand" beantwortet....

Und generell.. Mit "kommt ne Fehlermeldung" kann niemand was anfangen. Du musst die Meldung schon posten.

Social Bookmarks