cool, i am now gaining levels after inserting that code, but its still adding 400 xp when i specify it to add 100, also theres a minior glitch in the menu when showing the level, it constantly shows the default level behind the current one, heres my full script as of now:
#---------------------------------------------------------------------------
# *create new skills
#---------------------------------------------------------------------------
class Game_Actor
attr_reader :wclevel # wood cutting level
attr_accessor :wcexp # wood cutting exp
alias setup_mod setup
def setup(actor_id)
setup_mod(actor_id)
#------------------------------
@wclevel = 1
@wcexp_list = Array.new(101)
make_wcexp_list
@wcexp = @wcexp_list[@wclevel]
#------------------------------
end
#--------------------------------------------------------------------------
# * CALCULATE WC XP
#--------------------------------------------------------------------------
def make_wcexp_list
actor = $data_actors[@actor_id]
@wcexp_list[1] = 0
pow_i = 2.4 + 100 / 100.0
for i in 2..100
if i > actor.final_level
@wcexp_list[i] = 0
else
n = 1 * ((i + 3) ** pow_i) / (5 ** pow_i)
@wcexp_list[i] = @wcexp_list[i-1] + Integer(n)
end
end
end
#--------------------------------------------------------------------------
# * Change EXP
# exp : new EXP
#--------------------------------------------------------------------------
def wcexp=(wcexp)
@wcexp = [[wcexp, 9999999].min, 0].max
# Level up
while @wcexp >= @wcexp_list[@wclevel+1] and @wcexp_list[@wclevel+1] > 0
@wclevel += 1
end
# Level down
while @wcexp < @wcexp_list[@wclevel]
@level -= 1
end
end
end
#----------------------------------------------------------------------------
# * draw wc level and exp
#----------------------------------------------------------------------------
class Window_Base
def draw_actor_wclevel(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "WC")
self.contents.font.color = normal_color
self.contents.draw_text(x+24, y, 24, 32, actor.wclevel.to_s, 2)
end
def draw_actor_wcexp(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "exp")
self.contents.font.color = normal_color
self.contents.draw_text(x+32, y, 50, 32, actor.wcexp.to_s, 2)
end
end
#----------------------------------------------------------------------------
#
#----------------------------------------------------------------------------
#class Game_Party
# alias setup_battle_test_members_mod setup_battle_test_members
# def setup_battle_test_members
# setup_battle_test_members_mod
#----------------------------------------------------------------------------
# * draw wc level and xp in the menu
#----------------------------------------------------------------------------
class Window_MenuStatus
alias refresh_mod refresh
def refresh
refresh_mod
$game_party.actors.each_index {|i|
draw_actor_wclevel($game_party.actors[i], 150, 95)}
$game_party.actors.each_index {|i|
draw_actor_wcexp($game_party.actors[i], 360, 95)}
end
end
class Interpreter
alias update_mod update
def update
update_mod
if @wait_count == 0
$cutting = false
end
end
def my_call
$cutting = true
if $game_switches[1]
a = $game_actors[1]
a.set_graphic('aluxeswc', a.character_hue, a.battler_name, a.battler_hue)
$game_player.refresh
@wait_count = 200 * 2 - 1
for i in 0...$game_party.actors.size
actor = $game_party.actors[1]
#last_wclevel = actor.wclevel
actor.wcexp += 100
end
$game_player.refresh
end
end
end
class Game_Player
alias initialize_mod initialize
def initialize
initialize_mod
end
alias update_new update
def update
update_new
if $cutting == true
@step_anime = true
end
if $cutting == false
@step_anime = false
end
end
end