• Anmelden

1

Sonntag, 17. Mai 2009, 08:22

GTBS - GubiD's Tactical Battle System V1.4.1


[img='/scriptdb/sites/default/files/imagecache/logo/Customizable Skill Names.JPG',left][/img] von Gubid
Taktisches Isometrisches Kampfsystem
Bild Dies ist eine automatisch generierter Beitrag. Solltest du Fragen dazu haben, Fehler finden, Irgendetwas unklar sein, dann melde dich bei Playm.
Bild This is an automatically generated Post. Have you some questions, found errors or need more informations, please contact Playm.

2

Montag, 7. Dezember 2009, 18:31

GTBS Update Released

I would just like to mention that GTBS 1.5 has released for XP and includes alot of new features and bug fixes.
Spoiler: GTBS 1.5 Features/Updates

============================
=== GTBS 1.5 Release ===
============================
[bug] Scroll error when adjusting scroll speed
[bug] Place error
[bug] No weapon equiped error when attacking
[bug] Help info not displayed when casting skills
[bug] Message location always set to top during battle
[bug] Inability to transfer from battle
[bug] Transfer player errors
[bug] Revive Skills errors
[bug] Requiring _down graphics for summons/enemies (when remove battlers option enabled)
[bug] Lots of other bugs that I dont even remember.
Feature New AI (Will use rating system for actions from database as well as cast skills that inflict/remove states)
Feature Large Units
Feature New Animated Battler Engine(Fully customizable)
Feature Animated Battler Pose Sound Association (Allows another animation to be played when a 'pose' is executed)
Feature Movement Modifications ( Allows you to configure based on equipment/weapons/states, move advantages/disadvantages )
Feature New Remove Battler Options (none, only enemies, all)
Feature Change Open/Exit Text in module for easier management/update
Feature Change Menu Commands Text in module for easier management/update
Feature Pump Skills (like in SRT, skills that dont require your turns action)
Feature Multiple Summon Counter (Allows you to summon the same unit multiple times until the limit is reached, which is determined inside gtbs module)
Feature Animation on Death
Feature Open Scene Events
Feature New Skill Min Range option (allows it to work more like bow's)
Feature Ability to acquire items/gold immediately after killing enemy
Feature State icons displayed in Status Window
Feature State icons used for damage preview section (so you know what will happen when you are attacked)
Feature Face Enemy at battle begin option
Feature Scroll Map manually functions (for in battle events)
Feature Replace Actor method (Allows you to replace an actor (by id) with a new one)
Feature Force Move Before Action (Simply ends turn on action if move has not already been performed, if you want)
Feature Expanded Secret Hunt with the ability to gain multiple items, instead of just 1.
Feature All current patches included and only enable when located.
zum Lesen den Text mit der Maus markieren

I have also created a patch to the Mousie script which makes it GTBS compatible.
Spoiler: Mouse Script

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
if defined?(Sprite_Mouse)
#==============================================================================
# Sprite Mouse changes
#==============================================================================
class Sprite_Mouse
  def dispose
	@sprite.dispose
  end
end
#==============================================================================
# ** Window
#------------------------------------------------------------------------------
#	Adds all window instances to $windows array so that Input will only be
#	registered if Mouse is over window or key was pressed.
#==============================================================================
$windows = []
class Window_Base < Window
  alias init_win_mouse_gtbs initialize
  def initialize(*args)
	init_win_mouse_gtbs(*args)
	$windows << self
  end
  alias dispose_win_mouse_gtbs dispose
  def dispose(*args)
	$windows.delete(self)
	dispose_win_mouse_gtbs(*args)
  end
end
 
#==============================================================================
# ** Input
#------------------------------------------------------------------------------
#   Modifies mouse input so that it is only registered if over active window or
#   key was logged.
#==============================================================================
class << Input
  UMS_Present = defined?(NORMAL_MODE)
  def Input.get_active_window
	win = nil
	for window in $windows
  	if !window.disposed? and window.active and window.visible and 
    	!window.is_a?(Window_Actor_Display) and !window.is_a?(Window_Help)
    	if UMS_Present and !window.is_a?(Window_Dummy)
      	win = window
    	else
      	win = window
    	end
  	end
	end
	return win
  end
  alias upd_gtbs_input_mouse update
  def Input.update
	@new_cycle = true
	upd_gtbs_input_mouse
  end
  #--------------------------------------------------------------------------
  # * Update old input triggers
  # 	num : A, B, C
  #--------------------------------------------------------------------------
  alias gtbs_mouse_old_trigger? trigger? unless $@
  def Input.trigger?(num)
	# Result old result(mousie method) if not gtbs battle
	return gtbs_mouse_old_trigger?(num) if !$scene.is_a?(Scene_Battle_TBS)
 
	result = old_trigger?(num) 
	return result if result == true  #return keyboard result if it was found
 
	# If Mouse is inside of the game window.
	if Mouse.pos(false) != nil 
  	active = Input.get_active_window
  	# If no active window
  	if active.nil?
    	if Mouse.click?(Mouse::Middle_Click) and !$scene.busy
      	$mouse.set_cursor
      	return false
    	elsif Mouse.click?(Mouse::Left_Click) and num == Input::C and !$scene.busy
      	cursor = $scene.cursor
      	if (cursor.x != $mouse.tile_x or cursor.y != $mouse.tile_y) and $scene.phase != 6
        	$mouse.set_cursor
        	@new_cycle = false
      	else
        	return (old_trigger?(num) or (Mouse.click?(Mouse::Left_Click) and num == Input::C and @new_cycle))
      	end
    	elsif Mouse.click?(Mouse::Right_Click) and num == Input::B
      	return Mouse.click?(Mouse::Right_Click)
    	else; return false
    	end
  	#If active window, then ensure that cursor is within dialog and proceed like normal
  	elsif active != nil and $mouse.x.between?(active.x, active.x+active.width) and 
    	$mouse.y.between?(active.y, active.y+active.height)
    	case num
    	when Input::A
      	return (old_trigger?(num) or Mouse.click?(Mouse::Middle_Click))
    	when Input::B
      	if MOUSE_RIGHT_ACTION == 0
        	return (old_trigger?(num) or Mouse.click?(Mouse::Right_Click))
      	else
        	if !$scene.is_a?(Scene_Map)
          	return (old_trigger?(num) or Mouse.click?(Mouse::Right_Click))      	
        	else
          	return (old_trigger?(num))
        	end
      	end
    	when Input::C
      	if MOUSE_LEFT_ACTION == 0
        	return (old_trigger?(num) or Mouse.click?(Mouse::Left_Click))    	
      	else
        	if !$scene.is_a?(Scene_Map)
          	return (old_trigger?(num) or Mouse.click?(Mouse::Left_Click))
        	else
          	if $mouse.clicked == 2
            	return (old_trigger?(num) or Mouse.click?(Mouse::Left_Click))
          	else
            	return (old_trigger?(num))
          	end
        	end
      	end
    	end
  	end
	end
	return result
  end
  #--------------------------------------------------------------------------
  # * Check to see if an old input call was repeated
  # 	num : B
  #--------------------------------------------------------------------------
  alias old_repeat? repeat? unless $@
  def repeat?(num)
	return old_repeat?(num) if Mouse.pos(false) == nil
	if num == Input::B
  	return (old_repeat?(num) or Mouse.repeat?(Mouse::Right_Click))
	else
  	return old_repeat?(num)
	end
  end  
end
#==============================================================================
# Game Battler - changes introduced by mouse
#==============================================================================
class Game_Battler
  #--------------------------------------------------------------------------
  # Turn Toward (object) - Turns the player towards the object based on x,y
  #--------------------------------------------------------------------------
  def turn_toward(object)
	# Get difference in player coordinates
	sx = self.x - object.x
	sy = self.y - object.y
	# If coordinates are equal
	if sx == 0 and sy == 0
  	return
	end
	# If horizontal distance is longer
	if sx.abs > sy.abs
  	# Turn to the right or left towards player
  	sx > 0 ? turn_left : turn_right
	# If vertical distance is longer
	else
  	# Turn up or down towards player
  	sy > 0 ? turn_up : turn_down
	end
  end
end
#==============================================================================
# Scene Battle TBS changes
#==============================================================================
class Scene_Battle_TBS  
  attr_reader :cursor
  attr_reader :windows
  #--------------------------------------------------------------------------
  # Start - Replace Mouse with GTBS version
  #--------------------------------------------------------------------------
  alias start_gtbs_battle start
  def start
	start_gtbs_battle
	$mouse.dispose
	$mouse = Sprite_Mouse_GTBS.new
  end
  #--------------------------------------------------------------------------
  # Busy - Prevents mouse click from interruppting a process
  #--------------------------------------------------------------------------
  def busy
	return true if @tbs_phase > 6 
  end
  #--------------------------------------------------------------------------
  # Phase - Returns the current TBS phase
  #--------------------------------------------------------------------------
  def phase 
	return @tbs_phase
  end
  #--------------------------------------------------------------------------
  # Terminate - Resets the mouse back to default
  #--------------------------------------------------------------------------
  alias terminate_gtbs_battle terminate
  def terminate
	$mouse.dispose
	$mouse = Sprite_Mouse.new
	terminate_gtbs_battle
  end
  #--------------------------------------------------------------------------
  # tbs_phase_6 - wait phase updates for mouse
  #--------------------------------------------------------------------------
  alias wait_phase_mouse_update tbs_phase_6
  def tbs_phase_6
	unless @wait_pic
  	wait_phase_mouse_update
	end
	update_battler_to_mouse_direction(@active_battler)
	wait_phase_mouse_update
  end
  #--------------------------------------------------------------------------
  # Update Battler To Mouse Direction (pretty self explanitory)
  #--------------------------------------------------------------------------
  def update_battler_to_mouse_direction(battler)
	if Mouse.pos(false) != nil
  	pos = POS.new($mouse.tile_x, $mouse.tile_y)
  	@active_battler.turn_toward(pos)
	end
  end  
end
#==============================================================================
# Game Event Update
#==============================================================================
class Game_Event < Game_Character
  def at_xy_coord(x,y)
	return (x == self.x and y == self.y)
  end
end 
#==============================================================================
# Sprite Mouse
#==============================================================================
class Sprite_Mouse
  #--------------------------------------------------------------------------
  # Initialize - Changes to overall reduce lag of the Mousie System
  #--------------------------------------------------------------------------
  alias init_spr_mouse initialize
  def initilaize
	init_spr_mouse
	@cur_tile_x = 0
	@cur_tile_y = 0
  end
  #-------------------------------------------------------------------------- 
  # Update - Same as above
  #--------------------------------------------------------------------------
  alias update_spr_mouse update
  def update
	Mouse.update
	if Mouse.pos(false) != nil
  	update_spr_mouse
	end
	@new_cycle_x = true
	@new_cycle_y = true
  end
  #--------------------------------------------------------------------------
  # * Mouseover Icon - more changes to reduce lag
  #--------------------------------------------------------------------------
  alias gtbs_mouse_over_icon_fix mouse_over_icon
  def mouse_over_icon
	return if $game_map.scrolling? or $game_player.moving?
	gtbs_mouse_over_icon_fix 
  end
  #--------------------------------------------------------------------------
  # * Get the current x-coordinate of the tile - iso based as well
  #--------------------------------------------------------------------------
  def tile_x
	if !@new_cycle_x
  	return @cur_tile_x
	else
  	if !$game_map.iso?
    	@cur_tile_x = ((($game_map.display_x.to_f/4.0).floor + @x.to_f)/32.0).floor
    	@new_cycle_x = false
    	return @cur_tile_x
  	else
    	x,y = $mouse.x, $mouse.y
    	x += $game_map.display_x/4
    	y += $game_map.display_y/4
    	for pos in $game_map.grid.keys
      	rect = $game_map.grid[pos]
      	if rect.in?(x,y)
        	@cur_tile_x = pos[0]
        	@new_cycle_x = false
        	return @cur_tile_x
      	end
    	end
  	end
  	return @cur_tile_x
	end
  end
  #--------------------------------------------------------------------------
  # * Get the current y-coordinate of the tile - iso based as well
  #--------------------------------------------------------------------------
  def tile_y
	if !@new_cycle_y
  	return @cur_tile_y
	else
  	if !$game_map.iso?
    	@cur_tile_y = ((($game_map.display_y.to_f/4.0).floor + @y.to_f)/32.0).floor
    	@new_cycle_y = false
    	return @cur_tile_y
  	else
    	x,y = $mouse.x, $mouse.y
    	x += $game_map.display_x/4
    	y += $game_map.display_y/4
    	for pos in $game_map.grid.keys
      	rect = $game_map.grid[pos]
      	if rect.in?(x,y)
        	@cur_tile_y = pos[1]
        	@new_cycle_y = false
        	return @cur_tile_y
      	end
    	end
  	end
  	return @cur_tile_y
	end  
  end
end
#==============================================================================
# ** Sprite_Mouse_GTBS
#------------------------------------------------------------------------------
#  This sprite is used to display the mouse.  It observes the Mouse module and
#  automatically changes mouse graphic conditions.
#==============================================================================
class Sprite_Mouse_GTBS
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :icon
  attr_accessor :x
  attr_accessor :y
  attr_accessor :clicked
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
	@x        	= 0
	@y        	= 0
	@clicked	= nil
	@sprite   	= Sprite.new
	@sprite.z 	= 10000
	@draw     	= false
	@events   	= {}
	reset
  end
  def dispose
	@sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Reset
  #--------------------------------------------------------------------------
  def reset
	@icon = RPG::Cache.icon(MOUSE_ICON[MOUSE_DEFAULT])
	@icon_name = MOUSE_ICON[MOUSE_DEFAULT]
	@sprite.bitmap.dispose if @sprite.bitmap != nil and @sprite.bitmap.disposed?
	@sprite.bitmap = @icon
	@draw = false
	# Updates the co-ordinates of the icon
	@x, @y = Mouse.pos
	@sprite.x = @x
	@sprite.y = @y
	@sprite.z = 10000
	@sprite.visible = true
	@cur_tile_x = 0
	@cur_tile_y = 0
  end
  #--------------------------------------------------------------------------
  # * Set Cursor - Updates the location of the battle cursor
  #--------------------------------------------------------------------------
  def set_cursor
	$game_troop.interpreter.set_tbs_cursor(tile_x, tile_y)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
	Mouse.update
	@sprite.update
	# Updates the co-ordinates of the icon
	@x, @y = Mouse.pos
	return if @x == nil or @y == nil
	#Get Client Size
	width,height = Mouse.client_size
	@sprite.x = @x
	@sprite.y = @y
	#Check if needs to restart
	(@draw = (@x < 0 or @y < 0 or @x > width or @y > height)) if !@draw
	#Reset if need to reset
	reset if @draw and @x > 1 and @y > 1 and @x < width and @y < height
	#Show mouse if need to
	if (@x < 0 or @y < 0 or @x > width or @y > height) and @visible
  	Mouse.visible?
	elsif (@x > 0 or @y > 0 or @x < width or @y < height) and !@visible
  	Mouse.visible?(false)
	end
 
	@new_cycle_x = true
	@new_cycle_y = true
  end
  #--------------------------------------------------------------------------
  # * Get the current x-coordinate of the tile - iso as well
  #--------------------------------------------------------------------------
  def tile_x
	if !@new_cycle_x
  	return @cur_tile_x
	else
  	if !$game_map.iso?
    	@cur_tile_x = ((($game_map.display_x.to_f/4.0).floor + @x.to_f)/32.0).floor
    	@new_cycle_x = false
    	return @cur_tile_x
  	else
    	x,y = $mouse.x, $mouse.y
    	x += $game_map.display_x/4
    	y += $game_map.display_y/4
    	for pos in $game_map.grid.keys
      	rect = $game_map.grid[pos]
      	if rect.in?(x,y)
        	@cur_tile_x = pos[0]
        	@new_cycle_x = false
        	return @cur_tile_x
      	end
    	end
  	end
  	return @cur_tile_x
	end
  end
  #--------------------------------------------------------------------------
  # * Get the current y-coordinate of the tile - iso as well
  #--------------------------------------------------------------------------
  def tile_y
	if !@new_cycle_y
  	return @cur_tile_y
	else
  	if !$game_map.iso?
    	@cur_tile_y = ((($game_map.display_y.to_f/4.0).floor + @y.to_f)/32.0).floor
    	@new_cycle_y = false
    	return @cur_tile_y
  	else
    	x,y = $mouse.x, $mouse.y
    	x += $game_map.display_x/4
    	y += $game_map.display_y/4
    	for pos in $game_map.grid.keys
      	rect = $game_map.grid[pos]
      	if rect.in?(x,y)
        	@cur_tile_y = pos[1]
        	@new_cycle_y = false
        	return @cur_tile_y
      	end
    	end
  	end
  	return @cur_tile_y
	end  
  end
  #--------------------------------------------------------------------------
  # * Get Object - Returns GTBS battle objects only
  #--------------------------------------------------------------------------
  def get_object
	for event in $game_map.tactical_events
  	return [true,event] if event.at_xy_coord(tile_x, tile_y)
	end
	return [false,nil]
  end  
  #--------------------------------------------------------------------------
  # * MOUSE Refresh(Event, List, Characterset Name - Here for compatibility
  #--------------------------------------------------------------------------
  def refresh(event, list)
  end
end
#==============================================================================
# Rectangle Class Method Additions
#==============================================================================
class Rect
  #-------------------------------------------------------------------------- 
  # In? - Returns if the ploted x,y is contained with-IN the rect
  #--------------------------------------------------------------------------
  def in?(x,y)
	if (self.x <= x and (self.x + self.width) >= x) and 
  	(self.y <= y and (self.y + self.height) >= y)
  	return true
	end
	return false
  end
end
#==============================================================================
# Game Map Changes - for iso mouse movement
#==============================================================================
class Game_Map
  attr_reader :grid
  #--------------------------------------------------------------------------
  # Setup - Sets up the current map click grid if iso
  #--------------------------------------------------------------------------
  alias gtbs_gm_setup_mouse setup
  def setup(map_id)
	gtbs_gm_setup_mouse(map_id)
	@grid = {}
	generate_click_grid if iso?
  end
  #--------------------------------------------------------------------------
  # Generate Click Grid - Creates click gride based on iso coords
  # Due to size of the objects, there will be overlap in placed, but it shouldn't 
  # matter because it will always use the first match found.  Also if you click
  # in an area that is not within any click grid, then it will use $game_player, or 
  # battle_cursor current value for the missing coord to prevent errors.
  #--------------------------------------------------------------------------
  def generate_click_grid
	for x in 0...width
  	for y in 0...height
    	sx = (x*32 - y*32) + (32*height)
    	sy = (x*32 + y*32)/2
    	rect = Rect.new(sx-13,sy+6,36,19)
    	@grid[[x,y]] = rect
  	end
	end
  end
end
end

zum Lesen den Text mit der Maus markieren

Feel free to visit www.CreationAsylum.net for more assistance with the system.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »GubiD« (9. Dezember 2009, 17:49)


3

Mittwoch, 9. Dezember 2009, 17:48

I have created a new addon that allows you to monitor the order in which battlers will take their actions, including skills. Here is the code for this:
Spoiler: ActList Code

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
#--------------------------------------------------------------
# Act List addon
#--------------------------------------------------------------
module GTBS
  ACT_LIST = true
end
class Battle_Option < Window_Selectable
  #----------------------------------------------------------------------------
  # Refresh Process
  #----------------------------------------------------------------------------
  def refresh
	@options = []
	@options += ["End Turn"] if $game_system.cust_battle == "TEAM"
	@options += ["Act List"] if GTBS::ACT_LIST and $game_system.cust_battle != "TEAM"
	@options += ["Conditions", "Config", "Cancel"]
	if self.contents != nil
  	self.contents.clear
  	self.contents = nil
	end
	self.height = @options.size * 24 + 32
	self.contents = Bitmap.new(width - 32, height - 32)
	for i in 0...@options.size
  	self.contents.draw_text(2,i*24,100,24,@options[i])
	end
	@item_max = @options.size
  end
  #--------------------------------------------------------------
  # Update Curosr Rect changes - fixes mouse over issues
  #--------------------------------------------------------------
  def update_cursor_rect
	if @index < 0
  	self.cursor_rect.empty
  	return
	end
	row = @index / @column_max
	if row < self.top_row
  	self.top_row = row
	end
	if row > self.top_row + (self.page_row_max - 1)
  	self.top_row = row - (self.page_row_max - 1)
	end
	cursor_width = self.width / @column_max - 32
	x = @index % @column_max * (cursor_width + 32)
	y = @index / @column_max * 24 - self.oy
	self.cursor_rect.set(x, y, cursor_width, 24)
  end
end
#--------------------------------------------------------------
# Scene TBS changes
#--------------------------------------------------------------
class Scene_Battle_TBS
  #--------------------------------------------------------------
  # TBS Phase 0 - No Actor selected, dialog call updates
  #--------------------------------------------------------------
  alias act_list_update tbs_phase_0
  def tbs_phase_0
	if Input.trigger?(Input::C) and @windows["Act List"] != nil and 
  	@windows["Act List"].active
  	Sound.play_decision
  	selected = @windows["Act List"].data
  	@cursor.moveto(selected.x, selected.y)
  	@windows["Act List"].dispose
  	@windows["Act List"] = nil
  	@cursor_active = true
  	return
	elsif Input.trigger?(Input::B) and @windows["Act List"] != nil and 
  	@windows["Act List"].active
  	Sound.play_cancel
  	@windows["Act List"].dispose
  	@windows["Act List"] = nil
  	@windows["option"].active = true
  	@windows["option"].visible = true
  	return
	end
	if Input.trigger?(Input::C) and @windows["option"].active
  	case @windows["option"].data[@windows["option"].index]
  	when "Act List"
    	@windows["Act List"] = Window_ActList.new
    	@windows["Act List"].active = true
    	@windows["Act List"].visible = true
    	@windows["Act List"].index = 0
 
    	@windows["option"].active = false
    	@windows["option"].visible = false
    	Sound.play_decision
    	return
  	end
	end
	act_list_update
  end
end
#--------------------------------------------------------------
# Window ActList
#--------------------------------------------------------------
class Window_ActList < Window_Selectable
  Max_Updates = 400
  Max_List_Size = 20
  #--------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------
  def initialize
	div = 4
	div += 4 if GTBS::VX
	x = (Scene_Battle_TBS::CENTER_X/div) - 120
	y = 60
	super(x,y,240,420)
	self.contents = Bitmap.new(width-32, height-32)
	refresh
  end
  #--------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------
  def refresh
	update_list
	if self.contents != nil
  	self.contents = nil
  	self.contents = Bitmap.new(320,@act_list.size*32)
	end
	for i in 0...@act_list.size
  	draw_list_item(0,i*32,i)
	end
	@item_max = @act_list.size
  end
  #--------------------------------------------------------------
  # * Draw List Item
  #--------------------------------------------------------------
  def draw_list_item(x,y,i)
	if @act_list[i].is_a?(Array)
  	string = @act_list[i][0].name
  	string += "("+@act_list[i][1][0].name+")"
	else
  	string = @act_list[i].name
	end
	self.contents.draw_text(x+5,y,320,32,"#{i+1} : #{string}")
  end
  #--------------------------------------------------------------
  # * Update List
  #--------------------------------------------------------------
  def update_list
	act_list_pre = []
	for event in $game_system.tactical_events
  	if event.is_a?(Game_Battler)
    	act_list_pre << event.clone
  	end
	end
 
	act_list_pre.sort! { |a, b| a.atb <=> b.atb}
	@act_list_pre = act_list_pre.reverse
	#fill_local_vars
 
	@act_list = []
	@data 	= []
	count = Max_Updates
 
	while count > 0
  	populate_list
  	count -= 1
	end
  end
  #--------------------------------------------------------------
  # Populate List - Same routine that is used in GTBS battle to determine 
  # turn order, alhtough by a different name.
  #--------------------------------------------------------------
  def populate_list
	return if @act_list_pre.size == 0
	use_spell = []
	need_update = false
	active = [nil,0]
	for battler in @act_list_pre
  	if battler.muted? or battler.paralyzed? or battler.sleeping? or battler.knocked_out?
    	battler.skill_cast = nil
    	battler.up_cast(true) 
    	next
  	end    	
 
  	if battler.atb > 999 and !battler.dead?
    	if battler.sleeping? or battler.paralyzed?
      	battler.atb -= battler.agi
      	next
    	else
      	if battler.atb > active[1]
        	active = [battler, battler.atb]
      	elsif battler.atb == active[1]
        	if battler.agi > active[0].agi
          	active = [battler, battler.atb]
        	end
      	end
    	end
  	end
  	if battler.cast != nil and !battler.casting?
    	active = [battler, battler.atb, battler.cast]
    	use_spell << [battler, battler.atb, battler.cast]
  	end
	end
	if use_spell.size == 0
  	if active[0] != nil
    	active[0].reset_atb
    	set_active_battler(active) 
    	return
  	else
    	need_update = true 
  	end
	else
  	for i in 0...use_spell.size
    	active = use_spell[i]
    	set_active_battler(active)
    	#clear skill info
    	active[0].skill_cast = nil
    	active[0].up_cast(true) 
 
  	end
  	return
	end
 
	if need_update == true 
  	for battler in @act_list_pre
    	battler.atb += battler.agi unless battler.dead? or battler.paralyzed? or battler.sleeping? or battler.knocked_out?
 
    	if battler.casting? and !battler.muted?
      	battler.up_cast
    	end
  	end
	end
  end
  #--------------------------------------------------------------
  # Set Active Battler - Routine to populate list, First in First out method.
  #--------------------------------------------------------------
  def set_active_battler(info)
	data = info[0]
	if info[2] != nil
  	data = [info[0], info[2]]
	end
	@data << info
	@act_list.push(data.dup) unless @act_list.size == Max_List_Size
  end
  #--------------------------------------------------------------
  # Data - Returns the actor for the selected line
  #--------------------------------------------------------------
  def data
	return @data[self.index][0]
  end
end
 
zum Lesen den Text mit der Maus markieren

4

Donnerstag, 18. November 2010, 18:01

Wie installiert man den GTBS - GubiD's Tactical Battle System V1.4.1 im RPGXP

hallo, zusammen
ich hab eine frage zum GTBS - GubiD's Tactical Battle System V1.4.1
Wie installiert man den kann mir irgend jemand helfen :D
und ich würd ihn gern auf deutsch haben lässt sich da noch irgend was machen ?

würd mich freuen wenn mir jemand helfen kann :D

Edit Und ich suche ein tool womit man sockeln kann
zbs. wenn man ein kristall in eine waffe packen kann was zbs. +10 attack gibt

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Gjorsch« (19. November 2010, 09:47)


Ähnliche Themen

Social Bookmarks