Help with using Hime's Learn Condition Formulas?

Hello, I am usine Hime's Learn Condition Formulas and am confused with how to use it. I have the core script in the correct place and I've used previous scripts that use notetags before. When I was originally writing it I assumed I would put in a notetag in the skill notes. For example, the basic fire spell needed a user to be at least level 1, have magic power at least at 36, and it will be forgotten once the upgrade spel l is learned:

<req condition: a.level >= 1 />
<req condition: a.mat >= 36 />
<forget condition: a.skill_learn?($data_skills[007] />

Here is the upgrade spell which requires at least a level of 13 and a magic power of 116:

<req condition: a.level >= 13 />
<req condition: a.mat >= 116 />
<req condition: a.skill_learn?($data_skills[006]) />
<forget condition: a.skill_learn?($data_skills[008] />

However it doesn't work. The character's magic attack is much too low to even learn the first level spell but still learns it irregardless. I knew I was doing something wrong so I reread Hime's script and saw this:

To specify a required condition, use this note-tag in the Class Learning object.

I haven't had to work on something like this so I am confused. How does this work? Where would I be writing this? I feel like I am very close to getting this worked out but need a bit of clarification. Thanks in advanced.
Update: I realize where to put it, I misunderstood how this works and overlooked the class skill note. I fixed that and it works now. I might try to make a modification of the script so the requirements are part of the skill class and thus universal to all characters.
Moved to: RGSSx Script Support
The class learnings are the skills all heroes belonging to the same class will ever learn. It was always intended to work by leaving the comment on the Class Note box.

Could there be some extra places that could also allow heroes to learn skills?
Yeah, but the script ignores them. One good place could have been the Actor's note box, but then it'd only work for that specific actor. That's not Hime's original intention at all so he never included that option.
The class learnings are the skills all heroes belonging to the same class will ever learn. It was always intended to work by leaving the comment on the Class Note box.

Could there be some extra places that could also allow heroes to learn skills?
Yeah, but the script ignores them. One good place could have been the Actor's note box, but then it'd only work for that specific actor. That's not Hime's original intention at all so he never included that option.
I realized my project works a bit differently and skills have universal values that apply to any class which learns it. I realize the scripts Hime made is very close to what I want I might just have to make modifications to the script so that the notetags are in the skill notes instead. I don't believe that will be too difficult. Thanks so much for the clarification however.
I realized my project works a bit differently and skills have universal values that apply to any class which learns it. I realize the scripts Hime made is very close to what I want I might just have to make modifications to the script so that the notetags are in the skill notes instead. I don't believe that will be too difficult. Thanks so much for the clarification however.
Be careful then. You might accomplish most of your goals by making it read the skill notebox except for 1 thing AFAIK. That would be the skills already learned. I mean, if the current skill is being added and it has a condition that deletes the previous skill, like number 10, then it will work. BUT it won't work if you expect the old skill's notetag to do it for you. This happens mainly because it's not being read at that moment. XD (There's an kind of easy way to deal with it, but I think that it's better to do it based on the newly learned skill instead.)
Be careful then. You might accomplish most of your goals by making it read the skill notebox except for 1 thing AFAIK. That would be the skills already learned. I mean, if the current skill is being added and it has a condition that deletes the previous skill, like number 10, then it will work. BUT it won't work if you expect the old skill's notetag to do it for you. This happens mainly because it's not being read at that moment. XD (There's an kind of easy way to deal with it, but I think that it's better to do it based on the newly learned skill instead.)
Originally I was going to use Hime's other script Learn and Replace but had an error about the stack being too deep or something. If that can be fixed I should be good.

Edit: Fixed that. Realized I was not naming the scripts right so the stack error was a result of having two of the same scripts.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-using-himes-learn-condition-formulas.157962/