Day.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Sorties: Star Trek: Glorious Wolf - (...) / Sorties: Dread Mac Farlane - episode 3 / News: Plein d'images cools créées par (...) / Sorties: Star Trek: Glorious Wolf - (...) / Jeux: Final Fantasy 2.0 / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

456 connectés actuellement

29184713 visiteurs
depuis l'ouverture

4978 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

RPG Fusion

RPG Maker Détente

Lumen

Kingdom Ultimate

Tashiroworld

Tous nos partenaires

Devenir
partenaire



Stat points distribution system 1.71

Pour distribuer des points de statistiques (montée de niveaux, contre argent ou lors de quêtes).

Script pour RPG Maker VX
Ecrit par Lettuce & InfinateX
Publié par mitraille (lui envoyer un message privé)
Signaler un script cassé

❤ 0

Auteur : Lettuce
Logiciel : RPG Maker VX
Nombre de scripts : 1
Source : http://rmrk.net/index.php?topic=26799.0

Fonctionnalités
- Ce script va vous permettre de distribuer des points de statistique a vos héros, c'est-à-dire d'augmenter vos stat (att, PV, PV esquive...) grâce à des points accumulés soit par la montée de LV (ex 1 LVL de plus = 10 point de plus) ou moyennant une somme d'argent ou encore en les méritant (Quêtes).

Installation
A placer au dessus de Main.

Conditions d'utilisation
Vous être libres d'utiliser ce script tant que vous créditez le/les auteurs.

Utilisation
Appeler le menu
Depuis un script (menu principal) ou en appel de script, insérez $scene = Scene_Stat_Dist.new(0).

Donner des points
En appel de script ou dans un autre script : $game_party.members[<member ID>].points += <amount of points>. Vous devez remplacer <member ID> par l'id du héros dans la base de données, et <amount of points> par le nombre de points à distribuer.

Configuration dans le script
Vous pouvez configurer le script avec notamment le nombre de points max distribuables par stats, l'augmentation des stats, le mode à utiliser, la police et des termes de vocabulaire dans le menu. Tout se situe au début du code.

Il existe deux modes :
1 : Ajoute un point à la stat si vous y attribuez un point de compétence.
2 : (RO) Si votre stat est élevée, le nombre de points requis sera plus élevé. (exemple : vous 90 d'attaque et 5 en intelligence. Vous pourrez donc avec 10 points soit augmenter de 1 la stat d'attaque, ou de 6 la stat d'intelligence).

Pour ajouter des points lors de l'augmentation d'un niveau
Dans le script Game_Actor, allez à la ligne def change_exp, et sous la ligne level_up, collez ceci :

Portion de code : Tout sélectionner

1
$game_actors[@actor_id].points += x


ou, si vous utilisez le mode RO :

Portion de code : Tout sélectionner

1
$game_actors[@actor_id].points += ((@level/5).floor+2).floor*difference



Note : Lorsque vous augmentez de niveau, les augmentations liées aux courbes dans la base de données ont lieu. Si vous voulez supprimer ces augmentations, vous devrez éditer la base de données pour que les stats au niveau final soient les mêmes qu'au niveau de départ.

Compatibilité
- Compatible avec le script Weapon Upgrade d'Akin


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
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
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
=begin
+------------------------------------------------------------------------------+
# ** Stat points distribution system 1.71                                    
#                  By Lettuce.                                                 
#                  Edits by InfinateX                                          
#                                                                              
#                                                                             
#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) 
#                                                                              
#------------------------------------------------------------------------------
#  This script lets you distribute points onto your actor's stats              
#                                                                              
# Call scene using this: $scene = Scene_Stat_Dist.new(0)                       
#                                                                              
#                                                                             
#  You can give points to your actors by using this code                       
#                                                                              
#    $game_party.members[<member ID>].points += <amount of points>         
#                                                                              
#  If you want your actor to get points after leveling:                        
#  Under Game_Actor, in def change_exp, under the line level_up; paste this    
#                                                                              
#            difference = @level - last_level                      
#    $game_actors[@actor_id].points += <amount of points>                     
#                                                                              
#               OR (if you want RO mode; explained below)      
#                                                                              
#      difference = @level - last_level                                        
#      $game_actors[@actor_id].points += ((@level/5).floor+2).floor*difference 
#                                                                              
# # It seems the game returns non 0 based array if we use game_party >.<;      
#                                                                              
#  **Note**                                                                    
#  This script does not stop your actors from gaining stats points defined in 
#  the database. It will just add to it.                                       
#  Set the stats to 1 all the way in the database to disable growth :0         
#                                                                              
#  **Modes**                                                                   
#  1 : Add one point to the attribute per point                                
#  2 : Use RO system, attribute with value needs more points to increase.      
#     Explanation: In RO, if you got high stats, you need more points to   
#    increase it. So if you have 90 ATK and 5 INT...You can               
#   choose to use 10 points for 1 more ATK OR use that 10 points           
#   to get 6 INT                                                           
+------------------------------------------------------------------------------+
=end
############################### Configuration ##################################
#Starting points; how many points to give to actor at the beginning of the game
StartPoints = 100
#Maximum attribute point you allowed in your game
MaxStat = 100
MaxHP = 40
MaxMP = 0
     #Max hit, eva and crit rate are all in percentage
MaxHIT = 0 # 100 means never miss
MaxEVA = 0 #100 means ALWAYS dodge; very illogical ^^. 50-70 is good rate
MaxCRIT = 0 #100 means always crit o.O
 
    #How many points needed per increase
PointsPerHP = 1
PointsPerMP = 1
PointsPerHIT = 1
PointsPerEVA = 1
PointsPerCRIT = 1
 
#How many stats will increase per point?
IncreaseBy = 1
HPIncreaseBy = 4
MPIncreaseBy = 0
HITIncreaseBy = 0
EVAIncreaseBy = 0
CRITIncreaseBy = 0
 
 
#1 for normal mode, 2 or RO mode [points required calculated through formula]
Mode = 1
#You can change font family and size here
Fontname = Font.default_name
Fontsize = 20
 
#Layout mode, if you use long words for atk,spi,def or agi ; set LayoutMode to 2
LayoutMode = 2
 
#------------------------------------------------------------------------
# These are the phrases/Abrv. used in the Stat Distribution menu.
#------------------------------------------------------------------------
DIST_NAME = "Stat Distribution Menu"
CHAR_CHANGE_TEXT = "Press left or right to change character"
POINT_TEXT = "Points: "
CLASS_TEXT = "Class: "
LVL_TEXT = "Lv. "
 
#========================== 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,-10,544-32,32,DIST_NAME,1)
    self.contents.font.size = Fontsize-4
    self.contents.draw_text(0,10,544-32,32,CHAR_CHANGE_TEXT,1)
  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,POINT_TEXT+points.to_s)  
  end
end
 
#==============================================================================
# ** Lettuce_Window_Info
#------------------------------------------------------------------------------
#  This window displays the attributes of a party member
#==============================================================================
 
