RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Quick Menu Tweak

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 69
I have my menu mostly organized but I have a couple problems.
When I exit out of my "Stats" (stat distribution by Lettuce) it exits out the entire menu instead of going back to main menu.
I wish, after you exit out of Item/Equip/Skill/Stats, that it went back to actor selection instead of main menu selection.
I want it ordered as:
Item
Equip(moved from original position)
Skill
Stats(stat dist. by Lettuce)
Party(KGC Large Party)
Save
Game End
If anyone can help me I'd be thankful! :lol:
sorry that I can't fit the KGC script in this post
Code: [Select]
#===============================================================================
#
# Cozziekuns' Menu System
# Last Date Updated: 4/10/2010
#
# A menu system similar to that of Final Fantasy VII's.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 4/09/10 - Started Script.
# o 4/10/10 - Finished Script.
# o 4/12/10 - Upgraded it so it works with every font, and has a few icons. Also added modules, for
# customization.
#===============================================================================
# What's to come?
# -----------------------------------------------------------------------------
# o Even more icons.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save. Also,
# feel free to change the icons towards your preference.
#===============================================================================

#BEGIN CUSTOMIZABLE REGION-----------------------------------------------------

module COZZIEKUNS
module ICONS
TIME = 188
GOLD = 194
LOCATION = 150
end
end

#END CUSTOMIZABLE REGION-------------------------------------------------------

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, -1, 430, 416)
refresh
self.active = false
self.index = -1
end

#--------------------------------------------------------------------------
# * Draw TNL (To next level)
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : Width
#--------------------------------------------------------------------------
def draw_actor_tnl(actor, x, y, width = 100)
draw_actor_tnl_gauge(actor, x, y, width)
self.contents.font.color = system_color
self.contents.draw_text(x, y - 21, 135, WLH, "To next level")
self.contents.font.color = hp_color(actor)
last_font_size = self.contents.font.size
xr = x + width
if width < 120
self.contents.draw_text(xr - 44, y, 44, WLH, actor.next_rest_exp_s, 2)
else
self.contents.draw_text(xr - 99, y, 44, WLH, actor.next_rest_exp_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
self.contents.draw_text(xr - 44, y, 44, WLH, actor.next_exp_s, 2)
end
end
#--------------------------------------------------------------------------
# * Draw TNL gauge
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : Width
#--------------------------------------------------------------------------
def draw_actor_tnl_gauge(actor, x, y, width = 100)
gw = width * actor.exp_s / actor.next_exp_s
gc1 = tnl_gauge_colour1
gc2 = tnl_gauge_colour2
self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 104
y = actor.index * 96
draw_actor_name(actor, x + 30, y)
draw_actor_level(actor, x + 30, y + 21)
draw_actor_state(actor, x + 150, y)
draw_actor_hp(actor, x + 30, y + 18 + WLH * 1)
draw_actor_mp(actor, x + 30, y + 18 + WLH * 2)
draw_actor_tnl(actor, x + 165, y + 18 + WLH * 1)
end
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # No cursor
self.cursor_rect.empty
elsif @index < @item_max # Normal
self.cursor_rect.set(0, @index * 96, contents.width, 96)
elsif @index >= 100 # Self
self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
else # All
self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
end
end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a superclass of all windows in the game.
#==============================================================================

class Window_Base < Window

#--------------------------------------------------------------------------
# * To Next Level gauge colour 1
#--------------------------------------------------------------------------
def tnl_gauge_colour1
return text_color(3)
end
#--------------------------------------------------------------------------
# * To Next Level gauge colour 2
#--------------------------------------------------------------------------
def tnl_gauge_colour2
return text_color(11)
end
#--------------------------------------------------------------------------
# * Currency Value
#--------------------------------------------------------------------------
def draw_currency_value(value, x, y, width)
cx = contents.text_size(Vocab::gold).width
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, WLH, value, 2)
self.contents.font.color = system_color
draw_icon(COZZIEKUNS::ICONS::GOLD, 0, 25)
end
end
#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# This window displays the location.
#==============================================================================

class Window_Location < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize (x, y)
super (x, y, 300, WLH + 30)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
text = load_data ("Data/MapInfos.rvdata")[$game_map.map_id].name
self.contents.draw_text(25, -4, 120, WLH, text, 2)
draw_icon(COZZIEKUNS::ICONS::LOCATION, 0, -1)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end


#==============================================================================
# ** Window_Gold + Time
#------------------------------------------------------------------------------
# This window displays the amount of gold and playtime.
#==============================================================================

class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 56)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_currency_value($game_party.gold, 3, 25, 100)
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 105, WLH, text, 2)
self.contents.font.color = system_color
draw_icon(COZZIEKUNS::ICONS::TIME, 0, 1)
end

#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@status_window = Window_MenuStatus.new(0, 2)
create_command_window
@gold_window = Window_Gold.new(418, 289)
@location_window = Window_Location.new(376, 364)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@location_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@location_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
#s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
s9 = "Stats"
@command_window = Window_Command.new(130, [s1, s2, s3, s9, s5, s6])
@command_window.index = @menu_index
@command_window.x = 418
@command_window.width = 140
@command_window.height = 295
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, Stat
start_actor_selection
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
end
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # skill
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
$scene = Scene_Equip.new(@status_window.index)
when 3  # status       
$scene = Scene_Stat_Dist.new(@status_window.index)
end
end
end
end
« Last Edit: July 06, 2011, 08:52:18 PM by Scalinger2 »

****
Rep:
Level 69
Code: [Select]
=begin
+------------------------------------------------------------------------------+
# ** Stat points distribution system 1.71                                      #
#                  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) #
#                                                                              #
#------------------------------------------------------------------------------#
#  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 = 7
#Maximum attribute point you allowed in your game
MaxStat = 255
MaxHP = 9999
MaxMP = 999
     #Max hit, eva and crit rate are all in percentage
MaxHIT = 95 # 100 means never miss
MaxEVA = 70 #100 means ALWAYS dodge; very illogical ^^. 50-70 is good rate
MaxCRIT = 40 #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 = 2
HPIncreaseBy = 25
MPIncreaseBy = 15
HITIncreaseBy = 3
EVAIncreaseBy = 1
CRITIncreaseBy = 1


#1 for normal mode, 2 or RO mode [points required calculated through formula]
Mode = 1
#You can chage 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 = 1

