Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Help with Computer controlled actors and AIBC
#1
Hi there,

First off: Lovely forum you have here. The scripts and threads have inspired me to start my RPG maker hobby again.

Now for the reason I'm posting here. I've been putting together the scripts I want for my project, but I've run into a problem I can't seem to fix on my own.
I want to make use of 1 computer controlled ally. Found and tried to use two different scripts for that: Trickster's Ally AI and Claihm's Automatic Battle Actions.
They both work fine when using the normal ''Attack'', but as soon as the computer controlled char tries to use a skill I get a ''NoMethodError'' undefined method for 'skills' for nil:NilClass.
The script and line it refers to is part of the Advanced Individual Battle Commands by Trickster. (AIBC)

The part the system (error) reffers me to: (this is part of the Class Modification script from AIBC, full script listed bellow)

Code:
#--------------------------------------------------------------------------
  # * Skill Can Use?
  #--------------------------------------------------------------------------
  alias_method :trick_aibc_actor_skill_can_use?, :skill_can_use?
  def skill_can_use?(skill_id)
    # Get Flags
    flag, flag2 = trick_aibc_actor_skill_can_use?(skill_id), false
    # If in Scene_Battle
    if $game_temp.in_battle
      # If the Skills Parameter has been used
      flag2 = !self.current_action.command.skills.empty?    <<<<<< This line comes up in the error
      # If the Skill Id Parameter equals the skill id sent
      flag2 ||= self.current_action.command.skill_id == skill_id
      # call Game_Battler skill_can_use?
      flag2 &&= super
    end
    # Return flag
    return flag || flag2
  end

I realise the problem comes from the AIBC script rewriting the way my Battle commands work. As I get the same error when using either Claimh'sor Trickster's script for computer controlled allies.

As I have very little script experience, I'd like to know if there is a solution to this while using the AIBC script, or if I should accept this as a compatibility issue and give up on using this combination of scripts. If it's the latter, does anyone have a suggestion to make use of a computer controlled ally script/event together with costumized Battle Commands? The comp contr. char only has to be able to use attack and 1 or 2 regular skills every now and then.


Not really sure which codes to link here for people to look at. I'll just paste the onesI think are relevant. I would preffer getting Claihm's system to work. Listed at bottom.
Sorry if I went overkill on information, thought I'd be as thorough is I could. Thank you! Very cheery

Advanced Individual Battle Commands
setup:
Content Hidden

Data structure
Content Hidden

Windows:
Content Hidden

Class Modification: (part where the error occurs)
Content Hidden

Load and Save
Content Hidden

Automatic Battle Actions by Claimh

Content Hidden
Reply }


Messages In This Thread
Help with Computer controlled actors and AIBC - by ZeroSum - 07-06-2013, 01:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Actors & enemies without Morale Bennerdeben 4 1,329 07-15-2023, 06:21 PM
Last Post: Bennerdeben
   Possible to move battle actors when escaping? NewHope 8 12,405 07-27-2012, 06:14 AM
Last Post: NewHope
   Getting actors name? PK8 0 3,713 07-13-2009, 06:35 PM
Last Post: PK8



Users browsing this thread: