Day.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker


Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Jeux: puie z / Jeux: Citymaime - Chapitre 1 / Jeux: Mer, îles et fous / News: Du neuf dans le making / News: Muma|Rope est disponible en (...) / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

853 connectés actuellement

30729511 visiteurs
depuis l'ouverture

3128 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

New RPG Maker

RPG Maker VX

RPG Fusion

RPG Maker Détente

Tous nos partenaires

Devenir
partenaire



Menu_CMS

Un menu en losange, avec option d'afficher/masquer le temps de jeu.

Script pour RPG Maker XP
Ecrit par Krazplay
Publié par willotopboy (lui envoyer un message privé)
Signaler un script cassé

❤ 0

Auteur : Krazplay
Logiciel : RPG Maker XP
Nombre de scripts : 2

Fonctionnalités
Modifie le menu de base pour afficher les sprites des héros sur des losanges.

Installation
A placer au-dessus de Main.
Le script Window_MenuStatus est à remplacer par le deuxième script.

Portion de code : Tout sélectionner

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
#--------------------------------- 
# Menu_CMS par Krazplay 
#--------------------------------- 
def draw_actor_battler(actor, x, y) 
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) 
cw = bitmap.width 
ch = bitmap.height 
src_rect = Rect.new(0, 0, cw, ch) 
self.contents.blt(x - cw / 2, y - ch / 2, bitmap, src_rect) 
end 
 
 
#--------------------------------- 
#Def draw line 
#--------------------------------- 
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color) 
# ??????????????????? 
distance = (start_x - end_x).abs + (start_y - end_y).abs 
# ???? 
if end_color == start_color 
for i in 1..distance 
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i 
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i 
if width == 1 
self.set_pixel(x, y, start_color) 
else 
self.fill_rect(x, y, width, width, start_color) 
end 
end 
else 
for i in 1..distance 
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i 
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i 
r = start_color.red * (distance-i)/distance + end_color.red * i/distance 
g = start_color.green * (distance-i)/distance + end_color.green * i/distance 
b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance 
a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance 
if width == 1 
self.set_pixel(x, y, Color.new(r, g, b, a)) 
else 
self.fill_rect(x, y, width, width, Color.new(r, g, b, a)) 
end 
end 
end 
end 
 
 
#--------------------------------- 
#Def draw polygon (pour faire les contours des faces) 
#--------------------------------- 
def draw_polygon(peaks, color, width = 1) 
# ?(=??)?????????? 
for i in 0 ... (peaks.size - 1) 
# ????????? 
draw_line( peaks[i][0], peaks[i][1], peaks[i+1][0], peaks[i+1][1], color, width ) 
end 
# ?????????????? 
draw_line( peaks[peaks.size - 1][0], peaks[peaks.size - 1][1], peaks[0][0], peaks[0][1], color, width ) 
end 
 
 
#--------------------------------- 
#def draw face (les faces à proprement parler ^^) 
#--------------------------------- 
def draw_facesquare(character_name, character_hue, x, y, size = 24) 
bitmap = RPG::Cache.character(character_name, character_hue) 
src_rect = Rect.new((bitmap.width/4 - size)/2, 0, size, size) 
self.blt(x, y, bitmap, src_rect) 
self.draw_polygon([[x,y],[x+size,y],[x+size,y+size],[x,y+size]], Color.new(255,255,255,128)) 
end 
# HP/SP/EXPƒQ?[ƒW•\´¦ƒXƒNƒ¦ƒvƒg Ver 1.00 
# ”z•z¼³?EƒTƒ|?[ƒgURL 
# [url=http://members.jcom.home.ne.jp/cogwheel/]http://members.jcom.home.ne.jp/cogwheel/[/url] 
 