#========================== 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,"Stat Distribution",1)
self.contents.font.size = Fontsize-4
self.contents.draw_text(0,10,544-32,32,"Press left or right to change character",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,"Class: "+actor.class.name)
self.contents.draw_text(120,30,200,20,"Lv. "+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(250,74,90,20,"EXP: "+s3.to_s+"/"+s4.to_s,0)
    self.contents.font.size = Fontsize
  else
    self.contents.draw_text(250,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(250,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(250,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,120,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,120,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 change_exp(exp, show)
    last_level = @level
      last_skills = skills
      @exp = [[exp, 9999999].min, 0].max
      while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
        level_up
        #---------------------add the code here
         difference = @level - last_level                                       
      $game_actors[@actor_id].points += ((@level/5).floor+2).floor*difference       
        #----------------------- :D
      end
      while @exp < @exp_list[@level]
        level_down
      end
      @hp = [@hp, maxhp].min
      @mp = [@mp, maxmp].min
      if show and @level > last_level
        display_level_up(skills - last_skills)
      end
    end

  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

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Link to the KGC script please, or upload it in a .txt file. Shouldn't be that difficult.
it's like a metaphor or something i don't know

****
Rep:
Level 69
sorry to respond so late, here's the link to a project I put the KGC Large pty on.
http://dl.dropbox.com/u/33252047/Project1.zip

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Kind of forgot about this (which is understandable, it was a month ago), but since, I've released my own CMS which is basically built for ordering the menu and fixing the index problems for-seen in custom menu options.
http://rmrk.net/index.php/topic,43352.0.html
So, unless you were already using a CMS, it would be a breeze to put things in order. But you seem to have that under control.

As for the wanting things to return to actor selection, that would be a pretty nifty edit to do. I'll do it as soon as I finish the other request ^_^
it's like a metaphor or something i don't know

****
Rep:
Level 69
thx, I changed values in the script to fit my menu but it didn't change it, how do I use it with my menu? xD

edit: nvm I got it, only problem is I don't know how to call the KGC party script because it gives me nothing to call it with and how would I move and stretch the menu?
« Last Edit: August 19, 2011, 04:43:09 AM by Scalinger2 »

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
You need the actual script for that process to work. But it won't return to the actor selection.
Paste this snippet anywhere above main.
Code: [Select]
class Scene_Menu < Scene_Base
  alias actor_selection_ini initialize
  def initialize(menu_index = 0, start = 0)
    start = [[0, start].max, 1].min
    menu_index = $imported["PAC_Menu 1.7"] ? $game_system.menu_index : menu_index
    actor_selection_ini(menu_index)
    @start = start
  end
  alias actor_selection_start start
  def start
    actor_selection_start
    if @start == 1
      start_actor_selection
    end
  end
end
And in any script that has a custom scene that returns to the menu, there should be a method called return_scene. If not, look for a line that says $scene = Scene_Menu.new.
Then, add a , 1 to the brackets, so the equip one would read
Code: [Select]
$scene = Scene_Menu.new(2, 1)
it's like a metaphor or something i don't know

****
Rep:
Level 69
I'm probably getting this error since I'm using a different party script right? So what should I modify in the script?

When I use  $scene = Scene_Map.new(4, 1) in line 655 in stat script to return to menu I get this

Then I tryed $scene = Scene_PartyForm.new(current_menu_index) from line 1587 in party script with a new project using only ff7 menu and KGC to see if I could call the party option normally and got this one
« Last Edit: August 19, 2011, 10:22:53 PM by Scalinger2 »

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Okay, I've decided it would be easier if I just gave you the edited scripts. Copy the three custom scripts from the attached project, and follow this instruction:
In the default scenes that return to the menu that require actor selection, i.e. Skill, Equip and Status, go to the line of the return_scene method, and add
Code: [Select]
, true
inside the brackets.
So line 48 of Scene_Skill would read $scene = Scene_Menu.new(1, true)
Line 50 of Scene_Equip would read $scene = Scene_Menu.new(2, true)
Line 38 of Scene_Status would read $scene = Scene_Menu.new(3, true), except you're not even using that scene.
it's like a metaphor or something i don't know

****
Rep:
Level 69
thx!
so is there any way to move the party option or is it stuck at the bottom? xD

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Oh, that. Where in the menu do you want it?
it's like a metaphor or something i don't know

****
Rep:
Level 69
Party
Save
Game End
  third from the bottom

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Go to Party Form and set USE_MENU_PARTYFORM_COMMAND to false.
Then replace your menu with this.
Code: [Select]
#===============================================================================
#
# Cozziekuns' Menu System
# Last Date Updated: 4/10/2010
#
# A menu system similar to that of Final Fantasy VII's.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 4/09/10 - Started Script.
# o 4/10/10 - Finished Script.
# o 4/12/10 - Upgraded it so it works with every font, and has a few icons. Also added modules, for
# customization.
#===============================================================================
# What's to come?
# -----------------------------------------------------------------------------
# o Even more icons.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save. Also,
# feel free to change the icons towards your preference.
#===============================================================================

#BEGIN CUSTOMIZABLE REGION-----------------------------------------------------

module COZZIEKUNS
module ICONS
TIME = 188
GOLD = 194
LOCATION = 150
end
end

#END CUSTOMIZABLE REGION-------------------------------------------------------

#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  # x : window X coordinate
  # y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, -1, 430, 416)
    refresh
    self.active = false
    self.index = -1
  end

  #--------------------------------------------------------------------------
  # * Draw TNL (To next level)
  # actor : actor
  # x : draw spot x-coordinate
  # y : draw spot y-coordinate
  # width : Width
  #--------------------------------------------------------------------------
  def draw_actor_tnl(actor, x, y, width = 100)
    draw_actor_tnl_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y - 21, 135, WLH, "To next level")
    self.contents.font.color = hp_color(actor)
    last_font_size = self.contents.font.size
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.next_rest_exp_s, 2)
    else
      self.contents.draw_text(xr - 99, y, 44, WLH, actor.next_rest_exp_s, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.next_exp_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw TNL gauge
  # actor : actor
  # x : draw spot x-coordinate
  # y : draw spot y-coordinate
  # width : Width
  #--------------------------------------------------------------------------
  def draw_actor_tnl_gauge(actor, x, y, width = 100)
    gw = width * actor.exp_s / actor.next_exp_s
    gc1 = tnl_gauge_colour1
    gc2 = tnl_gauge_colour2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
      x = 104
      y = actor.index * 96
      draw_actor_name(actor, x + 30, y)
      draw_actor_level(actor, x + 30, y + 21)
      draw_actor_state(actor, x + 150, y)
      draw_actor_hp(actor, x + 30, y + 18 + WLH * 1)
      draw_actor_mp(actor, x + 30, y + 18 + WLH * 2)
      draw_actor_tnl(actor, x + 165, y + 18 + WLH * 1)
    end
  end
  #--------------------------------------------------------------------------
  # * Update cursor
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0 # No cursor
      self.cursor_rect.empty
    elsif @index < @item_max # Normal
      self.cursor_rect.set(0, @index * 96, contents.width, 96)
    elsif @index >= 100 # Self
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else # All
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a superclass of all windows in the game.
#==============================================================================

class Window_Base < Window

  #--------------------------------------------------------------------------
  # * To Next Level gauge colour 1
  #--------------------------------------------------------------------------
  def tnl_gauge_colour1
    return text_color(3)
  end
  #--------------------------------------------------------------------------
  # * To Next Level gauge colour 2
  #--------------------------------------------------------------------------
  def tnl_gauge_colour2
    return text_color(11)
  end
  #--------------------------------------------------------------------------
  # * Currency Value
  #--------------------------------------------------------------------------
  def draw_currency_value(value, x, y, width)
    cx = contents.text_size(Vocab::gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width, WLH, value, 2)
    self.contents.font.color = system_color
    draw_icon(COZZIEKUNS::ICONS::GOLD, 0, 25)
  end
end

#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# This window displays the location.
#==============================================================================

class Window_Location < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize (x, y)
    super (x, y, 300, WLH + 30)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    text = load_data ("Data/MapInfos.rvdata")[$game_map.map_id].name
    self.contents.draw_text(25, -4, 120, WLH, text, 2)
    draw_icon(COZZIEKUNS::ICONS::LOCATION, 0, -1)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end


#==============================================================================
# ** Window_Gold + Time
#------------------------------------------------------------------------------
# This window displays the amount of gold and playtime.
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  # x : window X coordinate
  # y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 160, WLH + 56)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, 3, 25, 100)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 105, WLH, text, 2)
    self.contents.font.color = system_color
    draw_icon(COZZIEKUNS::ICONS::TIME, 0, 1)
  end

  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  # menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0, start = false)
    @menu_index = menu_index
    @start = start
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @status_window = Window_MenuStatus.new(0, 2)
    create_command_window
    @gold_window = Window_Gold.new(418, 289)
    @location_window = Window_Location.new(376, 364)
    if @start
      start_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @location_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @location_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    #s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    s9 = "Stats"
    s7 = Vocab.partyform
    @command_window = Window_Command.new(130, [s1, s2, s3, s9, s7, s5, s6])
    @command_window.index = @menu_index
    @command_window.x = 418
    @command_window.width = 140
    @command_window.height = 295
    if $game_party.members.size == 0 # If number of party members is 0
      @command_window.draw_item(0, false) # Disable item
      @command_window.draw_item(1, false) # Disable skill
      @command_window.draw_item(2, false) # Disable equipment
      @command_window.draw_item(3, false) # Disable status
      @command_window.draw_item(4, false) # Disable party
    end
    if $game_system.save_disabled # If save is forbidden
      @command_window.draw_item(5, false) # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0 # Item
        $scene = Scene_Item.new
      when 1,2,3 # Skill, equipment, status, Stat
        start_actor_selection
      when 4
        $scene = Scene_PartyForm.new(@command_window.index)
      when 5 # Save
        $scene = Scene_File.new(true, false, false)
      when 6 # End Game
        $scene = Scene_End.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1 # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2 # equipment
        $scene = Scene_Equip.new(@status_window.index)
      #when 3 # status
      #$scene = Scene_Status.new(@status_window.index)
      when 3  # status
        $scene = Scene_Stat_Dist.new(@status_window.index, false)
      end
    end
  end
end
And change the return_scene methods of Scene_File and Scene_End to return to the menu with one higher index than before, i.e. for File, line 54 is $scene = Scene_Menu.new(5) and for End, line 42 is $scene = Scene_Menu.new(6)
it's like a metaphor or something i don't know

****
Rep:
Level 69
It all works except when I go to Stat after actor selection it does this,
but it should be a quick fix right?

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Oh, I forgot to post the edited stat script.
Code: [Select]
=begin
+------------------------------------------------------------------------------+
# ** Stat points distribution system 1.71                                      #
#                  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) #
#                                                                              #
#------------------------------------------------------------------------------#
#  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 = 1800
#Maximum attribute point you allowed in your game
MaxStat = 255
MaxHP = 9999
MaxMP = 999
     #Max hit, eva and crit rate are all in percentage
MaxHIT = 95 # 100 means never miss
MaxEVA = 70 #100 means ALWAYS dodge; very illogical ^^. 50-70 is good rate
MaxCRIT = 92 #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 = 2
HPIncreaseBy = 25
MPIncreaseBy = 15
HITIncreaseBy = 3
EVAIncreaseBy = 1
CRITIncreaseBy = 1


#1 for normal mode, 2 or RO mode [points required calculated through formula]
Mode = 1
#You can chage 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 = 1

#========================== 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,"Stat Distribution",1)
self.contents.font.size = Fontsize-4
self.contents.draw_text(0,10,544-32,32,"Press left or right to change character",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,"Class: "+actor.class.name)
self.contents.draw_text(120,30,200,20,"Lv. "+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(250,74,90,20,"EXP: "+s3.to_s+"/"+s4.to_s,0)
    self.contents.font.size = Fontsize
  else
    self.contents.draw_text(250,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(250,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(250,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,120,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,120,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, from_map = true)
@menu_index = menu_index
  @from_map = from_map
  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 = case @from_map
    when true then Scene_Map.new
    when false then Scene_Menu.new(3, true)
    end
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 change_exp(exp, show)
    last_level = @level
      last_skills = skills
      @exp = [[exp, 9999999].min, 0].max
      while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
        level_up
        #---------------------add the code here
         difference = @level - last_level                                       
      $game_actors[@actor_id].points += ((@level/5).floor+2).floor*difference       
        #----------------------- :D
      end
      while @exp < @exp_list[@level]
        level_down
      end
      @hp = [@hp, maxhp].min
      @mp = [@mp, maxmp].min
      if show and @level > last_level
        display_level_up(skills - last_skills)
      end
    end

  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
it's like a metaphor or something i don't know

****
Rep:
Level 69
thx
maybe I should start learning scripting so I dont have to bother you guys all the time lol

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Not at all. As long as you tell us what to do, we'll probably do it. Scripters generally hate guesswork.
it's like a metaphor or something i don't know

****
Rep:
Level 69