• Anmelden

1

Sonntag, 17. Juli 2011, 12:51

Simple Questlog

Hallo,
ich wollte mal wissen wie man das Questlog im Menü einbaut.

:hilfe:

Flex

Krieger

Motto: Menschen sind doof, Tiere sind doof, Pflanzen sind doof... Steine sind okay.

  • Nachricht senden

2

Sonntag, 17. Juli 2011, 13:21

wär ganz praktisch, wenn du uns erzählen würdest, welchen questlog-script du verwendest.
ist das Simple Quest-Log von hellMinor?
Was lebt, das kann man töten. Was tot ist, das kann man essen.
--------------------------------------------------------------------------
:map: Mapping: :star::star::star::star::star:
:compile: Scripting: :star-empty::star-empty::star-empty::star-empty::star-empty:
:system-monitor: Event: :star::star::star::star::star:
:doc: Story: :star::star::star::star::star-empty:
:pencil: Zeichnen: :star::star::star::star::star:
:palette: Pixeln: :star::star::star-half::star-empty::star-empty:
:music-beam-16: Musik & Sounds: :star::star::star::star-empty::star-empty:
--------------------------------------------------------------------------
Bevorzugter Maker: :ace:
Ebenfalls im Besitzt: :rmxp: :rmvx: :rmmv:

Mitsch93

Drachentöter

Motto: Aufgeben ist es, was den Menschen tötet. Nur der Mensch, der sich weigert aufzugeben, hat sich das Recht verdient, auf dem glanzvollen Pfad der Menschheit zu wandeln.

  • Nachricht senden

3

Sonntag, 17. Juli 2011, 16:33

Ich denke mal, dass du den Simple Questlog Skript verwendest:
Simple Questlog | RPG Studio

Ich verwende den Skript zwar nicht, aber in der Beschreibung steht eigentlich schon alles:
Um den Skript einzufügen, gehst du beim Event auf die Seite 3 und wählst
unten Skript.
Da fügst du folgenden Code ein.

Quellcode

1
$questlog.addQuest("Unique ID","Quest Titel","Quest Beschreibung")

Unique ID: Ich nehme mal an, dass ist die ID der Quest (Folgerung: Jede ID nur einmal verwenden!)
Quest Titel und Quest Beschreibung klären sich von selbst.

Mit

Quellcode

1
$questlog.updateQuest("unique ID","Quest Description")

Kannst du die Quest aktualisieren bzw. die Beschreibung ändern.

Mit

Quellcode

1
$questlog.completeQuest("Unique ID")

Kannst du eine Quest mit einer bestimmten ID zu den abgeschlossenen Quests verschieben.

Hier mit löscht du aktive Quest:

Quellcode

1
$questlog.deleteQuest("Unique ID")

Flex

Krieger

Motto: Menschen sind doof, Tiere sind doof, Pflanzen sind doof... Steine sind okay.

  • Nachricht senden

4

Sonntag, 17. Juli 2011, 17:22

@Mitsch93

die frage war, wie man diesen script als menüzeile einbauen kann, also zusammen mit item, skills, ausrüstung etc.
ich hab das ebenfalls gemacht.
ersetze dein komplettes scene_menu damit:
Spoiler

