IskatuMesk
Member
Hey. I asked around elsewhere and located Trickster's AI Ally 2.0 in the Lost Scripts thread. Problem is, in my RPG, it crashes as soon as my dudes start doing stuff inside the battle.
I get the error,
The code in question seems to be this,
I know nothing about scripting but I theorize that it's failing because for some reason actor.sp is exploding. Hopefully someone around here will be able to suggest what's going on. I can post the entire Game_AllyAi, or the demo RPG, if needed.
I'm not using any other custom script systems of any kind. So, I'm using the default battle system and all. To install it, since there was no installation instructions, I just copied and pasted it + the SDK exactly as arranged in the demo RPG into my own RPG.
/Edit
Okay, I managed to fix the first error. It seems that if your dudes don't have skills then the Ai Ally implodes.
Now I've got a new error! Horray! And it also occurs just when the fight starts and dudes start doing stuff. Delightful.
I suspect this is exploding because I don't have any offensive attack items. (Nor do I really want to have them at this point in the RPG... especially a huge amount to prevent the AI from crashing...).
I'm gonna try setting their item usage to 0.
/edit
That didn't work. Still exploding.
Okay I seriously can't get it to stop crashing. I hope someone here is a bit fluent with this.
I get the error,
The code in question seems to be this,
Code:
# * Magic Influences
#--------------------------------------------------------------------------
def magic_influences
# Initialize Counter
number = 0
# Initialize sp Array
sp = []
# Run Through Each Skill
@actor.skills.each {|skill_id| sp << $data_skills[skill_id].sp_cost}
# If at least one member is in critical condition
if $game_party.critical?
# If knows at least one healing skill that can be used
@actor.skills.each do |skill_id|
# If skill is healing and can use the skill
if $data_skills[skill_id].is_healing? && @actor.skill_can_use?(skill_id)
# Heavy influence for magic
@action_magic = 20
# Break
break
end
end
end
# If Sp is less than the minimum then fail
@action_magic = 0 if @actor.sp < sp.min
end
I know nothing about scripting but I theorize that it's failing because for some reason actor.sp is exploding. Hopefully someone around here will be able to suggest what's going on. I can post the entire Game_AllyAi, or the demo RPG, if needed.
I'm not using any other custom script systems of any kind. So, I'm using the default battle system and all. To install it, since there was no installation instructions, I just copied and pasted it + the SDK exactly as arranged in the demo RPG into my own RPG.
/Edit
Okay, I managed to fix the first error. It seems that if your dudes don't have skills then the Ai Ally implodes.
Now I've got a new error! Horray! And it also occurs just when the fight starts and dudes start doing stuff. Delightful.
Code:
#--------------------------------------------------------------------------
# * Make Item Choice
#--------------------------------------------------------------------------
def make_item_choice
# Get Item Id
item_id = @useable[rand(@useable.size)]
# Set Random Item
@actor.current_action.item_id = item_id
# If not Targets All
if not $data_items[item_id].targets_all?
# Make Target Choice
make_item_target_choice
end
end
I suspect this is exploding because I don't have any offensive attack items. (Nor do I really want to have them at this point in the RPG... especially a huge amount to prevent the AI from crashing...).
I'm gonna try setting their item usage to 0.
/edit
That didn't work. Still exploding.
Okay I seriously can't get it to stop crashing. I hope someone here is a bit fluent with this.