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
| =begin
+------------------------------------------------------------------------------+
� ** Stat points distribution system 1.6
� By Lettuce.
�
�
�Some help:
� - Position wasn't stored properly in mode 1 (Thanks Akin)
� - Some sort of notification to player (Thanks Akin)
� - Player switch now supports LEFT and RIGHT arrow (Thanks Akin)
� - Advice on using class attr instead of global var (Thanks GoldenShadow)
�
�-----------------------------------------------------------------------------
� Ce script, permet de distribuer des points pour augmenter les stats de vos héros
�
� Pour l'appeler : $scene = Scene_Stat_Dist.new(0)
�
�
� Pour donner des points à vos héros utilisez :
�
� $game_party.members[ID_du_héros].points += Nombre_de_points
�
� Si vous voulez que votre héros ai ces points après avoir monté d'un niveau :
� Dans Game_Actor, à "def change_exp", sous la ligne 'level_up'; collez ça :
�
� $game_actors[@actor_id].points += Nombre_de_points
�
� OU (Si vous voulez le mode RO, expliqué en bas)
�
� $game_actors[@actor_id].points += ((@level/5).floor+2).floor
�
� # It seems the game returns non 0 based array if we use game_party >.<;
�
� **Note**
� Le script n'influance pas sur les stats du héros dans la base de données
� Il les ajoutes juste.
� Set the stats to 1 all the way in the database to disable growth :0
�
� **Modes**
� 1 : 1 point / caractéristiques
� Exemple : Pour augmenter l'attaque vous utiliserez 1 points quelque sois sa valeur
� 2 : Utiliser le systéme RO , les points a donner dépende de la valeur du stat.
� Explanation: Dans RO, si vous avez des stats éléves, vous avez besoin de plus de points pour
� les augmenter. Donc si vous avez 90 d'attaque et 5 d'intel, Vous pouvez choisir
� d'utiliser 10 point pour 1 d'attaque de plus ou utiliser 10 points pour obtenir 6 d'Intteligence
+------------------------------------------------------------------------------+
=end
#������������������������������ Configuration ���������������������������������#
#Points de départ : Nombre de points reçus au début du jeu
StartPoints = 0
#Le maximun de stats que vous autorisez
MaxStat = 800
MaxHP = 9999
MaxMP = 999
#Le maximum de stats : "% chance de toucher l'ennemi, d'esquiver et de faire un coup critique.
MaxHIT = 100 # 100 = Ne rate jamais
MaxEVA = 65 #100 = esquive TOUT les coups : Pas logique ^^'. 50-70 est une bonne moyenne
MaxCRIT = 85 #100 = Toujours des critiques.
# Combien de points sont nécessaire pour augmenter les stats
PointsPerHP = 10 # Hp
PointsPerMP = 5 # Mp
PointsPerHIT = 6 # % de chance de toucher
PointsPerEVA = 6 #% de chance d'esquiver
PointsPerCRIT = 7 # % chance de critique.
# De combien sont augmenté les stats par points ?
IncreaseBy = 10 # Attaque, défense,intelligence, agilitée
HPIncreaseBy = 50 # Hp
MPIncreaseBy = 25 # Mp
HITIncreaseBy = 1 # % de chance de toucher
EVAIncreaseBy = 1 # % de chance d'esquiver
CRITIncreaseBy = 1 # % chance de critique.
#1 pour le mode normal, 2 ou RO mode [Les points requis sont calculés différaments]
Mode = 2
#Vous pouvez changer la police et la taille :
Fontname = "UmePlus Gothic"
Fontsize = 20
#Layout mode, si vous utilisez des mots long à la place de atk,spi,def or agi ; mettez 2.
LayoutMode = 2
#========================== End Configuration ==================================
OFFSET = -10 #moves equipment part up and down XD
#==============================================================================
# ** Lettuce_Window_Top
#------------------------------------------------------------------------------
# This window displays Title message
#==============================================================================
class Lettuce_Window_Top < Window_Base
def initialize
super(0,0,544,70)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.name = Fontname
self.contents.font.size = Fontsize
refresh
end
def refresh
self.contents.clear
self.contents.draw_text(0,7,544-32,32,"Distribution de Statistiques",1)
self.contents.font.size = Fontsize-4
end
end
#==============================================================================
# ** Lettuce_Window_Points
#------------------------------------------------------------------------------
# This window displays the attributes of a party member
#==============================================================================
class Lettuce_Window_Points < Window_Base
def initialize(member_index)
super(401,320,144,52)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.name = Fontname
self.contents.font.size = Fontsize
refresh(member_index)
end
def refresh(member_index)
actor = $game_party.members[member_index]
points = actor.points
self.contents.clear
self.contents.draw_text(0,0,162,20,"Points: "+points.to_s)
end
end
#==============================================================================
** Lettuce_Window_Info
#------------------------------------------------------------------------------
# This window displays the attributes of a party member
#==============================================================================
lass Lettuce_Window_Info < Window_Base
def initialize(member_index)
super(0,71,400,346)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.name = Fontname
self.contents.font.size = Fontsize
@exo = 25 #equipment section X coordinate offset
@exo2 = 35 #equipment section X coordinate offset
eyo = -10 #equipment section Y coordinate offset
refresh(member_index)
end
def refresh(member_index)
actor = $game_party.members[member_index]
self.contents.clear
self.contents.font.size = Fontsize - 3
draw_actor_face(actor,10,10,92)
draw_actor_name(actor,120,5)
self.contents.draw_text(120,21,200,20,actor.class.name)
self.contents.draw_text(120,36,200,20,"Niveau "+actor.level.to_s)
if LayoutMode == 1
draw_actor_state(actor,200,280,168)
elsif LayoutMode == 2
draw_actor_state(actor,220,10)
end
s1 = actor.exp_s #total exp
s2 = actor.current_lvl_exp #exp to get to this level
if s1.is_a?(Numeric)
s3 = s1-s2 #progress in this level
s4 = actor.next_lvl_exp #exp needed for next level
self.contents.font.size = Fontsize - 5
self.contents.draw_text(230,74,90,20,"Exp: "+s3.to_s+"/"+s4.to_s,0)
self.contents.font.size = Fontsize
else
self.contents.draw_text(230,74,90,20,"-----/-----",2)
end
#Preparing bar colours
back_color = Color.new(39, 58, 83, 255)
str_color1 = Color.new(229, 153, 73, 255)
str_color2 = Color.new(255, 72, 0, 255)
def_color1 = Color.new(210, 255, 0, 255)
def_color2 = Color.new(85, 129, 9, 255)
spi_color1 = Color.new(99, 133, 161, 255)
spi_color2 = Color.new(10, 60,107, 255)
agi_color1 = Color.new(167, 125, 180, 255)
agi_color2 = Color.new(90, 11, 107, 255)
hp_color1 = Color.new(66, 114, 164, 255)
hp_color2 = Color.new(122, 175, 229, 255)
mp_color1 = Color.new(93, 50, 158, 255)
mp_color2 = Color.new(145, 122, 229, 255)
exp_color1 = Color.new(246, 243, 224, 255)
exp_color2 = Color.new(255, 182, 0, 255)
if s1.is_a?(Numeric)
self.contents.fill_rect(230,90,89,7,back_color)
self.contents.gradient_fill_rect(232,92,(85*s3)/s4,3,exp_color1,exp_color2)
else
self.contents.fill_rect(230,60,89,7,back_color)
end
self.contents.fill_rect(120,67,104,7,back_color)
self.contents.gradient_fill_rect(122,69,100*actor.hp/actor.maxhp,3,hp_color1,hp_color2)
self.contents.font.size = Fontsize - 5
self.contents.draw_text(120,44,100,35,"HP",0)
self.contents.draw_text(120,44,100,35,actor.hp.to_s + "/" + actor.maxhp.to_s,2)
self.contents.fill_rect(120,90,104,7,back_color)
self.contents.gradient_fill_rect(122,92,100*actor.mp/actor.maxmp,3,mp_color1,mp_color2)
self.contents.draw_text(120,67,100,35,"MP",0)
self.contents.draw_text(120,67,100,35,actor.mp.to_s + "/" + actor.maxmp.to_s,2)
self.contents.font.size = Fontsize
##weapons
weapon = $data_weapons[actor.weapon_id]
shield = $data_armors[actor.armor1_id]
helm =$data_armors[actor.armor2_id]
body =$data_armors[actor.armor3_id]
accessory =$data_armors[actor.armor4_id]
bonus_atk = 0
bonus_def = 0
bonus_spi = 0
bonus_agi = 0
evasion = 0
crit = 4
if $data_actors[actor.id].critical_bonus
crit +=4
end
if weapon
bonus_atk += weapon.atk
bonus_def += weapon.def
bonus_spi += weapon.spi
bonus_agi += weapon.agi
if weapon.critical_bonus
crit += 4
end
end
if shield
bonus_atk += shield.atk
bonus_def += shield.def
bonus_spi += shield.spi
bonus_agi += shield.agi
evasion += shield.eva
end
if helm
bonus_atk += helm.atk
bonus_def += helm.def
bonus_spi += helm.spi
bonus_agi += helm.agi
evasion += helm.eva
end
if body
bonus_atk += body.atk
bonus_def += body.def
bonus_spi += body.spi
bonus_agi += body.agi
evasion += body.eva
end
if accessory
bonus_atk += accessory.atk
bonus_def += accessory.def
bonus_spi += accessory.spi
bonus_agi += accessory.agi
evasion += accessory.eva
end
if LayoutMode == 1
draw_item_name(weapon,160+@exo,125+@eyo,true)
if weapon.two_handed == true
draw_item_name(weapon,160+@exo,155+@eyo,true)
else
draw_item_name(shield,160+@exo,155+@eyo,true)
end
draw_item_name(helm,160+@exo,185+@eyo,true)
draw_item_name(body,160+@exo,215+@eyo,true)
draw_item_name(accessory,160+@exo,245+@eyo,true)
#Testing area for Weapon upgrade script
#self.contents.font.size = Fontsize - 7
#self.contents.draw_text(160+@exo,135,30,20,"]+"+weapon.level.to_s+"]",0)
self.contents.font.color = Color.new(87,87,87,255)
if !weapon
draw_icon(216,160+@exo,125+@eyo,true)
self.contents.draw_text(184+@exo,127+@eyo,200,20,"Unequiped")
end
if !shield
draw_icon(217,160+@exo,155+@eyo,true)
self.contents.draw_text(184+@exo,157+@eyo,200,20,"Unequiped")
end
if !helm
draw_icon(218,160+@exo,185+@eyo,true)
self.contents.draw_text(184+@exo,187+@eyo,200,20,"Unequiped")
end
if !body
draw_icon(219,160+@exo,215+@eyo,true)
self.contents.draw_text(184+@exo,217+@eyo,200,20,"Unequiped")
end
if !accessory
draw_icon(220,160+@exo,245+@eyo,true)
self.contents.draw_text(184+@exo,247+@eyo,200,20,"Unequiped")
end
self.contents.font.color = Color.new(255,255,255,255)
elsif LayoutMode == 2
draw_item_name(weapon,160+@exo2,125+OFFSET+@eyo,true)
draw_item_name(shield,160+@exo2,165+OFFSET+@eyo,true)
draw_item_name(helm,160+@exo2,205+OFFSET+@eyo,true)
draw_item_name(body,160+@exo2,245+OFFSET+@eyo,true)
draw_item_name(accessory,160+@exo2,285+OFFSET+@eyo,true)
self.contents.font.color = Color.new(87,87,87,255)
if !weapon
draw_icon(216,160+@exo2,125+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,127+OFFSET+@eyo,200,20,"Déséquipé")
end
if !helm
draw_icon(218,160+@exo2,205+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,207+OFFSET+@eyo,200,20,"Déséquipé")
end
if !body
draw_icon(219,160+@exo2,245+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,247+OFFSET+@eyo,200,20,"Déséquipé")
end
if !accessory
draw_icon(220,160+@exo2,285+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,287+OFFSET+@eyo,200,20,"Déséquipé")
end
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.font.size = Fontsize - 5
self.contents.draw_text(10,120,100,20,Vocab::atk+": ")
self.contents.draw_text(10,120,100,20,(actor.atk-bonus_atk).to_s+" + "+bonus_atk.to_s,2)
self.contents.fill_rect(10,140,104,7,back_color)
self.contents.gradient_fill_rect(12,142,((actor.atk-bonus_atk)*100)/MaxStat,3,str_color1,str_color2)
self.contents.draw_text(10,150,100,20,Vocab::def+": ")
self.contents.draw_text(10,150,100,20,(actor.def-bonus_def).to_s+" + "+bonus_def.to_s,2)
self.contents.fill_rect(10,170,104,7,back_color)
self.contents.gradient_fill_rect(12,172,((actor.def-bonus_def)*100)/MaxStat,3,def_color1,def_color2)
self.contents.draw_text(10,180,100,20,Vocab::spi+": ")
self.contents.draw_text(10,180,100,20,(actor.spi-bonus_spi).to_s+" + "+bonus_spi.to_s,2)
self.contents.fill_rect(10,200,104,7,back_color)
self.contents.gradient_fill_rect(12,202,((actor.spi-bonus_spi)*100)/MaxStat,3,spi_color1,spi_color2)
self.contents.draw_text(10,210,100,20,Vocab::agi+": ")
self.contents.draw_text(10,210,100,20,(actor.agi-bonus_agi).to_s+" + "+bonus_agi.to_s,2)
self.contents.fill_rect(10,230,104,7,back_color)
self.contents.gradient_fill_rect(12,232,((actor.agi-bonus_agi)*100)/MaxStat,3,agi_color1,agi_color2)
if weapon
hit_rate = weapon.hit
else
hit_rate = 95
end
self.contents.font.size = Fontsize - 5
self.contents.font.color = Color.new(162,212,98,255)
self.contents.draw_text(10,245,100,20,"Attaque max. :",2)
self.contents.draw_text(10,260,100,20,"Frappe (%) :",2)
self.contents.draw_text(10,275,100,20,"Esquive (%) :",2)
self.contents.draw_text(10,290,100,20,"Critique (%) :",2)
self.contents.draw_text(120,245,60,20,(actor.atk*4).to_s,0)
self.contents.draw_text(120,260,60,20,actor.base_hit.to_s + "+" + actor.hitr.to_s,0)
self.contents.draw_text(120,275,60,20,actor.base_eva.to_s + "+" +actor.evar.to_s,0)
self.contents.draw_text(120,290,60,20,actor.base_cri.to_s + "+" + actor.crir.to_s,0)
self.contents.font.size = Fontsize-6
self.contents.font.color = text_color(16)
self.contents.draw_text(135,260,60,20,"["+PointsPerHIT.to_s+"pt.]",2)
self.contents.draw_text(135,275,60,20,"["+PointsPerEVA.to_s+"pt.]",2)
self.contents.draw_text(135,290,60,20,"["+PointsPerCRIT.to_s+"pt.]",2)
#self.contents.draw_text(120,260,60,20,(hit_rate+actor.hit_bonus).to_s,0)
#self.contents.draw_text(120,275,60,20,(evasion+actor.eva).to_s,0)
#self.contents.draw_text(120,290,60,20,(crit+actor.cri_bonus).to_s,0)
if LayoutMode == 1
self.contents.font.color = Color.new(155,199,206,255)
self.contents.font.size = Fontsize - 8
if weapon
self.contents.draw_text(185+@exo,140+@eyo,100,20,Vocab::atk+"+"+weapon.atk.to_s)
self.contents.draw_text(219+@exo,140+@eyo,100,20,Vocab::def+"+"+weapon.def.to_s)
self.contents.draw_text(253+@exo,140+@eyo,100,20,Vocab::spi+"+"+weapon.spi.to_s)
self.contents.draw_text(287+@exo,140+@eyo,100,20,Vocab::agi+"+"+weapon.agi.to_s)
end
if shield
self.contents.draw_text(185+@exo,170+@eyo,100,20,Vocab::atk+"+"+shield.atk.to_s)
self.contents.draw_text(219+@exo,170+@eyo,100,20,Vocab::def+"+"+shield.def.to_s)
self.contents.draw_text(253+@exo,170+@eyo,100,20,Vocab::spi+"+"+shield.spi.to_s)
self.contents.draw_text(287+@exo,170+@eyo,100,20,Vocab::agi+"+"+shield.agi.to_s)
end
if helm
self.contents.draw_text(185+@exo,200+@eyo,100,20,Vocab::atk+"+"+helm.atk.to_s)
self.contents.draw_text(219+@exo,200+@eyo,100,20,Vocab::def+"+"+helm.def.to_s)
self.contents.draw_text(253+@exo,200+@eyo,100,20,Vocab::spi+"+"+helm.spi.to_s)
self.contents.draw_text(287+@exo,200+@eyo,100,20,Vocab::agi+"+"+helm.agi.to_s)
end
if body
self.contents.draw_text(185+@exo,230+@eyo,100,20,Vocab::atk+"+"+body.atk.to_s)
self.contents.draw_text(219+@exo,230+@eyo,100,20,Vocab::def+"+"+body.def.to_s)
self.contents.draw_text(253+@exo,230+@eyo,100,20,Vocab::spi+"+"+body.spi.to_s)
self.contents.draw_text(287+@exo,230+@eyo,100,20,Vocab::agi+"+"+body.agi.to_s)
end
if accessory
self.contents.draw_text(185+@exo,260+@eyo,100,20,Vocab::atk+"+"+accessory.atk.to_s)
self.contents.draw_text(219+@exo,260+@eyo,100,20,Vocab::def+"+"+accessory.def.to_s)
self.contents.draw_text(253+@exo,260+@eyo,100,20,Vocab::spi+"+"+accessory.spi.to_s)
self.contents.draw_text(287+@exo,260+@eyo,100,20,Vocab::agi+"+"+accessory.agi.to_s)
end
end
if Mode == 2
self.contents.font.size = Fontsize - 8
self.contents.font.color = Color.new(155,199,206,255)
self.contents.draw_text(23,100,125,20,"POINTS",2)
self.contents.draw_text(29,110,125,20,"REQUIS",2)
self.contents.font.size = Fontsize - 4
self.contents.draw_text(20,125,115,20,required(actor.atk-bonus_atk).to_s,2)
self.contents.draw_text(20,155,115,20,required(actor.def-bonus_def).to_s,2)
self.contents.draw_text(20,185,115,20,required(actor.spi-bonus_spi).to_s,2)
self.contents.draw_text(20,215,115,20,required(actor.agi-bonus_agi).to_s,2)
end
if LayoutMode == 2
self.contents.font.color = Color.new(155,199,206,255)
self.contents.font.size = Fontsize - 8
if weapon
self.contents.draw_text(185+@exo2,140+OFFSET+@eyo,100,20,Vocab::atk+"+"+weapon.atk.to_s)
self.contents.draw_text(185+@exo2,150+OFFSET+@eyo,100,20,Vocab::def+"+"+weapon.def.to_s)
self.contents.draw_text(253+@exo2,140+OFFSET+@eyo,100,20,Vocab::spi+"+"+weapon.spi.to_s)
self.contents.draw_text(253+@exo2,150+OFFSET+@eyo,100,20,Vocab::agi+"+"+weapon.agi.to_s)
end
if shield
self.contents.draw_text(185+@exo2,180+OFFSET+@eyo,100,20,Vocab::atk+"+"+shield.atk.to_s)
self.contents.draw_text(185+@exo2,190+OFFSET+@eyo,100,20,Vocab::def+"+"+shield.def.to_s)
self.contents.draw_text(253+@exo2,180+OFFSET+@eyo,100,20,Vocab::spi+"+"+shield.spi.to_s)
self.contents.draw_text(253+@exo2,190+OFFSET+@eyo,100,20,Vocab::agi+"+"+shield.agi.to_s)
end
if helm
self.contents.draw_text(185+@exo2,220+OFFSET+@eyo,100,20,Vocab::atk+"+"+helm.atk.to_s)
self.contents.draw_text(185+@exo2,230+OFFSET+@eyo,100,20,Vocab::def+"+"+helm.def.to_s)
self.contents.draw_text(253+@exo2,220+OFFSET+@eyo,100,20,Vocab::spi+"+"+helm.spi.to_s)
self.contents.draw_text(253+@exo2,230+OFFSET+@eyo,100,20,Vocab::agi+"+"+helm.agi.to_s)
end
if body
self.contents.draw_text(185+@exo2,260+OFFSET+@eyo,100,20,Vocab::atk+"+"+body.atk.to_s)
self.contents.draw_text(185+@exo2,270+OFFSET+@eyo,100,20,Vocab::def+"+"+body.def.to_s)
self.contents.draw_text(253+@exo2,260+OFFSET+@eyo,100,20,Vocab::spi+"+"+body.spi.to_s)
self.contents.draw_text(253+@exo2,270+OFFSET+@eyo,100,20,Vocab::agi+"+"+body.agi.to_s)
end
if accessory
self.contents.draw_text(185+@exo2,300+OFFSET+@eyo,100,20,Vocab::atk+"+"+accessory.atk.to_s)
self.contents.draw_text(185+@exo2,310+OFFSET+@eyo,100,20,Vocab::def+"+"+accessory.def.to_s)
self.contents.draw_text(253+@exo2,300+OFFSET+@eyo,100,20,Vocab::spi+"+"+accessory.spi.to_s)
self.contents.draw_text(253+@exo2,310+OFFSET+@eyo,100,20,Vocab::agi+"+"+accessory.agi.to_s)
end
end
end
def required(base)
return (((base-1)/10)+2).floor
end |