Author Topic: [Resolved] [RMXP] Alternate Attack Algorithms Not Working in Blizz ABS  (Read 109 times)

Offline CriticalHit

  • Trained Member
  • *
  • Posts: 15
  • LV: 0
    • View Profile
Hi,

I was looking for a way that weapons like guns do not rely on strength for damage. I'd prefer the stat that influences damage in this case to be dexterity or just a plain flat number for damage. However, I'd still like melee weapons to use strength for damage.

A promising script for this is the Alternate Attack Algorithms found here. The problem is that I get an error when using it with Blizz ABS. This error

"
Script 'Alternate Attack Algorithms' line 181: NoMethodError occurred. Undefined method '*' for nil:NilClass"

I am quite confused what this error means. Having a system like this script will be a huge help in all my projects I have planned so it would be a great help if this could work with Blizz ABS.
I'm planning to modify it to make certain weapons do damage based on dexterity and no stat (straight weapon power).

Let me know how I can make it work or other ways to make it so weapons can do damage based on a weapon's type like mentioned above.
Thanks in advance.
« Last Edit: May 15, 2017, 09:13:05 PM by CriticalHit »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2970
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [RMXP] Alternate Attack Algorithms Not Working in Blizz ABS
« Reply #1 on: May 15, 2017, 08:18:52 PM »
It says in the script instructions:
Code: [Select]
# Also place all weapons ID except SP damaging and absorbing ones, into the
# "ALL_WEAPONS_IDS", because if you don't, a nasty bug will prevent you from
# dealing damage with normal attack. Cool, huh ?
The line the error code is pointing to is
Code: [Select]
self.damage *= elements_correct(attacker.element_set)The error is saying the variable or method damage is currently equal to nil. The class NilClass has no defined method for the * operator.

The reason damage is nil is because you didn't configure the script correctly, as indicated above.



(click to show/hide)
NNID: KK20-CP

Offline CriticalHit

  • Trained Member
  • *
  • Posts: 15
  • LV: 0
    • View Profile
Re: [RMXP] Alternate Attack Algorithms Not Working in Blizz ABS
« Reply #2 on: May 15, 2017, 09:07:06 PM »
Thank you! I wasn't sure what that weird bug was that was mentioned in the script. I have it working and was able to add a section for dexterity based attacks.