#============================================================================== 
# ?¡ Game_Actor 
#------------------------------------------------------------------------------ 
# ?@ƒAƒNƒ^?[‚ðˆµ‚¤ƒNƒ‰ƒX‚Å‚•?B‚±‚̃Nƒ‰ƒX‚Í Game_Actors ƒNƒ‰ƒX ($game_actors) 
# ‚Ì“à•”‚Å´g—p‚³‚ê?AGame_Party ƒNƒ‰ƒX ($game_party) ‚©‚ç‚à´Q?Æ‚³‚ê‚Ü‚•?B 
#============================================================================== 
 
class Game_Actor < Game_Battler 
def now_exp 
return @exp - @exp_list[@level] 
end 
def next_exp 
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 
end 
end 
 
#============================================================================== 
# ?¡ Window_Base 
#------------------------------------------------------------------------------ 
# ?@ƒQ?[ƒ¤’†‚Ì‚•‚ׂẴEƒBƒ“ƒhƒE‚̃X?[ƒp?[ƒNƒ‰ƒX‚Å‚•?B 
#============================================================================== 
 
class Window_Base < Window 
#-------------------------------------------------------------------------- 
# ?½ HP ƒQ?[ƒW‚Ì•`‰æ 
#-------------------------------------------------------------------------- 
# ƒIƒ¦ƒWƒiƒ‹‚ÌHP•`‰æ‚ð draw_actor_hp_original ‚Æ–¼‘O•Ï?X 
alias :draw_actor_hp_original :draw_actor_hp 
def draw_actor_hp(actor, x, y, width = 144) 
# •Ï?”rate‚É ¼»?Ý‚ÌHP/MHP‚ð‘ã“ü 
if actor.maxhp != 0 
rate = actor.hp.to_f / actor.maxhp 
else 
rate = 0 
end 
# plus_x:X?À•W‚̈ʒu•â?³ rate_x:X?À•W‚̈ʒu•â?³(%) plus_y:Y?À•W‚̈ʒu•â?³ 
# plus_width:•?‚Ì•â?³ rate_width:•?‚Ì•â?³(%) height:?c•? 
# align1:•`‰æƒ^ƒCƒv1 0:?¶‹l‚ß 1:’†‰›‘µ‚¦ 2:‰E‹l‚ß 
# align2:•`‰æƒ^ƒCƒv2 0:?ã‹l‚ß 1:’†‰›‘µ‚¦ 2:‰º‹l‚ß 
# align3:ƒQ?[ƒWƒ^ƒCƒv 0:?¶‹l‚ß 1:‰E‹l‚ß 
plus_x = 0 
rate_x = 0 
plus_y = 25 
plus_width = 0 
rate_width = 100 
height = 10 
align1 = 1 
align2 = 2 
align3 = 0 
# ƒOƒ‰ƒf?[ƒVƒ‡ƒ“?Ý’è grade1:‹óƒQ?[ƒW grade2:´ÀƒQ?[ƒW 
# (0:‰¡‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 1:?c‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 2:´Î‚߂ɃOƒ‰ƒf?[ƒVƒ‡ƒ“(¼ƒ?d)?j 
grade1 = 1 
grade2 = 0 
# ?F?Ý’è?Bcolor1:¦O˜g?Ccolor2:’†˜g 
# color3:‹óƒQ?[ƒWƒ_?[ƒNƒJƒ‰?[?Ccolor4:‹óƒQ?[ƒWƒ‰ƒCƒgƒJƒ‰?[ 
# color5:´ÀƒQ?[ƒWƒ_?[ƒNƒJƒ‰?[?Ccolor6:´ÀƒQ?[ƒWƒ‰ƒCƒgƒJƒ‰?[ 
color1 = Color.new(0, 0, 0, 192) 
color2 = Color.new(255, 255, 192, 192) 
color3 = Color.new(0, 0, 0, 192) 
color4 = Color.new(64, 0, 0, 192) 
color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192) 
color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192) 
# •Ï?”sp‚É•`‰æ‚•‚éƒQ?[ƒW‚Ì•?‚ð‘ã“ü 
if actor.maxhp != 0 
hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp 
else 
hp = 0 
end 
# ƒQ?[ƒW‚Ì•`‰æ 
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, 
width, plus_width + width * rate_width / 100, 
height, hp, align1, align2, align3, 
color1, color2, color3, color4, color5, color6, grade1, grade2) 
# ƒIƒ¦ƒWƒiƒ‹‚ÌHP•`‰æ?ˆ—?‚ð¼Ä‚Ñ?o‚µ 
draw_actor_hp_original(actor, x, y, width) 
end 
#-------------------------------------------------------------------------- 
# ?½ SP ƒQ?[ƒW‚Ì•`‰æ 
#-------------------------------------------------------------------------- 
# ƒIƒ¦ƒWƒiƒ‹‚ÌSP•`‰æ‚ð draw_actor_sp_original ‚Æ–¼‘O•Ï?X 
alias :draw_actor_sp_original :draw_actor_sp 
def draw_actor_sp(actor, x, y, width = 144) 
# •Ï?”rate‚É ¼»?Ý‚ÌSP/MSP‚ð‘ã“ü 
if actor.maxsp != 0 
rate = actor.sp.to_f / actor.maxsp 
else 
rate = 1 
end 
# plus_x:X?À•W‚̈ʒu•â?³ rate_x:X?À•W‚̈ʒu•â?³(%) plus_y:Y?À•W‚̈ʒu•â?³ 
# plus_width:•?‚Ì•â?³ rate_width:•?‚Ì•â?³(%) height:?c•? 
# align1:•`‰æƒ^ƒCƒv1 0:?¶‹l‚ß 1:’†‰›‘µ‚¦ 2:‰E‹l‚ß 
# align2:•`‰æƒ^ƒCƒv2 0:?ã‹l‚ß 1:’†‰›‘µ‚¦ 2:‰º‹l‚ß 
# align3:ƒQ?[ƒWƒ^ƒCƒv 0:?¶‹l‚ß 1:‰E‹l‚ß 
plus_x = 0 
rate_x = 0 
plus_y = 25 
plus_width = 0 
rate_width = 100 
height = 10 
align1 = 1 
align2 = 2 
align3 = 0 
# ƒOƒ‰ƒf?[ƒVƒ‡ƒ“?Ý’è grade1:‹óƒQ?[ƒW grade2:´ÀƒQ?[ƒW 
# (0:‰¡‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 1:?c‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 2:´Î‚߂ɃOƒ‰ƒf?[ƒVƒ‡ƒ“(¼ƒ?d)?j 
grade1 = 1 
grade2 = 0 
# ?F?Ý’è?Bcolor1:¦O˜g?Ccolor2:’†˜g 
# color3:‹óƒQ?[ƒWƒ_?[ƒNƒJƒ‰?[?Ccolor4:‹óƒQ?[ƒWƒ‰ƒCƒgƒJƒ‰?[ 
# color5:´ÀƒQ?[ƒWƒ_?[ƒNƒJƒ‰?[?Ccolor6:´ÀƒQ?[ƒWƒ‰ƒCƒgƒJƒ‰?[ 
color1 = Color.new(0, 0, 0, 192) 
color2 = Color.new(255, 255, 192, 192) 
color3 = Color.new(0, 0, 0, 192) 
color4 = Color.new(0, 64, 0, 192) 
color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192) 
color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192) 
# •Ï?”sp‚É•`‰æ‚•‚éƒQ?[ƒW‚Ì•?‚ð‘ã“ü 
if actor.maxsp != 0 
sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp 
else 
sp = (width + plus_width) * rate_width / 100 
end 
# ƒQ?[ƒW‚Ì•`‰æ 
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, 
width, plus_width + width * rate_width / 100, 
height, sp, align1, align2, align3, 
color1, color2, color3, color4, color5, color6, grade1, grade2) 
# ƒIƒ¦ƒWƒiƒ‹‚ÌSP•`‰æ?ˆ—?‚ð¼Ä‚Ñ?o‚µ 
draw_actor_sp_original(actor, x, y, width) 
end 
#-------------------------------------------------------------------------- 
# ?½ EXP ƒQ?[ƒW‚Ì•`‰æ 
#-------------------------------------------------------------------------- 
# ƒIƒ¦ƒWƒiƒ‹‚ÌEXP•`‰æ‚ð draw_actor_sp_original ‚Æ–¼‘O•Ï?X 
alias :draw_actor_exp_original :draw_actor_exp 
def draw_actor_exp(actor, x, y, width = 204) 
# •Ï?”rate‚É ¼»?Ý‚Ìexp/nextexp‚ð‘ã“ü 
if actor.next_exp != 0 
rate = actor.now_exp.to_f / actor.next_exp 
else 
rate = 1 
end 
# plus_x:X?À•W‚̈ʒu•â?³ rate_x:X?À•W‚̈ʒu•â?³(%) plus_y:Y?À•W‚̈ʒu•â?³ 
# plus_width:•?‚Ì•â?³ rate_width:•?‚Ì•â?³(%) height:?c•? 
# align1:•`‰æƒ^ƒCƒv1 0:?¶‹l‚ß 1:’†‰›‘µ‚¦ 2:‰E‹l‚ß 
# align2:•`‰æƒ^ƒCƒv2 0:?ã‹l‚ß 1:’†‰›‘µ‚¦ 2:‰º‹l‚ß 
# align3:ƒQ?[ƒWƒ^ƒCƒv 0:?¶‹l‚ß 1:‰E‹l‚ß 
plus_x = 0 
rate_x = 0 
plus_y = 25 
plus_width = 0 
rate_width = 100 
height = 10 
align1 = 1 
align2 = 2 
align3 = 0 
# ƒOƒ‰ƒf?[ƒVƒ‡ƒ“?Ý’è grade1:‹óƒQ?[ƒW grade2:´ÀƒQ?[ƒW 
# (0:‰¡‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 1:?c‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 2:´Î‚߂ɃOƒ‰ƒf?[ƒVƒ‡ƒ“(¼ƒ?d)?j 
grade1 = 1 
grade2 = 0 
# ?F?Ý’è?Bcolor1:¦O˜g?Ccolor2:’†˜g 
# color3:‹óƒQ?[ƒWƒ_?[ƒNƒJƒ‰?[?Ccolor4:‹óƒQ?[ƒWƒ‰ƒCƒgƒJƒ‰?[ 
# color5:´ÀƒQ?[ƒWƒ_?[ƒNƒJƒ‰?[?Ccolor6:´ÀƒQ?[ƒWƒ‰ƒCƒgƒJƒ‰?[ 
color1 = Color.new(0, 0, 0, 192) 
color2 = Color.new(255, 255, 192, 192) 
color3 = Color.new(0, 0, 0, 192) 
color4 = Color.new(64, 0, 0, 192) 
color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192) 
color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192) 
# •Ï?”exp‚É•`‰æ‚•‚éƒQ?[ƒW‚Ì•?‚ð‘ã“ü 
if actor.next_exp != 0 
exp = (width + plus_width) * actor.now_exp * rate_width / 
100 / actor.next_exp 
else 
exp = (width + plus_width) * rate_width / 100 
end 
# ƒQ?[ƒW‚Ì•`‰æ 
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, 
width, plus_width + width * rate_width / 100, 
height, exp, align1, align2, align3, 
color1, color2, color3, color4, color5, color6, grade1, grade2) 
# ƒIƒ¦ƒWƒiƒ‹‚ÌEXP•`‰æ?ˆ—?‚ð¼Ä‚Ñ?o‚µ 
draw_actor_exp_original(actor, x, y) 
end 
 
#-------------------------------------------------------------------------- 
# ?½ ƒQ?[ƒW‚Ì•`‰æ 
#-------------------------------------------------------------------------- 
def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3, 
color1, color2, color3, color4, color5, color6, grade1, grade2) 
case align1 
when 1 
x += (rect_width - width) / 2 
when 2 
x += rect_width - width 
end 
case align2 
when 1 
y -= height / 2 
when 2 
y -= height 
end 
# ˜g•`‰æ 
self.contents.fill_rect(x, y, width, height, color1) 
self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2) 
if align3 == 0 
if grade1 == 2 
grade1 = 3 
end 
if grade2 == 2 
grade2 = 3 
end 
end 
if (align3 == 1 and grade1 == 0) or grade1 > 0 
color = color3 
color3 = color4 
color4 = color 
end 
if (align3 == 1 and grade2 == 0) or grade2 > 0 
color = color5 
color5 = color6 
color6 = color 
end 
# ‹óƒQ?[ƒW‚Ì•`‰æ 
self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4, 
color3, color4, grade1) 
if align3 == 1 
x += width - gauge 
end 
# ´ÀƒQ?[ƒW‚Ì•`‰æ 
self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4, 
color5, color6, grade2) 
end 
end 
 
#------------------------------------------------------------------------------ 
# ?@BitmapƒNƒ‰ƒX‚É?V‚½‚È‹@”\‚ð’ljÁ‚µ‚Ü‚•?B 
#============================================================================== 
 
class Bitmap 
#-------------------------------------------------------------------------- 
# ?½ ‹é¼`‚ðƒOƒ‰ƒf?[ƒVƒ‡ƒ“•\´¦ 
# color1 : ƒXƒ^?[ƒgƒJƒ‰?[ 
# color2 : ƒGƒ“ƒhƒJƒ‰?[ 
# align : 0:‰¡‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 
# 1:?c‚ɃOƒ‰ƒf?[ƒVƒ‡ƒ“ 
# 2:´Î‚߂ɃOƒ‰ƒf?[ƒVƒ‡ƒ“?i¼ƒ?d‚ɂ‚«’?ˆÓ?j 
#-------------------------------------------------------------------------- 
def gradation_rect(x, y, width, height, color1, color2, align = 0) 
if align == 0 
for i in x...x + width 
red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1) 
green = color1.green + 
(color2.green - color1.green) * (i - x) / (width - 1) 
blue = color1.blue + 
(color2.blue - color1.blue) * (i - x) / (width - 1) 
alpha = color1.alpha + 
(color2.alpha - color1.alpha) * (i - x) / (width - 1) 
color = Color.new(red, green, blue, alpha) 
fill_rect(i, y, 1, height, color) 
end 
elsif align == 1 
for i in y...y + height 
red = color1.red + 
(color2.red - color1.red) * (i - y) / (height - 1) 
green = color1.green + 
(color2.green - color1.green) * (i - y) / (height - 1) 
blue = color1.blue + 
(color2.blue - color1.blue) * (i - y) / (height - 1) 
alpha = color1.alpha + 
(color2.alpha - color1.alpha) * (i - y) / (height - 1) 
color = Color.new(red, green, blue, alpha) 
fill_rect(x, i, width, 1, color) 
end 
elsif align == 2 
for i in x...x + width 
for j in y...y + height 
red = color1.red + (color2.red - color1.red) * 
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
green = color1.green + (color2.green - color1.green) * 
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
blue = color1.blue + (color2.blue - color1.blue) * 
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
alpha = color1.alpha + (color2.alpha - color1.alpha) * 
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
color = Color.new(red, green, blue, alpha) 
set_pixel(i, j, color) 
end 
end 
elsif align == 3 
for i in x...x + width 
for j in y...y + height 
red = color1.red + (color2.red - color1.red) * 
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
green = color1.green + (color2.green - color1.green) * 
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
blue = color1.blue + (color2.blue - color1.blue) * 
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
alpha = color1.alpha + (color2.alpha - color1.alpha) * 
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 
color = Color.new(red, green, blue, alpha) 
set_pixel(i, j, color) 
end 
end 
end 
end 
end 
 
#============================================================================== 
# ?¡ Spriteƒ‚ƒWƒ…?[ƒ‹ 
#------------------------------------------------------------------------------ 
# ?@ƒAƒjƒ??[ƒVƒ‡ƒ“‚̦Ǘ?‚ð?s‚¤ƒ‚ƒWƒ…?[ƒ‹‚Å‚•?B 
#============================================================================== 
 
module RPG 
class Sprite < ::Sprite 
def damage(value, critical) 
dispose_damage 
if value.is_a?(Numeric) 
damage_string = value.abs.to_s 
else 
damage_string = value.to_s 
end 
bitmap = Bitmap.new(160, 4 )
bitmap.font.name = "Arial Black" 
bitmap.font.size = 32 
bitmap.font.color.set(0, 0, 0) 
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1) 
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1) 
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1) 
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1) 
if value.is_a?(Numeric) and value < 0 
bitmap.font.color.set(176, 255, 144) 
else 
bitmap.font.color.set(255, 255, 255) 
end 
bitmap.draw_text(0, 12, 160, 36, damage_string, 1) 
if critical 
bitmap.font.size = 20 
bitmap.font.color.set(0, 0, 0) 
bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1) 
bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1) 
bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1) 
bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1) 
bitmap.font.color.set(255, 255, 255) 
bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1) 
end 
@_damage_sprite = ::Sprite.new 
@_damage_sprite.bitmap = bitmap 
@_damage_sprite.ox = 80 + self.viewport.ox 
@_damage_sprite.oy = 20 + self.viewport.oy 
@_damage_sprite.x = self.x + self.viewport.rect.x 
@_damage_sprite.y = self.y - self.oy / 2 + self.viewport.rect.y 
@_damage_sprite.z = 3000 
@_damage_duration = 40 
end 
def animation(animation, hit) 
dispose_animation 
@_animation = animation 
return if @_animation == nil 
@_animation_hit = hit 
@_animation_duration = @_animation.frame_max 
animation_name = @_animation.animation_name 
animation_hue = @_animation.animation_hue 
bitmap = RPG::Cache.animation(animation_name, animation_hue) 
if @@_reference_count.include?(bitmap) 
@@_reference_count[bitmap] += 1 
else 
@@_reference_count[bitmap] = 1 
end 
@_animation_sprites = [] 
if @_animation.position != 3 or not @@_animations.include?(animation) 
for i in 0..15 
sprite = ::Sprite.new 
sprite.bitmap = bitmap 
sprite.visible = false 
@_animation_sprites.push(sprite) 
end 
unless @@_animations.include?(animation) 
@@_animations.push(animation) 
end 
end 
 
end 
def loop_animation(animation) 
return if animation == @_loop_animation 
dispose_loop_animation 
@_loop_animation = animation 
return if @_loop_animation == nil 
@_loop_animation_index = 0 
animation_name = @_loop_animation.animation_name 
animation_hue = @_loop_animation.animation_hue 
bitmap = RPG::Cache.animation(animation_name, animation_hue) 
if @@_reference_count.include?(bitmap) 
@@_reference_count[bitmap] += 1 
else 
@@_reference_count[bitmap] = 1 
end 
@_loop_animation_sprites = [] 
for i in 0..15 
sprite = ::Sprite.new 
sprite.bitmap = bitmap 
sprite.visible = false 
@_loop_animation_sprites.push(sprite) 
end 
update_loop_animation 
end 
def animation_set_sprites(sprites, cell_data, position) 
for i in 0..15 
sprite = sprites[i] 
pattern = cell_data[i, 0] 
if sprite == nil or pattern == nil or pattern == -1 
sprite.visible = false if sprite != nil 
next 
end 
sprite.visible = true 
sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192) 
if position == 3 
if self.viewport != nil 
sprite.x = self.viewport.rect.width / 2 
sprite.y = self.viewport.rect.height - 160 
else 
sprite.x = 320 
sprite.y = 240 
end 
else 
sprite.x = self.x + self.viewport.rect.x - 
self.ox + self.src_rect.width / 2 
sprite.y = self.y + self.viewport.rect.y - 
self.oy + self.src_rect.height / 2 
sprite.y -= self.src_rect.height / 4 if position == 0 
sprite.y += self.src_rect.height / 4 if position == 2 
end 
sprite.x += cell_data[i, 1] 
sprite.y += cell_data[i, 2] 
sprite.z = 2000 
sprite.ox = 96 
sprite.oy = 96 
sprite.zoom_x = cell_data[i, 3] / 100.0 
sprite.zoom_y = cell_data[i, 3] / 100.0 
sprite.angle = cell_data[i, 4] 
sprite.mirror = (cell_data[i, 5] == 1) 
sprite.opacity = cell_data[i, 6] * self.opacity / 255.0 
sprite.blend_type = cell_data[i, 7] 
end 
end 
end 
end