class 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
    draw_actor_face(actor,10,10,92)
    draw_actor_name(actor,120,10)
    self.contents.font.size = Fontsize
    self.contents.draw_text(190,30,200,20,CLASS_TEXT+actor.class.name)
    self.contents.draw_text(120,30,200,20,LVL_TEXT+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,85,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.draw_text(120,44,100,30,"HP",0)
  self.contents.draw_text(120,44,100,30,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,30,"MP",0)
  self.contents.draw_text(120,67,100,30,actor.mp.to_s + "/" + actor.maxmp.to_s,2)
  
  ##weapons
  dual_w = true if actor.two_swords_style == true
  weapon = $data_weapons[actor.weapon_id]
  
  shield = $data_armors[actor.armor1_id]
  shield = dual_w ? $data_weapons[actor.armor1_id] : $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 dual_w && shield
    bonus_atk += shield.atk
    bonus_def += shield.def
    bonus_spi += shield.spi
    bonus_agi += shield.agi
    if weapon.critical_bonus
      crit += 4
    end
  end
  if shield && !dual_w
    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_hand = true if weapon.two_handed == true
      
    end
    if two_hand      
      draw_item_name(weapon,160+@exo,155+@eyo,true)
    elsif dual_w
      dweapon = $data_weapons[actor.armor1_id]
      draw_item_name(dweapon,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,"Unequipped")
    end
    if !shield 
      #draw_icon(217,160+@exo,155+@eyo,true)
      if !two_hand
      self.contents.draw_text(184+@exo,157+@eyo,200,20,"Unequipped")
      end
    end
    if !helm
      #draw_icon(218,160+@exo,185+@eyo,true)
      self.contents.draw_text(184+@exo,187+@eyo,200,20,"Unequipped")
    end
    if !body
      #draw_icon(219,160+@exo,215+@eyo,true)
      self.contents.draw_text(184+@exo,217+@eyo,200,20,"Unequipped")
    end
    if !accessory
      #draw_icon(220,160+@exo,245+@eyo,true)
      self.contents.draw_text(184+@exo,247+@eyo,200,20,"Unequipped")
    end
    self.contents.font.color = Color.new(255,255,255,255)
    
  elsif LayoutMode == 2
    draw_item_name(weapon,160+@exo2,125+OFFSET+@eyo,true)
    #if weapon
  if weapon
    two_hand = true if weapon.two_handed
  end
      if two_hand
      draw_item_name(weapon,160+@exo2,165+OFFSET+@eyo,true)
    else
      draw_item_name(shield,160+@exo2,165+OFFSET+@eyo,true)
      end
    #end
=begin
    if weapon.two_handed == true
      draw_item_name(weapon,160+@exo2,165+OFFSET+@eyo,true)
    else
      draw_item_name(shield,160+@exo2,165+OFFSET+@eyo,true)
    end
=end
    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,"Unequipped")
    end
    if weapon
    if !shield and weapon.two_handed == false
      #draw_icon(217,160+@exo2,165+OFFSET+@eyo,true)
      self.contents.draw_text(184+@exo2,167+OFFSET+@eyo,200,20,"Unequipped")
    end
    else
    if !shield
      #draw_icon(217,160+@exo2,165+OFFSET+@eyo,true)
      self.contents.draw_text(184+@exo2,167+OFFSET+@eyo,200,20,"Unequipped")
    end
    end
    
    if !helm
      #draw_icon(218,160+@exo2,205+OFFSET+@eyo,true)
      self.contents.draw_text(184+@exo2,207+OFFSET+@eyo,200,20,"Unequipped")
    end
    if !body
      #draw_icon(219,160+@exo2,245+OFFSET+@eyo,true)
      self.contents.draw_text(184+@exo2,247+OFFSET+@eyo,200,20,"Unequipped")
    end
    if !accessory
      #draw_icon(220,160+@exo2,285+OFFSET+@eyo,true)
      self.contents.draw_text(184+@exo2,287+OFFSET+@eyo,200,20,"Unequipped")
    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(1,245,100,20,"Maximum ATK :",2)
  self.contents.draw_text(1,260,100,20,"Hit rate (%) :",2)
  self.contents.draw_text(1,275,100,20,"Evasion rate (%) :",2)
  self.contents.draw_text(1,290,100,20,"Critical Rate (%) :",2)
  
  self.contents.draw_text(105,245,60,20,(actor.atk*4).to_s,0)
  self.contents.draw_text(105,260,60,20,actor.base_hit.to_s + "+" + actor.hitr.to_s,0)
  self.contents.draw_text(105,275,60,20,actor.base_eva.to_s + "+" +actor.evar.to_s,0)
  self.contents.draw_text(105,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,"[Req:"+PointsPerHIT.to_s+"pt.]",2)
  self.contents.draw_text(135,275,60,20,"[Req:"+PointsPerEVA.to_s+"pt.]",2)
  self.contents.draw_text(135,290,60,20,"[Req:"+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,"REQUIRED",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
  
end
 
#==============================================================================
# ** Lettuce_Window_Help
#------------------------------------------------------------------------------
#  This window displays property of each attribute
#==============================================================================
class Lettuce_Window_Help < Window_Base
  def initialize(index)
    super(401,372,144,44)
    self.contents = Bitmap.new(width-32,height-32)
    self.contents.font.size = Fontsize - 6
    refresh(index)
  end
  
  def refresh(index)
    self.contents.clear
  self.contents.font.color = text_color(16)
 
    case index
    when 0
      self.contents.draw_text(0,-5,112,20,"HP + "+HPIncreaseBy.to_s)
    when 1
      self.contents.draw_text(0,-5,112,20,"MP + "+MPIncreaseBy.to_s)
    when 2
      self.contents.draw_text(0,-5,112,20,Vocab::atk+" + "+IncreaseBy.to_s)
    when 3
      self.contents.draw_text(0,-5,112,20,Vocab::def+" + "+IncreaseBy.to_s)
    when 4
      self.contents.draw_text(0,-5,112,20,Vocab::spi+" + "+IncreaseBy.to_s)
    when 5
      self.contents.draw_text(0,-5,112,20,Vocab::agi+" + "+IncreaseBy.to_s)
    when 6
      self.contents.draw_text(0,-5,112,20,"HIT + "+HITIncreaseBy.to_s)
    when 7
      self.contents.draw_text(0,-5,112,20,"EVA + "+EVAIncreaseBy.to_s)
    when 8
      self.contents.draw_text(0,-5,112,20,"CRIT + "+CRITIncreaseBy.to_s)
    end
 
  
  end
  
end
  
 
#==============================================================================
# ** Scene_Stat_Dist
#------------------------------------------------------------------------------
#  Performs stat distribution process :)
#==============================================================================
class Scene_Stat_Dist < Scene_Base
  def initialize(menu_index)
    @menu_index = menu_index
  end
  
  def start
    super
    create_menu_background
  ihp = Vocab::hp
  imp = Vocab::mp
    i1 = Vocab::atk
    i2 = Vocab::def
    i3 = Vocab::spi
    i4 = Vocab::agi
  i5 = "HIT"
  i6 = "EVA"
  i7 = "CRIT"
    @window_select = Window_Command.new(144,[ihp,imp,i1,i2,i3,i4,i5,i6,i7])
    if $position
      @window_select.index = $position - 1
    else
      @window_select.index = 0
    end
    
    @window_select.active = true
    @window_select.x = 401
    @window_select.y = 71
    
    @window_top = Lettuce_Window_Top.new
    @window_points = Lettuce_Window_Points.new(@menu_index)
    @window_info = Lettuce_Window_Info.new(@menu_index)
    @window_help = Lettuce_Window_Help.new(@window_select.index)
  end
    
  def terminate
    super
    dispose_menu_background
    @window_top.dispose
    @window_points.dispose
    @window_info.dispose
    @window_help.dispose
    @window_select.dispose
  end
  
  def update
    update_menu_background
    #@window_points.refresh(@menu_index)
  
    @window_select.update
    #@window_help.refresh(@window_select.index)
  if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
    @window_help.refresh(@window_select.index)
  end
  
    @changes = 0
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
      @menu_index += 1
      @menu_index %= $game_party.members.size
      $scene = Scene_Stat_Dist.new(@menu_index)
    elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
      @menu_index += $game_party.members.size - 1
      @menu_index %= $game_party.members.size
      $scene = Scene_Stat_Dist.new(@menu_index)
    elsif Input.trigger?(Input::C)
      #Points addition begins
      #which attribute
      if Mode == 1
        do_point_reg
      elsif Mode == 2
        do_point_rag
      end
    end  
 
  end
  
  def do_point_reg
    @att = @window_select.index
  
  actor = $game_party.members[@menu_index]
  
##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
  
  if weapon
    bonus_atk += weapon.atk
    bonus_def += weapon.def
    bonus_spi += weapon.spi
    bonus_agi += weapon.agi
  end
  if shield
    bonus_atk += shield.atk
    bonus_def += shield.def
    bonus_spi += shield.spi
    bonus_agi += shield.agi
  end
    if helm
    bonus_atk += helm.atk
    bonus_def += helm.def
    bonus_spi += helm.spi
    bonus_agi += helm.agi
  end
    if body
    bonus_atk += body.atk
    bonus_def += body.def
    bonus_spi += body.spi
    bonus_agi += body.agi
  end
    if accessory
    bonus_atk += accessory.atk
    bonus_def += accessory.def
    bonus_spi += accessory.spi
    bonus_agi += accessory.agi
  end
  
      case @att
    
    when 0 #HP
        if actor.points < PointsPerHP
          Sound.play_cancel
        elsif actor.maxhp >= MaxHP
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].maxhp += HPIncreaseBy
      if $game_party.members[@menu_index].maxhp > MaxHP
        $game_party.members[@menu_index].maxhp = MaxHP
      end
          actor.points -= PointsPerHP
          @changes += 1
      $position = 1
        end
    
    when 1 #MP
        if actor.points < PointsPerMP
          Sound.play_cancel
        elsif actor.maxmp >= MaxMP
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].maxmp += MPIncreaseBy
      if $game_party.members[@menu_index].maxmp > MaxMP
        $game_party.members[@menu_index].maxmp = MaxMP
      end
          actor.points -= PointsPerMP
          @changes += 1
      $position = 1
        end
    
      when 2 #ATK
        if actor.points < 1
          Sound.play_cancel
        elsif (actor.atk-bonus_atk) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].atk += IncreaseBy
      if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
        $game_party.members[@menu_index].atk = MaxStat+bonus_atk
      end
          actor.points -= 1
          @changes += 1
      $position = 1
        end
        
      when 3 #DEF
        if actor.points < 1
          Sound.play_cancel
        elsif (actor.def-bonus_def) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].def += IncreaseBy
      if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
        $game_party.members[@menu_index].def = MaxStat+bonus_def
      end
          actor.points -= 1
          @changes += 1
      $position = 2
        end
        
      when 4 #SPI
        if actor.points < 1
          Sound.play_cancel
        elsif (actor.spi-bonus_spi) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].spi += IncreaseBy
      if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
        $game_party.members[@menu_index].spi = MaxStat+bonus_spi
      end
          actor.points -= 1
          @changes += 1
      $position = 3
        end
      when 5 #AGI
        if actor.points < 1
          Sound.play_cancel
        elsif (actor.agi-bonus_agi) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].agi += IncreaseBy
      if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
        $game_party.members[@menu_index].agi = MaxStat+bonus_agi
      end
          actor.points -= 1
          @changes += 1
      $position = 4
        end
      
      
    when 6 #HIT
        if actor.points < PointsPerHIT
          Sound.play_cancel
        elsif actor.hitr >= MaxHIT
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].hitr += HITIncreaseBy
      if $game_party.members[@menu_index].hitr > MaxHIT
        $game_party.members[@menu_index].hitr = MaxHIT
      end
          actor.points -= PointsPerHIT
          @changes += 1
      $position = 1
        end
    when 7 #EVA
        if actor.points < PointsPerEVA
          Sound.play_cancel
        elsif actor.evar >= MaxEVA
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].evar += EVAIncreaseBy
      if $game_party.members[@menu_index].evar > MaxEVA
        $game_party.members[@menu_index].evar = MaxEVA
      end
          actor.points -= PointsPerEVA
          @changes += 1
      $position = 1
        end
    when 8 #CRIT
        if actor.points < PointsPerCRIT
          Sound.play_cancel
        elsif actor.crir >= MaxCRIT
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].crir += CRITIncreaseBy
      if $game_party.members[@menu_index].crir > MaxCRIT
        $game_party.members[@menu_index].crir = MaxCRIT
      end
          actor.points -= PointsPerCRIT
          @changes += 1
      $position = 1
        end
  end
  
  if @changes > 0
      @window_info.refresh(@menu_index)
      @window_points.refresh(@menu_index)
          #$scene = Scene_Stat_Dist.new(@menu_index)
      end
  end
  
  def do_point_rag
    @att = @window_select.index
  
  actor = $game_party.members[@menu_index]
  
##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
  
  if weapon
    bonus_atk += weapon.atk
    bonus_def += weapon.def
    bonus_spi += weapon.spi
    bonus_agi += weapon.agi
  end
  if shield
    bonus_atk += shield.atk
    bonus_def += shield.def
    bonus_spi += shield.spi
    bonus_agi += shield.agi
  end
    if helm
    bonus_atk += helm.atk
    bonus_def += helm.def
    bonus_spi += helm.spi
    bonus_agi += helm.agi
  end
    if body
    bonus_atk += body.atk
    bonus_def += body.def
    bonus_spi += body.spi
    bonus_agi += body.agi
  end
    if accessory
    bonus_atk += accessory.atk
    bonus_def += accessory.def
    bonus_spi += accessory.spi
    bonus_agi += accessory.agi
  end
  
      case @att
    
    when 0 #HP
        if actor.points < PointsPerHP
          Sound.play_cancel
        elsif actor.maxhp >= MaxHP
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].maxhp += HPIncreaseBy
      if $game_party.members[@menu_index].maxhp > MaxHP
        $game_party.members[@menu_index].maxhp = MaxHP
      end
          actor.points -= PointsPerHP
          @changes += 1
      $position = 1
        end
    
    when 1 #MP
        if actor.points < PointsPerMP
          Sound.play_cancel
        elsif actor.maxmp >= MaxMP
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].maxmp += MPIncreaseBy
      if $game_party.members[@menu_index].maxmp > MaxMP
        $game_party.members[@menu_index].maxmp = MaxMP
      end
          actor.points -= PointsPerMP
          @changes += 1
      $position = 1
        end
    
      when 2 #ATK
        base_value = actor.atk-bonus_atk
        points = actor.points
        if enough_point(base_value,points)
          Sound.play_cancel
        elsif (actor.atk-bonus_atk) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].atk += IncreaseBy
      if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
        $game_party.members[@menu_index].atk = MaxStat+bonus_atk
      end
          actor.points -= required(base_value)
          @changes += 1
          $position = 1
        end
        
      when 3 #DEF
        base_value = actor.def-bonus_def
        points = actor.points
        if enough_point(base_value,points)
          Sound.play_cancel
        elsif (actor.def-bonus_def) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].def += IncreaseBy
      if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
        $game_party.members[@menu_index].def = MaxStat+bonus_def
      end
          actor.points -= required(base_value)
          @changes += 1
          $position = 2
        end
        
      when 4 #SPI
        base_value = actor.spi-bonus_spi
        points = actor.points
        if enough_point(base_value,points)
          Sound.play_cancel
        elsif (actor.spi-bonus_spi) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].spi += IncreaseBy
      if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
        $game_party.members[@menu_index].spi = MaxStat+bonus_spi
      end
          actor.points -= required(base_value)
          @changes += 1
          $position = 3
        end
      when 5 #AGI
        base_value = actor.agi-bonus_agi
        points = actor.points
        if enough_point(base_value,points)
          Sound.play_cancel
        elsif (actor.agi-bonus_agi) >= MaxStat
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].agi += IncreaseBy
      if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
        $game_party.members[@menu_index].agi = MaxStat+bonus_agi
      end
          actor.points -= required(base_value)
          @changes += 1
          $position = 4
        end
    when 6 #HIT
        if actor.points < PointsPerHIT
          Sound.play_cancel
        elsif actor.hitr >= MaxHIT
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].hitr += HITIncreaseBy
      if $game_party.members[@menu_index].hitr > MaxHIT
        $game_party.members[@menu_index].hitr = MaxHIT
      end
          actor.points -= PointsPerHIT
          @changes += 1
      $position = 1
        end
    when 7 #EVA
        if actor.points < PointsPerEVA
          Sound.play_cancel
        elsif actor.evar >= MaxEVA
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].evar += EVAIncreaseBy
      if $game_party.members[@menu_index].evar > MaxEVA
        $game_party.members[@menu_index].evar = MaxEVA
      end
          actor.points -= PointsPerEVA
          @changes += 1
      $position = 1
        end
    when 8 #CRIT
        if actor.points < PointsPerCRIT
          Sound.play_cancel
        elsif actor.crir >= MaxCRIT
          Sound.play_cancel
        else
      Sound.play_use_item
          $game_party.members[@menu_index].crir += CRITIncreaseBy
      if $game_party.members[@menu_index].crir > MaxCRIT
        $game_party.members[@menu_index].crir = MaxCRIT
      end
          actor.points -= PointsPerCRIT
          @changes += 1
      $position = 1
        end
      end
      if @changes > 0
      @window_points.refresh(@menu_index)
      @window_info.refresh(@menu_index)
        #$scene = Scene_Stat_Dist.new(@menu_index)
      end
  end
  
  def enough_point(base,points)
    required = (((base-1)/10)+2).floor
    if required > points
      return true
    elsif required <= points
      return false
    end
  end
  
  def required(base)
    return (((base-1)/10)+2).floor
  end
  
