• Anmelden

1

Donnerstag, 20. März 2008, 22:01

Ist es möglich...

Hallo,

ich bin neu hier. Ich hab mal ne Frage zu den Battel Commands. Gibt es einen Script, der es möglich macht den Befehl "Skill", zu unterteilen in zum Beispiel Zauber und Techniken? Also das man ,wenn man auf Skill geht, auf eine weitere Auswahl stößt, in der man zwischen Zaubern und Techniken auswählen kann?

2

Donnerstag, 20. März 2008, 22:33

Möglich ist es schon. Das müsste man über das rgss selbst modifizieren und ich weiß jetzt nicht ob das so schon jemand, bezogen auf das standard KS, in Angriff genommen hat.


3

Donnerstag, 20. März 2008, 22:42

ich hab im internet ein tool dazu zum dwgesehen kann es aber nicht mehr finden sry googel mal

4

Dienstag, 25. März 2008, 22:24

Weiss denn sonst keiner wie man so etwas machen kann?

Wäre wirklich wichtig.

5

Dienstag, 25. März 2008, 22:51

Hi Felix91,

das Problem was du beschreibst kann man nicht so einfach lösen. Relativ unproblemtisch ist dabei noch die Veränderung des Kampfmenüs. Es gibt hier mehrere Tuts (Tutorials), die das genauer erklären. Das Problem liegt meiner bescheidenen Meinung eher darin, dass alle Skills, egal ob Zauber oder Waffenskills, in der Database auch unter Skills aufgelistet stehen. Das bedeutet, dass das System nicht wissen würde, welche Fähigkeit nun ein Skill und welche ein Zauber ist.

Also ich würde zumindest im Ansatz etwas versuchen wie:

Ein neues Element einführen (kannst du einfach in der Database machen) das nennst du dann Magie. Dieses Element an sich hat keine Funktion, wäre aber in einem Script (wenn ich das Scripten mit Ruby nun richtig verstehe) abfragbar. So nun baust du dein Kampfmenü (hier kann ich dir nicht großartig helfen, da musst du dich wirklich durch die Tuts lesen) und kannst dann innerhalb des Scripts jeweils die Fähigkeiten zu den skills und die Zauber zur Magie anzeigen lassen.

So würde ich es zumindest probieren. Allerdings weiß ich jetzt nicht, ob dir das hilft.

Liebe Grüße

Amboss

6

Donnerstag, 27. März 2008, 19:26

Zur Unterscheidung würde ich einfach festlegen, das die Zauber erst ab ID 50 anfangen und die normalen Tenchniken eben kleinere IDs haben.
Die Version mit dem Element geht natürlich auch. Wennn du mir sagst was dir lieber is, setz ich mich morgen mal hin und schreib dir das...

7

Freitag, 28. März 2008, 14:37

vielen dank für eure Hilfe.

@Lelle

ich würde mich freuen, wenn du es so ein Skript, wo ich Zaubern von Techniken trennen kann, für mich schreibst. Ich würde das aber so machen dass dieTechniken erst ab ID 50 anfangen und die Zauber kleinere IDs haben, da ich schon ein paar Zauber auf kleinen IDs festgelegt habe.

8

Freitag, 28. März 2008, 17:21

Also ich war mal wieder erstaunt wie unglaublich kompliziert der Code für die Kämpfe is, aber ich denke ich habs hingekriegt.

Scene_Battle 3 muss verändert werden zu dem hier:
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
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
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
#==============================================================================
# ** Scene_Battle (part 3)
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================
 
class Scene_Battle
  #--------------------------------------------------------------------------
  # * Start Actor Command Phase
  #--------------------------------------------------------------------------
  def start_phase3
	# Shift to phase 3
	@phase = 3
	# Set actor as unselectable
	@actor_index = -1
	@active_battler = nil
	# Go to command input for next actor
	phase3_next_actor
  end
  #--------------------------------------------------------------------------
  # * Go to Command Input for Next Actor
  #--------------------------------------------------------------------------
  def phase3_next_actor
	# Loop
	begin
  	# Actor blink effect OFF
  	if @active_battler != nil
    	@active_battler.blink = false
  	end
  	# If last actor
  	if @actor_index == $game_party.actors.size-1
    	# Start main phase
    	start_phase4
    	return
  	end
  	# Advance actor index
  	@actor_index += 1
  	@active_battler = $game_party.actors[@actor_index]
  	@active_battler.blink = true
	# Once more if actor refuses command input
	end until @active_battler.inputable?
	# Set up actor command window
	phase3_setup_command_window
  end
  #--------------------------------------------------------------------------
  # * Go to Command Input of Previous Actor
  #--------------------------------------------------------------------------
  def phase3_prior_actor
	# Loop
	begin
  	# Actor blink effect OFF
  	if @active_battler != nil
    	@active_battler.blink = false
  	end
  	# If first actor
  	if @actor_index == 0
    	# Start party command phase
    	start_phase2
    	return
  	end
  	# Return to actor index
  	@actor_index -= 1
  	@active_battler = $game_party.actors[@actor_index]
  	@active_battler.blink = true
	# Once more if actor refuses command input
	end until @active_battler.inputable?
	# Set up actor command window
	phase3_setup_command_window
  end
  #--------------------------------------------------------------------------
  # * Actor Command Window Setup
  #--------------------------------------------------------------------------
  def phase3_setup_command_window
	# Disable party command window
	@party_command_window.active = false
	@party_command_window.visible = false
	# Enable actor command window
	@actor_command_window.active = true
	@actor_command_window.visible = true
	# Set actor command window position
	@actor_command_window.x = @actor_index * 160
	# Set index to 0
	@actor_command_window.index = 0
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase)
  #--------------------------------------------------------------------------
  def update_phase3
	# If enemy arrow is enabled
	if @enemy_arrow != nil
  	update_phase3_enemy_select
	# If actor arrow is enabled
	elsif @actor_arrow != nil
  	update_phase3_actor_select
	# If skill window is enabled
	elsif @skill_window != nil
  	update_phase3_skill_select
	# If magic window is enabled
	elsif @magic_window != nil
  	update_phase3_magic_select
	# If item window is enabled
	elsif @item_window != nil
  	update_phase3_item_select
	# If actor command window is enabled
	elsif @actor_command_window.active
  	update_phase3_basic_command
	end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : basic command)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
	# If B button was pressed
	if Input.trigger?(Input::B)
  	# Play cancel SE
  	$game_system.se_play($data_system.cancel_se)
  	# Go to command input for previous actor
  	phase3_prior_actor
  	return
	end
	# If C button was pressed
	if Input.trigger?(Input::C)
  	# Branch by actor command window cursor position
  	case @actor_command_window.index
  	when 0  # attack
    	# Play decision SE
    	$game_system.se_play($data_system.decision_se)
    	# Set action
    	@active_battler.current_action.kind = 0
    	@active_battler.current_action.basic = 0
    	# Start enemy selection
    	start_enemy_select
  	when 1  # skill
    	# Play decision SE
    	$game_system.se_play($data_system.decision_se)
    	# Set action
    	@active_battler.current_action.kind = 1
    	# Start skill selection
    	start_skill_select
  	when 2 # magic
    	# Play decision SE
    	$game_system.se_play($data_system.decision_se)
    	# Set action
    	@active_battler.current_action.kind = 1
    	# Start skill selection
    	start_magic_select
  	when 3  # guard
    	# Play decision SE
    	$game_system.se_play($data_system.decision_se)
    	# Set action
    	@active_battler.current_action.kind = 0
    	@active_battler.current_action.basic = 1
    	# Go to command input for next actor
    	phase3_next_actor
  	when 4  # item
    	# Play decision SE
    	$game_system.se_play($data_system.decision_se)
    	# Set action
    	@active_battler.current_action.kind = 2
    	# Start item selection
    	start_item_select
  	end
  	return
	end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : skill selection)
  #--------------------------------------------------------------------------
  def update_phase3_skill_select
	# Make skill window visible
	@skill_window.visible = true
	# Update skill window
	@skill_window.update
	# If B button was pressed
	if Input.trigger?(Input::B)
  	# Play cancel SE
  	$game_system.se_play($data_system.cancel_se)
  	# End skill selection
  	end_skill_select
  	return
	end
	# If C button was pressed
	if Input.trigger?(Input::C)
  	# Get currently selected data on the skill window
  	@skill = @skill_window.skill
  	# If it can't be used
  	if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
    	# Play buzzer SE
    	$game_system.se_play($data_system.buzzer_se)
    	return
  	end
  	# Play decision SE
  	$game_system.se_play($data_system.decision_se)
  	# Set action
  	@active_battler.current_action.skill_id = @skill.id
  	# Make skill window invisible
  	@skill_window.visible = false
  	# If effect scope is single enemy
  	if @skill.scope == 1
    	# Start enemy selection
    	start_enemy_select
  	# If effect scope is single ally
  	elsif @skill.scope == 3 or @skill.scope == 5
    	# Start actor selection
    	start_actor_select
  	# If effect scope is not single
  	else
    	# End skill selection
    	end_skill_select
    	# Go to command input for next actor
    	phase3_next_actor
  	end
  	return
	end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : magic selection)
  #--------------------------------------------------------------------------
  def update_phase3_magic_select
	# Make skill window visible
	@magic_window.visible = true
	# Update skill window
	@magic_window.update
	# If B button was pressed
	if Input.trigger?(Input::B)
  	# Play cancel SE
  	$game_system.se_play($data_system.cancel_se)
  	# End skill selection
  	end_magic_select
  	return
	end
	# If C button was pressed
	if Input.trigger?(Input::C)
  	# Get currently selected data on the skill window
  	@skill = @magic_window.skill
  	# If it can't be used
  	if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
    	# Play buzzer SE
    	$game_system.se_play($data_system.buzzer_se)
    	return
  	end
  	# Play decision SE
  	$game_system.se_play($data_system.decision_se)
  	# Set action
  	@active_battler.current_action.skill_id = @skill.id
  	# Make skill window invisible
  	@magic_window.visible = false
  	# If effect scope is single enemy
  	if @skill.scope == 1
    	# Start enemy selection
    	start_enemy_select
  	# If effect scope is single ally
  	elsif @skill.scope == 3 or @skill.scope == 5
    	# Start actor selection
    	start_actor_select
  	# If effect scope is not single
  	else
    	# End skill selection
    	end_magic_select
    	# Go to command input for next actor
    	phase3_next_actor
  	end
  	return
	end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : item selection)
  #--------------------------------------------------------------------------
  def update_phase3_item_select
	# Make item window visible
	@item_window.visible = true
	# Update item window
	@item_window.update
	# If B button was pressed
	if Input.trigger?(Input::B)
  	# Play cancel SE
  	$game_system.se_play($data_system.cancel_se)
  	# End item selection
  	end_item_select
  	return
	end
	# If C button was pressed
	if Input.trigger?(Input::C)
  	# Get currently selected data on the item window
  	@item = @item_window.item
  	# If it can't be used
  	unless $game_party.item_can_use?(@item.id)
    	# Play buzzer SE
    	$game_system.se_play($data_system.buzzer_se)
    	return
  	end
  	# Play decision SE
  	$game_system.se_play($data_system.decision_se)
  	# Set action
  	@active_battler.current_action.item_id = @item.id
  	# Make item window invisible
  	@item_window.visible = false
  	# If effect scope is single enemy
  	if @item.scope == 1
    	# Start enemy selection
    	start_enemy_select
  	# If effect scope is single ally
  	elsif @item.scope == 3 or @item.scope == 5
    	# Start actor selection
    	start_actor_select
  	# If effect scope is not single
  	else
    	# End item selection
    	end_item_select
    	# Go to command input for next actor
    	phase3_next_actor
  	end
  	return
	end
  end
  #--------------------------------------------------------------------------
  # * Frame Updat (actor command phase : enemy selection)
  #--------------------------------------------------------------------------
  def update_phase3_enemy_select
	# Update enemy arrow
	@enemy_arrow.update
	# If B button was pressed
	if Input.trigger?(Input::B)
  	# Play cancel SE
  	$game_system.se_play($data_system.cancel_se)
  	# End enemy selection
  	end_enemy_select
  	return
	end
	# If C button was pressed
	if Input.trigger?(Input::C)
  	# Play decision SE
  	$game_system.se_play($data_system.decision_se)
  	# Set action
  	@active_battler.current_action.target_index = @enemy_arrow.index
  	# End enemy selection
  	end_enemy_select
  	# If skill window is showing
  	if @skill_window != nil
    	# End skill selection
    	end_skill_select
  	end
  	# If item window is showing
  	if @item_window != nil
    	# End item selection
    	end_item_select
  	end
  	# If magic window is showing
  	if @magic_window != nil
    	# Endmagic slection
    	end_magic_select
  	end
  	# Go to command input for next actor
  	phase3_next_actor
	end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : actor selection)
  #--------------------------------------------------------------------------
  def update_phase3_actor_select
	# Update actor arrow
	@actor_arrow.update
	# If B button was pressed
	if Input.trigger?(Input::B)
  	# Play cancel SE
  	$game_system.se_play($data_system.cancel_se)
  	# End actor selection
  	end_actor_select
  	return
	end
	# If C button was pressed
	if Input.trigger?(Input::C)
  	# Play decision SE
  	$game_system.se_play($data_system.decision_se)
  	# Set action
  	@active_battler.current_action.target_index = @actor_arrow.index
  	# End actor selection
  	end_actor_select
  	# If skill window is showing
  	if @skill_window != nil
    	# End skill selection
    	end_skill_select
  	end
  	# If item window is showing
  	if @item_window != nil
    	# End item selection
    	end_item_select
  	end
  	# If magic window is showing
  	if @magic_window != nil
    	# End magic selection
    	end_magic_select
  	end
  	# Go to command input for next actor
  	phase3_next_actor
	end
  end
  #--------------------------------------------------------------------------
  # * Start Enemy Selection
  #--------------------------------------------------------------------------
  def start_enemy_select
	# Make enemy arrow
	@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
	# Associate help window
	@enemy_arrow.help_window = @help_window
	# Disable actor command window
	@actor_command_window.active = false
	@actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * End Enemy Selection
  #--------------------------------------------------------------------------
  def end_enemy_select
	# Dispose of enemy arrow
	@enemy_arrow.dispose
	@enemy_arrow = nil
	# If command is [fight]
	if @actor_command_window.index == 0
  	# Enable actor command window
  	@actor_command_window.active = true
  	@actor_command_window.visible = true
  	# Hide help window
  	@help_window.visible = false
	end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_select
	# Make actor arrow
	@actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
	@actor_arrow.index = @actor_index
	# Associate help window
	@actor_arrow.help_window = @help_window
	# Disable actor command window
	@actor_command_window.active = false
	@actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_select
	# Dispose of actor arrow
	@actor_arrow.dispose
	@actor_arrow = nil
  end
  #--------------------------------------------------------------------------
  # * Start Skill Selection
  #--------------------------------------------------------------------------
  def start_skill_select
	# Make skill window
	@skill_window = Window_Skill.new(@active_battler)
	# Associate help window
	@skill_window.help_window = @help_window
	# Disable actor command window
	@actor_command_window.active = false
	@actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * Start Magic Selection
  #--------------------------------------------------------------------------
  def start_magic_select
	#p "MAKE M WINDOW"
	# Make skill window
	@magic_window = Window_Magic.new(@active_battler)
	# Associate help window
	@magic_window.help_window = @help_window
	# Disable actor command window
	@actor_command_window.active = false
	@actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * End Skill Selection
  #--------------------------------------------------------------------------
  def end_skill_select
	# Dispose of skill window
	@skill_window.dispose
	@skill_window = nil
	# Hide help window
	@help_window.visible = false
	# Enable actor command window
	@actor_command_window.active = true
	@actor_command_window.visible = true
  end
  #--------------------------------------------------------------------------
  # * End Magic Selection
  #--------------------------------------------------------------------------
  def end_magic_select
	# Dispose of skill window
	@magic_window.dispose
	@magic_window = nil
	# Hide help window
	@help_window.visible = false
	# Enable actor command window
	@actor_command_window.active = true
	@actor_command_window.visible = true
  end
  #--------------------------------------------------------------------------
  # * Start Item Selection
  #--------------------------------------------------------------------------
  def start_item_select
	# Make item window
	@item_window = Window_Item.new
	# Associate help window
	@item_window.help_window = @help_window
	# Disable actor command window
	@actor_command_window.active = false
	@actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * End Item Selection
  #--------------------------------------------------------------------------
  def end_item_select
	# Dispose of item window
	@item_window.dispose
	@item_window = nil
	# Hide help window
	@help_window.visible = false
	# Enable actor command window
	@actor_command_window.active = true
	@actor_command_window.visible = true
  end
end

zum Lesen den Text mit der Maus markieren


Scene_Battel 1 zu dem hier:


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
#==============================================================================
# ** Scene_Battle (part 1)
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================
 
class Scene_Battle
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
# Initialize each kind of temporary battle data
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
# Initialize battle event interpreter
$game_system.battle_interpreter.setup(nil, 0)
# Prepare troop
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
# Make actor command window
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2,"Zauber", s3, s4])
@actor_command_window.y = 128
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
# Make other windows
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
# Make sprite set
@spriteset = Spriteset_Battle.new
# Initialize wait count
@wait_count = 0
# Execute transition
if $data_system.battle_transition == ""
  Graphics.transition(20)
else
  Graphics.transition(40, "Graphics/Transitions/" +
    $data_system.battle_transition)
end
# Start pre-battle phase
start_phase1
# 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
# Refresh map
$game_map.refresh
# Prepare for transition
Graphics.freeze
# Dispose of windows
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
  @skill_window.dispose
end
if @item_window != nil
  @item_window.dispose
end
if @result_window != nil
  @result_window.dispose
end
# Dispose of sprite set
@spriteset.dispose
# If switching to title screen
if $scene.is_a?(Scene_Title)
  # Fade out screen
  Graphics.transition
  Graphics.freeze
end
# If switching from battle test to any screen other than game over screen
if $BTEST and not $scene.is_a?(Scene_Gameover)
  $scene = nil