Ruby 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
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
 
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  # 	menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
	@menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
	super
	create_menu_background
	create_command_window
	@gold_window = Window_Gold.new(0, 360)
	@status_window = Window_MenuStatus.new(160, 0)
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
	super
	dispose_menu_background
	@command_window.dispose
	@gold_window.dispose
	@status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
	super
	update_menu_background
	@command_window.update
	@gold_window.update
	@status_window.update
	if @command_window.active
  	update_command_selection
	elsif @status_window.active
  	update_actor_selection
	end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
	s1 = Vocab::item
	s2 = Vocab::skill
	s3 = Vocab::equip
	s4 = Vocab::status
	s5 = "Aufgaben"
	s6 = Vocab::save
	s7 = Vocab::game_end
	@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])
	@command_window.index = @menu_index
	if $game_party.members.size == 0  		# If number of party members is 0
  	@command_window.draw_item(0, false) 	# Disable item
  	@command_window.draw_item(1, false) 	# Disable skill
  	@command_window.draw_item(2, false) 	# Disable equipment
  	@command_window.draw_item(3, false) 	# Disable status
	end
	if $game_system.save_disabled 			# If save is forbidden
  	@command_window.draw_item(4, false) 	# Disable save
	end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
	if Input.trigger?(Input::B)
  	Sound.play_cancel
  	$scene = Scene_Map.new
	elsif Input.trigger?(Input::C)
  	if $game_party.members.size == 0 and @command_window.index < 4
		Sound.play_buzzer
		return
  	elsif $game_system.save_disabled and @command_window.index == 4
		Sound.play_buzzer
		return
  	end
  	Sound.play_decision
  	case @command_window.index
  	when 0  	# Item
		$scene = Scene_Item.new
  	when 1,2,3  # Skill, equipment, status
		start_actor_selection
  	when 4
		$scene = Scene_Questlog.new
  	when 5  	# Save
		$scene = Scene_File.new(true, false, false)
  	when 6  	# End Game
		$scene = Scene_End.new
  	end
	end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
	@command_window.active = false
	@status_window.active = true
	if $game_party.last_actor_index < @status_window.item_max
  	@status_window.index = $game_party.last_actor_index
	else
  	@status_window.index = 0
	end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
	@command_window.active = true
	@status_window.active = false
	@status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
	if Input.trigger?(Input::B)
  	Sound.play_cancel
  	end_actor_selection
	elsif Input.trigger?(Input::C)
  	$game_party.last_actor_index = @status_window.index
  	Sound.play_decision
  	case @command_window.index
  	when 1  # skill
		$scene = Scene_Skill.new(@status_window.index)
  	when 2  # equipment
		$scene = Scene_Equip.new(@status_window.index)
  	when 3  # status
		$scene = Scene_Status.new(@status_window.index)
  	end
	end
  end
end
zum Lesen den Text mit der Maus markieren


und den questlog script damit:
Spoiler

Ruby 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
#==============================================================================
#  Simple Quest-Log
#
#  Version : 1.2 - 02.04.08
#  Created by : hellMinor
#  Do NOT redistribute without my permission
#  Description : A simple script for a Quest-Log
#
#==============================================================================
#==============================================================================
# F.A.Q.
#==============================================================================
# The Global Questlog-Name is $questlog
# To open the Questlog from the menu just do $scene = Scene_Questlog.new
# To open the Questlog from an event $scene = Scene_Questlog.new(false)
#
# To add a quest make a new call script with this Template :
# $questlog.addQuest("Unique ID","Quest Title","Quest Description","State")
#
# To update a Quest description make a new call script with this Template :
# $questlog.updateQuest("unique ID","Quest Description","State")
#
# To move a Quest to Completed Quests make new call script with this Template :
# $questlog.completeQuest("Unique ID")
#
# To delete a Quest from the Active-Questlog make a call script with this
# Template :
# $questlog.deleteQuest("Unique ID")
#
# You can get the current state of a Quest with this Template :
# $questlog.getQuestState("Unique ID")
# This may be useful in a conditional branch if you want to react with a
# special Quest-State
#
# If u want to add a Questmap, create a folder named Questmaps in your
# Graphics folder. The name of the Questmap must be the same as the Quest
# in the Game. Be sure that you set the correct MAP_FORMAT.
# A Quest-Map should have a size of 265*200 px !
# I.E. : If your Quest is named QuestYXZ , the picture in the Questmap folder
# has to be QuestYXZ.png if your map is a .png
#==============================================================================
# Setup
#==============================================================================
QUESTLOGNAME = "Aufgaben"   			# Questlog Menu name
QUEST_MENU_ITEM_1 = "Aktive Aufgaben" 	# Active Quest name
QUEST_MENU_ITEM_2 = "Beendete Aufgaben"  # Completed Quest name
SIZE_VAR = 20               			# Character Size
MAP_FORMAT = "png"          			# Quest-Map Ending
#==============================================================================
class Questlog
#============================================================================== 
  def addQuest(id,header,description,state = "")
	$activelog << [id,header,description,state]
  end
#------------------------------------------------------------------------------  
  def updateQuest(id,description,state = "")
	for i in 0..$activelog.size-1
  	if $activelog[i][0] == id
		$activelog[i][2] = description
		$activelog[i][3] = state
		break
  	end
	end
  end
