Liegt es eigentlich wirklich an den Skills oder könnte es ewas mit den zusätzlichen Fähigkeiten, die ich verwende zu tun haben. Dises erhalten zu Beginn der Klasse jeweils einen Reader.
Dies betrifft allerdings nur den Hero und keinen Enemy...
Wenn du von Actors und Enemies Skills herauslesen willst, müssen diese ja auch eine entsprechende skill-Methode besitzen. Hast du meinen vorherigen Post denn mal ausprobiert?
*nochmal subtil darauf hinweis, dass der einfachste Weg einfach das Posten deiner Scripte wäre*
Hast du meinen vorherigen Post denn mal ausprobiert?
...
Ich habe deine Klasse als neues Skript probiert, ebenso in das Fehlerskript am Ende eingebaut. Der selbe Fehler. Anderen Einbauvorschlag?
Zitat von -KD-
*nochmal subtil darauf hinweis, dass der einfachste Weg einfach das Posten deiner Scripte wäre*
...
Gut, bedenke aber:
Zitat von P-Games
Ich verwende eine große Zahl an Skripten...
...
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
attr_reader :kills # enemy kills
attr_reader :skill_exp # skill EXP
attr_reader :skill_level # skill level
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
def setup(actor_id)
actor = $data_actors[actor_id]
@actor_id = actor_id
@name = actor.name
@character_name = actor.character_name
@character_hue = actor.character_hue
@battler_name = actor.battler_name
@battler_hue = actor.battler_hue
@class_id = actor.class_id
@weapon_id = actor.weapon_id
@armor1_id = actor.armor1_id
@armor2_id = actor.armor2_id
@armor3_id = actor.armor3_id
@armor4_id = actor.armor4_id
@level = actor.initial_level
@exp_list = Array.new(101)
make_exp_list
@exp = @exp_list[@level]
@skills = []
@skill_exp_list = Array.new(101)
make_skill_exp_list
@skill_exp = []
@skill_level = []
@hp = maxhp
@sp = maxsp
@states = []
@states_turn = {}
@maxhp_plus = 0
@maxsp_plus = 0
@str_plus = 0
@dex_plus = 0
@agi_plus = 0
@int_plus = 0
@kills = 0
@ap = maxap
# Learn skill
for i in 1..@level
for j in $data_classes[@class_id].learnings
if j.level == i
learn_skill(j.skill_id)
end
end
end
# Update auto state
update_auto_state(nil, $data_armors[@armor1_id])
update_auto_state(nil, $data_armors[@armor2_id])
update_auto_state(nil, $data_armors[@armor3_id])
update_auto_state(nil, $data_armors[@armor4_id])
end
#--------------------------------------------------------------------------
# * Get Maximum HP
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
for i in @enabled_abilities
n *= $data_abilities[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 999999].min
return n
end
#--------------------------------------------------------------------------
# * Get Maximum SP
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, 9999].min
for i in @states
n *= $data_states[i].maxsp_rate / 100.0
end
for i in @enabled_abilities
n *= $data_abilities[i].maxsp_rate / 100.0
end
n = [[Integer(n), 0].max, 9999].min
return n
end
#--------------------------------------------------------------------------
# * Get Element Revision Value
# element_id : element ID
#--------------------------------------------------------------------------
def element_rate(element_id)
# Get values corresponding to element effectiveness
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
# If this element is protected by armor, then it's reduced by half
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
end
# If this element is protected by states, then it's reduced by half
for i in @states
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
end
for i in @enabled_abilities
result *= $data_abilities[i].element_rate[element_id] / 100.0
end
# End Method
return Integer(result)
end
#--------------------------------------------------------------------------
# * Get Next Level EXP
#--------------------------------------------------------------------------
def next_exp
if @level < 99
return @exp_list[@level+1]
end
end
#--------------------------------------------------------------------------
# * Change EXP
# exp : new EXP
#--------------------------------------------------------------------------
def exp=(exp)
diff = exp - @exp
for i in @enabled_abilities
diff *= $data_abilities[i].exp_rate / 100.0
end
@exp = [[Integer(@exp + diff), 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
# Level down
while @exp < @exp_list[@level]
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# * Increases the Kills Counter by 1
#--------------------------------------------------------------------------
def add_kill
@kills += 1
end
#--------------------------------------------------------------------------
# * Calculate Skill EXP
#--------------------------------------------------------------------------
def make_skill_exp_list
actor = $data_actors[@actor_id]
@skill_exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
for i in 2..100
if i > 99
@skill_exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@skill_exp_list[i] = @skill_exp_list[i-1] + Integer(n)
end
end
end
#--------------------------------------------------------------------------
# * Get Until Next Level EXP
#--------------------------------------------------------------------------
def until_next_exp
return @level < 99 ? (@exp_list[@level+1] - @exp_list[@level]) : 0
end
#--------------------------------------------------------------------------
# * Learn Skill
# skill_id : skill ID
#--------------------------------------------------------------------------
def learn_skill(skill_id)
if skill_id > 0 and not skill_learn?(skill_id)
@skills.push(skill_id)
@skill_exp.push(0)
@skill_level.push(1)
end
end
#--------------------------------------------------------------------------
# * Get Next Skill Level EXP String
#--------------------------------------------------------------------------
def skill_next_exp_s
return @skill_exp_list[@level+1] > 0 ? @skill_exp_list[@level+1].to_s : "-------"
end
#--------------------------------------------------------------------------
# * Get Next Skill Level EXP
#--------------------------------------------------------------------------
def skill_next_exp(index)
if @skill_level[index] < 99
return @skill_exp_list[@skill_level[index]+1]
end
end
#--------------------------------------------------------------------------
# * Get Until Next Skill Level EXP
#--------------------------------------------------------------------------
def next_rest_skill_exp(index)
return @skill_level[index] < 99 ? (@skill_exp_list[@skill_level[index]+1] - @skill_exp_list[@skill_level[index]]) : 0
end
#--------------------------------------------------------------------------
# * Add Skill EXP
# index : skill index
# exp : new EXP
#--------------------------------------------------------------------------
def add_skill_exp(index, exp)
if @skill_level[index] < 99
@skill_exp[index] += exp
# Level up
while @skill_exp[index] >= @skill_exp_list[@skill_level[index]+1]
@skill_level[index] += 1
if @skill_level[index] == 99
return
end
end
end
end
#--------------------------------------------------------------------------
# * Change Skill Level
# level : new level
#--------------------------------------------------------------------------
def increase_skill_level(index)
# Check up and down limits
level = [[level, $data_actors[@actor_id].final_level].min, 1].max
# Change EXP
self.exp = @exp_list[level]
end
#--------------------------------------------------------------------------
# * Find Skill Index
#--------------------------------------------------------------------------
def find_skill_index(skill)
for i in 0..@skills.size
if @skills[i] == skill.id
return i
end
end
return 0
end
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
attr_reader :battle_count # number of battles
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Create actor array
@actors = []
# Initialize amount of gold and steps
@gold = 0
@steps = 0
# Initialize battle count
@battle_count = 0
# Create amount in possession hash for items, weapons, and armor
@items = {}
@weapons = {}
@armors = {}
end
#--------------------------------------------------------------------------
# * Gain Gold (or lose)
# n : amount of gold
#--------------------------------------------------------------------------
def gain_gold(n)
for actor in @actors
for i in actor.enabled_abilities
n *= $data_abilities[i].gold_rate / 100.0
end
end
@gold = [[@gold + Integer(n), 0].max, 9999999].min
end
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
def add_actor(actor_id)
# Get actor
actor = $game_actors[actor_id]
# Determine if the actor is in the party
if not @actors.include?(actor)
# Add actor
@actors.push(actor)
# Refresh player
$game_player.refresh
end
end
end
#==============================================================================
# ** Scene_Battle (part 1)
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Object Initialization
# spriteset : spriteset of the map to use as a background
#--------------------------------------------------------------------------
def initialize(spriteset)
@mapspriteset = spriteset
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Initialize each kind of temporary battle data
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.forcing_battler = nil
# Initialize battle event interpreter
$game_system.battle_interpreter.setup(nil, 0)
# Prepare troop
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
# Make actor command window
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 320
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
# Make other windows
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
# Make sprite set
@spriteset = Spriteset_Battle.new
# Initialize wait count
@wait_count = 0
# Execute transition
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
# Start pre-battle phase
start_phase1
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Refresh map
$game_map.refresh
# Prepare for transition
Graphics.freeze
# Dispose of windows
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @mapspriteset != nil
@mapspriteset.dispose
end
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
# Dispose of sprite set
@spriteset.dispose
# If switching to title screen
if $scene.is_a?(Scene_Title)
# Fade out screen
Graphics.transition
Graphics.freeze
end
# If switching from battle test to any screen other than game over screen
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end
end
#==============================================================================
# ** Scene_Battle (part 3)
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Start Actor Command Phase
#--------------------------------------------------------------------------
def start_phase3
# Shift to phase 3
@phase = 3
# Set actor as unselectable
@actor_index = -1
@active_battler = nil
# Go to command input for next actor
phase3_next_actor
end
#--------------------------------------------------------------------------
# * Go to Command Input for Next Actor
#--------------------------------------------------------------------------
def phase3_next_actor
# Loop
begin
# Actor blink effect OFF
if @active_battler != nil
@active_battler.blink = false
end
# If last actor
item_index = $game_party.actors.size
if item_index > 3
item_index = 3
end
if @actor_index == item_index - 1
# Start main phase
start_phase4
return
end
# Advance actor index
@actor_index += 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# Once more if actor refuses command input
end until @active_battler.inputable?
# Set up actor command window
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# * Go to Command Input of Previous Actor
#--------------------------------------------------------------------------
def phase3_prior_actor
# Loop
begin
# Actor blink effect OFF
if @active_battler != nil
@active_battler.blink = false
end
# If first actor
if @actor_index == 0
# Start party command phase
start_phase2
return
end
# Return to actor index
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# Once more if actor refuses command input
end until @active_battler.inputable?
# Set up actor command window
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# * Actor Command Window Setup
#--------------------------------------------------------------------------
def phase3_setup_command_window
# Disable party command window
@party_command_window.active = false
@party_command_window.visible = false
# Enable actor command window
@actor_command_window.active = true
@actor_command_window.visible = true
# Set actor command window position
@actor_command_window.x = 0
# Set index to 0
@actor_command_window.index = 0
end
#--------------------------------------------------------------------------
# * Frame Update (actor command phase)
#--------------------------------------------------------------------------
def update_phase3
# If enemy arrow is enabled
if @enemy_arrow != nil
update_phase3_enemy_select
# If actor arrow is enabled
elsif @actor_arrow != nil
update_phase3_actor_select
# If skill window is enabled
elsif @skill_window != nil
update_phase3_skill_select
# If item window is enabled
elsif @item_window != nil
update_phase3_item_select
# If actor command window is enabled
elsif @actor_command_window.active
update_phase3_basic_command
end
end
#--------------------------------------------------------------------------
# * Frame Update (actor command phase : basic command)
#--------------------------------------------------------------------------
def update_phase3_basic_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Go to command input for previous actor
phase3_prior_actor
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by actor command window cursor position
case @actor_command_window.index
when 0 # attack
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
# Start enemy selection
start_enemy_select
when 1 # skill
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.kind = 1
# Start skill selection
start_skill_select
when 2 # guard
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
# Go to command input for next actor
phase3_next_actor
when 3 # item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.kind = 2
# Start item selection
start_item_select
end
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (actor command phase : skill selection)
#--------------------------------------------------------------------------
def update_phase3_skill_select
# Make skill window visible
@skill_window.visible = true
# Update skill window
@skill_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# End skill selection
end_skill_select
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Get currently selected data on the skill window
@skill = @skill_window.skill
# If it can't be used
if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.skill_id = @skill.id
# Make skill window invisible
@skill_window.visible = false
# If effect scope is single enemy
if @skill.scope == 1
# Start enemy selection
start_enemy_select
# If effect scope is single ally
elsif @skill.scope == 3 or @skill.scope == 5
# Start actor selection
start_actor_select
# If effect scope is not single
else
# End skill selection
end_skill_select
# Go to command input for next actor
phase3_next_actor
end
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (actor command phase : item selection)
#--------------------------------------------------------------------------
def update_phase3_item_select
# Make item window visible
@item_window.visible = true
# Update item window
@item_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# End item selection
end_item_select
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Get currently selected data on the item window
@item = @item_window.item
# If it can't be used
unless $game_party.item_can_use?(@item.id)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.item_id = @item.id
# Make item window invisible
@item_window.visible = false
# If effect scope is single enemy
if @item.scope == 1
# Start enemy selection
start_enemy_select
# If effect scope is single ally
elsif @item.scope == 3 or @item.scope == 5
# Start actor selection
start_actor_select
# If effect scope is not single
else
# End item selection
end_item_select
# Go to command input for next actor
phase3_next_actor
end
return
end
end
#--------------------------------------------------------------------------
# * Frame Updat (actor command phase : enemy selection)
#--------------------------------------------------------------------------
def update_phase3_enemy_select
# Update enemy arrow
@enemy_arrow.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# End enemy selection
end_enemy_select
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.target_index = @enemy_arrow.index
# End enemy selection
end_enemy_select
# If skill window is showing
if @skill_window != nil
# End skill selection
end_skill_select
end
# If item window is showing
if @item_window != nil
# End item selection
end_item_select
end
# Go to command input for next actor
phase3_next_actor
end
end
#--------------------------------------------------------------------------
# * Frame Update (actor command phase : actor selection)
#--------------------------------------------------------------------------
def update_phase3_actor_select
# Update actor arrow
@actor_arrow.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# End actor selection
end_actor_select
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
@active_battler.current_action.target_index = @actor_arrow.index
# End actor selection
end_actor_select
# If skill window is showing
if @skill_window != nil
# End skill selection
end_skill_select
end
# If item window is showing
if @item_window != nil
# End item selection
end_item_select
end
# Go to command input for next actor
phase3_next_actor
end
end
#--------------------------------------------------------------------------
# * Start Enemy Selection
#--------------------------------------------------------------------------
def start_enemy_select
# Make enemy arrow
@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
# Associate help window
@enemy_arrow.help_window = @help_window
# Disable actor command window
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# * End Enemy Selection
#--------------------------------------------------------------------------
def end_enemy_select
# Dispose of enemy arrow
@enemy_arrow.dispose
@enemy_arrow = nil
# If command is [fight]
if @actor_command_window.index == 0
# Enable actor command window
@actor_command_window.active = true
@actor_command_window.visible = true
# Hide help window
@help_window.visible = false
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_select
# Make actor arrow
@actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
@actor_arrow.index = @actor_index
# Associate help window
@actor_arrow.help_window = @help_window
# Disable actor command window
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_select
# Dispose of actor arrow
@actor_arrow.dispose
@actor_arrow = nil
end
#--------------------------------------------------------------------------
# * Start Skill Selection
#--------------------------------------------------------------------------
def start_skill_select
# Make skill window
@skill_window = Window_Skill.new(@active_battler)
# Associate help window
@skill_window.help_window = @help_window
# Disable actor command window
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# * End Skill Selection
#--------------------------------------------------------------------------
def end_skill_select
# Dispose of skill window
@skill_window.dispose
@skill_window = nil
# Hide help window
@help_window.visible = false
# Enable actor command window
@actor_command_window.active = true
@actor_command_window.visible = true
end
#--------------------------------------------------------------------------
# * Start Item Selection
#--------------------------------------------------------------------------
def start_item_select
# Make item window
@item_window = Window_Item.new
# Associate help window
@item_window.help_window = @help_window
# Disable actor command window
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# * End Item Selection
#--------------------------------------------------------------------------
def end_item_select
# Dispose of item window
@item_window.dispose
@item_window = nil
# Hide help window
@help_window.visible = false
# Enable actor command window
@actor_command_window.active = true
@actor_command_window.visible = true
end
end
Wenn sich jemand wirklich die Arbeit macht, diese Skripte zu vergleichen und sogar den Fehler zu finden (eventuell braucht man noch mehr meiner Skripte), wird dieser natürlich mit einem Creditseintrag belohnt. Das SDK wird nicht verwendet. Und nochmal zur Erinnerung: Alle Skripte sind auch in der Demo eingebaut, dort funktioniert es einwandfrei!
Das Problem kommt daher, dass in Game_Actor auf skills nicht mehr von außen zugegriffen werden kann. In der Standard-Klasse steht auch ein attr_reader :skills. Und das ursprüngliche Problem könnte damit zusammenhängen, dass find_skill_index vielleicht nur in Game_Actor, aber nicht in Game_Enemy definiert ist. Game_Battler ist ja die Superklasse der beiden.
Jetzt wird die ganze Sache doch verständlicher. Tjoar, Kelven hat eigentlich schon alles gesagt. Reader-Methode skills fehlt, find_skill_index ist nur in Game_Actor definiert, die Methode wird aber laut Fehlermeldung auch für Game_Enemy aufgerufen.
class Game_Enemy
def find_skill_index(skill)
$data_enemies[@enemy_id].actions.find {|action|
action.kind==1 and action.skill_id == skill.id
} || 0
end
end
Wenn du den Code einfügst dürfte es funktionieren, da dann find_skill_index auch für Game_Enemy definiert ist.
Jo danke erstmal -KD-, das hat wirklich geholfen. Leider sind anscheinend noch andere Methoden undefiniert, z.B. im Game_Battler dieses mal skill_level.
In der Demo müssen diese doch irgendwo definiert sein, ich werde mal nachsehen.
Naja, skill_level, skill_exp sind für gewöhnlich auch nur für den Actor interessant, da nur er seine Skills mit der Zeit aufleveln kann. Dein Script hingegen scheint sowas auch für Enemies zu verwenden, was an sich irgendwie unlogisch scheint.
class Game_Battler
attr_reader :kills # enemy kills
attr_reader :skill_exp # skill EXP
attr_reader :skill_level # skill level
alias skill_level_initialize initialize
def initialize(*p)
skill_level_initialize(*p)
@kills, @skill_exp, @skill_level = 0, [], []
end
end
Ja das kommt mir auch seltsam vor, da ja nur man selbst seine Skills aufleveln kann. Ich habe die beiden von dir geposteten Klassen in ein neues Skript gepackt, *seufz*, NoMethodError von: []. Hast du nicht ICQ, ich würde dir gerne mal mein Projekt zeigen, vielleicht kannst du mir dann besser helfen. Danke bis jetzt.