end
  end
  #--------------------------------------------------------------------------
  # * Determine Battle Win/Loss Results
  #--------------------------------------------------------------------------
  def judge
# If all dead determinant is true, or number of members in party is 0
if $game_party.all_dead? or $game_party.actors.size == 0
  # If possible to lose
  if $game_temp.battle_can_lose
    # Return to BGM before battle starts
    $game_system.bgm_play($game_temp.map_bgm)
    # Battle ends
    battle_end(2)
    # Return true
    return true
  end
  # Set game over flag
  $game_temp.gameover = true
  # Return true
  return true
end
# Return false if even 1 enemy exists
for enemy in $game_troop.enemies
  if enemy.exist?
    return false
  end
end
# Start after battle phase (win)
start_phase5
# Return true
return true
  end
  #--------------------------------------------------------------------------
  # * Battle Ends
  # result : results (0:win 1:lose 2:escape)
  #--------------------------------------------------------------------------
  def battle_end(result)
# Clear in battle flag
$game_temp.in_battle = false
# Clear entire party actions flag
$game_party.clear_actions
# Remove battle states
for actor in $game_party.actors
  actor.remove_states_battle
end
# Clear enemies
$game_troop.enemies.clear
# Call battle callback
if $game_temp.battle_proc != nil
  $game_temp.battle_proc.call(result)
  $game_temp.battle_proc = nil