end
 
 
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  Giving game actor a point attribute
#  -> $game_party.member[x].points
#==============================================================================
 
class Game_Actor < Game_Battler
 
  attr_accessor :points
  attr_accessor :hit_bonus
  attr_accessor :eva_bonus
  attr_accessor :cri_bonus
  attr_accessor :hitr
  attr_accessor :evar
  attr_accessor :crir
  #attr_accessor :current_lvl_exp
  #attr_accessor :next_lvl_exp
  alias Lettuce_Game_Actor_Ini initialize
  
  def initialize(actor_id)
    Lettuce_Game_Actor_Ini(actor_id)
     @points = StartPoints
     @hitr = 0
     @evar = 0
     @crir = 0
     #@current_lvl_exp = @exp_list[@level-1]
     #@next_lvl_exp = @exp_list[@level]
  end
 
  def points
     return @points
  end
  
  #--------------------------------------------------------------------------
  # * Get Hit Rate
  #--------------------------------------------------------------------------
  def hit
    if two_swords_style
      n1 = weapons[0] == nil ? 95 : weapons[0].hit
      n2 = weapons[1] == nil ? 95 : weapons[1].hit
      n = [n1, n2].min
    else
      n = weapons[0] == nil ? 95 : weapons[0].hit
    end
    if n+@hitr <= MaxHIT
    return n+@hitr
  else return MaxHIT
    end
  end
  #--------------------------------------------------------------------------
  # * Get Evasion Rate
  #--------------------------------------------------------------------------
  def eva
    n = 5
    for item in armors.compact do n += item.eva end
    if n+@evar <= MaxEVA
     return n+@evar
   else return MaxEVA
     end
  end
  #--------------------------------------------------------------------------
  # * Get Critical Ratio
  #--------------------------------------------------------------------------
  def cri
    n = 4
    n += 4 if actor.critical_bonus
    for weapon in weapons.compact
      n += 4 if weapon.critical_bonus
    end
    if n+@crir <= MaxCRIT
      return n+@crir
    else return MaxCRIT
      end
  end
  
 #--------------------------------------------------------------------------
  # * Get Hit Rate
  #--------------------------------------------------------------------------
  def base_hit
    if two_swords_style
      n1 = weapons[0] == nil ? 95 : weapons[0].hit
      n2 = weapons[1] == nil ? 95 : weapons[1].hit
      n = [n1, n2].min
    else
      n = weapons[0] == nil ? 95 : weapons[0].hit
    end
    return n
  end
  #--------------------------------------------------------------------------
  # * Get Evasion Rate
  #--------------------------------------------------------------------------
  def base_eva
    n = 5
    for item in armors.compact do n += item.eva end
    return n
  end
  #--------------------------------------------------------------------------
  # * Get Critical Ratio
  #--------------------------------------------------------------------------
  def base_cri
    n = 4
    n += 4 if actor.critical_bonus
    for weapon in weapons.compact
      n += 4 if weapon.critical_bonus
    end
    return n
  end
  
  
  #--------------------------------------------------------------------------
  # * bonus rates
  #--------------------------------------------------------------------------   
  def hitr
    return @hitr
  end
  
  def evar
    return @evar
  end
  
  def crir
    return @crir
  end
    
    
  
  def current_lvl_exp
    return @exp_list[@level]
  end
  
  def next_lvl_exp
    return @exp_list[@level+1]-@exp_list[@level]
  end
end




Mis à jour le 9 novembre 2011.
La version 1.6 traduite par mitraille a été remplacée par la version 1.71, à priori corrigée (mais en anglais).
InfinateX a rajouté des options de configuration en début de script pour facilliter le changement des termes dans le menu.






karn06800 - posté le 03/11/2008 à 22:46:37 (60 messages postés)

❤ 0

sa a l'air sympas, go test :)


Tricky - posté le 04/11/2008 à 04:21:50 (205 messages postés)

❤ 0

Super script,
Vivement l'arrivé de bons scripts pour VX! :D


mitraille - posté le 04/11/2008 à 08:44:17 (94 messages postés)

❤ 0

mon statut ..... on dit pas une statut... Ah, non...

laissez moi le temps de les tests et je les mets XD ( et oui tout repose sur moi XD )

Chaque jour qui passe nous rapproche de l'infini


Zoidberg - posté le 04/11/2008 à 13:21:45 (4 messages postés)

❤ 0

membre de la ligue anti-RTP !

J'ai tout fais bien comme il faut et quand j'appelle le script (in game), il me sort un bug a la ligne 629 : if weapon.two_handed == true

Et comme j'y connais rien en programmation, je ne peux rien faire, alors help me please !!

PS: ROXAMORT LE SCRIPT !

Game-Designer de GameSoft...


mitraille - posté le 04/11/2008 à 18:41:27 (94 messages postés)

❤ 0

mon statut ..... on dit pas une statut... Ah, non...

as-tu des script en parallèle ( anti lag ou autre ), car j'ai connue quelque bug a cause de cela. maintenant ( et cela j'aurai dû le préciser) as tu copié le morceau de code ( celui a la fin ) dans le script de distribution des stats ( en fait faut aller vraiment dans Game Actor et chercher la potion que j'ai nommer pour coller la petite ligne ( le script officiel )) ?

cela sont mes seuls explication, puisque j'ai directement copié le script de mon jeu, donc a toi de me répondre :)

Chaque jour qui passe nous rapproche de l'infini


RayWolf - posté le 04/11/2008 à 19:19:00 (452 messages postés)

❤ 0

You cannot grasp the true form of RayWolf's avatar...

Le "=begin" au début, il est normal, je veux dire, est-il obligatoire ?
En tout cas, je vole l'essayer 8-)
EDIT : quand on appelle le script, on le met dans un évènement commun ?

I... I feel... Happy...


mitraille - posté le 04/11/2008 à 19:49:18 (94 messages postés)

❤ 0

mon statut ..... on dit pas une statut... Ah, non...

Le = begin est normal

pour appeler le script tu passe soit par événement commun ( pour passer par l'appuis touche )

ou par événement ( un PNJ qui te upgrade)

Chaque jour qui passe nous rapproche de l'infini


RayWolf - posté le 04/11/2008 à 22:39:15 (452 messages postés)

❤ 0

You cannot grasp the true form of RayWolf's avatar...

Okidoki, merci de ces précisions :banane

I... I feel... Happy...


Zoidberg - posté le 04/11/2008 à 23:23:54 (4 messages postés)

❤ 0

membre de la ligue anti-RTP !

Désolé Mitraille j'ai trouvé enfait c'est parceque je voulais tester le script tellement vite que mon perso j'lai mis level 1 et sans armes et à mon avis c'est pour çà qu'il a buggé ^^

Merci encore pour le script !

Game-Designer de GameSoft...


mitraille - posté le 05/11/2008 à 09:21:23 (94 messages postés)

❤ 0

mon statut ..... on dit pas une statut... Ah, non...

j'avais j'amais test sans arme ( je le fait tout de suite )

Edit : Il est vrai qu'il bug a cette endroit ( alors qu'il ne devrait pas (je vais le modif))

reédit : le bug vient du fait que si aucun bouclier et aucune arme équipe, le script ne sait pas si il controle 2 armes ou si il controle une arme, et en sachant que si 2 armes équipés le script n'affiche pas les 2 armes ( mais un bouclier a la place de la 2em armes )

je conseille ( et je suis en train de le faire ) de supprimer tout se qui est en rapport avec le port de 2 armes ou alors de corriger le script ( :D )

Chaque jour qui passe nous rapproche de l'infini


Zoidberg - posté le 05/11/2008 à 12:19:48 (4 messages postés)

❤ 0

membre de la ligue anti-RTP !

Mi mois j'y connais rien en programmation :'( C'est pô juste xD

Game-Designer de GameSoft...


SuperHerosLink - posté le 07/11/2008 à 13:04:44 (31 messages postés)

❤ 0

Projet en cours: un rpg sans titre mais qui va être cool^^

Bon script surement très serviable^^
EDIT: Pour moi, il marche pô...

La terre est ronde, donc comment puis-je marcher normalent?


Abazazel (visiteur non enregistré) - posté le 15/11/2008 à 03:13:47

❤ 0

Le script fonctionne parfaitement, il suffit de suivre les instructions dans le script.

Utilisation :



- placez un évènement avec "Appeler Script" (page 3 des events) et placez :
$scene = Scene_Stat_Dist.new(0)


- ensuite placez sous la ligne 539 du Script Game_Actor (sous def level_up):
$game_actors[@actor_id].points += Nombre_de_points

(exemple : $game_actors[@actor_id].points += 5
signifie qu'à chaque level vos persos gagneront 5 points à distribuer)

ou

$game_actors[@actor_id].points += ((@level/5).floor+2).floor
(pour avoir un système de point gagné exponentielle comme dans Ragnarok Online... vous pouvez évidement personnalisé ce calcul)


Problèmes rencontrés :



- En A-Rpg (style Zelda) l'agilité ne sert à rien
>> Solution proposée : On peut probablement scripté quelquechose pour que l'agilité augmente une variable et ainsi l'utiliser en condition.
(ex : Si AGI < 40, vous ne pourrez pas crocheter un coffre précis...)
D'ailleurs si quelqu'un sait comment je pourrais transformer l'agi en variable... je suis preneur.
Et au pire, laisser cette stat de coté.

- Il faut toujours avoir un bouclier et une arme
>> Solution : Pour les armes a deux mains > les mettre à une main et créer un bouclier sans icône et sans stats à équipper (exemple pour un mage, créez des bâton à une main et un bouclier unique qu'il pourra mettre appelé 'Main Nue' ou 'Deuxième Main' etc). La fenêtre de distribution de stats s’ouvrira alors sans bugger.

- Problème d’ambidextrie
Lorsqu'on met deux armes (ambidextrie) la deuxième arme qui apparaît est en fait l'armure avec le meme ID.
>> Solution : créer les armes en doubles dans la partie 'Armure' de la base de données avec les mêmes ID. (pas besoin de les équipper ensuite, c’est juste pour l’apparence)

Conseils supplémentaires :



- Il est conseillé de mettre les Stats à 1 du level 1 au level max dans
Base de données>Héros... sinon ce système sert pas à grand chose.

- Vous pouvez personnalisé facilement votre système de la ligne 101 à 170 de ce script.

- Pour placer un evenement qui donnera des points de stats supplémentaires :
> Appeler script : $game_party.members[ID_du_héros-1].points += Nombre_de_points
(ex : $game_party.members[9].points += 30
donnera 30 points de stats à votre héros placé en 10è position dans Base de données>Persos)

- Vous pouvez, si vous le désirez, ouvrir la fenêtre de distribution des stats n'importe quand en créant un événement commun
> Base de données>Evenements Communs
# Déclenchement : Processus Parallèle # Interrupteur : (Créez-en un)
> Condition : Si la touche Z est pressé (attention, les touches correspondent pas au clavier FR je crois)
-> Appeler script : $scene = Scene_Stat_Dist.new(0)
Et quand vous appuierez sur Z (il me semble que ça correspond à S par défaut) votre fenêtre s’ouvrira.


Orion 1357 (visiteur non enregistré) - posté le 16/11/2008 à 18:36:25

❤ 0

Bonjour, mais j'ai un problème avec ce script.
L'écran de distribution des stats s'affiche correctement lorsque je passe par un pnj avec appel de script etc.
Cependant, il y a une erreur lors de la montée de niv du héros. Cette erreur me renvoie au script game_actor. Je précise que j'ai rapjouté la ligne $game_actors[@actor_id].points += 5 sous def up
Je suppose qu'il faut mettre l' ID du héros à la place de @actor_id, chose que j'ai faite, mais ce la ne marche pas.
L'erreur est la suivante: " script 'game_actor' line 544: no method error occured. Undefined method `points' for nil: NilClass

Si pouviez me dire ou je me trompe . Merci d'avence


Abazazel (visiteur non enregistré) - posté le 16/11/2008 à 19:32:32

❤ 0

Non l'ID du perso ne doit pas être marqué. Tu l'as bien écrit.
> $game_actors[@actor_id].points += 5
(à la ligne 540 du script Game_Actor)

Le long Script posté par mitraille doit être placé dans un nouveau script au dessus de Main (au cas où tu l'aurais mis ailleurs).

Essaye le script sur un projet vierge voir si ça marche, et si c'est le cas. C'est qu'un autre script est incompatible avec celui là.

Tu peux alors copier-coller tous tes autres scripts additionnels jusqu'a ce que ça bug et tu verras lequel tu dois enlever.

Ou sinon re-copie-colle le script, on sait jamais t'as peut etre oublié un truc. ^^


Orion1357 (visiteur non enregistré) - posté le 17/11/2008 à 09:48:26

❤ 0

C'est bon ça marche, j'ai laissé le @game_actor.
Merci pour ton aide
Cya


makeur pro (visiteur non enregistré) - posté le 19/11/2008 à 14:53:00

❤ 0

Bonjour!
Moi,le scripts marche par un PNJ mais en fin de combats, RIEN ne s'affiche:oO...
J'ai la version 1.02, c'est pour ça ou il faut un anti-lag?


Alkanédon - posté le 26/12/2008 à 22:29:12 (8250 messages postés) - -

❤ 0

Citoyen d'Alent

Dommage, ce script m'a l'air TOP? Mais j'ai beau suivre les instructions pour l'afficher en fin de combats, RIEN ne se passe.
Quelqu'un pourrait m'éxpliquer pourquoi siouplait???:noel
Merci d'avance!!
Ps: Il fonctionne par appel mais pas en fin de combats...

Mes musiques


Hiryuu - posté le 21/02/2009 à 19:28:02 (8 messages postés)

❤ 0

Même problème qu'Alkanédon...:'(

EDIT: moi c'est plutôt que je n'arrive pas à faire en sorte
que je gagne des point quand mes perso UP.

Je make, mais je forum pas >


xXx-Dark-Vlad-xXx - posté le 20/03/2009 à 13:03:40 (25 messages postés)

❤ 0

killer of rpg maker VX

sa fé trop style dofus jador ^_^


link121 - posté le 28/03/2009 à 21:53:01 (9 messages postés)

❤ 0

tu veux ma photo ???

en fait il faudrait que l'on puisse accéder a la Distribution des statistiques par le menu,quelqu'un pourrait faire ça:inter
si il ne s'affiche pas en fin de combat c'est parce que le truc du game actor il donne des point c'est tout
par contre moi il bug ligne 1193 quand j'attaque il me fait l'animation et il me fait le message d'erreur


maker30 - posté le 05/04/2009 à 17:01:11 (14 messages postés)

❤ 0

tres mal expliquer!!!


mitraille - posté le 07/04/2009 à 09:56:02 (94 messages postés)

❤ 0

mon statut ..... on dit pas une statut... Ah, non...

Alors vous voulez pouvoir y accéder par le menu ??
Muerto simple.
je vous fais un petit tuto maison ( puisque j'ai du apprendre a le faire seul moi ^^ )

1er vérifier que le script windows_command est bien la ^^

2em aller dans Scene_menu ( ou dans le script qui modifie votre menu )

pour le script originale aller a la ligne 54

Portion de code : Tout sélectionner

1
2
3
4
5
6
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end



vous aller devoir ajouter un ligne, dans votre cas cette ligne est :
s7 = "Compétence"
le numéro a coté du s est en fait sa place dans le menu, alors pour plus de clarté je vous propose ceux ci:

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = "Compétence"
s7 = Vocab::game_end



ensuite aller a la ligne 60 ( sans la modification )

Portion de code : Tout sélectionner

1
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])



pour la modification faite cela :

Portion de code : Tout sélectionner

1
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])




tout simplement

ensuite ( c pas fini )

allez a la ligne 89 :

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_Save.new
      when 5     # End Game
        $scene = Scene_End.new
 



on simplement rajouter 2 ligne et en modifier une ( dur )

ajout :

Portion de code : Tout sélectionner

1
2
When 5    #distribution de compétences
$scene = Scene_Stat_Dist.new(0) 



modif :

Portion de code : Tout sélectionner

1
2
3
        when 6     # End Game
        $scene = Scene_End.new
 




c'est juste le chiffre qui change

et voila, normalement ça marche ( moi c ok en tout cas )

en espérant avoir était clair ^^
:sonic:sonic

Chaque jour qui passe nous rapproche de l'infini


zouglou - posté le 28/04/2009 à 19:55:11 (2197 messages postés)

❤ 0

Il n'y aurait pas un moyen de faire une fenêtre plus simple, enfin je veux dire sans toutes les jaunes de partout et les petit numéro parce que je trouve pas ça beau svp


somnifaire - posté le 04/05/2009 à 21:17:11 (3 messages postés)

❤ 0

J'ai un problème en ouvrant dans le menu "Compétence": il n'y a rien qui se passe:'(:'(!!!! Help my:help!!!!!


fou de rpg - posté le 05/05/2009 à 19:36:04 (17 messages postés)

❤ 0

Gamer

Alor pour plus de plus de facilier je te conseille "somnifaire"de faire un objet.
Si ta des questions vas y.:D

rpg


Dark-Angel - posté le 20/05/2009 à 16:37:11 (25 messages postés)

❤ 0

j'ai la solution pour toi somnifaire va a la ligne 96 du script scene_menu copie le when de la ligne superieurre et colle le a la place de when qui n'est pas en bleu donc ligne 96 je suis pas expert en scriptage enfait j'y connais rien mais si le when que tu as mis ligne 96 n'est pas bleu ca ne marchera pas car la couleure je pense défini la fonction voila ce devrais marcher par contre si ton when est bleu bin la je peu rien pour toi allé bonne chance:hihi

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


winged-angel - posté le 21/05/2009 à 18:29:22 (8 messages postés)

❤ 0

C'est un mec il rentre dans un Café et il fait : Salut c'est moi ! Et en fait c'était pas lui !

En fait le when que tu as copier collé commence simplement par une Majuscule alors qu'il n'en faut pas, en tout cas excellent script et simple à personnaliser. merci !

Quand tu passe pour un con passe vite !


OneOther - posté le 17/07/2009 à 09:37:07 (986 messages postés)

❤ 0

Mange du manga à la louche

image

Cela se produit lorsque j'appuie sur une touche pour appeler l'écran d'attribut

image

Cela se produit lorsque je passe par le menu (via le système qu'à indiqué mitraille, plus haut)

Je ne sais pas et ne vois pas ce qu'il faut corriger (en sachant que j'ai rien changé du script et tentez de suivre le maximum de truc pour qu'il n'y ai aucun problème)

Auriez-vous une solution?

EDIT: problème résolu (mettre le script au dessus de main...)

zzz... (Bah, les vacances quoi) / No anti-virus since 6 months (and no problem occured)


ruinechozo - posté le 21/09/2009 à 21:14:15 (22 messages postés)

❤ 0

quand j'essaye d'auguementer quelque chose (ex pv, pm...) il me dit qu'il y a une erreur de script a la ligne 822 pour PV, 898 pour PM ... pourtant je l'ai testé sur un projet vierge et il marche très bien... que faire:help

Dans le monde il y a trois sortes de personnes : ceux qui savent compter et ceux qui savent pas


Shadow-of-Life - posté le 22/09/2009 à 18:13:33 (19 messages postés)

❤ 0

"Nous sommes trop à penser peu, peu à penser trop ..."

Tout d'abord bonjour : j'utilise ce script pour mon jeu et je voulez vous dire , Mitraille , que je le trouve tout bonnement formidable !
En tout cas, continué comme ça et merci beaucoup !

kingdom-of-life.bbactif.com/


cheiko - posté le 06/10/2009 à 19:42:48 (26 messages postés)

❤ 0

je tenais à te remercier pour ce script vraiment interessant qui me sera utile et il marche a merveille et s'associe presque avec tous les autres script situer au dessus de "main" . Bonne continuation à toi et continue comme sa ^^ sachant que sur rmVX peut de chose sont encore mise en oeuvre mais cela viendra avec le temps ^_^

death note le shinigami du clan maudit - Chieko-


Kirby58 - posté le 21/10/2009 à 10:22:10 (3 messages postés)

❤ 0

Merci pour ce super script^^
Pour ceux que ça intéresse (et qui sont trop flemmards pour le faire eux même :p ), j'ai modifié un peu le script, ce dernier autorise vos personnages à ne pas porter d'équipement. En revanche si vous utilisez deux armes, rien ne se passera, la deuxième arme ne sera pas prise en compte et ne sera pas affichée dans l'écran des compétence. Je ne suis pas doué en script donc je m'excuse de ne pas pouvoir faire mieux. J'ai aussi retravaillé légèrement l'interface (les points requis n'empiètent plus sur "frappe" "critique" et "esquive") ainsi que le nombre requis de points par augmentation de compétences et j'ai revu le maximum des statistiques à la hausse. En utilisation avec le mode RO pour l'acquisition des points sous cette forme:

Note : cette version est erronée. Une autre est présentée dans les messages postérieurs.

Portion de code : Tout sélectionner

1
$game_actors[@actor_id].points += ((@level*2).floor+20).floor



Le nombre de point gagné par niveau est ainsi optimal. Faites le test si vous voulez ;)

Bien, voilà le scripts pour les impatients:

Portion de code:

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
=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





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
#==============================================================================
# ** Lettuce_Window_Help
#------------------------------------------------------------------------------
# This window displays property of each attribute
#==============================================================================
class Lettuce_Window_Help < Window_Base
def initialize(index)
super(401,372,144,44)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.size = Fontsize - 6
refresh(index)
end
 
def refresh(index)
self.contents.clear
self.contents.font.color = text_color(16)
 
case index
when 0
self.contents.draw_text(0,-5,112,20,"HP + "+HPIncreaseBy.to_s)
when 1
self.contents.draw_text(0,-5,112,20,"MP + "+MPIncreaseBy.to_s)
when 2
self.contents.draw_text(0,-5,112,20,Vocab::atk+" + "+IncreaseBy.to_s)
when 3
self.contents.draw_text(0,-5,112,20,Vocab::def+" + "+IncreaseBy.to_s)
when 4
self.contents.draw_text(0,-5,112,20,Vocab::spi+" + "+IncreaseBy.to_s)
when 5
self.contents.draw_text(0,-5,112,20,Vocab::agi+" + "+IncreaseBy.to_s)
when 6
self.contents.draw_text(0,-5,112,20,"HIT + "+HITIncreaseBy.to_s)
when 7
self.contents.draw_text(0,-5,112,20,"EVA + "+EVAIncreaseBy.to_s)
when 8
self.contents.draw_text(0,-5,112,20,"CRIT + "+CRITIncreaseBy.to_s)
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
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
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
#==============================================================================
# ** Scene_Stat_Dist
#------------------------------------------------------------------------------
# Performs stat distribution process :)
#==============================================================================
class Scene_Stat_Dist < Scene_Base
 
def initialize(menu_index)
@menu_index = menu_index
end
 
def start
super
create_menu_background
ihp = Vocab::hp
imp = Vocab::mp
i1 = Vocab::atk
i2 = Vocab::def
i3 = Vocab::spi
i4 = Vocab::agi
i5 = "Frappe"
i6 = "Esquive"
i7 = "Critique"
@window_select = Window_Command.new(144,[ihp,imp,i1,i2,i3,i4,i5,i6,i7])
if $position
@window_select.index = $position - 1
else
@window_select.index = 0
end
 
@window_select.active = true
@window_select.x = 401
@window_select.y = 71
 
@window_top = Lettuce_Window_Top.new
@window_points = Lettuce_Window_Points.new(@menu_index)
@window_info = Lettuce_Window_Info.new(@menu_index)
@window_help = Lettuce_Window_Help.new(@window_select.index)
end
 
def terminate
super
dispose_menu_background
@window_top.dispose
@window_points.dispose
@window_info.dispose
@window_help.dispose
@window_select.dispose
end
 
def update
update_menu_background
#@window_points.refresh(@menu_index)
 
@window_select.update
#@window_help.refresh(@window_select.index)
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@window_help.refresh(@window_select.index)
end
 
@changes = 0
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
@menu_index += 1
@menu_index %= $game_party.members.size
$scene = Scene_Stat_Dist.new(@menu_index)
elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
@menu_index += $game_party.members.size - 1
@menu_index %= $game_party.members.size
$scene = Scene_Stat_Dist.new(@menu_index)
elsif Input.trigger?(Input::C)
#Points addition begins
#which attribute
if Mode == 1
do_point_reg
elsif Mode == 2
do_point_rag
end
end
 
end
 
def do_point_reg
@att = @window_select.index
 
actor = $game_party.members[@menu_index]
 
##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
 
if weapon
bonus_atk += weapon.atk
bonus_def += weapon.def
bonus_spi += weapon.spi
bonus_agi += weapon.agi
end
if shield
bonus_atk += shield.atk
bonus_def += shield.def
bonus_spi += shield.spi
bonus_agi += shield.agi
end
if helm
bonus_atk += helm.atk
bonus_def += helm.def
bonus_spi += helm.spi
bonus_agi += helm.agi
end
if body
bonus_atk += body.atk
bonus_def += body.def
bonus_spi += body.spi
bonus_agi += body.agi
end
if accessory
bonus_atk += accessory.atk
bonus_def += accessory.def
bonus_spi += accessory.spi
bonus_agi += accessory.agi
end
 
case @att
 
when 0 #HP
if actor.points < PointsPerHP
Sound.play_cancel
elsif actor.maxhp >= MaxHP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxhp += HPIncreaseBy
if $game_party.members[@menu_index].maxhp > MaxHP
$game_party.members[@menu_index].maxhp = MaxHP
end
actor.points -= PointsPerHP
@changes += 1
$position = 1
end
 
when 1 #MP
if actor.points < PointsPerMP
Sound.play_cancel
elsif actor.maxmp >= MaxMP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxmp += MPIncreaseBy
if $game_party.members[@menu_index].maxmp > MaxMP
$game_party.members[@menu_index].maxmp = MaxMP
end
actor.points -= PointsPerMP
@changes += 1
$position = 1
end
 
when 2 #ATK
if actor.points < 1
Sound.play_cancel
elsif (actor.atk-bonus_atk) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].atk += IncreaseBy
if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
$game_party.members[@menu_index].atk = MaxStat+bonus_atk
end
actor.points -= 1
@changes += 1
$position = 1
end
 
when 3 #DEF
if actor.points < 1
Sound.play_cancel
elsif (actor.def-bonus_def) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].def += IncreaseBy
if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
$game_party.members[@menu_index].def = MaxStat+bonus_def
end
actor.points -= 1
@changes += 1
$position = 2
end
 
when 4 #SPI
if actor.points < 1
Sound.play_cancel
elsif (actor.spi-bonus_spi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].spi += IncreaseBy
if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
$game_party.members[@menu_index].spi = MaxStat+bonus_spi
end
actor.points -= 1
@changes += 1
$position = 3
end
 
when 5 #AGI
if actor.points < 1
Sound.play_cancel
elsif (actor.agi-bonus_agi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].agi += IncreaseBy
if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
$game_party.members[@menu_index].agi = MaxStat+bonus_agi
end
actor.points -= 1
@changes += 1
$position = 4
end
 
when 6 #HIT
if actor.points < PointsPerHIT
Sound.play_cancel
elsif actor.hitr >= MaxHIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].hitr += HITIncreaseBy
if $game_party.members[@menu_index].hitr > MaxHIT
$game_party.members[@menu_index].hitr = MaxHIT
end
actor.points -= PointsPerHIT
@changes += 1
$position = 1
end
 
when 7 #EVA
if actor.points < PointsPerEVA
Sound.play_cancel
elsif actor.evar >= MaxEVA
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].evar += EVAIncreaseBy
if $game_party.members[@menu_index].evar > MaxEVA
$game_party.members[@menu_index].evar = MaxEVA
end
actor.points -= PointsPerEVA
@changes += 1
$position = 1
end
 
