Help with odd skill system

Mr_Saltine

Warper
Member
Joined
Sep 26, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
I am trying to make a skill/magic system similar in function to the "Mana Eggs" from Grandia 2. My version are crystals. for example, equipping the Fire Crystal will only let you see, learn, and use Fire spells. if you unequip the fire crystal, the spells go with it. i can set the crystals to just have all the spells on it, but i want a player to have to buy the spells with job points. I believe the <Learn Show Eval> notetag is what i'm looking for, but i have next to nothing in javascript experience. Just from running around the internet, this is what i've come up with.

<Learn Show Eval>
if(!this._actor.isAtypeEquipped(ID)) value = false;
else value = true;
</Learn Show Eval>

i'm unsure if this is even right though.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
1.) It not only matters if the notetag contents are correct, but what type of data you put the formula on. Are you writing this notetag on the item or the skill?

2.) I assume that this <Learn Show Eval> is coming from a plugin? Can you provide a link to that plugin so that people can read the instructions without having to hunt for it?
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
OK so the plugin description reads:
For using a custom code to hide or show the skill, you can use these notetags. Returning value as true will cause the skill to appear regardless of all other requirements being unmet
You're on the right track, so you want to check if the user has a certain item equipped. What type of data is the user specifically? In this case, it's an actor.
You can go here to see what kind of methods are available to use on an actor - see any methods that check whether an item is Equipped or not?

Try to see if you can find it, before checking the spoiler.
This is assuming that the "gem" is an armor, since you didn't say what type of item it was.
Code:
<Learn Show Eval>
var gem = $dataArmors[X];
if (user.isEquipped(gem)) {
    value = true;
} else {
    value = false;
}
</Learn Show Eval>
 

Mr_Saltine

Warper
Member
Joined
Sep 26, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
OK so the plugin description reads:


You're on the right track, so you want to check if the user has a certain item equipped. What type of data is the user specifically? In this case, it's an actor.
You can go here to see what kind of methods are available to use on an actor - see any methods that check whether an item is Equipped or not?

Try to see if you can find it, before checking the spoiler.
This is assuming that the "gem" is an armor, since you didn't say what type of item it was.
Code:
<Learn Show Eval>
var gem = $dataArmors[X];
if (user.isEquipped(gem)) {
    value = true;
} else {
    value = false;
}
</Learn Show Eval>

i actually got my answer in a steam community discussion. Thank you for replying though.

Here is the link to that, if anyone else wishes to do the same kind of system i'm doing.
https://steamcommunity.com/app/363890/discussions/1/1734340257881603497/
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
Fair enough, looks to be an equivalent solution.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top