end
# Switch to map screen
$scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # * Battle Event Setup
  #--------------------------------------------------------------------------
  def setup_battle_event
# If battle event is running
if $game_system.battle_interpreter.running?
  return
end
# Search for all battle event pages
for index in 0...$data_troops[@troop_id].pages.size
  # Get event pages
  page = $data_troops[@troop_id].pages[index]
  # Make event conditions possible for reference with c
  c = page.condition
  # Go to next page if no conditions are appointed
  unless c.turn_valid or c.enemy_valid or
         c.actor_valid or c.switch_valid
    next
  end
  # Go to next page if action has been completed
  if $game_temp.battle_event_flags[index]
    next
  end
  # Confirm turn conditions
  if c.turn_valid
    n = $game_temp.battle_turn
    a = c.turn_a
    b = c.turn_b
    if (b == 0 and n != a) or
       (b > 0 and (n < 1 or n < a or n % b != a % b))
      next
    end
  end
  # Confirm enemy conditions
  if c.enemy_valid
    enemy = $game_troop.enemies[c.enemy_index]
    if enemy == nil or enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp
      next
    end
  end
  # Confirm actor conditions
  if c.actor_valid
    actor = $game_actors[c.actor_id]
    if actor == nil or actor.hp * 100.0 / actor.maxhp > c.actor_hp
      next
    end
  end
  # Confirm switch conditions
  if c.switch_valid
    if $game_switches[c.switch_id] == false
      next
    end
  end
  # Set up event
  $game_system.battle_interpreter.setup(page.list, 0)
  # If this page span is [battle] or [turn]
  if page.span <= 1
    # Set action completed flag
    $game_temp.battle_event_flags[index] = true
  end
  return