#------------------------------------------------------------------------------
  def completeQuest(id)
	for i in 0..$activelog.size-1
  	if $activelog[i][0] == id
		$completedlog << $activelog[i]
		$activelog.delete_at(i)
		break
  	end
	end
  end
#------------------------------------------------------------------------------
  def deleteQuest(id)
	for i in 0..$activelog.size-1
  	if $activelog[i][0] == id
		$activelog.delete_at(i)
		break
  	end
	end
  end
#------------------------------------------------------------------------------
  def getQuestState(id)
	for i in 0..$activelog.size-1
  	if $activelog[i][0] == id
		return $activelog[i][3]
		break
  	end
	end
  end
 
end
#==============================================================================
class Scene_Questlog < Scene_Base
#==============================================================================
  def initialize(from_menu = true)
	@from_menu = from_menu
  end
 
  def start
	super
	create_menu_background
	@help_window = Window_Help.new
	@help_window.set_text(QUESTLOGNAME,1)
 
	s1 = QUEST_MENU_ITEM_1
	s2 = QUEST_MENU_ITEM_2
 
	@select_window = Window_Command.new(544,[s1,s2],2,1) 
	@select_window.y = 55
	@select_window.active = true
 
  end
#------------------------------------------------------------------------------
  def terminate
	super
	dispose_menu_background
	@help_window.dispose
	@select_window.dispose
  end
#------------------------------------------------------------------------------  
  def kill_questwindows
	@quest_window.dispose
  end  
#------------------------------------------------------------------------------
  def return_scene
	if @from_menu
  	$scene = Scene_Menu.new(4)
	else
  	$scene = Scene_Map.new
	end
  end
#------------------------------------------------------------------------------
  def update
	super
	update_menu_background
	@help_window.update
	if @select_window.active
  	@select_window.update
  	update_select_selection
	elsif @quest_window.active
  	@quest_window.update
  	update_quest_selection
	end
  end
#------------------------------------------------------------------------------
  def update_select_selection
	if Input.trigger?(Input::B)
  	Sound.play_cancel
  	return_scene
	elsif Input.trigger?(Input::C)
  	case @select_window.index
  	when 0
		$oldlog = false
		@quest_window = Window_Quest.new(0,110,272,(24*11)+42)
		@select_window.active = false
		@quest_window.active = true
  	when 1
		$oldlog = true
		@quest_window = Window_Quest.new(0,110,272,(24*11)+42)
		@select_window.active = false
		@quest_window.active = true
  	end  	
	end
  end
#------------------------------------------------------------------------------  
  def update_quest_selection
	if Input.trigger?(Input::B)
  	Sound.play_cancel
  	kill_questwindows
  	@select_window.active = true
	end
  end
 
end
#==============================================================================
class Scene_Title < Scene_Base
#==============================================================================
  alias create_game_objects_additions create_game_objects
  def create_game_objects
	create_game_objects_additions
	$questlog = Questlog.new
	$activelog = Array.new
	$completedlog = Array.new
  end
 
end
#==============================================================================
class Window_Help < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
	super(x, y, width, height)
  end
 
end
#==============================================================================
class Window_Description < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
	super(x, y, width, height)
	@text = nil
	@contents_x = 0
	@contents_y = 0
	@line_count = 0 			# Line count drawn up until now
	update
  end
#------------------------------------------------------------------------------  
  def new_line
	@contents_x = 0
	@contents_y += WLH
	@line_count += 1
	@line_show_fast = false
  end
#------------------------------------------------------------------------------  
  def finish_message
	@text = nil
	@line_count = 0
	@contents_x = 0
	@contents_y = 0
  end
#------------------------------------------------------------------------------  
  def write_text(str)
	if str != nil || str != ""
  	create_contents
  	update_msg(str)
	end
  end
#------------------------------------------------------------------------------  
  def update_msg(str)
	str.each_line{|str2|iterator(str2)}
	finish_message
  end
#------------------------------------------------------------------------------   
  def iterator(str2)
	contents.font.size = SIZE_VAR
	contents.draw_text(@contents_x, @contents_y, str2.size*40, WLH, str2.delete("\n"))
	c_width = contents.text_size(str2).width
	@contents_x += c_width
	new_line
  end
 