when 8 #CRIT
if actor.points < PointsPerCRIT
Sound.play_cancel
elsif actor.crir >= MaxCRIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].crir += CRITIncreaseBy
if $game_party.members[@menu_index].crir > MaxCRIT
$game_party.members[@menu_index].crir = MaxCRIT
end
actor.points -= PointsPerCRIT
@changes += 1
$position = 1
end
end
 
if @changes > 0
@window_info.refresh(@menu_index)
@window_points.refresh(@menu_index)
#$scene = Scene_Stat_Dist.new(@menu_index)
end
end
 
def do_point_rag
@att = @window_select.index
 
actor = $game_party.members[@menu_index]
 
##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
 
if weapon
bonus_atk += weapon.atk
bonus_def += weapon.def
bonus_spi += weapon.spi
bonus_agi += weapon.agi
end
if shield
bonus_atk += shield.atk
bonus_def += shield.def
bonus_spi += shield.spi
bonus_agi += shield.agi
end
if helm
bonus_atk += helm.atk
bonus_def += helm.def
bonus_spi += helm.spi
bonus_agi += helm.agi
end
if body
bonus_atk += body.atk
bonus_def += body.def
bonus_spi += body.spi
bonus_agi += body.agi
end
if accessory
bonus_atk += accessory.atk
bonus_def += accessory.def
bonus_spi += accessory.spi
bonus_agi += accessory.agi
end
 
case @att
 
when 0 #HP
if actor.points < PointsPerHP
Sound.play_cancel
elsif actor.maxhp >= MaxHP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxhp += HPIncreaseBy
if $game_party.members[@menu_index].maxhp > MaxHP
$game_party.members[@menu_index].maxhp = MaxHP
end
actor.points -= PointsPerHP
@changes += 1
$position = 1
end
 
when 1 #MP
if actor.points < PointsPerMP
Sound.play_cancel
elsif actor.maxmp >= MaxMP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxmp += MPIncreaseBy
if $game_party.members[@menu_index].maxmp > MaxMP
$game_party.members[@menu_index].maxmp = MaxMP
end
actor.points -= PointsPerMP
@changes += 1
$position = 1
end
 
when 2 #ATK
base_value = actor.atk-bonus_atk
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.atk-bonus_atk) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].atk += IncreaseBy
if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
$game_party.members[@menu_index].atk = MaxStat+bonus_atk
end
actor.points -= required(base_value)
@changes += 1
$position = 1
end
 
when 3 #DEF
base_value = actor.def-bonus_def
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.def-bonus_def) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].def += IncreaseBy
if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
$game_party.members[@menu_index].def = MaxStat+bonus_def
end
actor.points -= required(base_value)
@changes += 1
$position = 2
end
 
when 4 #SPI
base_value = actor.spi-bonus_spi
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.spi-bonus_spi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].spi += IncreaseBy
if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
$game_party.members[@menu_index].spi = MaxStat+bonus_spi
end
actor.points -= required(base_value)
@changes += 1
$position = 3
end
when 5 #AGI
base_value = actor.agi-bonus_agi
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.agi-bonus_agi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].agi += IncreaseBy
if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
$game_party.members[@menu_index].agi = MaxStat+bonus_agi
end
actor.points -= required(base_value)
@changes += 1
$position = 4
end
when 6 #HIT
if actor.points < PointsPerHIT
Sound.play_cancel
elsif actor.hitr >= MaxHIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].hitr += HITIncreaseBy
if $game_party.members[@menu_index].hitr > MaxHIT
$game_party.members[@menu_index].hitr = MaxHIT
end
actor.points -= PointsPerHIT
@changes += 1
$position = 1
end
when 7 #EVA
if actor.points < PointsPerEVA
Sound.play_cancel
elsif actor.evar >= MaxEVA
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].evar += EVAIncreaseBy
if $game_party.members[@menu_index].evar > MaxEVA
$game_party.members[@menu_index].evar = MaxEVA
end
actor.points -= PointsPerEVA
@changes += 1
$position = 1
end
when 8 #CRIT
if actor.points < PointsPerCRIT
Sound.play_cancel
elsif actor.crir >= MaxCRIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].crir += CRITIncreaseBy
if $game_party.members[@menu_index].crir > MaxCRIT
$game_party.members[@menu_index].crir = MaxCRIT
end
actor.points -= PointsPerCRIT
@changes += 1
$position = 1
end
end
if @changes > 0
@window_points.refresh(@menu_index)
@window_info.refresh(@menu_index)
#$scene = Scene_Stat_Dist.new(@menu_index)
end
end
 
def enough_point(base,points)
required = (((base-1)/10)+2).floor
if required > points
return true
elsif required <= points
return false
end
end
 
def required(base)
return (((base-1)/10)+2).floor
end
 
end
 
 
#=============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# Giving game actor a point attribute
# -> $game_party.member[x].points
#=============================================================================
 
class Game_Actor < Game_Battler
 
