DeepSix

Villager
Member
Joined
Dec 30, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
Hi guys, I'm using Yanfly's learn skill engine v1. There are ways to set requirements for skills to be learned, but I want to have a minimum parameter value requirement.


There's this:

# <learn require eval>
#  string
#  string
# </learn require eval>



But I don't know anything about coding. How do I check the value of an actor's specific parameter? (Eg ATK, DEF)


Thanks
 

Sixth

Regular
Regular
Joined
Jul 4, 2014
Messages
2,207
Reaction score
877
First Language
Hungarian
Primarily Uses
RMVXA
<learn require eval>
@actor.param(id) >= value
<\learn require eval>


Replace id with the ID of the parameter you want to check for.


0 = HP, 1 = MP, 2 = ATK, and so on.


Replace value with the requirement value from that stat. If the actor got less than that from that parameter, the skill will be locked.


If you want multiple parameter requirements:


<learn require eval>
@actor.param(id) >= value &&;
@actor.param(id) >= value &&;
# And so on here...
@actor.param(id) >= value
<\learn require eval>


Note the semi-colons and the && signs at the end!


Those are needed if you want to check for something else.


The last check should NOT have those signs at the end!


Ohh, and keep in mind that this will include the parameter values gained from equipment and states as well!


For some odd reason, the default engine got no method to get the parameter values without those stats. >.>
 
Last edited by a moderator:

DeepSix

Villager
Member
Joined
Dec 30, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
Thanks very much Sixth, appreciate it.


EDIT: I get this error-

error.png
 
Last edited by a moderator:

Sixth

Regular
Regular
Joined
Jul 4, 2014
Messages
2,207
Reaction score
877
First Language
Hungarian
Primarily Uses
RMVXA
You must put the <learn require eval> and <\learn require eval> lines in new lines, they can't be on the same line as the actual requirement text(s).
 

DeepSix

Villager
Member
Joined
Dec 30, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
I did, it looks like this in the skill note tag box:

 <learn require eval>


@actor.param(2) >= 8


<\learn require eval>
 

Sixth

Regular
Regular
Joined
Jul 4, 2014
Messages
2,207
Reaction score
877
First Language
Hungarian
Primarily Uses
RMVXA
Ohh, sorry, my bad! *-*


If you copied my example, than that is the problem.


I wrote these examples from my memory, and that tends to mess up the little details often, unfortunately.


The \ sign in the last line should be a / sign actually, so if you change that, it should work.
 
Last edited by a moderator:

DeepSix

Villager
Member
Joined
Dec 30, 2013
Messages
10
Reaction score
0
First Language
English
Primarily Uses
Oh haha, that works, thanks so much for your help Sixth!
 

Latest Threads

Latest Profile Posts

"Do this task for me, and you will be allowed to eat your weight in gold as a reward".
Hmm. Like. I do art things. But, every time I try to make a logo I keep thinking about how awesome it would be if I was not doing it. That may go into the outsource pile. :kaothx:
I put lights up in my living room! And, a stego with hats ^-^
20231130_131859.jpg
Yo, anybody seen this yet?
At what stage are you?

87shj5.jpg

Forum statistics

Threads
136,629
Messages
1,268,143
Members
180,306
Latest member
BTM
Top