Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: CriticalHit on May 15, 2017, 12:42:59 pm

Title: [Resolved] [RMXP] Alternate Attack Algorithms Not Working in Blizz ABS
Post by: CriticalHit on May 15, 2017, 12:42:59 pm
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.
Title: Re: [RMXP] Alternate Attack Algorithms Not Working in Blizz ABS
Post by: KK20 on May 15, 2017, 02:18:52 pm
It says in the script instructions:

# 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
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.
Title: Re: [RMXP] Alternate Attack Algorithms Not Working in Blizz ABS
Post by: CriticalHit on May 15, 2017, 03: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.