Undefined Method 'subject' when using recovery skill in menu

orphen89

Experimenter
Member
Joined
Aug 24, 2013
Messages
25
Reaction score
4
First Language
English
Primarily Uses
Hello,

I'm using the following script:
https://alistairengine.wordpress.com/2015/07/18/critical-hit/

Everything is working normally fine, except for when I use a recovery skill in the skill menu outside of battle. I receive the following message:
upload_2019-5-19_4-18-14.png

This happens when I use a recovery skill with a damage formula (i.e., see image)
upload_2019-5-19_4-20-52.png

However, if I set the skill to have the effect (not using damage formula, ie HP Recover 500) to heal an specific amount of HP, it appears to work fine, but not what I intend. Other skills, including this one, with a damage formula work fine in battle, just get this error outside of battle.

I've tried using the script in a new project by itself and get the same error using a new game under the same circumstances.

It is strange as I understand these NoMethodError/undefined method appear to be for skills that may be in an old save or something, but this isn't the case. Skill was there in new game.

Any ideas or help?

Thank you.
 

Attachments

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,138
Reaction score
5,750
First Language
Indonesian
Primarily Uses
RMVXA
The script looks like was written with the skills are only used in battle in mind, and with YEA Battle Engine installed (probably wont work either if no battle engine, but idk).

That said, this haven't been tested, but I probably could make a "workaround", so make the "subject" is not undefined.
Put this somewhere in your script list, see if it does the job
Code:
class Scene_Skill
  alias :subject :user
end
 

orphen89

Experimenter
Member
Joined
Aug 24, 2013
Messages
25
Reaction score
4
First Language
English
Primarily Uses
You are right, script appears to be an addon for YEA Ace Battle Engine and doesn't work stand-alone.

But... your snippet is working and fixed the problem! Thank you so much for your help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Am I allowed to make a recruitment thread NOT for RPG Maker stuff?

Like for a group project?
(NOT RPG Maker project.)
If the new RPG Maker's character generator produces full busts and can match the art styles of previous RPG Makers, that might be a big incentive to buy it. An easier way to craft custom map tile sheets though would probably be an even bigger game changer.
Note to self: One lemon is enough to flavor my drink.
'I'm not homophobic, I'm not scared of me house.' - Peter Kay xD
When did anything under your mid-twenties become the new 10 years old? At least try to act like your old enough to sign a lease.

Forum statistics

Threads
98,191
Messages
950,241
Members
129,491
Latest member
Solar_Flare
Top