Show Changed Skills in Equipment Screen

● ARCHIVED · READ-ONLY
Started by Seacliff 13 posts View original ↗
  1. In RPG Maker, you are able to have equipment contain skills the actors can be used when equipped. However, there is no way to know what skills a piece of equipment contains until it's equipped.

    I'm also using a bit of custom code to have some randomization for skills equipment can contain, so I can't just use the description to list them.

    Does anyone know of a way to show what skills a piece of equipment contains on the Equipment screen?

    Edit: Formar has created something similar for Ace. Here's an example of what I want visually, but without the mastery aspect.
    SS0002.png
  2. Getting skills from equipment is not a feature built into RPG Maker so you should find out which plugin you're using before anyone can help you with this.
  3. armornick said:
    Getting skills from equipment is not a feature built into RPG Maker so you should find out which plugin you're using before anyone can help you with this.
    Except it is a built-in feature?
    Go to Features and Traits -> Add Skill.
  4. Oh, I never knew.
    From what I could find in the code, it has something to do with the traits field in $dataWeapons, and you need the traits with type 43 which is Game_Action.EFFECT_LEARN_SKILL. And from what I see in Game_Action, the field that contains the skill id is dataId.
    After that, it's just a matter of drawing the text in the right place. I don't have time at the moment, though.
  5. If you use this
    http://yanfly.moe/2015/10/10/yep-2-message-core/

    You can draw an icon in the equipment piece description and then colour it a different colour and label it as the certain skills.

    While a plugin to do this would still be useful, Yanfly's Message Core plugin is a possible alternative.
  6. If it was that easy, I would have done that. However, as I stated in the post:
    Seacliff said:
    I'm also using a bit of custom code to have some randomization for skills equipment can contain, so I can't just use the description to list them.
    The code in question is
    item.traits.push({"code":43,"dataId":/Skill ID/,"value":0})
    which should have the same properties as adding the skills in the traits menu. The reason I did that is so I could do something like this with Yanfly's Equip Core.

    var skill = Math.randomInt(100);
    if (skill > 50) {
    item.traits.push({"code":43,"dataId":33,"value":0})
    } else {
    item.traits.push({"code":43,"dataId":46,"value":0})
    }

    All I need to do is to find a way to call back that information. If I could, Message Core might be an alternative.
  7. If your equip will always handle added skills via that line, then you could just iterate thru the traits array of that item and get the trait that has the code #43. Of course assuming message core lets you use actual JS codes as text

    BTW have you tried if the skill added thru that code stays after saving, closing the game, then loading? And what happens if you reequip that equipment a lot of times?

    Im asking this because iirc, the items arent saved with the save file but are loaded from the database every time the game is launched so changes to it might not stay after closing the game. And using Equip Core, I think the code runs everytime the equip is equipped so it might also cause you to get both traits eventually if you equip and unequip repeatedly (since you dont remove the pushed trait upon unequip)
  8. Alright, I've messed about a bit and this is what I've come up with:

    Show Code


    It takes the traits from the actor so whether it works with your modifications depends on when you add them.
    If it doesn't work, feel free to tell me more about when and where you modify the item.
  9. Engr. Adiktuzmiko said:
    BTW have you tried if the skill added thru that code stays after saving, closing the game, then loading? And what happens if you reequip that equipment a lot of times?
    They do save. The code only runs once when the item is created.
    Here are the details of the lunatic eval: http://yanfly.moe/2016/03/31/plugin-updates-142/
    I believe it's based on the same concept as his Item upgrade slots plugin, but it's applied when you get new equipment.

    @armornick I placed the plugin in a blanch project and created an armor with the 'Add Skill' trait, but it doesn't show the details on the equipment screen.
  10. Ahh its for the independent items. I see, then thats good. You said equip core so I thought its the code for when equipping items, but based on your link its actually for Item Core. :)
  11. Seacliff said:
    @armornick I placed the plugin in a blanch project and created an armor with the 'Add Skill' trait, but it doesn't show the details on the equipment screen.

    That's strange. I tried it and it works. Did you use any other plugins?
  12. armornick said:
    That's strange. I tried it and it works. Did you use any other plugins?
    Okay. It wasn't what I thought of immediately, but it's because I wasn't running on version 1.6.1

    The plugin works great. Thanks a lot!
  13. [closed]IgnoreMe[/closed]