Learning a Skill from an Item

● ARCHIVED · READ-ONLY
Started by Caner 8 posts View original ↗
  1. Hello,

    This is a rather complicated task for me as I am not that good at js and I tend to do things the hard way.

    I’m developing a game in which the party collects stone tablets. Party members can learn skills by using these tablets. That is easy but...

    I would like a member to be able to learn the skill if s/he is the required level or class.

    e.g. Connor finds the tablet Stun. He can learn the Stun skill by using the tablet. Stun skill is a level 4 skill. Conner is level 4. So I can use tablet on Connor and he can learn the skill.

    However, there is another party member, Leon. Leon is level 2. When I want to use the tablet on Leon, he cannot learn the skill and I would like to see a message that says “Leon needs to be Level 4 to learn Stun.”

    How do I use variables or conditionals on items. I did it some way using a common event but then I cannot the specify the actor.

    Can you help me?
  2. 'Game Mechanics Design' is for looking at aspects of gameplay at a more conceptual level. "How do I...?" (implementation) questions go in the Support forum for the engine you are using.

    [move]RPGMaker MV[/move]

    First you have to identify who the target for the item is.
    Make the item place a "target state" on the actor using it and then call a common event.
    In the common event, use conditional branches to check which actor has the "target state" to identify the item user. In the case of the wrong user that might be "show text: you can't use this".
    Within the Connor branch of the conditional, have another one which checks his level is 4 or above. If it is, he learns the skill, if it's not, some text e.g. you are not experienced enough to handle this.
  3. 2.Do this in the item screen:

    Screenshot (12).png


    Do this in the Common Event:

    Screenshot (35).png

    And for the Variable:

    Screenshot (31).png

    and in the text message replace \n[1] with \n[x] where x is the actor id, of the actor you're checking.

    3. Some Cavets about doing this like this.
    1. For every actor in the database you must do this for. If they will not be able to be affected by this system/item then do this:Screenshot (37).png
    2. You are either going to have a very, very, very, very long common event or you're going to have a lot of common events, depending on whether you make 1 event per item or place it all in one common. Also the amount of skills you have is going to determine the amount of these you do
  4. Wow, thank you for the detailed descriptions.

    @Zarsla I exactly did what you did and it was a really, really long common event with effects and everything. I was happy with it but it is a little counter-intuitive as it still checks if the first actor has the skill or not even though I use the item on the second actor. Do you think there is a script that goes like this?

    IF Item#1 used on Actor#1
    do this do that
    IF Item #1 used on Actor#2
    do this do that

    What do you think?
  5. Well right now, your other alternative is to use plugins.However you won't have a message shown when you use the items.
    If you go the plugin route:
    YEP Core Engine
    YEP Item Core
    YEP Item Requirements
    YEP Skill Core

    Set the item up to add a new state.

    In the item notetag:
    <After Eval>
    target.removeState(x);
    target.learnSkill(y);
    </After Eval>
    <Custom Enable Requirement>
    condition = target.level >= z;
    </Custom Enable Requirement>

    Where x is the state id, y is the skill id, and z is the lowest level you can be to use this item.
  6. Thank you very much. I will be trying all the options right now. Will get back to you with the results!
  7. IT WORKED! Thank you very much. Works like a charm!
    Though I had to have a very long common event, it doesn't matter as I need all those effects and messages.

    Cheers!
  8. You don't really need the common event anymore. However I'm happy it work.