end
#==============================================================================
class Window_Quest < Window_Selectable
#==============================================================================
  def initialize(x, y, width, height)
	super(x, y, width, height)
	@column_max = 1
	self.index = 0
 
	@quest_helper = Window_Description.new(271,110,273,(24*11)+42)
 
	refresh
  end
#------------------------------------------------------------------------------
  def refresh
	@data = []
	if !$oldlog
  	for i in (0..$activelog.size-1)
		@data.push($activelog[i])
  	end
	else
  	for i in (0..$completedlog.size-1)
		@data.push($completedlog[i])
  	end
	end
	@item_max = @data.size
	create_contents
	for i in 0...@item_max
  	draw_item(i)
	end
  end
#------------------------------------------------------------------------------
  def draw_item(index)
	rect = item_rect(index)
	self.contents.clear_rect(rect)
	item = @data[index][1]
	if item != nil
  	rect.width -= 4
  	self.contents.draw_text(rect.x, rect.y, 172, WLH, item)
	end
  end
#------------------------------------------------------------------------------
  alias update_addition update
  def update
	update_addition
	update_description(@index)
	update_selection
  end
#------------------------------------------------------------------------------
  def update_selection
	if Input.trigger?(Input::B)
  	Sound.play_cancel
  	@quest_helper.dispose
  	if @quest_map != nil
		@quest_map_bitmap.bitmap.dispose
		@quest_map_bitmap.dispose
		@quest_map.dispose
		@quest_map_viewport.dispose
		@quest_map = nil
  	end
	end
  end
#------------------------------------------------------------------------------	
  def update_description(id)
	if defined?(@data[id][2])
  	@quest_helper.write_text(@data[id][2])
  	if @quest_map == nil
		if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
  		self.height /= 3
  		@quest_map = Window_Description.new(0,210,272,(24*7)+38)
  		@quest_map_bitmap = Sprite.new
  		@quest_map_viewport = Viewport.new(3,213,268,(24*7)+35)
  		@quest_map_bitmap.viewport = @quest_map_viewport
  		@quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
  		@quest_map_bitmap.viewport.z = 150
		end
  	else
		if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
  		@quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
		else
  		self.height *= 3
  		@quest_map_bitmap.bitmap.dispose
  		@quest_map_bitmap.dispose
  		@quest_map.dispose
  		@quest_map_viewport.dispose
  		@quest_map = nil
		end
  	end
	end
  end
 
end
#==============================================================================
class Scene_File < Scene_Base
#==============================================================================
  alias write_save_data_adds write_save_data
  def write_save_data(file)
	write_save_data_adds(file)	
	Marshal.dump($activelog,   		file)
	Marshal.dump($completedlog,		file)
	Marshal.dump($questlog,			file)
  end
 
  alias read_save_data_adds read_save_data
  def read_save_data(file)
	read_save_data_adds(file)
	$activelog   		= Marshal.load(file)
	$completedlog		= Marshal.load(file)
	$questlog			= Marshal.load(file)
  end
end
#==============================================================================
module Cache
#==============================================================================  
  def self.questmaps(filename)
	load_bitmap("Graphics/Questmaps/", filename)
  end
 
end
zum Lesen den Text mit der Maus markieren


jetzt müsste es klappen... SOFERN du wirklich diesen questlog-script verwendest. ist es ein anderer, dann wird das selbstverständlich nicht hinhauen.
Was lebt, das kann man töten. Was tot ist, das kann man essen.
--------------------------------------------------------------------------
:map: Mapping: :star::star::star::star::star:
:compile: Scripting: :star-empty::star-empty::star-empty::star-empty::star-empty:
:system-monitor: Event: :star::star::star::star::star:
:doc: Story: :star::star::star::star::star-empty:
:pencil: Zeichnen: :star::star::star::star::star:
:palette: Pixeln: :star::star::star-half::star-empty::star-empty:
:music-beam-16: Musik & Sounds: :star::star::star::star-empty::star-empty:
--------------------------------------------------------------------------
Bevorzugter Maker: :ace:
Ebenfalls im Besitzt: :rmxp: :rmvx: :rmmv:

5

Sonntag, 17. Juli 2011, 18:59

Danke für die antworten habs aber geschafft es selbst um zuprogramieren. :D

Social Bookmarks