Portion de code : Tout sélectionner

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
#============================================================================== 
# ■ Window_MenuStatus 
#------------------------------------------------------------------------------ 
# Menu spécial de Silversun 
#============================================================================== 
 
class Window_MenuStatus < Window_Selectable 
#-------------------------------------------------------------------------- 
# ● オブジェクト初期化 
#-------------------------------------------------------------------------- 
def initialize 
super(0, 0, 480, 480) 
self.contents = Bitmap.new(width - 32, height - 32) 
self.contents.font.name = $fontface 
self.contents.font.size = $fontsize 
refresh 
self.active = false 
self.index = -1 
end 
#-------------------------------------------------------------------------- 
# ● リフレッシュ 
#-------------------------------------------------------------------------- 
def refresh 
self.contents.clear 
@item_max = $game_party.actors.size 
for i in 0...$game_party.actors.size 
y = 270 
x = 220 
actor = $game_party.actors[i] 
actor1 = $game_party.actors[0] 
actor2 = $game_party.actors[1] 
actor3 = $game_party.actors[2] 
actor4 = $game_party.actors[3] 
self.contents.draw_facesquare(actor.character_name, actor.character_hue,10+32*i, 5 ) 
if @item_max >= 4 
#variables 
cnw = contents.text_size(actor4.name).width 
cnh = contents.text_size(actor4.name).height 
ccw = contents.text_size(actor4.class_name).width 
cch = contents.text_size(actor4.class_name).height 
chpw = contents.text_size(actor4.hp.to_s).width 
cspw = contents.text_size(actor4.sp.to_s).width 
#draw 
draw_actor_battler(actor4,x, y-100) 
draw_actor_name(actor4, x-cnw/2, y-275) 
draw_actor_class(actor4, x-ccw/2, y-275+cnh) 
draw_actor_level(actor4, x-130, y - 275+cnh+cch/2) 
draw_actor_state(actor4, x +80, y - 275+cnh+cch/2) 
draw_actor_hp(actor4, x-chpw*2, y - 275+cnh*2) 
draw_actor_sp(actor4, x -cspw*2, y - 275+cnh*3) 
end 
if @item_max >= 3 
#variables 
cnw = contents.text_size(actor3.name).width 
cnh = contents.text_size(actor3.name).height 
ccw = contents.text_size(actor3.class_name).width 
cch = contents.text_size(actor3.class_name).height 
clw = contents.text_size(actor3.level.to_s).width 
chpw = contents.text_size(actor3.hp.to_s).width 
cspw = contents.text_size(actor3.sp.to_s).width 
#draw 
draw_actor_battler(actor3, x+70, y - 70) 
draw_actor_name(actor3, x+180-cnw/2+10, y-140) 
draw_actor_class(actor3, x+180-cch/2-35, y-140+cnh) 
draw_actor_level(actor3, x+180-clw, y -140+cnh+cch) 
draw_actor_state(actor3, x+180-35, y -140+cnh*3) 
draw_actor_hp(actor3, x+180-100, y-140+cnh*4) 
draw_actor_sp(actor3, x+180-100, y-140+cnh*5) 
end 
if @item_max >= 2 
#variables 
cnw = contents.text_size(actor2.name).width 
cnh = contents.text_size(actor2.name).height 
ccw = contents.text_size(actor2.class_name).width 
cch = contents.text_size(actor2.class_name).height 
#draw 
draw_actor_battler(actor2, x-70,y-70) 
draw_actor_name(actor2, x-220, y-140) 
draw_actor_class(actor2, x-220, y-140+cnh) 
draw_actor_level(actor2, x-220, y -140+cnh+cch) 
draw_actor_state(actor2, x-220, y -140+cnh*3) 
draw_actor_hp(actor2, x-220, y-140+cnh*4) 
draw_actor_sp(actor2, x-220, y-140+cnh*5) 
end 
if @item_max >= 1 
#variables 
cnw = contents.text_size(actor1.name).width 
cnh = contents.text_size(actor1.name).height 
ccw = contents.text_size(actor1.class_name).width 
cch = contents.text_size(actor1.class_name).height 
chpw = contents.text_size(actor1.hp.to_s).width 
cspw = contents.text_size(actor1.sp.to_s).width 
#draw 
draw_actor_battler(actor1, x,y) 
draw_actor_name(actor1, x-cnw/2, y+80) 
draw_actor_class(actor1, x-ccw/2, y+80+cnh) 
draw_actor_level(actor1, x-130, y + 80+cnh+cch/2) 
draw_actor_state(actor1, x +80, y + 80+cnh+cch/2) 
draw_actor_hp(actor1, x-chpw*2, y + 80+cnh*2) 
draw_actor_sp(actor1, x -cspw*2, y + 80+cnh*3) 
end 
 
