Bienvenue visiteur !
|
Statistiques
Liste des membres
Contact
Mentions légales
426 connectés actuellement
29541136 visiteurs depuis l'ouverture
8548 visiteurs aujourd'hui
Partenaires
Tous nos partenaires
Devenir partenaire
|
Messages postés par 7163D Nombre de messages référencés sur Oniromancie (non supprimés): 929 Aller à la page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Posté dans News - Voeux Oniriques |
7163D -
posté le 01/01/2015 à 10:04:08. (946 messages postés) |
| Bonne année!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG maker VX Ace] Party Storage System |
7163D -
posté le 31/12/2014 à 19:03:15. (946 messages postés) |
| Pas de problème!
J'ai juste écrit un peu vite:
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
|
module Cache
def self.storage(filename)
load_bitmap("Graphics/Storage/", filename)
end
end
class Window_Base < Window
def draw_actor_storage(face_name, face_index, x, y, enabled = true)
bitmap = Cache.storage(face_name)
rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)
contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
bitmap.dispose
end
end
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ Sakuraba's Party Storage System (PSS) v1.2
#≡ by: Sakuraba
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Change Log:
#≡ 12/12/2014: 13:30 > Added Release Feature
#≡ 25/08/2014: 20:30 > Added Lock Feature
#≡ 23/07/2014: 14:42 > Finished Script
#≡ 22/07/2014: 19:00 > Started Script
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Terms of Use:
#≡ ◦ Do NOT remove this Header
#≡ ◦ Give Credit to "Sakuraba" if Used
#≡ ◦ Feel Free to use in commercial and non commercial projects
#≡ ◦ Edit below Script Line ONLY if you know what you're doing
#≡ ◦ Don't post this in other forums, post a link to this forum instead
#≡ ◦ Do NOT steal the Code!!!
#≡ ◦ Do NOT steal the Sakuraba Nickname!!!
#≡ ◦ ENJOY
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Requires:
#≡ ◦ This Script
#≡ ◦ Nothing Else
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Description
#≡ ◦ This script allows the player to have a "storage" of párty members,
#≡ similar to pokemon games, stores actors does not gain experience or
#≡ level up, storage is unlimited, however this script allows to limit
#≡ the max mambers party can have. When party is full, adding a new actor
#≡ makes the new actor to be send to the stock.Now, actors can be locked
#≡ and released from storage.
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Compatibility & Glitches
#≡ ◦ None
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Script Calls
#≡ ◦ use "SceneManager.call(Scene_PartyStorageBox)" to call the storage scene
#≡ ◦ Use "$game_stock.add_actor(actor_id") to add an actor to the stock, where
#≡ actor_id is the database ID of an actor
#≡ ◦ Use "$game_stock.remove_actor(actor_id") to remove an actor of the stock,
#≡ where actor_id is the database ID of an actor
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Note Tags
#≡ ◦ use <party_lock> to lock actors in party
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
module SAKURABA
module SKPSS
MAXPARTYMEMBERS = 6 #this controls the max actors that the party can have
PARTYWINDOWTITLE = "Party Members" #Text to show above party window
STOCKWINDOWTITLE = "Waiting Members" #Text to show above party stock window
end
end
#~ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#~ #≡ ● SCRIPT LINE!!! ◦Edit below ONLY if you know what you're doing
#~ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#==============================================================================
# ● Window_StoreCommand
#==============================================================================
class Window_StoreCommand < Window_Command
#≡ ● Window Attributes Setup ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def self.init_command_position
@@last_command_symbol = nil
end
def initialize
super(0, 0)
end
def window_width
return 160
end
def visible_line_number
return 3 #item_max
end
#≡ ● Window Commands Setup =================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def make_command_list
add_command("Deposit", :store, $game_party.members.size > 1)
mxptymbr = SAKURABA::SKPSS::MAXPARTYMEMBERS
add_command("Withdraw", :get, $game_party.members.size < mxptymbr && $game_stock.members.size > 0 )
add_command("Release", :fire, $game_stock.members.size > 0)
add_command("Close", :exit, true)
end
def process_ok
super
end
end
#==============================================================================
# ● Game_Stock
#==============================================================================
class Game_Stock < Game_Unit
#≡ ● Class Setup ===========================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super
@actors = []
end
def exists
!@actors.empty?
end
def members
all_members
end
def all_members
@actors.collect {|id| $game_actors[id] }
end
def highest_level
lv = members.collect {|actor| actor.level }.max
end
def add_actor(actor_id)
@actors.push(actor_id) unless @actors.include?(actor_id)
actor = $game_actors[actor_id]
actor.recover_all
$game_player.refresh
$game_map.need_refresh = true
end
def remove_actor(actor_id)
@actors.delete(actor_id)
$game_player.refresh
$game_map.need_refresh = true
end
def members_equip_include?(item)
members.any? {|actor| actor.equips.include?(item) }
end
end
#==============================================================================
# ● Game_Party // Method Overwriting
#==============================================================================
class Game_Party < Game_Unit
def add_actor(actor_id)
mxprtymbr = SAKURABA::SKPSS::MAXPARTYMEMBERS
if $game_party.members.size >= mxprtymbr
$game_stock.add_actor(actor_id)
else
@actors.push(actor_id) unless @actors.include?(actor_id)
$game_player.refresh
$game_map.need_refresh = true
end
end
def remove_actor(actor_id)
if $game_party.members.include?($game_actors[actor_id])
@actors.delete(actor_id)
$game_player.refresh
$game_map.need_refresh = true
else
$game_stock.remove_actor(actor_id)
end
end
end
#==============================================================================
# ● Data Manager Module //// DO NOT EDIT!!
#==============================================================================
module DataManager
#≡ ● Method Aliasing =======================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
class << self
alias :sk_create_game_objects :create_game_objects
alias :sk_make_save_contents :make_save_contents
alias :sk_extract_save_contents :extract_save_contents
end
#≡ ● Data Setup ===========================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def self.create_game_objects
sk_create_game_objects
$game_stock = Game_Stock.new
end
def self.make_save_contents
contents = sk_make_save_contents
contents[:stock] = $game_stock
contents
end
def self.extract_save_contents(contents)
sk_extract_save_contents(contents)
$game_stock = contents[:stock]
end
end
#==============================================================================
# ● Window_PartyList ///// EDITABLE
#==============================================================================
class Window_PartyList < Window_Selectable
attr_reader :pending_index
#≡ ● Window Attributes ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize(x, y)
super(x, y, 160, 270)
@pending_index = -1
refresh
end
def item_max
$game_party.members.size
end
def item_height
40
end
#≡ ● Actor MiniStatus Drawing =============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def draw_item(index)
actor = $game_party.members[index]
rect = item_rect(index)
draw_actor_storage(actor, rect.x + 16, 38 + (index * 40))
draw_actor_name(actor, 32 , index * 40, width = 104, )
draw_actor_minimalisthp(actor, 32, 16 +(index * 40))
draw_actor_minimalislevel(actor, 88, 16 +(index * 40))
end
def draw_actor_minimalisthp(actor, x, y)
draw_gauge(x + 10, y ,40, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::hp_a)
end
def draw_actor_minimalislevel(actor, x, y)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 16, y, 24, line_height, actor.level, 2)
end
#≡ ● Somewhat Vital Process ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
Sound.play_cursor if @index != last_index
$pwindex = @index
refresh
end
def select_last
select($game_party.menu_actor.index || 0)
end
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
end
#==============================================================================
# ● Window_StockList ///// EDITABLE
#==============================================================================
class Window_StockList < Window_Selectable
attr_reader :pending_index
#≡ ● Window Attributes ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(160, 48, 384, 368)
@pending_index = -1
refresh
end
def item_max
$game_stock.members.size
end
def item_height
40
end
def col_max
return 3
end
def row_max
return 500
end
def spacing
return 0
end
#≡ ● Actor MiniStatus Drawing =============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def draw_item(index)
actor = $game_stock.members[index]
enabled = $game_stock.members.include?(actor)
rect = item_rect(index)
draw_actor_storage(actor, rect.x + 16,rect.y + 38)
draw_actor_name(actor, rect.x + 32 ,rect.y - 1 , width = 96)
draw_actor_minimalislevel(actor,rect.x + 40,rect.y + 18 )
end
def draw_actor_minimalislevel(actor, x, y)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 16, y, 24, line_height, actor.level, 2)
end
#≡ ● Somewhat Vital Process ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
cursor_left (Input.trigger?(:LEFT)) if Input.repeat?(:LEFT)
cursor_pagedown if !handle?(:pagedown) && Input.trigger?(:R)
cursor_pageup if !handle?(:pageup) && Input.trigger?(:L)
Sound.play_cursor if @index != last_index
$swindex = @index
refresh
end
end
#==============================================================================
# ● Window_PartyTitle
#==============================================================================
class Window_PartyTitle < Window_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(0, 98, 160, 48)
refresh
end
#≡ ● Refreshing ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def refresh
contents.clear
draw_text(0, 0, 150, 24, SAKURABA::SKPSS::PARTYWINDOWTITLE)
end
end
#==============================================================================
# ● Window_StockTitle
#==============================================================================
class Window_StockTitle < Window_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(160, 0, 384, 48)
refresh
end
#≡ ● Refreshing ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def refresh
contents.clear
draw_text(0, 0, 360, 24, SAKURABA::SKPSS::STOCKWINDOWTITLE)
end
end
#≡ ● Add Actor Lock Param =================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
class RPG::Actor
def party_lock
if @party_lock.nil?
if @note =~ /<party_lock>/
@party_lock = true
else
@party_lock = false
end
end
@party_lock
end
end
#==============================================================================
# ● Scene_PartyStorageBox //// EDITABBLE BUT NOT RECOMMENDED
#==============================================================================
class Scene_PartyStorageBox < Scene_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def start
super
create_cmdwindw
create_partywindow
create_boxwindow
create_xtrawindows
end
#≡ ● Create all Windows ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def create_xtrawindows
@partitle = Window_PartyTitle.new
@sotckitle = Window_StockTitle.new
end
def create_cmdwindw
@cmdwdw = Window_StoreCommand.new
@cmdwdw.set_handler(:store, method(:command_store))
@cmdwdw.set_handler(:get, method(:command_get))
@cmdwdw.set_handler(:fire, method(:command_fire))
@cmdwdw.set_handler(:exit, method(:return_scene))
@cmdwdw.set_handler(:cancel, method(:return_scene))
@cmdwdw.activate
end
def create_partywindow
@ptywndw = Window_PartyList.new(0,146)
@ptywndw.set_handler(:ok, method(:store_ok))
@ptywndw.set_handler(:cancel, method(:store_cancel))
end
def create_boxwindow
@stckwndw = Window_StockList.new
@stckwndw.set_handler(:ok, method(:get_ok))
@stckwndw.set_handler(:cancel, method(:store_cancel))
end
#≡ ● Window Handlers ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def command_store
@ptywndw.select(0)
@ptywndw.activate
end
def command_get
@stckwndw.select(0)
@stckwndw.activate
end
def command_fire
@stckwndw.select(0)
@stckwndw.activate
$releasing = true
end
def store_ok
storeactor = $game_party.members[$pwindex].id
if $data_actors[storeactor].party_lock == true
Sound.play_buzzer
@ptywndw.activate
else
$game_stock.add_actor(storeactor)
$game_party.remove_actor($game_party.members[$pwindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_party.members.size == 1
@cmdwdw.refresh
@cmdwdw.activate
else
@ptywndw.select(0)
@ptywndw.activate
end
end
end
def get_ok
if $releasing == true
$game_stock.remove_actor($game_stock.members[$swindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_stock.members.size == 0
@cmdwdw.refresh
@cmdwdw.activate
releasing = false
else
@stckwndw.select(0)
@stckwndw.activate
end
else
getactor = $game_stock.members[$swindex].id
$game_party.add_actor(getactor)
$game_stock.remove_actor($game_stock.members[$swindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_stock.members.size == 0 or $game_party.members.size >= SAKURABA::SKPSS::MAXPARTYMEMBERS
@cmdwdw.refresh
@cmdwdw.activate
else
@stckwndw.select(0)
@stckwndw.activate
end
end
end
def store_cancel
@cmdwdw.refresh
@cmdwdw.activate
$releasing = false
end
end
#≡ ● End Of Script ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
|
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG maker VX Ace] Party Storage System |
7163D -
posté le 30/12/2014 à 21:20:41. (946 messages postés) |
|
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
|
module Cache
def self.storage(filename)
load_bitmap("Graphics/Storage/", filename)
end
end
class Window_Base < Window
def draw_storage(face_name, face_index, x, y, enabled = true)
bitmap = Cache.storage(face_name)
rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)
contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
bitmap.dispose
end
end
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ Sakuraba's Party Storage System (PSS) v1.2
#≡ by: Sakuraba
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Change Log:
#≡ 12/12/2014: 13:30 > Added Release Feature
#≡ 25/08/2014: 20:30 > Added Lock Feature
#≡ 23/07/2014: 14:42 > Finished Script
#≡ 22/07/2014: 19:00 > Started Script
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Terms of Use:
#≡ ◦ Do NOT remove this Header
#≡ ◦ Give Credit to "Sakuraba" if Used
#≡ ◦ Feel Free to use in commercial and non commercial projects
#≡ ◦ Edit below Script Line ONLY if you know what you're doing
#≡ ◦ Don't post this in other forums, post a link to this forum instead
#≡ ◦ Do NOT steal the Code!!!
#≡ ◦ Do NOT steal the Sakuraba Nickname!!!
#≡ ◦ ENJOY
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Requires:
#≡ ◦ This Script
#≡ ◦ Nothing Else
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Description
#≡ ◦ This script allows the player to have a "storage" of párty members,
#≡ similar to pokemon games, stores actors does not gain experience or
#≡ level up, storage is unlimited, however this script allows to limit
#≡ the max mambers party can have. When party is full, adding a new actor
#≡ makes the new actor to be send to the stock.Now, actors can be locked
#≡ and released from storage.
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Compatibility & Glitches
#≡ ◦ None
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Script Calls
#≡ ◦ use "SceneManager.call(Scene_PartyStorageBox)" to call the storage scene
#≡ ◦ Use "$game_stock.add_actor(actor_id") to add an actor to the stock, where
#≡ actor_id is the database ID of an actor
#≡ ◦ Use "$game_stock.remove_actor(actor_id") to remove an actor of the stock,
#≡ where actor_id is the database ID of an actor
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Note Tags
#≡ ◦ use <party_lock> to lock actors in party
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
module SAKURABA
module SKPSS
MAXPARTYMEMBERS = 6 #this controls the max actors that the party can have
PARTYWINDOWTITLE = "Party Members" #Text to show above party window
STOCKWINDOWTITLE = "Waiting Members" #Text to show above party stock window
end
end
#~ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#~ #≡ ● SCRIPT LINE!!! ◦Edit below ONLY if you know what you're doing
#~ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#==============================================================================
# ● Window_StoreCommand
#==============================================================================
class Window_StoreCommand < Window_Command
#≡ ● Window Attributes Setup ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def self.init_command_position
@@last_command_symbol = nil
end
def initialize
super(0, 0)
end
def window_width
return 160
end
def visible_line_number
return 3 #item_max
end
#≡ ● Window Commands Setup =================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def make_command_list
add_command("Deposit", :store, $game_party.members.size > 1)
mxptymbr = SAKURABA::SKPSS::MAXPARTYMEMBERS
add_command("Withdraw", :get, $game_party.members.size < mxptymbr && $game_stock.members.size > 0 )
add_command("Release", :fire, $game_stock.members.size > 0)
add_command("Close", :exit, true)
end
def process_ok
super
end
end
#==============================================================================
# ● Game_Stock
#==============================================================================
class Game_Stock < Game_Unit
#≡ ● Class Setup ===========================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super
@actors = []
end
def exists
!@actors.empty?
end
def members
all_members
end
def all_members
@actors.collect {|id| $game_actors[id] }
end
def highest_level
lv = members.collect {|actor| actor.level }.max
end
def add_actor(actor_id)
@actors.push(actor_id) unless @actors.include?(actor_id)
actor = $game_actors[actor_id]
actor.recover_all
$game_player.refresh
$game_map.need_refresh = true
end
def remove_actor(actor_id)
@actors.delete(actor_id)
$game_player.refresh
$game_map.need_refresh = true
end
def members_equip_include?(item)
members.any? {|actor| actor.equips.include?(item) }
end
end
#==============================================================================
# ● Game_Party // Method Overwriting
#==============================================================================
class Game_Party < Game_Unit
def add_actor(actor_id)
mxprtymbr = SAKURABA::SKPSS::MAXPARTYMEMBERS
if $game_party.members.size >= mxprtymbr
$game_stock.add_actor(actor_id)
else
@actors.push(actor_id) unless @actors.include?(actor_id)
$game_player.refresh
$game_map.need_refresh = true
end
end
def remove_actor(actor_id)
if $game_party.members.include?($game_actors[actor_id])
@actors.delete(actor_id)
$game_player.refresh
$game_map.need_refresh = true
else
$game_stock.remove_actor(actor_id)
end
end
end
#==============================================================================
# ● Data Manager Module //// DO NOT EDIT!!
#==============================================================================
module DataManager
#≡ ● Method Aliasing =======================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
class << self
alias :sk_create_game_objects :create_game_objects
alias :sk_make_save_contents :make_save_contents
alias :sk_extract_save_contents :extract_save_contents
end
#≡ ● Data Setup ===========================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def self.create_game_objects
sk_create_game_objects
$game_stock = Game_Stock.new
end
def self.make_save_contents
contents = sk_make_save_contents
contents[:stock] = $game_stock
contents
end
def self.extract_save_contents(contents)
sk_extract_save_contents(contents)
$game_stock = contents[:stock]
end
end
#==============================================================================
# ● Window_PartyList ///// EDITABLE
#==============================================================================
class Window_PartyList < Window_Selectable
attr_reader :pending_index
#≡ ● Window Attributes ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize(x, y)
super(x, y, 160, 270)
@pending_index = -1
refresh
end
def item_max
$game_party.members.size
end
def item_height
40
end
#≡ ● Actor MiniStatus Drawing =============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def draw_item(index)
actor = $game_party.members[index]
rect = item_rect(index)
draw_actor_storage(actor, rect.x + 16, 38 + (index * 40))
draw_actor_name(actor, 32 , index * 40, width = 104, )
draw_actor_minimalisthp(actor, 32, 16 +(index * 40))
draw_actor_minimalislevel(actor, 88, 16 +(index * 40))
end
def draw_actor_minimalisthp(actor, x, y)
draw_gauge(x + 10, y ,40, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::hp_a)
end
def draw_actor_minimalislevel(actor, x, y)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 16, y, 24, line_height, actor.level, 2)
end
#≡ ● Somewhat Vital Process ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
Sound.play_cursor if @index != last_index
$pwindex = @index
refresh
end
def select_last
select($game_party.menu_actor.index || 0)
end
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
end
#==============================================================================
# ● Window_StockList ///// EDITABLE
#==============================================================================
class Window_StockList < Window_Selectable
attr_reader :pending_index
#≡ ● Window Attributes ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(160, 48, 384, 368)
@pending_index = -1
refresh
end
def item_max
$game_stock.members.size
end
def item_height
40
end
def col_max
return 3
end
def row_max
return 500
end
def spacing
return 0
end
#≡ ● Actor MiniStatus Drawing =============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def draw_item(index)
actor = $game_stock.members[index]
enabled = $game_stock.members.include?(actor)
rect = item_rect(index)
draw_actor_storage(actor, rect.x + 16,rect.y + 38)
draw_actor_name(actor, rect.x + 32 ,rect.y - 1 , width = 96)
draw_actor_minimalislevel(actor,rect.x + 40,rect.y + 18 )
end
def draw_actor_minimalislevel(actor, x, y)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 16, y, 24, line_height, actor.level, 2)
end
#≡ ● Somewhat Vital Process ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
cursor_left (Input.trigger?(:LEFT)) if Input.repeat?(:LEFT)
cursor_pagedown if !handle?(:pagedown) && Input.trigger?(:R)
cursor_pageup if !handle?(:pageup) && Input.trigger?(:L)
Sound.play_cursor if @index != last_index
$swindex = @index
refresh
end
end
#==============================================================================
# ● Window_PartyTitle
#==============================================================================
class Window_PartyTitle < Window_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(0, 98, 160, 48)
refresh
end
#≡ ● Refreshing ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def refresh
contents.clear
draw_text(0, 0, 150, 24, SAKURABA::SKPSS::PARTYWINDOWTITLE)
end
end
#==============================================================================
# ● Window_StockTitle
#==============================================================================
class Window_StockTitle < Window_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(160, 0, 384, 48)
refresh
end
#≡ ● Refreshing ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def refresh
contents.clear
draw_text(0, 0, 360, 24, SAKURABA::SKPSS::STOCKWINDOWTITLE)
end
end
#≡ ● Add Actor Lock Param =================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
class RPG::Actor
def party_lock
if @party_lock.nil?
if @note =~ /<party_lock>/
@party_lock = true
else
@party_lock = false
end
end
@party_lock
end
end
#==============================================================================
# ● Scene_PartyStorageBox //// EDITABBLE BUT NOT RECOMMENDED
#==============================================================================
class Scene_PartyStorageBox < Scene_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def start
super
create_cmdwindw
create_partywindow
create_boxwindow
create_xtrawindows
end
#≡ ● Create all Windows ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def create_xtrawindows
@partitle = Window_PartyTitle.new
@sotckitle = Window_StockTitle.new
end
def create_cmdwindw
@cmdwdw = Window_StoreCommand.new
@cmdwdw.set_handler(:store, method(:command_store))
@cmdwdw.set_handler(:get, method(:command_get))
@cmdwdw.set_handler(:fire, method(:command_fire))
@cmdwdw.set_handler(:exit, method(:return_scene))
@cmdwdw.set_handler(:cancel, method(:return_scene))
@cmdwdw.activate
end
def create_partywindow
@ptywndw = Window_PartyList.new(0,146)
@ptywndw.set_handler(:ok, method(:store_ok))
@ptywndw.set_handler(:cancel, method(:store_cancel))
end
def create_boxwindow
@stckwndw = Window_StockList.new
@stckwndw.set_handler(:ok, method(:get_ok))
@stckwndw.set_handler(:cancel, method(:store_cancel))
end
#≡ ● Window Handlers ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def command_store
@ptywndw.select(0)
@ptywndw.activate
end
def command_get
@stckwndw.select(0)
@stckwndw.activate
end
def command_fire
@stckwndw.select(0)
@stckwndw.activate
$releasing = true
end
def store_ok
storeactor = $game_party.members[$pwindex].id
if $data_actors[storeactor].party_lock == true
Sound.play_buzzer
@ptywndw.activate
else
$game_stock.add_actor(storeactor)
$game_party.remove_actor($game_party.members[$pwindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_party.members.size == 1
@cmdwdw.refresh
@cmdwdw.activate
else
@ptywndw.select(0)
@ptywndw.activate
end
end
end
def get_ok
if $releasing == true
$game_stock.remove_actor($game_stock.members[$swindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_stock.members.size == 0
@cmdwdw.refresh
@cmdwdw.activate
releasing = false
else
@stckwndw.select(0)
@stckwndw.activate
end
else
getactor = $game_stock.members[$swindex].id
$game_party.add_actor(getactor)
$game_stock.remove_actor($game_stock.members[$swindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_stock.members.size == 0 or $game_party.members.size >= SAKURABA::SKPSS::MAXPARTYMEMBERS
@cmdwdw.refresh
@cmdwdw.activate
else
@stckwndw.select(0)
@stckwndw.activate
end
end
end
def store_cancel
@cmdwdw.refresh
@cmdwdw.activate
$releasing = false
end
end
#≡ ● End Of Script ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
|
Remplace ton script par celui-ci.
Il faut placer les images que tu veut voir en combat dans le dossier Graphics/Storage/ et leur donner le nom du héro.
Par contre fait attention à ce que ces images aient les mêmes dimensions que les faces, je n'ai pas trouvé comment modifier la taille de l'image.
Enjoy!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG maker VX Ace] Party Storage System |
7163D -
posté le 30/12/2014 à 20:31:06. (946 messages postés) |
| Pardon, j'ai copié ton code et non le mien
J'ai édité mon message, il devrait fonctionner maintenant
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG maker VX Ace] Party Storage System |
7163D -
posté le 30/12/2014 à 19:51:06. (946 messages postés) |
| Essaye celui-là:
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
524
525
526
527
528
529
530
531
532
533
| #≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ Sakuraba's Party Storage System (PSS) v1.2
#≡ by: Sakuraba
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Change Log:
#≡ 12/12/2014: 13:30 > Added Release Feature
#≡ 25/08/2014: 20:30 > Added Lock Feature
#≡ 23/07/2014: 14:42 > Finished Script
#≡ 22/07/2014: 19:00 > Started Script
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Terms of Use:
#≡ ◦ Do NOT remove this Header
#≡ ◦ Give Credit to "Sakuraba" if Used
#≡ ◦ Feel Free to use in commercial and non commercial projects
#≡ ◦ Edit below Script Line ONLY if you know what you're doing
#≡ ◦ Don't post this in other forums, post a link to this forum instead
#≡ ◦ Do NOT steal the Code!!!
#≡ ◦ Do NOT steal the Sakuraba Nickname!!!
#≡ ◦ ENJOY
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Requires:
#≡ ◦ This Script
#≡ ◦ Nothing Else
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Description
#≡ ◦ This script allows the player to have a "storage" of párty members,
#≡ similar to pokemon games, stores actors does not gain experience or
#≡ level up, storage is unlimited, however this script allows to limit
#≡ the max mambers party can have. When party is full, adding a new actor
#≡ makes the new actor to be send to the stock.Now, actors can be locked
#≡ and released from storage.
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Compatibility & Glitches
#≡ ◦ None
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Script Calls
#≡ ◦ use "SceneManager.call(Scene_PartyStorageBox)" to call the storage scene
#≡ ◦ Use "$game_stock.add_actor(actor_id") to add an actor to the stock, where
#≡ actor_id is the database ID of an actor
#≡ ◦ Use "$game_stock.remove_actor(actor_id") to remove an actor of the stock,
#≡ where actor_id is the database ID of an actor
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
#≡ ● Note Tags
#≡ ◦ use <party_lock> to lock actors in party
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
module SAKURABA
module SKPSS
MAXPARTYMEMBERS = 6 #this controls the max actors that the party can have
PARTYWINDOWTITLE = "Party Members" #Text to show above party window
STOCKWINDOWTITLE = "Waiting Members" #Text to show above party stock window
end
end
#~ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#~ #≡ ● SCRIPT LINE!!! ◦Edit below ONLY if you know what you're doing
#~ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#==============================================================================
# ● Window_StoreCommand
#==============================================================================
class Window_StoreCommand < Window_Command
#≡ ● Window Attributes Setup ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def self.init_command_position
@@last_command_symbol = nil
end
def initialize
super(0, 0)
end
def window_width
return 160
end
def visible_line_number
return 3 #item_max
end
#≡ ● Window Commands Setup =================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def make_command_list
add_command("Deposit", :store, $game_party.members.size > 1)
mxptymbr = SAKURABA::SKPSS::MAXPARTYMEMBERS
add_command("Withdraw", :get, $game_party.members.size < mxptymbr && $game_stock.members.size > 0 )
add_command("Release", :fire, $game_stock.members.size > 0)
add_command("Close", :exit, true)
end
def process_ok
super
end
end
#==============================================================================
# ● Game_Stock
#==============================================================================
class Game_Stock < Game_Unit
#≡ ● Class Setup ===========================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super
@actors = []
end
def exists
!@actors.empty?
end
def members
all_members
end
def all_members
@actors.collect {|id| $game_actors[id] }
end
def highest_level
lv = members.collect {|actor| actor.level }.max
end
def add_actor(actor_id)
@actors.push(actor_id) unless @actors.include?(actor_id)
actor = $game_actors[actor_id]
actor.recover_all
$game_player.refresh
$game_map.need_refresh = true
end
def remove_actor(actor_id)
@actors.delete(actor_id)
$game_player.refresh
$game_map.need_refresh = true
end
def members_equip_include?(item)
members.any? {|actor| actor.equips.include?(item) }
end
end
#==============================================================================
# ● Game_Party // Method Overwriting
#==============================================================================
class Game_Party < Game_Unit
def add_actor(actor_id)
mxprtymbr = SAKURABA::SKPSS::MAXPARTYMEMBERS
if $game_party.members.size >= mxprtymbr
$game_stock.add_actor(actor_id)
else
@actors.push(actor_id) unless @actors.include?(actor_id)
$game_player.refresh
$game_map.need_refresh = true
end
end
def remove_actor(actor_id)
if $game_party.members.include?($game_actors[actor_id])
@actors.delete(actor_id)
$game_player.refresh
$game_map.need_refresh = true
else
$game_stock.remove_actor(actor_id)
end
end
end
#==============================================================================
# ● Data Manager Module //// DO NOT EDIT!!
#==============================================================================
module DataManager
#≡ ● Method Aliasing =======================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
class << self
alias :sk_create_game_objects :create_game_objects
alias :sk_make_save_contents :make_save_contents
alias :sk_extract_save_contents :extract_save_contents
end
#≡ ● Data Setup ===========================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def self.create_game_objects
sk_create_game_objects
$game_stock = Game_Stock.new
end
def self.make_save_contents
contents = sk_make_save_contents
contents[:stock] = $game_stock
contents
end
def self.extract_save_contents(contents)
sk_extract_save_contents(contents)
$game_stock = contents[:stock]
end
end
#==============================================================================
# ● Window_PartyList ///// EDITABLE
#==============================================================================
class Window_PartyList < Window_Selectable
attr_reader :pending_index
#≡ ● Window Attributes ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize(x, y)
super(x, y, 160, 270)
@pending_index = -1
refresh
end
def item_max
$game_party.members.size
end
def item_height
40
end
#≡ ● Actor MiniStatus Drawing =============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def draw_item(index)
actor = $game_party.members[index]
rect = item_rect(index)
draw_actor_face(actor, rect.x + 16, 38 + (index * 40))
draw_actor_name(actor, 32 , index * 40, width = 104, )
draw_actor_minimalisthp(actor, 32, 16 +(index * 40))
draw_actor_minimalislevel(actor, 88, 16 +(index * 40))
end
def draw_actor_minimalisthp(actor, x, y)
draw_gauge(x + 10, y ,40, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::hp_a)
end
def draw_actor_minimalislevel(actor, x, y)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 16, y, 24, line_height, actor.level, 2)
end
#≡ ● Somewhat Vital Process ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
Sound.play_cursor if @index != last_index
$pwindex = @index
refresh
end
def select_last
select($game_party.menu_actor.index || 0)
end
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
end
#==============================================================================
# ● Window_StockList ///// EDITABLE
#==============================================================================
class Window_StockList < Window_Selectable
attr_reader :pending_index
#≡ ● Window Attributes ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(160, 48, 384, 368)
@pending_index = -1
refresh
end
def item_max
$game_stock.members.size
end
def item_height
40
end
def col_max
return 3
end
def row_max
return 500
end
def spacing
return 0
end
#≡ ● Actor MiniStatus Drawing =============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def draw_item(index)
actor = $game_stock.members[index]
enabled = $game_stock.members.include?(actor)
rect = item_rect(index)
draw_actor_face(actor, rect.x + 16,rect.y + 38)
draw_actor_name(actor, rect.x + 32 ,rect.y - 1 , width = 96)
draw_actor_minimalislevel(actor,rect.x + 40,rect.y + 18 )
end
def draw_actor_minimalislevel(actor, x, y)
change_color(system_color)
draw_text(x, y, 16, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 16, y, 24, line_height, actor.level, 2)
end
#≡ ● Somewhat Vital Process ===============================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
cursor_left (Input.trigger?(:LEFT)) if Input.repeat?(:LEFT)
cursor_pagedown if !handle?(:pagedown) && Input.trigger?(:R)
cursor_pageup if !handle?(:pageup) && Input.trigger?(:L)
Sound.play_cursor if @index != last_index
$swindex = @index
refresh
end
end
#==============================================================================
# ● Window_PartyTitle
#==============================================================================
class Window_PartyTitle < Window_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(0, 98, 160, 48)
refresh
end
#≡ ● Refreshing ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def refresh
contents.clear
draw_text(0, 0, 150, 24, SAKURABA::SKPSS::PARTYWINDOWTITLE)
end
end
#==============================================================================
# ● Window_StockTitle
#==============================================================================
class Window_StockTitle < Window_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def initialize
super(160, 0, 384, 48)
refresh
end
#≡ ● Refreshing ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def refresh
contents.clear
draw_text(0, 0, 360, 24, SAKURABA::SKPSS::STOCKWINDOWTITLE)
end
end
#≡ ● Add Actor Lock Param =================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
class RPG::Actor
def party_lock
if @party_lock.nil?
if @note =~ /<party_lock>/
@party_lock = true
else
@party_lock = false
end
end
@party_lock
end
end
#==============================================================================
# ● Scene_PartyStorageBox //// EDITABBLE BUT NOT RECOMMENDED
#==============================================================================
class Scene_PartyStorageBox < Scene_Base
#≡ ● Initialize ============================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def start
super
create_cmdwindw
create_partywindow
create_boxwindow
create_xtrawindows
end
#≡ ● Create all Windows ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def create_xtrawindows
@partitle = Window_PartyTitle.new
@sotckitle = Window_StockTitle.new
end
def create_cmdwindw
@cmdwdw = Window_StoreCommand.new
@cmdwdw.set_handler(:store, method(:command_store))
@cmdwdw.set_handler(:get, method(:command_get))
@cmdwdw.set_handler(:fire, method(:command_fire))
@cmdwdw.set_handler(:exit, method(:return_scene))
@cmdwdw.set_handler(:cancel, method(:return_scene))
@cmdwdw.activate
end
def create_partywindow
@ptywndw = Window_PartyList.new(0,146)
@ptywndw.set_handler(:ok, method(:store_ok))
@ptywndw.set_handler(:cancel, method(:store_cancel))
end
def create_boxwindow
@stckwndw = Window_StockList.new
@stckwndw.set_handler(:ok, method(:get_ok))
@stckwndw.set_handler(:cancel, method(:store_cancel))
end
#≡ ● Window Handlers ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
def command_store
@ptywndw.select(0)
@ptywndw.activate
end
def command_get
@stckwndw.select(0)
@stckwndw.activate
end
def command_fire
@stckwndw.select(0)
@stckwndw.activate
$releasing = true
end
def store_ok
storeactor = $game_party.members[$pwindex].id
if $data_actors[storeactor].party_lock == true
Sound.play_buzzer
@ptywndw.activate
else
$game_stock.add_actor(storeactor)
$game_party.remove_actor($game_party.members[$pwindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_party.members.size == 1
@cmdwdw.refresh
@cmdwdw.activate
else
@ptywndw.select(0)
@ptywndw.activate
end
end
end
def get_ok
if $releasing == true
$game_stock.remove_actor($game_stock.members[$swindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_stock.members.size == 0
@cmdwdw.refresh
@cmdwdw.activate
releasing = false
else
@stckwndw.select(0)
@stckwndw.activate
end
else
getactor = $game_stock.members[$swindex].id
$game_party.add_actor(getactor)
$game_stock.remove_actor($game_stock.members[$swindex].id)
@ptywndw.refresh
@stckwndw.refresh
if $game_stock.members.size == 0 or $game_party.members.size >= SAKURABA::SKPSS::MAXPARTYMEMBERS
@cmdwdw.refresh
@cmdwdw.activate
else
@stckwndw.select(0)
@stckwndw.activate
end
end
end
def store_cancel
@cmdwdw.refresh
@cmdwdw.activate
$releasing = false
end
end
#≡ ● End Of Script ====================================================
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
|
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG MAKER VX ACE ] RESOLUTION HD SCRIPT |
7163D -
posté le 30/12/2014 à 18:23:01. (946 messages postés) |
| Je me suis mal exprimé.
"Appeler" une fonction signifie faire un événement, et dans cet événement rajouter une action "script" dans laquelle tu met ton code. (ici c'est Graphics.resize_screen(width, height)).
Perso je n'ai pas d'erreur, mais au moment où j'appele la fonction window me met "RGSS3 a cessé de fonctionner".
Donc je pense que le script est mal conçu, il doit y avoir une boucle infinie ou un truc comme ça.
Essaye de trouver un autre script.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPGVXA] Liez la souris au bouton "space" |
7163D -
posté le 30/12/2014 à 16:22:04. (946 messages postés) |
| Non, mais le problème est que dans ce cas je ne contrôle pas le temps entre deux vérifications, et sur la détection du clique ça peut faire des trucs bizzares si le temps entre deux boucles est trop long.
Après, je ne compte de toute façons pas utiliser le clavier dans mon jeu ^^
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPGVXA] Liez la souris au bouton "space" |
7163D -
posté le 30/12/2014 à 16:14:20. (946 messages postés) |
| La fonction originale est
1
2
3
4
5
6
7
| def input_pause
self.pause = true
wait(10)
Fiber.yield until Input.trigger?(:B) || Input.trigger?(:C)
Input.update
self.pause = false
end |
Je l'ai bidouillé à ma sauce et ça marche.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG MAKER VX ACE ] RESOLUTION HD SCRIPT |
7163D -
posté le 30/12/2014 à 15:43:37. (946 messages postés) |
| Qu'est ce que ça veut dire, "je n'arrive pas à le faire marcher"?
Il bug? Il plante? Aucun effet?
As-tu bien appelé la fonction
1
| Graphics.resize_screen(width, height) |
comme indiqué? (en remplaçant width et height par des nombre)
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG MAKER XP] Peut-on redéfinir "se défendre" ? |
7163D -
posté le 28/12/2014 à 10:05:36. (946 messages postés) |
| Essaye ça remplace "Scene_Battle4"par:
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
| #==============================================================================
# ** Scene_Battle (part 4)
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
$ID_COMPETENCE_GUARD = 1
class Scene_Battle
#--------------------------------------------------------------------------
# * Start Main Phase
#--------------------------------------------------------------------------
def start_phase4
# Shift to phase 4
@phase = 4
# Turn count
$game_temp.battle_turn += 1
# Search all battle event pages
for index in 0...$data_troops[@troop_id].pages.size
# Get event page
page = $data_troops[@troop_id].pages[index]
# If this page span is [turn]
if page.span == 1
# Clear action completed flags
$game_temp.battle_event_flags[index] = false
end
end
# Set actor as unselectable
@actor_index = -1
@active_battler = nil
# Enable party command window
@party_command_window.active = false
@party_command_window.visible = false
# Disable actor command window
@actor_command_window.active = false
@actor_command_window.visible = false
# Set main phase flag
$game_temp.battle_main_phase = true
# Make enemy action
for enemy in $game_troop.enemies
enemy.make_action
end
# Make action orders
make_action_orders
# Shift to step 1
@phase4_step = 1
end
#--------------------------------------------------------------------------
# * Make Action Orders
#--------------------------------------------------------------------------
def make_action_orders
# Initialize @action_battlers array
@action_battlers = []
# Add enemy to @action_battlers array
for enemy in $game_troop.enemies
@action_battlers.push(enemy)
end
# Add actor to @action_battlers array
for actor in $game_party.actors
@action_battlers.push(actor)
end
# Decide action speed for all
for battler in @action_battlers
battler.make_action_speed
end
# Line up action speed in order from greatest to least
@action_battlers.sort! {|a,b|
b.current_action.speed - a.current_action.speed }
end
#--------------------------------------------------------------------------
# * Frame Update (main phase)
#--------------------------------------------------------------------------
def update_phase4
case @phase4_step
when 1
update_phase4_step1
when 2
update_phase4_step2
when 3
update_phase4_step3
when 4
update_phase4_step4
when 5
update_phase4_step5
when 6
update_phase4_step6
end
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 1 : action preparation)
#--------------------------------------------------------------------------
def update_phase4_step1
# Hide help window
@help_window.visible = false
# Determine win/loss
if judge
# If won, or if lost : end method
return
end
# If an action forcing battler doesn't exist
if $game_temp.forcing_battler == nil
# Set up battle event
setup_battle_event
# If battle event is running
if $game_system.battle_interpreter.running?
return
end
end
# If an action forcing battler exists
if $game_temp.forcing_battler != nil
# Add to head, or move
@action_battlers.delete($game_temp.forcing_battler)
@action_battlers.unshift($game_temp.forcing_battler)
end
# If no actionless battlers exist (all have performed an action)
if @action_battlers.size == 0
# Start party command phase
start_phase2
return
end
# Initialize animation ID and common event ID
@animation1_id = 0
@animation2_id = 0
@common_event_id = 0
# Shift from head of actionless battlers
@active_battler = @action_battlers.shift
# If already removed from battle
if @active_battler.index == nil
return
end
# Slip damage
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
# Natural removal of states
@active_battler.remove_states_auto
# Refresh status window
@status_window.refresh
# Shift to step 2
@phase4_step = 2
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 2 : start action)
#--------------------------------------------------------------------------
def update_phase4_step2
# If not a forcing action
unless @active_battler.current_action.forcing
# If restriction is [normal attack enemy] or [normal attack ally]
if @active_battler.restriction == 2 or @active_battler.restriction == 3
# Set attack as an action
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
# If restriction is [cannot perform action]
if @active_battler.restriction == 4
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
# Clear target battlers
@target_battlers = []
# Branch according to each action
case @active_battler.current_action.kind
when 0 # basic
make_basic_action_result
when 1 # skill
make_skill_action_result
when 2 # item
make_item_action_result
end
# Shift to step 3
if @phase4_step == 2
@phase4_step = 3
end
end
#--------------------------------------------------------------------------
# * Make Basic Action Results
#--------------------------------------------------------------------------
def make_basic_action_result
# If attack
if @active_battler.current_action.basic == 0
# Set anaimation ID
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
# If action battler is enemy
if @active_battler.is_a?(Game_Enemy)
if @active_battler.restriction == 3
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
end
# If action battler is actor
if @active_battler.is_a?(Game_Actor)
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
end
# Set array of targeted battlers
@target_battlers = [target]
# Apply normal attack results
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
# If guard
if @active_battler.current_action.basic == 1
make_guard_action_result
# Display "Guard" in help window
@help_window.set_text($data_system.words.guard, 1)
return
end
# If escape
if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2
# Display "Escape" in help window
@help_window.set_text("Fuite", 1)
# Escape
@active_battler.escape
return
end
# If doing nothing
if @active_battler.current_action.basic == 3
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
#--------------------------------------------------------------------------
# * Set Targeted Battler for Skill or Item
# scope : effect scope for skill or item
#--------------------------------------------------------------------------
def set_target_battlers(scope)
# If battler performing action is enemy
if @active_battler.is_a?(Game_Enemy)
# Branch by effect scope
case scope
when 1 # single enemy
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
when 2 # all enemies
for actor in $game_party.actors
if actor.exist?
@target_battlers.push(actor)
end
end
when 3 # single ally
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
when 4 # all allies
for enemy in $game_troop.enemies
if enemy.exist?
@target_battlers.push(enemy)
end
end
when 5 # single ally (HP 0)
index = @active_battler.current_action.target_index
enemy = $game_troop.enemies[index]
if enemy != nil and enemy.hp0?
@target_battlers.push(enemy)
end
when 6 # all allies (HP 0)
for enemy in $game_troop.enemies
if enemy != nil and enemy.hp0?
@target_battlers.push(enemy)
end
end
when 7 # user
@target_battlers.push(@active_battler)
end
end
# If battler performing action is actor
if @active_battler.is_a?(Game_Actor)
# Branch by effect scope
case scope
when 1 # single enemy
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
when 2 # all enemies
for enemy in $game_troop.enemies
if enemy.exist?
@target_battlers.push(enemy)
end
end
when 3 # single ally
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
when 4 # all allies
for actor in $game_party.actors
if actor.exist?
@target_battlers.push(actor)
end
end
when 5 # single ally (HP 0)
index = @active_battler.current_action.target_index
actor = $game_party.actors[index]
if actor != nil and actor.hp0?
@target_battlers.push(actor)
end
when 6 # all allies (HP 0)
for actor in $game_party.actors
if actor != nil and actor.hp0?
@target_battlers.push(actor)
end
end
when 7 # user
@target_battlers.push(@active_battler)
end
end
end
#--------------------------------------------------------------------------
# * Make Skill Action Results
#--------------------------------------------------------------------------
def make_guard_action_result
# Get skill
@skill = $data_skills[$ID_COMPETENCE_GUARD]
# If not a forcing action
unless @active_battler.current_action.forcing
# If unable to use due to SP running out
unless @active_battler.skill_can_use?(@skill.id)
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
# Use up SP
@active_battler.sp -= @skill.sp_cost
# Refresh status window
@status_window.refresh
# Show skill name on help window
@help_window.set_text(@skill.name, 1)
# Set animation ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# Set command event ID
@common_event_id = @skill.common_event_id
# Set target battlers
set_target_battlers(@skill.scope)
# Apply skill effect
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
#--------------------------------------------------------------------------
# * Make Skill Action Results
#--------------------------------------------------------------------------
def make_skill_action_result
# Get skill
@skill = $data_skills[@active_battler.current_action.skill_id]
# If not a forcing action
unless @active_battler.current_action.forcing
# If unable to use due to SP running out
unless @active_battler.skill_can_use?(@skill.id)
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
# Use up SP
@active_battler.sp -= @skill.sp_cost
# Refresh status window
@status_window.refresh
# Show skill name on help window
@help_window.set_text(@skill.name, 1)
# Set animation ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# Set command event ID
@common_event_id = @skill.common_event_id
# Set target battlers
set_target_battlers(@skill.scope)
# Apply skill effect
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
#--------------------------------------------------------------------------
# * Make Item Action Results
#--------------------------------------------------------------------------
def make_item_action_result
# Get item
@item = $data_items[@active_battler.current_action.item_id]
# If unable to use due to items running out
unless $game_party.item_can_use?(@item.id)
# Shift to step 1
@phase4_step = 1
return
end
# If consumable
if @item.consumable
# Decrease used item by 1
$game_party.lose_item(@item.id, 1)
end
# Display item name on help window
@help_window.set_text(@item.name, 1)
# Set animation ID
@animation1_id = @item.animation1_id
@animation2_id = @item.animation2_id
# Set common event ID
@common_event_id = @item.common_event_id
# Decide on target
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
# Set targeted battlers
set_target_battlers(@item.scope)
# Apply item effect
for target in @target_battlers
target.item_effect(@item)
end
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 3 : animation for action performer)
#--------------------------------------------------------------------------
def update_phase4_step3
# Animation for action performer (if ID is 0, then white flash)
if @animation1_id == 0
@active_battler.white_flash = true
else
@active_battler.animation_id = @animation1_id
@active_battler.animation_hit = true
end
# Shift to step 4
@phase4_step = 4
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 4 : animation for target)
#--------------------------------------------------------------------------
def update_phase4_step4
# Animation for target
for target in @target_battlers
target.animation_id = @animation2_id
target.animation_hit = (target.damage != "Raté")
end
# Animation has at least 8 frames, regardless of its length
@wait_count = 8
# Shift to step 5
@phase4_step = 5
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 5 : damage display)
#--------------------------------------------------------------------------
def update_phase4_step5
# Hide help window
@help_window.visible = false
# Refresh status window
@status_window.refresh
# Display damage
for target in @target_battlers
if target.damage != nil
target.damage_pop = true
end
end
# Shift to step 6
@phase4_step = 6
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 6 : refresh)
#--------------------------------------------------------------------------
def update_phase4_step6
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# If common event ID is valid
if @common_event_id > 0
# Set up event
common_event = $data_common_events[@common_event_id]
$game_system.battle_interpreter.setup(common_event.list, 0)
end
# Shift to step 1
@phase4_step = 1
end
end
|
Tout en haut tu modifie l'id de la compétence que tu veut utiliser.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [Forum] Modifier un article |
7163D -
posté le 28/12/2014 à 09:50:11. (946 messages postés) |
| Domaine concerné: Oniromancie Logiciel utilisé: Forum Bon, je savais pas trop où le mettre, donc désolé si je ne suis pas dans la bonne section.
J'ai récemment posté un petit script sur oniro, et Crystal vient de me proposer une amélioration pas bête du tout, que je veut donc ajouter à mon script.
Sauf que je ne sais absolument pas comment faire! Si quelqu'un pouvait me dire comment éditer, (voir même remplacer, au pire) un message, je suis preneur!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVX] Arme à éléments et Ambidextre Bug ? |
7163D -
posté le 27/12/2014 à 20:16:53. (946 messages postés) |
| La raison, c'est à priori que pour simplifier les choses rm considère que ton guerrier n'a qu'une arme qui est la "moyenne" des deux et qu'il peut attaquer deux fois.
Un solution serait de remplacer immunisé par dégats / 4 par exemple.
Sinon, j'ai regardé dans les scripts et pour faire deux attaques séparés il faudrait modifier pas mal de choses, cela serait compliqué.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [Scripts] Petites questions connes sur les SCRIPTS!! |
7163D -
posté le 27/12/2014 à 16:11:32. (946 messages postés) |
| La map en cour est stocké dans $game_map.
Donc si dans le script Game_Map tu rajoute
1
2
3
4
5
6
|
class Game_Map
attr_reader :map_id
#[...]
end
|
Tu transforme alors ton code:
1
2
3
4
5
6
7
8
9
| class Scene_Map < Scene_Base
def start
create_Picture if $game_map.map_id == 10154845
end
def create_Picture
@sprite = Sprite.new
@sprite.bitmap = Cache.system("Interface")
end
end |
Je n'ai pas essayé, mais ça devrait marcher.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPGVXA] Liez la souris au bouton "space" |
7163D -
posté le 27/12/2014 à 15:04:09. (946 messages postés) |
| Domaine concerné: Script
Logiciel utilisé: RPGVXA
Bonjour,
Depuis quelques temps je m'amuse avec le génial Event Extender , et je suis donc en train d'écrire une petite librairie pour créer d'autres fonctionnalités.
Parmi celles-ci, le jeu à la souris, bien entendu. Arrive alors un problème pour la gestion des messages : on s'attend à ce que les messages défilent lorsque l'on clique.
Mais hélas si on ne dit pas à rm de le faire, il ne le fera pas.
Deux choix se présentent alors:
1-Créer de toute pièce un système de message
2-Faire en sorte que le clique soit l'équivalent d'un appui sur "space" pour rm.
Comme vous le devinez, mon choix se porte évidemment sur le premier deuxième.
Sauf que je ne voit pas trop comment...Alors si jamais passe par là un explorateur accompli des recoin les plus sombres du RGSS 3, qu'ils fasse par de son expérience à un jeune novice perdu dans les ténèbres...
Merci d'avance pour vos réponses!
Up:
Pour ceux que cela intéresserais, j'ai trouver un solution(défilement uniquement à la souris par contre):
1
2
3
4
5
6
7
8
9
| class Window_Message
def input_pause
self.pause = true
wait(1) while !cmd(:mouse_trigger?, :mouse_left)
self.pause = false
end
end |
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG MAKER XP] Peut-on redéfinir "se défendre" ? |
7163D -
posté le 27/12/2014 à 14:56:16. (946 messages postés) |
| Dans RPGVXA c'est facile puisque "attaquer" et "se défendre" se trouvent dans le menu compétence de la base de données.
Par contre, en XP... J'ai regardé vite fait dans le code, mais je pense que ce serait un peu chaud à faire...
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [Rpg Maker VX] augmentation progressive des prix selon le niveau |
7163D -
posté le 26/08/2014 à 09:38:02. (946 messages postés) |
| @K1GBOT
Je n'ai pas trouvé pour VX de fonction modifier le prix d'un objet... Et puis si tu as 100 objet et que tu veut que les prix montent tout les niveau, ça fait beaucoup...
@zackkkfair
Si tu veut je t'ai bricolé un petit script:
Spoiler (cliquez pour afficher)
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
| module Dynamic_price
def self.increase
10#De combien de % le prix augmente par niveau
end
def self.hero?
true#Prend en compte le niveau d'un héro? true pour oui et false pour non
end
def self.variable
1#Numéros du héros(dans la base de de donné) dont on utilise le héro
#si héro? vaut false, c'est le numéros de la variable
#qui sera utilisé comme niveau
end
end
class RPG::Item
def _price
@price * (1 + 0.01 * Dynamic_price.increase * $game_actors[Dynamic_price.variable].level) if Dynamic_price.hero?
@price * (1 + 0.01 * Dynamic_price.increase * $game_variables[Dynamic_price.variable] )
end
def price
_price.round
end
end |
A placer juste au dessus de main, si tu ne comprend pas les explications que j'ai mise demande moi!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPGMVXACE] Tchat in-game ? |
7163D -
posté le 23/08/2014 à 12:57:55. (946 messages postés) |
| Landerster a dit: ils me propose des scripts pour faire apparaître une bulle au-dessus du PNJ
|
Je pense qu'il est possible de modifier ce script pour avoir un message au dessus du héro.
Ensuite, tu prend un script de gestion de clavier.
Quand tu lance le chat, tu enregistre ce que tu tapes au clavier dans une variable et quand tu tape "Entrée", le script que tu a trouvé affiche la bulle avec comme texte ta variable.
C'est théorique, mais je pense qu'en bidouilant de la sorte tu puisse y arriver.
Après, si tu n'aime pas ruby, ça vas être dur...
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Animation 3D |
7163D -
posté le 22/08/2014 à 19:35:50. (946 messages postés) |
| Je regarde comment rm fait pour afficher l'animation des charas et voir si je peut reporter ça pendant le combat.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Animation 3D |
7163D -
posté le 21/08/2014 à 19:15:59. (946 messages postés) |
| @solidboko je suis impardonnable...
J'ai tapé mon exemple un peu à l'arrache et j'ai zappé ça...
Effectivement, je ne vois vraiment pas pourquoi je l'ai fait de la sorte...
Merci de l'avoir signalé!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Animation 3D |
7163D -
posté le 21/08/2014 à 14:27:30. (946 messages postés) |
| Domaine concerné: Script
Logiciel utilisé: RMVXA
Bonjour,
Comme certain le savent déjà, j'envisage de faire un jeu rm avec des battlers 3D.
Le logiciel Blender propose un certain nombre d'outil pour créer des animations, alors je me suis dit pourquoi pas?
Je pense savoir comment faire:
En temps normal, le jeu affiche à chaque frame l'image du monstre qui a été préchargé. J'aimerais à la place préchargé une dizaine d'images qui seront affiché les une après les autres de la façons suivante:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
def initialize
super
@frame = 0
end
def refresh
@frame += 1
if @frame < 10#valeur arbitraire
draw(anim1)
elsif @frame < 20
draw(anim2)
#(...)
else#si on a fait toutes les animations
@frame = 0
draw(anim1)
end
end
|
Sauf que malgrés mes fouilles, je suis incapable de trouver le script à modifier pour ça...
Alors si jamais un hardgore scripteur passe par là, merci d'avance de son aide!(ne serait-ce que pour dire que c'est impossible...)
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG Maker VX Ace] Blesser alliés et ennemis à la fois |
7163D -
posté le 20/08/2014 à 23:28:41. (946 messages postés) |
| kazual a dit:
Le solution serait à la limite de rajouter un élément spécifique à cette attaque auquel le héro est immunisé,
|
c'est ce que je voulais dire
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG Maker VX Ace] Blesser alliés et ennemis à la fois |
7163D -
posté le 20/08/2014 à 23:10:10. (946 messages postés) |
| Au pire, si ton attaque touche tout le monde, la cible ne change rien, non?
Pour le héro, tu peut mettre à la compétence un élément auquel ton héro est immunisé.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RPG Maker VX Ace] Blesser alliés et ennemis à la fois |
7163D -
posté le 20/08/2014 à 22:28:28. (946 messages postés) |
| 1-Tu crées 3 compétences: attaque1, attaque2 et attaque3
2-Pour attaque1 tuv as dans effet->autre->événement commun "fraper alliée et ennemis"
3-Tu paramètre cet événement commun:onglet3->combat->forcer action->(ton héro)->attaque2
et
onglet3->combat->forcer action->(ton héro)->attaque3
Et voilà!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - 2D ou 3D? |
7163D -
posté le 19/08/2014 à 14:46:06. (946 messages postés) |
| @Saheyus:
Je pense que je peut encore attendre un peu pour avoir un rat comme ça, mais merci pour ton explication!
En répondant en même temps à solidboko, si je refesait tout en 3D, je pourrais garder ce niveau de simplification, mais je pense que la tâche serait peut-être trop ardu, à voir...Sinon je vais déjà bien bosser le scénar' et les scripts et j'aviserai.
Pour la map, oui je suis au début du projet et je ne me suis pas posé la question du mapping, mais j'avoue que ça ne me choque pas une map comme ça...Celle là je l'ai faîte mais j'ai un mappeur dans mon équipe qui fait des truc beaucoups mieux.
Merci des conseils!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - 2D ou 3D? |
7163D -
posté le 19/08/2014 à 12:44:39. (946 messages postés) |
| Merci pour le contour blanc, je cherchais à résoudre ça!
Pour l'orthographe euh...
Ce n'est évidemment qu'un début, merci pour les conseils sur la souris!
Merci pour vos avis!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - 2D ou 3D? |
7163D -
posté le 19/08/2014 à 12:10:49. (946 messages postés) |
| Bien sur!
Sur la map
En combat
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - 2D ou 3D? |
7163D -
posté le 19/08/2014 à 09:42:34. (946 messages postés) |
| Bonjour,
Dans la création d'un jeu, la question de l'apparence des monstres a son importance. Ayant des problèmes au niveau des graphistes, je me suis dit "pourquoi pas des monstre en 3D?".
Je me débrouille en effet avec Blender, et donc pourquoi pas faire les battlers(avec le système de combat natif de RMVXA) en 3D? Sachant le reste du jeu est full-RTP.
Pensez-vous que le décalage serait trop chocant?
Je poste des images des deux premiers monstre que j'ai fait:
Une souri
Une araigné
Donc dites-moi franchement: cela vous gênerait-il de voir apparaître de semblables monstres dans un jeu full-RTP?
Merci d'avance de vos réponses!
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Graphisme analogique-numérique |
7163D -
posté le 17/08/2014 à 17:32:43. (946 messages postés) |
| Citation: Sinon tu fais des charas type "dessinés par tes frères". |
En gros je teste différentes taille jusqu'à obtenir celle avec le meilleur rendu?
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Modifier $data_skill au cours de la partie |
7163D -
posté le 17/08/2014 à 09:31:50. (946 messages postés) |
| Ok merci!
@Estheone : j'ai en fait ajouté une méthode dans RPG::Skill qui renvoie à un tableau de classe initialisé au début du jeu et modifiableà loisir
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Modifier $data_skill au cours de la partie |
7163D -
posté le 16/08/2014 à 23:39:45. (946 messages postés) |
| @Wolfylink : non, ça plantait
@Estheone : Vu que ces valeurs sont amenées à évoluer au cour du jeu, je vais garder ma méthode mais merci du renseignement, je retient pour d'autre choses!
Petit HS, mais je ne vais pas ouvrir un topic pour ça, que signifie
en RGSS3?
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Modifier $data_skill au cours de la partie |
7163D -
posté le 16/08/2014 à 22:45:33. (946 messages postés) |
| Bon, si d'autre on le même problème... (on ne sait jamais, je suis peut être pas le seul psycopathe sado-machorubyste)
J'ai carrément créé une autre classe skill (je l'ai pas appelé RPG::Skill, hein) avec les même id que la classe skill de base.
|
Minimaliste, le "." comme signe de ralliement. |
Posté dans Forum - [RMVXA] Modifier $data_skill au cours de la partie |
7163D -
posté le 16/08/2014 à 22:21:44. (946 messages postés) |
| Je vais essayer de bidouiller un truc comme ça...
Mais ce que je ne comprend vraiment pas, c'est pourquoi ma modification de l'initialisation n'est pas prise en compte par rm.
|
Minimaliste, le "." comme signe de ralliement. |
Aller à la page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
|
|