attr_accessor :point
attr_accessor :hit_bonus
attr_accessor :eva_bonus
attr_accessor :cri_bonus
attr_accessor :hitr
attr_accessor :evar
attr_accessor :crir
#attr_accessor :current_lvl_exp
#attr_accessor :next_lvl_exp
alias Lettuce_Game_Actor_Ini initialize
 
def initialize(actor_id)
Lettuce_Game_Actor_Ini(actor_id)
@points = StartPoints
@hitr = 0
@evar = 0
@crir = 0
#@current_lvl_exp = @exp_list[@level-1]
#@next_lvl_exp = @exp_list[@level
end
 
def points
return @points
end
 
#--------------------------------------------------------------------------
# * Get Hit Rate
#--------------------------------------------------------------------------
def hit
if two_swords_style
n1 = weapons[0] == nil ? 95 : weapons[0].hit
n2 = weapons[1] == nil ? 95 : weapons[1].hit
n = [n1, n2].min
else
n = weapons[0] == nil ? 95 : weapons[0].hit
end
if n+@hitr <= MaxHIT
return n+@hitr
else return MaxHIT
end
end
#--------------------------------------------------------------------------
# * Get Evasion Rate
#--------------------------------------------------------------------------
def eva
n = 5
for item in armors.compact do n += item.eva end
if n+@evar <= MaxEVA
return n+@evar
else return MaxEVA
end
end
#--------------------------------------------------------------------------
# * Get Critical Ratio
#--------------------------------------------------------------------------
def cri
n = 4
n += 4 if actor.critical_bonus
for weapon in weapons.compact
n += 4 if weapon.critical_bonus
end
if n+@crir <= MaxCRIT
return n+@crir
else return MaxCRIT
end
end
 
#--------------------------------------------------------------------------
# * Get Hit Rate
#--------------------------------------------------------------------------
def base_hit
if two_swords_style
n1 = weapons[0] == nil ? 95 : weapons[0].hit
n2 = weapons[1] == nil ? 95 : weapons[1].hit
n = [n1, n2].min
else
n = weapons[0] == nil ? 95 : weapons[0].hit
end
return n
end
#--------------------------------------------------------------------------
# * Get Evasion Rate
#--------------------------------------------------------------------------
def base_eva
n = 5
for item in armors.compact do n += item.eva end
return n
end
#--------------------------------------------------------------------------
# * Get Critical Ratio
#--------------------------------------------------------------------------
def base_cri
n = 4
n += 4 if actor.critical_bonus
for weapon in weapons.compact
n += 4 if weapon.critical_bonus
end
return n
end
 
 
#--------------------------------------------------------------------------
# * bonus rates
#--------------------------------------------------------------------------
def hitr
return @hitr
end
 
def evar
return @evar
end
 
def crir
return @crir
end
 
 
 
def current_lvl_exp
return @exp_list[@level]
end
 
def next_lvl_exp
return @exp_list[@level+1]-@exp_list[@level]
end
end



Petites précisions avant de vous laisser pour optimiser le leveling et les stats de vos persos. Dans les statistiques de vos personnages et ceci pour chacun d'entre eux, générez leurs courbes de la manière suivante:
HP: 400 du niveau 1 au niveau 99
MP: 10 du niveau 1 au niveau 99
Force: 18 au niveau 1 et 300 au niveau 99, progression normale.
Défence: 15 au niveau 1 et 300 au niveau 99, progression normale.
Intelligence: 19 au niveau 1 et 300 au niveau 99, progression normale.
Agilité:20 au niveau 1 et 300 au niveau 99, progression normale.

Avec des courbes comme celles-ci vos personnages auront une progression réaliste et complète, sans points en surplus une fois arrivé au niveau 99, et avec assez de points manquants pour que vos personnages soient bien distincts dans leurs capacités.

Et voilà:)

Bon Making à tous!

PS: Voilà une image pour ceux qui se demandent ce que ça donne.
Il est à noter que "Ecran de Symbiose" n'apparait que dans mon jeu, le scripts que je vous ai laissé fera apparaitre "Distribution de statistiques" à la place. De même, "Niveau x" remplacera "Seuil x", et "Mana" et "Santé" sera remplacé par les termes que vous avez choisis dans votre base de donnée à l'onglet "Lexique"

image


PPS: Et maintenant, une demande d'aide:D!
Est-ce que quelqu'un saurait comment faire apparaître automatiquement cet écran après un combat à chaque fois qu'un personnage passe un niveau au cours d'un combat? Parceque j'ai essayé en mettant la commande
" $scene = Scene_Stat_Dist.new(0) "
dans le Game_actor au dessous de Level Up mais ça ne marche pas... L'ecran s'affiche uniquement si un personnage gagne un niveau hors combat...
Je souhaiterai aussi faire en sorte que l'écran soit flashé lorsqu'on ouvre ce menu et que le volume de la musique diminue légèrement.
Merci à ceux qui m'aideront.


ruinechozo - posté le 29/10/2009 à 10:52:38 (22 messages postés)

❤ 0

euuuh... kirby58 j'ai testé ton script sur un projet vierge et il marche pas. Il me dit qu'il y a une erreur à la ligne 718

Dans le monde il y a trois sortes de personnes : ceux qui savent compter et ceux qui savent pas


Kirby58 - posté le 01/11/2009 à 13:33:43 (3 messages postés)

❤ 0

Bien RuineChozo,

Suite à ton post j'ai testé le script sur projet vierge et effectivement il ne marche pas, mais tu as également mal copié le script car il n'y à rien à la ligne 718...
L'erreur se trouve "normalement" à la ligne 1157. J'avais malheureusement oublié ce détail. Pour corriger ceci il faut rajouter un script nommé "Lettuce_Window_Help" juste en dessous du script "Window_Base".
Et voilà le contenu du script "Lettuce_Window_Help":

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
#==============================================================================
# ** Lettuce_Window_Help
#------------------------------------------------------------------------------
#  This window displays property of each attribute
#==============================================================================
class Lettuce_Window_Help < Window_Base
  def initialize(index)
        super(401,372,144,44)
        self.contents = Bitmap.new(width-32,height-32)
        self.contents.font.size = Fontsize - 6
        refresh(index)
  end
  
  def refresh(index)
        self.contents.clear
  self.contents.font.color = text_color(16)
 
    case index
    when 0
      self.contents.draw_text(0,-5,112,20,"HP + "+HPIncreaseBy.to_s)
    when 1
      self.contents.draw_text(0,-5,112,20,"MP + "+MPIncreaseBy.to_s)
    when 2
      self.contents.draw_text(0,-5,112,20,Vocab::atk+" + "+IncreaseBy.to_s)
    when 3
      self.contents.draw_text(0,-5,112,20,Vocab::def+" + "+IncreaseBy.to_s)
    when 4
      self.contents.draw_text(0,-5,112,20,Vocab::spi+" + "+IncreaseBy.to_s)
    when 5
      self.contents.draw_text(0,-5,112,20,Vocab::agi+" + "+IncreaseBy.to_s)
    when 6
      self.contents.draw_text(0,-5,112,20,"HIT + "+HITIncreaseBy.to_s)
    when 7
      self.contents.draw_text(0,-5,112,20,"EVA + "+EVAIncreaseBy.to_s)
    when 8
      self.contents.draw_text(0,-5,112,20,"CRIT + "+CRITIncreaseBy.to_s)
    end
 
  
  end
  
end




Donc recopie correctement le script que j'ai donné, rajoute celui-ci au bon endroit, et tout devrait fonctionner à merveille^^

PS: Je viens de modifier légèrement le script, l'écran ressemble désormais à ceci
image

Pensez aussi à changer votre lexique dans la database pour la force l'intelligence etc pour ne pas que les lettres se superposent aux chiffres.


Kaharon - posté le 23/12/2009 à 10:28:10 (4 messages postés)

❤ 0

Bonjour comment faire pour que l'on puisse voir cette fenêtre dans le menu ?:banane


timtrack - posté le 14/02/2010 à 17:47:10 (653 messages postés)

❤ 0

Plop

Le script à un GROS problème. Dès qu'on change de niveau les stats redeviennent normaux.
Pour Kaharon, le moyen de le mettre dans le menu est cité plus haut.

Projet actuel


Alex7six - posté le 20/04/2010 à 17:40:01 (32 messages postés)

❤ 0

Je voulais savoir si vous pouviez m'indiquer la partie à changer pour que l'écriture ne se chevauche pas (frappe, esquive, critique). Juste celle-ci. Merci d'avance :)


timtrack - posté le 13/05/2010 à 23:35:11 (653 messages postés)

❤ 0

Plop

Je me suis trompé, il marche très bien !:)

Projet actuel


--ayoub-- - posté le 15/05/2010 à 13:18:20 (96 messages postés)

❤ 0

C'est moi la meileur

mais marche pas il buger bcp avec anti lag aussi marche po :moinsun

78


Dragongaze13 - posté le 26/05/2010 à 23:17:16 (1 messages postés)

❤ 0

Up. Bonjour, comment fait-on pour réduire le coût des stats: Attaque, Défense, Intelligence et Agilité ?
J'ai essayé pas mal de trucs mais malheureusement je n'arrive pas à réduire leur coût qui reste de 3 points.. :-/

Merci ! :)
Et super script qui "déchirlamorkitu" !
Merci beaucoup !


Devorer - posté le 01/06/2010 à 09:23:45 (1 messages postés)

❤ 0

Je suis victime d'un truc bizarre que je n'arrive pas à régler.
(Je suis pas très doué en script non plus)
Semble-t-il que je réussis à le faire fonctionner à merveille, mais j'ai bien beau indiquer (par exemple) 20 point au passage à un niveau (level up) ils en gagne 40 en jeux !!
J'ai pu noté que même ceux qui ne lvl pas durant un combat en gagne 20 si un autre perso lvl up. J'ai aussi remarqué que ce n'est qu'en combat que ce problème apparait, car si mes personnages lvl up par un gain en EXP du par un évènement, ils en gagne tous belle et bien 20 comme je le veux.
Je sais pas si je suis asser clair :s
Sinon, bah faites moi signe...


Shinai - posté le 21/06/2010 à 00:04:14 (1 messages postés)

❤ 0

Bonjour
je viens de copier/coller plusieurs fois le script proposer par Kirby58. Le problème est que lors du lancement de la démo, j'ai le message d'erreur suivant: Script "compétence"line716: SyntaxError occurred
Le problème étant que je commence je suis débutant donc je ne sais pas trop quoi faire, ou si c'est une erreur de ma part.
Merci d'avance


blackbrahim - posté le 02/09/2010 à 12:00:05 (7 messages postés)

❤ 0

Quand j'essaye avec la fonction appelle du script il me fait:

Script "Winows_Base" line 867: NoMethodError occured.
Undefined method 'two_handed' for nil:NilClass


kev77320 - posté le 27/11/2010 à 16:57:50 (15 messages postés)

❤ 0

Salut je suis "Nouveau" au fait pour que le script marche vaut
que le "Héro" doit avoir une arme equiper Voila j'espere que vous comprenez :)


Mikou - posté le 13/01/2011 à 23:41:29 (3 messages postés)

❤ 0

MERCI !!!!!!! Ce script est ÉNORME ! C'est le genre de script dont j'avais besoin pour mon jeu !
J'ai pu le modifier et l'adapter exactement pour mon système de jeu.

Perso pour moi il fonctionne si un perso n'a pas d'arme ou de boubou.
Je n'ai pas testé pour le coup de l'arme à 2 mains par contre.


Dalaas - posté le 31/07/2011 à 22:08:16 (1 messages postés)

❤ 0

Bonjour à tous^^

je veux vous fournir une version *Sweet* de ce merveilleux script créé par letuce, poster par mitraille et modifier par :kirby58