end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
# If battle event is running
if $game_system.battle_interpreter.running?
  # Update interpreter
  $game_system.battle_interpreter.update
  # If a battler which is forcing actions doesn't exist
  if $game_temp.forcing_battler == nil
    # If battle event has finished running
    unless $game_system.battle_interpreter.running?
      # Rerun battle event set up if battle continues
      unless judge
        setup_battle_event
      end
    end
    # If not after battle phase
    if @phase != 5
      # Refresh status window
      @status_window.refresh
    end
  end
end
# Update system (timer) and screen
$game_system.update
$game_screen.update
# If timer has reached 0
if $game_system.timer_working and $game_system.timer == 0
  # Abort battle
  $game_temp.battle_abort = true
end
# Update windows
@help_window.update
@party_command_window.update
@actor_command_window.update
@status_window.update
@message_window.update
# Update sprite set
@spriteset.update
# If transition is processing
if $game_temp.transition_processing
  # Clear transition processing flag
  $game_temp.transition_processing = false
  # Execute transition
  if $game_temp.transition_name == ""
    Graphics.transition(20)
  else
    Graphics.transition(40, "Graphics/Transitions/" +
      $game_temp.transition_name)
  end
end
# If message window is showing
if $game_temp.message_window_showing
  return
end
# If effect is showing
if @spriteset.effect?
  return
end
# If game over
if $game_temp.gameover
  # Switch to game over screen
  $scene = Scene_Gameover.new
  return
end
# If returning to title screen
if $game_temp.to_title
  # Switch to title screen
  $scene = Scene_Title.new
  return
end
# If battle is aborted
if $game_temp.battle_abort
  # Return to BGM used before battle started
  $game_system.bgm_play($game_temp.map_bgm)
  # Battle ends
  battle_end(1)
  return
end
# If waiting
if @wait_count > 0
  # Decrease wait count
  @wait_count -= 1
  return
end
# If battler forcing an action doesn't exist,
# and battle event is running
if $game_temp.forcing_battler == nil and
   $game_system.battle_interpreter.running?
  return
end
# Branch according to phase
case @phase
when 1  # pre-battle phase
  update_phase1
when 2  # party command phase
  update_phase2
when 3  # actor command phase
  update_phase3
when 4  # main phase
  update_phase4
when 5  # after battle phase
  update_phase5
end
  end
end

zum Lesen den Text mit der Maus markieren


Man brauch dieses zusätzliche Window:

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
#==============================================================================
# ** Window_Magic
#==============================================================================
 