end 
end 
#-------------------------------------------------------------------------- 
# ● カーソルの矩形更新 
#-------------------------------------------------------------------------- 
def update_cursor_rect 
if @index < 0 
self.cursor_rect.empty 
else 
self.cursor_rect.set(7+@index*32, 2, 31, 31) 
end 
end 
end



C'est tout !!!image




Dark-Angel - posté le 27/09/2008 à 00:15:41 (25 messages postés)

❤ 0

moi ca a absolument RIEN[size=24][/size] changer dans mon menu il marche mais y a pas de difference

la patience et la clef du succes surtout sur ses logiciels xD


kakashi41 - posté le 22/04/2009 à 22:10:13 (82 messages postés)

❤ 0

j'aime pas trop le menue il est un peut trop basic je trouve.

Allez sur le répertoire des projet sur http://rpg-project.xooit.com/index.php


Vyslanté - posté le 08/07/2009 à 08:17:19 (274 messages postés)

❤ 0

Prince du Valhalla, Maître de l'Olympe et Fistule parmi les Fistules !

Ce script est vraiment génial !
Je l'ai essayé...et miracle ! Ça marche !

Oxygennfait imploser des kevins en leur apprenant l’imparfait du subjonctif | Mon first tuto ! | Et voilà la BA la plus attendue du net !


Fredomaker - posté le 11/08/2010 à 22:01:00 (37 messages postés)

❤ 0

Epéliste en colère

Je veux un [color=red][/color][/size]Screen[size=9][bgcolor=black] Sinon je le prends pas:doute3
alors un SCREEN sinon je vais etre furax:fache1:fache2:fache3

beaucoup de choses se passe mais quoi que vous fassiez quelqu'un ous regarde d'un mauvais oeil

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe - Mentions légales

Plan du site

Communauté: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidée | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Télécharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Eléments séparés | Sprites
Jeux: Au hasard | Notre sélection | Sélection des membres | Tous les jeux | Jeux complets | Le cimetière | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarès | L'Annuaire | Livre d'or | Le Wiki | Divers