En voici une screenshot



Alors comme vous voyez ce n'est que du placage de texte, mais comme
certaine personne que je connais n'aimait pas le fait que le texte se superpose ou qu'il ne soit pas aligné. Et surtout il ne voulais pas le faire par eu même... Alors je l'ai fait^^.
Je dois avouez que le texte est un peu petit... mais c'est la seule façon que cela rentre.

Donc voici le même script que celui de :kirbyKirby58:kirby. Il est a placer au dessus de main.


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
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
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
=begin
+------------------------------------------------------------------------------+
� ** Stat points distribution system 1.6                                      
�                             By Lettuce. Edité par Kirby58                                      
�                                                                             
�                                                                             
�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, isi 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 = 30
#Le maximun de stats que vous autorisez 
MaxStat = 300
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 = 90 #100  = Toujours des critiques. 
 
    # Combien de points sont nécessaire pour augmenter les stats 
PointsPerHP = 5 # Hp
PointsPerMP = 5 # Mp
PointsPerHIT = 4 # % de chance de toucher
PointsPerEVA = 7 #% de chance d'esquiver
PointsPerCRIT = 5 # % chance de critique.
 
# De combien sont augmenté les stats par points ?
IncreaseBy = 10 # Attaque, défense,intelligence, agilitée
HPIncreaseBy = 100 # Hp
MPIncreaseBy = 50 # 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,-10,544-32,32,"Distribution de Stats",1)
        self.contents.font.size = Fontsize-4
        self.contents.draw_text(0,10,544-32,32,"Gauche ou droite pour changer de héros",1)
  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
#==============================================================================
 
class 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
        draw_actor_face(actor,10,10,92)
        draw_actor_name(actor,120,10)
        self.contents.font.size = Fontsize
        self.contents.draw_text(190,30,200,20,"Classe: "+actor.class.name)
        self.contents.draw_text(120,30,200,20,"Niv "+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,85,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.draw_text(120,44,100,30,"HP",0)
  self.contents.draw_text(120,44,100,30,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,30,"MP",0)
  self.contents.draw_text(120,67,100,30,actor.mp.to_s + "/" + actor.maxmp.to_s,2)
  
  ##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)
    if weapon.two_handed == true
      draw_item_name(weapon,160+@exo2,165+OFFSET+@eyo,true)
    else
      draw_item_name(shield,160+@exo2,165+OFFSET+@eyo,true)
    end
    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 !shield and weapon.two_handed == false
      draw_icon(217,160+@exo2,165+OFFSET+@eyo,true)
      self.contents.draw_text(184+@exo2,167+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,"[Req:"+PointsPerHIT.to_s+"pt.]",2)
  self.contents.draw_text(135,275,60,20,"[Req:"+PointsPerEVA.to_s+"pt.]",2)
  self.contents.draw_text(135,290,60,20,"[Req:"+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
  
end
 
#==============================================================================
# ** Lettuce_Window_Help
#------------------------------------------------------------------------------
#  This window displays property of each attribute
#==============================================================================
class Lettuce_Window_Help < Window_Base
  def initialize(index)
        super(401,372,144,44)
        self.contents = Bitmap.new(width-32,height-32)
        self.contents.font.size = Fontsize - 6
        refresh(index)
  end
  
  def refresh(index)
        self.contents.clear
  self.contents.font.color = text_color(16)
 
    case index
    when 0
      self.contents.draw_text(0,-5,112,20,"HP + "+HPIncreaseBy.to_s)
    when 1
      self.contents.draw_text(0,-5,112,20,"MP + "+MPIncreaseBy.to_s)
    when 2
      self.contents.draw_text(0,-5,112,20,Vocab::atk+" + "+IncreaseBy.to_s)
    when 3
      self.contents.draw_text(0,-5,112,20,Vocab::def+" + "+IncreaseBy.to_s)
    when 4
      self.contents.draw_text(0,-5,112,20,Vocab::spi+" + "+IncreaseBy.to_s)
    when 5
      self.contents.draw_text(0,-5,112,20,Vocab::agi+" + "+IncreaseBy.to_s)
    when 6
      self.contents.draw_text(0,-5,112,20,"HIT + "+HITIncreaseBy.to_s)
    when 7
      self.contents.draw_text(0,-5,112,20,"EVA + "+EVAIncreaseBy.to_s)
    when 8
      self.contents.draw_text(0,-5,112,20,"CRIT + "+CRITIncreaseBy.to_s)
    end
 
  
  end
  
end
  
 
#==============================================================================
# ** Scene_Stat_Dist
#------------------------------------------------------------------------------
#  Performs stat distribution process :)
#==============================================================================
class Scene_Stat_Dist < Scene_Base
  def initialize(menu_index)
        @menu_index = menu_index
  end
  
  def start
        super
        create_menu_background
  ihp = Vocab::hp
  imp = Vocab::mp
        i1 = Vocab::atk
        i2 = Vocab::def
        i3 = Vocab::spi
        i4 = Vocab::agi
  i5 = "Frappe"
  i6 = "Esquive"
  i7 = "Critique"
        @window_select = Window_Command.new(144,[ihp,imp,i1,i2,i3,i4,i5,i6,i7])
        if $position
          @window_select.index = $position - 1
        else
          @window_select.index = 0
        end
        
        @window_select.active = true
        @window_select.x = 401
        @window_select.y = 71
        
        @window_top = Lettuce_Window_Top.new
        @window_points = Lettuce_Window_Points.new(@menu_index)
        @window_info = Lettuce_Window_Info.new(@menu_index)
        @window_help = Lettuce_Window_Help.new(@window_select.index)
  end
        
  def terminate
        super
        dispose_menu_background
        @window_top.dispose
        @window_points.dispose
        @window_info.dispose
        @window_help.dispose
        @window_select.dispose
  end
  
  def update
        update_menu_background
        #@window_points.refresh(@menu_index)
  
        @window_select.update
        #@window_help.refresh(@window_select.index)
  if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
    @window_help.refresh(@window_select.index)
  end
  
        @changes = 0
        if Input.trigger?(Input::B)
          Sound.play_cancel
          $scene = Scene_Map.new
        elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
          @menu_index += 1
          @menu_index %= $game_party.members.size
          $scene = Scene_Stat_Dist.new(@menu_index)
        elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
          @menu_index += $game_party.members.size - 1
          @menu_index %= $game_party.members.size
          $scene = Scene_Stat_Dist.new(@menu_index)
        elsif Input.trigger?(Input::C)
          #Points addition begins
          #which attribute
          if Mode == 1
                do_point_reg
          elsif Mode == 2
                do_point_rag
          end
        end  
 
  end
  
  def do_point_reg
        @att = @window_select.index
  
  actor = $game_party.members[@menu_index]
  
##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
  
  if weapon
    bonus_atk += weapon.atk
    bonus_def += weapon.def
    bonus_spi += weapon.spi
    bonus_agi += weapon.agi
  end
  if shield
    bonus_atk += shield.atk
    bonus_def += shield.def
    bonus_spi += shield.spi
    bonus_agi += shield.agi
  end
    if helm
    bonus_atk += helm.atk
    bonus_def += helm.def
    bonus_spi += helm.spi
    bonus_agi += helm.agi
  end
    if body
    bonus_atk += body.atk
    bonus_def += body.def
    bonus_spi += body.spi
    bonus_agi += body.agi
  end
    if accessory
    bonus_atk += accessory.atk
    bonus_def += accessory.def
    bonus_spi += accessory.spi
    bonus_agi += accessory.agi
  end
  
          case @att
    
    when 0 #HP
                if actor.points < PointsPerHP
                  Sound.play_cancel
                elsif actor.maxhp >= MaxHP
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].maxhp += HPIncreaseBy
      if $game_party.members[@menu_index].maxhp > MaxHP
        $game_party.members[@menu_index].maxhp = MaxHP
      end
                  actor.points -= PointsPerHP
                  @changes += 1
      $position = 1
                end
    
    when 1 #MP
                if actor.points < PointsPerMP
                  Sound.play_cancel
                elsif actor.maxmp >= MaxMP
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].maxmp += MPIncreaseBy
      if $game_party.members[@menu_index].maxmp > MaxMP
        $game_party.members[@menu_index].maxmp = MaxMP
      end
                  actor.points -= PointsPerMP
                  @changes += 1
      $position = 1
                end
    
          when 2 #ATK
                if actor.points < 1
                  Sound.play_cancel
                elsif (actor.atk-bonus_atk) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].atk += IncreaseBy
      if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
        $game_party.members[@menu_index].atk = MaxStat+bonus_atk
      end
                  actor.points -= 1
                  @changes += 1
      $position = 1
                end
                
          when 3 #DEF
                if actor.points < 1
                  Sound.play_cancel
                elsif (actor.def-bonus_def) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].def += IncreaseBy
      if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
        $game_party.members[@menu_index].def = MaxStat+bonus_def
      end
                  actor.points -= 1
                  @changes += 1
      $position = 2
                end
                
          when 4 #SPI
                if actor.points < 1
                  Sound.play_cancel
                elsif (actor.spi-bonus_spi) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].spi += IncreaseBy
      if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
        $game_party.members[@menu_index].spi = MaxStat+bonus_spi
      end
                  actor.points -= 1
                  @changes += 1
      $position = 3
                end
          when 5 #AGI
                if actor.points < 1
                  Sound.play_cancel
                elsif (actor.agi-bonus_agi) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].agi += IncreaseBy
      if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
        $game_party.members[@menu_index].agi = MaxStat+bonus_agi
      end
                  actor.points -= 1
                  @changes += 1
      $position = 4
                end
          
          
    when 6 #HIT
                if actor.points < PointsPerHIT
                  Sound.play_cancel
                elsif actor.hitr >= MaxHIT
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].hitr += HITIncreaseBy
      if $game_party.members[@menu_index].hitr > MaxHIT
        $game_party.members[@menu_index].hitr = MaxHIT
      end
                  actor.points -= PointsPerHIT
                  @changes += 1
      $position = 1
                end
    when 7 #EVA
                if actor.points < PointsPerEVA
                  Sound.play_cancel
                elsif actor.evar >= MaxEVA
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].evar += EVAIncreaseBy
      if $game_party.members[@menu_index].evar > MaxEVA
        $game_party.members[@menu_index].evar = MaxEVA
      end
                  actor.points -= PointsPerEVA
                  @changes += 1
      $position = 1
                end
    when 8 #CRIT
                if actor.points < PointsPerCRIT
                  Sound.play_cancel
                elsif actor.crir >= MaxCRIT
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].crir += CRITIncreaseBy
      if $game_party.members[@menu_index].crir > MaxCRIT
        $game_party.members[@menu_index].crir = MaxCRIT
      end
                  actor.points -= PointsPerCRIT
                  @changes += 1
      $position = 1
                end
  end
  
  if @changes > 0
      @window_info.refresh(@menu_index)
      @window_points.refresh(@menu_index)
                  #$scene = Scene_Stat_Dist.new(@menu_index)
          end
  end
  
  def do_point_rag
        @att = @window_select.index
  
  actor = $game_party.members[@menu_index]
  
##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
  
  if weapon
    bonus_atk += weapon.atk
    bonus_def += weapon.def
    bonus_spi += weapon.spi
    bonus_agi += weapon.agi
  end
  if shield
    bonus_atk += shield.atk
    bonus_def += shield.def
    bonus_spi += shield.spi
    bonus_agi += shield.agi
  end
    if helm
    bonus_atk += helm.atk
    bonus_def += helm.def
    bonus_spi += helm.spi
    bonus_agi += helm.agi
  end
    if body
    bonus_atk += body.atk
    bonus_def += body.def
    bonus_spi += body.spi
    bonus_agi += body.agi
  end
    if accessory
    bonus_atk += accessory.atk
    bonus_def += accessory.def
    bonus_spi += accessory.spi
    bonus_agi += accessory.agi
  end
  
          case @att
    
    when 0 #HP
                if actor.points < PointsPerHP
                  Sound.play_cancel
                elsif actor.maxhp >= MaxHP
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].maxhp += HPIncreaseBy
      if $game_party.members[@menu_index].maxhp > MaxHP
        $game_party.members[@menu_index].maxhp = MaxHP
      end
                  actor.points -= PointsPerHP
                  @changes += 1
      $position = 1
                end
    
    when 1 #MP
                if actor.points < PointsPerMP
                  Sound.play_cancel
                elsif actor.maxmp >= MaxMP
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].maxmp += MPIncreaseBy
      if $game_party.members[@menu_index].maxmp > MaxMP
        $game_party.members[@menu_index].maxmp = MaxMP
      end
                  actor.points -= PointsPerMP
                  @changes += 1
      $position = 1
                end
    
          when 2 #ATK
                base_value = actor.atk-bonus_atk
                points = actor.points
                if enough_point(base_value,points)
                  Sound.play_cancel
                elsif (actor.atk-bonus_atk) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].atk += IncreaseBy
      if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
        $game_party.members[@menu_index].atk = MaxStat+bonus_atk
      end
                  actor.points -= required(base_value)
                  @changes += 1
                  $position = 1
                end
                
          when 3 #DEF
                base_value = actor.def-bonus_def
                points = actor.points
                if enough_point(base_value,points)
                  Sound.play_cancel
                elsif (actor.def-bonus_def) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].def += IncreaseBy
      if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
        $game_party.members[@menu_index].def = MaxStat+bonus_def
      end
                  actor.points -= required(base_value)
                  @changes += 1
                  $position = 2
                end
                
          when 4 #SPI
                base_value = actor.spi-bonus_spi
                points = actor.points
                if enough_point(base_value,points)
                  Sound.play_cancel
                elsif (actor.spi-bonus_spi) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].spi += IncreaseBy
      if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
        $game_party.members[@menu_index].spi = MaxStat+bonus_spi
      end
                  actor.points -= required(base_value)
                  @changes += 1
                  $position = 3
                end
          when 5 #AGI
                base_value = actor.agi-bonus_agi
                points = actor.points
                if enough_point(base_value,points)
                  Sound.play_cancel
                elsif (actor.agi-bonus_agi) >= MaxStat
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].agi += IncreaseBy
      if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
        $game_party.members[@menu_index].agi = MaxStat+bonus_agi
      end
                  actor.points -= required(base_value)
                  @changes += 1
                  $position = 4
                end
    when 6 #HIT
                if actor.points < PointsPerHIT
                  Sound.play_cancel
                elsif actor.hitr >= MaxHIT
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].hitr += HITIncreaseBy
      if $game_party.members[@menu_index].hitr > MaxHIT
        $game_party.members[@menu_index].hitr = MaxHIT
      end
                  actor.points -= PointsPerHIT
                  @changes += 1
      $position = 1
                end
    when 7 #EVA
                if actor.points < PointsPerEVA
                  Sound.play_cancel
                elsif actor.evar >= MaxEVA
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].evar += EVAIncreaseBy
      if $game_party.members[@menu_index].evar > MaxEVA
        $game_party.members[@menu_index].evar = MaxEVA
      end
                  actor.points -= PointsPerEVA
                  @changes += 1
      $position = 1
                end
    when 8 #CRIT
                if actor.points < PointsPerCRIT
                  Sound.play_cancel
                elsif actor.crir >= MaxCRIT
                  Sound.play_cancel
                else
      Sound.play_use_item
                  $game_party.members[@menu_index].crir += CRITIncreaseBy
      if $game_party.members[@menu_index].crir > MaxCRIT
        $game_party.members[@menu_index].crir = MaxCRIT
      end
                  actor.points -= PointsPerCRIT
                  @changes += 1
      $position = 1
                end
          end
          if @changes > 0
      @window_points.refresh(@menu_index)
      @window_info.refresh(@menu_index)
                #$scene = Scene_Stat_Dist.new(@menu_index)
          end
  end
  
  def enough_point(base,points)
        required = (((base-1)/10)+2).floor
        if required > points
          return true
        elsif required <= points
          return false
        end
  end
  
  def required(base)
        return (((base-1)/10)+2).floor
  end
  
end
 
 
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  Giving game actor a point attribute
#  -> $game_party.member[x].points
#==============================================================================
 
class Game_Actor < Game_Battler
 
  attr_accessor :points
  attr_accessor :hit_bonus
  attr_accessor :eva_bonus
  attr_accessor :cri_bonus
  attr_accessor :hitr
  attr_accessor :evar
  attr_accessor :crir
  #attr_accessor :current_lvl_exp
  #attr_accessor :next_lvl_exp
  alias Lettuce_Game_Actor_Ini initialize
  
  def initialize(actor_id)
    Lettuce_Game_Actor_Ini(actor_id)
     @points = StartPoints
     @hitr = 0
     @evar = 0
     @crir = 0
     #@current_lvl_exp = @exp_list[@level-1]
     #@next_lvl_exp = @exp_list[@level]
  end
 
  def points
     return @points
  end
  
  #--------------------------------------------------------------------------
  # * Get Hit Rate
  #--------------------------------------------------------------------------
  def hit
    if two_swords_style
      n1 = weapons[0] == nil ? 95 : weapons[0].hit
      n2 = weapons[1] == nil ? 95 : weapons[1].hit
      n = [n1, n2].min
    else
      n = weapons[0] == nil ? 95 : weapons[0].hit
    end
    if n+@hitr <= MaxHIT
    return n+@hitr
  else return MaxHIT
    end
  end
  #--------------------------------------------------------------------------
  # * Get Evasion Rate
  #--------------------------------------------------------------------------
  def eva
    n = 5
    for item in armors.compact do n += item.eva end
    if n+@evar <= MaxEVA
     return n+@evar
   else return MaxEVA
     end
  end
  #--------------------------------------------------------------------------
  # * Get Critical Ratio
  #--------------------------------------------------------------------------
  def cri
    n = 4
    n += 4 if actor.critical_bonus
    for weapon in weapons.compact
      n += 4 if weapon.critical_bonus
    end
    if n+@crir <= MaxCRIT
      return n+@crir
    else return MaxCRIT
      end
  end
  
 #--------------------------------------------------------------------------
  # * Get Hit Rate
  #--------------------------------------------------------------------------
  def base_hit
    if two_swords_style
      n1 = weapons[0] == nil ? 95 : weapons[0].hit
      n2 = weapons[1] == nil ? 95 : weapons[1].hit
      n = [n1, n2].min
    else
      n = weapons[0] == nil ? 95 : weapons[0].hit
    end
    return n
  end
  #--------------------------------------------------------------------------
  # * Get Evasion Rate
  #--------------------------------------------------------------------------
  def base_eva
    n = 5
    for item in armors.compact do n += item.eva end
    return n
  end
  #--------------------------------------------------------------------------
  # * Get Critical Ratio
  #--------------------------------------------------------------------------
  def base_cri
    n = 4
    n += 4 if actor.critical_bonus
    for weapon in weapons.compact
      n += 4 if weapon.critical_bonus
    end
    return n
  end
  
  
  #--------------------------------------------------------------------------
  # * bonus rates
  #--------------------------------------------------------------------------   
  def hitr
    return @hitr
  end
  
  def evar
    return @evar
  end
  
  def crir
    return @crir
  end
    
    
  
  def current_lvl_exp
    return @exp_list[@level]
  end
  
  def next_lvl_exp
    return @exp_list[@level+1]-@exp_list[@level]
  end
end



pour l'utilisation, rien de plus simple: appeler un script :

Portion de code : Tout sélectionner

1
$scene = Scene_Stat_Dist.new(0)



Pour donner des points aux héros :

Portion de code : Tout sélectionner

1
$game_party.members[ID_du_héros].points += Nombre_de_points


Ou ID_du_héros est l'ID de votre héros - 1 (Par exemple si vous voulez donner 100 points a ralf qui à pour ID 1, il faut mettre 0)

en ce qui concerne le coût en point pour augmenter les stats, je vous renvoi au script ( au début )

Si vous voulez donner des points a votre héros quand il monte d'un niveau :
Allez dans Game_actor :

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  def level_up                   
#Collez le code ici, si vous voulez que vos héros, gagnent des points quand il gagnent un niveau.
    @level += 1
    for learning in self.class.learnings
      learn_skill(learning.skill_id) if learning.level == @level
    end
  end
  #--------------------







Voici le deuxième qui doit être nommer Lettuce_Window_Help et qui doit être placer en bas de de window_base



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
#==============================================================================
# ** Lettuce_Window_Help
#------------------------------------------------------------------------------
#  This window displays property of each attribute
#====================================================================================
class Lettuce_Window_Help < Window_Base
  def initialize(index)
        super(401,372,144,44)
        self.contents = Bitmap.new(width-32,height-32)
        self.contents.font.size = Fontsize - 6
        refresh(index)
  end
  
  def refresh(index)
        self.contents.clear
  self.contents.font.color = text_color(16)
 
    case index
    when 0
      self.contents.draw_text(0,-5,112,20,"HP + "+HPIncreaseBy.to_s)
    when 1
      self.contents.draw_text(0,-5,112,20,"MP + "+MPIncreaseBy.to_s)
    when 2
      self.contents.draw_text(0,-5,112,20,Vocab::atk+" + "+IncreaseBy.to_s)
    when 3
      self.contents.draw_text(0,-5,112,20,Vocab::def+" + "+IncreaseBy.to_s)
    when 4
      self.contents.draw_text(0,-5,112,20,Vocab::spi+" + "+IncreaseBy.to_s)
    when 5
      self.contents.draw_text(0,-5,112,20,Vocab::agi+" + "+IncreaseBy.to_s)
    when 6
      self.contents.draw_text(0,-5,112,20,"HIT + "+HITIncreaseBy.to_s)
    when 7
      self.contents.draw_text(0,-5,112,20,"EVA + "+EVAIncreaseBy.to_s)
    when 8
      self.contents.draw_text(0,-5,112,20,"CRIT + "+CRITIncreaseBy.to_s)
    end
 
  
  end
  
end





Voilà donc j'espère que vous appréciez mes petite modifications, comme que l'on ne voit plus de :: après force, intelligence, etc mais seulement un seul :, que attaque max, précision, critique et etc soit aligné avec le reste, le texte qui ne superpose plus et finalement que dans la barre des choix de statistiques force (et le reste) n'ai plus un : a la fin^^. Mais je dit un grand merci a Mitraille, Lettuce et kirby58 pour ce merveilleux script ! :plusun


vinvin - posté le 12/07/2012 à 16:27:30 (2 messages postés)

❤ 0

Bonjour, je tiens à souligner qu'en réalité le chiffre pour désigner un perso n'a pas rapport avec l'ID de celui-ci mais de la place dans l'équipe. AINSI 0=premier personnage de l'équipe, 1=2ème personnage de l'équipe ect.. De ce fait ce script est obsolète pour tout jeu ou l'on peut modifier l'équipe à volonté ou changer l'ordre de l'équipe.
En attendant une modification, merci pour ton travail. :p


Skatino - posté le 22/07/2013 à 23:09:55 (53 messages postés)

❤ 0

Vive rpg-maker.fr !

Buggé a mort ce script..

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