class Window_Magic < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  # actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
super(0, 128, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
  self.y = 64
  self.height = 256
  self.back_opacity = 160
end
  end
  #--------------------------------------------------------------------------
  # * Acquiring Skill
  #--------------------------------------------------------------------------
  def skill
return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
if self.contents != nil
  self.contents.dispose
  self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
  skill = $data_skills[@actor.skills[i]]
  if skill!=nil and skill.id<=50
    @data.push(skill)
  end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
  self.contents = Bitmap.new(width - 32, row_max * 32)
  for i in 0...@item_max
    draw_item(i)
  end
end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  # index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
  self.contents.font.color = normal_color
else
  self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
end

zum Lesen den Text mit der Maus markieren


und zu guter letzt muss Window_Skill zu dem hier verändert werden:

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
#==============================================================================
# ** Window_Skill
#------------------------------------------------------------------------------
#  This window displays usable skills on the skill and battle screens.
#==============================================================================
 
class Window_Skill < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  # actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
super(0, 128, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
  self.y = 64
  self.height = 256
  self.back_opacity = 160
end
  end
  #--------------------------------------------------------------------------
  # * Acquiring Skill
  #--------------------------------------------------------------------------
  def skill
return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
if self.contents != nil
  self.contents.dispose
  self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
  skill = $data_skills[@actor.skills[i]]
  if skill!=nil and skill.id>50
    @data.push(skill)
  end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
  self.contents = Bitmap.new(width - 32, row_max * 32)
  for i in 0...@item_max
    draw_item(i)
  end
end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  # index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
  self.contents.font.color = normal_color
else
  self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
end

zum Lesen den Text mit der Maus markieren


Der Punkt zum auswählen der Zauber heißt jetzt "Zauber". Das kannst du aber in Scene_Battel 1 in Zeile 30 ändern.
Insgesammt bin ich mit der ganzen Sache unzufrieden, aber ich muss erhlich sagen, den Battelcode zu verändern bringt mich immer relativ schnell an den Rand des Wahnsinns.

Und mir is grad noch ein Problem aufgefallen: Die Zauber sind nicht vom Menü aus aufrufbar. Dazu müsste man da noch nen zusätzlichen Menüpunkt einbauen.

9

Freitag, 28. März 2008, 18:27

Ein weiterer Fehler:Attachment 2404

Aber ansonsten ist dein Skript sehr gut.Ich würde mich sehr freuen,wen du es noch vollenden könntest
Meine Spiele:

Spoiler
Final Fantasy Revenge

Story:2%

Mapping:3%

Sounds:1%

Equipment:8%

Items:6%

Skripte:70%



----d -- --r---s- (die Restlichen Buchstaben sag ich noch nicht !)

Features:

2 verschiedne Intros,1 wird noch gelöscht !



zum Lesen den Text mit der Maus markieren

10

Freitag, 28. März 2008, 18:33

vielen dank,

das skript ist an sich ganz gut doch in verbidung mit diesem Skript hier Verbessertes Standard-KS funktioniert das net, was ich sehr schade finde, denn ich würde gerne beide haben...

in hoffnung auf eine Lösung

Felix91

11

Freitag, 28. März 2008, 19:46

@ Todes Schlaf:
Hab den Fehler gefunden und behoben. Lag in Battel_Scene 3. Müsst ihr dann nochmal neu einsetzen.

@Felix:
Ich hasse das verbesserte standart KS. Also es sieht gut aus und so, aber der Code der hier im Forum ist, is unendlich unübersichltich. Beschreib mal genauer worans hakt. Also gibts ne Fehlermeldung? oder funktionierts einfach nich?

12

Sonntag, 30. März 2008, 22:12

nein eine Fehlermeldung kommt nicht, es funktioniert einfach nicht. Das verbesserte Standart-ks verläuft normal weiter,doch dieses skript klappt dann nicht mehr.

13

Montag, 31. März 2008, 15:16

Sorry, aber ich hab im Moment echt keine Nerven mich durch das Skript zu wühlen. Vielleicht irgendwann mal.... Oder du suchst dir jemand anders, der grad etwas motivierter ist...

Yuber

Seher

Motto: Die Welt zu beherrschen.

  • Nachricht senden

14

Montag, 31. März 2008, 22:46

Das Script ist gut für mein nächstes Spiel. Da soll das auch unterteilt sein ABER: wenn ich z.B. ins Menü auf Fähigkeiten gehe wird nicht der Name der Fähigkeit angezeigt man sieht nur das Icon. Das gleiche im Kampf! Wieso?
Nur noch selten hier.

'Til now, I always let people walk all over me!
From now on, if anyone makes fun of me, I'll kill 'em! Just like that!

15

Dienstag, 1. April 2008, 00:22

Ich habe keine Ahnung. Bei mir sieht man sowohl Name als auch Icon. Benutzt du noch andere Scripts?

16

Donnerstag, 7. August 2008, 17:20

es hat sich erledigt.

Ich habe herausgefunden, wie man beide Skripte kombiniert.

Social Bookmarks