Learn Skill from Equipment

● ARCHIVED · READ-ONLY
Started by Fomar0153 127 posts Page 1 of 7 View original ↗
  1. Equipment Skill System
    Version 1.1
    by Fomar0153

    Description
    Allows you to learn skills from your equipment.
    Please note this plugin requires an AP system.
    Click here for my AP System.

    Features
    With this plugin you can pernamently learn skills from your equipment.

    Screenshots
    7HQTTu4.png

    How to Use
    Place the plugin in your project's js/plugins/ folder.
    Inside RPG Maker MZ's editor, open the Plugin Manager.
    Create a new entry and select this plugin from the list.
    Please note that in order to work this plugin must be placed below the AP System in the plugin list.
    Customise the options to your liking and then click ok.
    Skills that you wish to be learnable from equipment must be notetagged with: <ap: n> where n is the AP to learn.
    To add the skills to the equipment you can either add them via traits which will let the players use the skills prior to being mastered, like Final Fantasy IX.
    Or you can add them via notetags: <skills: x;y;z>
    Seperate the skill ids with a semicolon, there is only room on the menu to display 3 skills.
    If you want a piece of equipment to teach a skill faster than that the normal rate then do: skillid:learnrate e.g. <skills: x:2;y;z>

    Download
    Click here.

    FAQ
    Q: My skills don't gain the AP displayed in battle.
    A: Please double check you have this plugin below the AP System in your plugin manager.

    Credits
    Fomar0153

    Terms of Use
    As long as I am credited, you may use this plugin in your projects both commercial and non-commercial.

    Version History
    1.0 -> 1.1 - 29/08/20
    New feature added: You can now restrict who can learn which skills from equipment.
  2. I didn't expect a plugin like this for quite a while yet and you did it almost immediately. Thank you so much for this Fomar!
  3. I have a little request for next release:
    Could you make option in plugin configuration to move X/Y offset of bar/text in equip status file? I am using Visustella additional stats, and text is overwritten with your script. I think that option could be also helpful with other custom menus.
    Image
    Bez tytułu.png

    Also, thanks for quick patch to your Passive Skills script. Im grateful for all the good work you do for community, and good luck with all your projects!
  4. If you open my plugin and find these lines (148-150):
    JavaScript:
            this.drawGauge(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, (this._actor._ap[skills[i].id] / skills[i].meta["ap"]));
            this.drawMinMaxValue(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills[i], mults[skills[i].id]);
            this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
    And change it to:
    JavaScript:
            this.drawGauge(4, this.lineHeight() * (11.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, (this._actor._ap[skills[i].id] / skills[i].meta["ap"]));
            this.drawMinMaxValue(4, this.lineHeight() * (11.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills[i], mults[skills[i].id]);
            this.drawItemName(skills[i], 4, this.lineHeight() * (10.5 + 1.5 * i));
    Then that should work. You might find 3 skills don't fit and have to stick to 2 skills on each piece though.

    Hope that helps.
  5. Fomar0153 said:
    If you open my plugin and find these lines (148-150):
    JavaScript:
            this.drawGauge(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, (this._actor._ap[skills[i].id] / skills[i].meta["ap"]));
            this.drawMinMaxValue(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills[i], mults[skills[i].id]);
            this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
    And change it to:
    JavaScript:
            this.drawGauge(4, this.lineHeight() * (11.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, (this._actor._ap[skills[i].id] / skills[i].meta["ap"]));
            this.drawMinMaxValue(4, this.lineHeight() * (11.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills[i], mults[skills[i].id]);
            this.drawItemName(skills[i], 4, this.lineHeight() * (10.5 + 1.5 * i));
    Then that should work. You might find 3 skills don't fit and have to stick to 2 skills on each piece though.

    Hope that helps.
    Okay thanks, solved it :)

    EDIT: I thought of something, which part of the code is for y position? I might disable some Equip slots instead, then 3 skills would fit this.
  6. Swish said:
    EDIT: I thought of something, which part of the code is for y position? I might disable some Equip slots instead, then 3 skills would fit this.

    The numbers that changed:
    8.5 -> 11.5
    7.5 -> 10.5
    Are the bit of the y that you'll want to change.
  7. Fomar0153 said:
    The numbers that changed:
    8.5 -> 11.5
    7.5 -> 10.5
    Are the bit of the y that you'll want to change.
    Argh wrote y, and thought about x (or is there code for sub-window? so Your text appears below equipment slots, instead of parameters)
  8. Swish said:
    Argh wrote y, and thought about x (or is there code for sub-window? so Your text appears below equipment slots, instead of parameters)
    Really sorry but it's not as simple as changing the x-cordinate. You'd need to move the drawing code to the other window and then have it refresh when you change the index.
  9. Fomar0153 said:
    Really sorry but it's not as simple as changing the x-cordinate. You'd need to move the drawing code to the other window and then have it refresh when you change the index.
    Oh I see. I'll remove one of visustella Attributes then, to fit all my needs. Thanks for help and little info about javascripting.
  10. Quick question, is there a way that I can limit what players can learn skills? Much like FF9, I wanted my mages to learn magic, but some equipment may teach abilities to other classes as well. I believe in the one I was using for MV (Moogle_X i believe) was able to have you limit that via a note tag for the actor or class, showing what abilities could be learned. Thanks for the plugins!
  11. TheSoulBlade said:
    Quick question, is there a way that I can limit what players can learn skills? Much like FF9, I wanted my mages to learn magic, but some equipment may teach abilities to other classes as well. I believe in the one I was using for MV (Moogle_X i believe) was able to have you limit that via a note tag for the actor or class, showing what abilities could be learned. Thanks for the plugins!

    Also to add to this, I'm getting an error after setting it up. I did everything that the plugin said in terms of tags, as well as ensuring that the AP plugin is above this one and I'm getting this error;
  12. TheSoulBlade said:
    Quick question, is there a way that I can limit what players can learn skills? Much like FF9, I wanted my mages to learn magic, but some equipment may teach abilities to other classes as well. I believe in the one I was using for MV (Moogle_X i believe) was able to have you limit that via a note tag for the actor or class, showing what abilities could be learned. Thanks for the plugins!

    I guess I could add that feature. I'll look into it tomorrow.

    TheSoulBlade said:
    Also to add to this, I'm getting an error after setting it up. I did everything that the plugin said in terms of tags, as well as ensuring that the AP plugin is above this one and I'm getting this error;

    You haven't changed the plugin name have you?
  13. Not sure if this has been asked or requested, but is there a way to make the skill names appear as "????" until they are learned? I think it would be neat to hide information like that from the player, gives them a bit more incentive to find out what it is!

    Ok I took a shot at adding it myself just from looking at the code, no idea if it even works but I'll test it when I get home:
    JavaScript:
    Fomar.EquipmentSkills.hidden = (Fomar.EquipmentSkills.parameters["Hide Skills before Learning"] == "false")
    
    ...
    
    this.drawMinMaxValue(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills[i], mults[skills[i].id]);
    if (Fomar.EquipmentSkills.hidden == "false")
    {
        this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
    }
    else
    {
        if (this._ap[skillId] != $dataSkills[skillId].meta["ap"])
            {
                this.drawItemName("????", 4, this.lineHeight() * (7.5 + 1.5 * i));
            }
        else
            {
                this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
            }
    }
    Any additions or modifications to code provided by me within this thread automatically become intellectual property of Fomar0153.
  14. Fomar0153 said:
    I guess I could add that feature. I'll look into it tomorrow.



    You haven't changed the plugin name have you?

    Thanks for looking into adding that! It would be a great help, and i belueve the name is "Fomar0153_EquipmentSkills.js"

    When i clicked the "click here" for download it didnt take me to a download, it just showed me the script, so i right clicked and downloaded the link. Idk if that has anything to do with it or not. I did the same with the APsystem.
  15. TheSoulBlade said:
    Thanks for looking into adding that! It would be a great help, and i belueve the name is "Fomar0153_EquipmentSkills.js"

    When i clicked the "click here" for download it didnt take me to a download, it just showed me the script, so i right clicked and downloaded the link. Idk if that has anything to do with it or not. I did the same with the APsystem.

    No it's named correctly, I just wanted to check that first - it seems to be the most common form of error people come to me with). If you upload a copy of your data and js folders, I'll take a look and see why you're getting that error.
  16. Fomar0153 said:
    No it's named correctly, I just wanted to check that first - it seems to be the most common form of error people come to me with). If you upload a copy of your data and js folders, I'll take a look and see why you're getting that error.

    Thank you, currently at work but i will do that when i get home. Appreciate all your help!
  17. Good Job on the plugin, also looking forward to limiting skills to certain actors like ff9 :smile:
  18. Fomar0153 said:
    No it's named correctly, I just wanted to check that first - it seems to be the most common form of error people come to me with). If you upload a copy of your data and js folders, I'll take a look and see why you're getting that error.

    So I just got home, and I checked my files, when I saved this plugin, apparently I deleted part of the name. It's working properly now though!
  19. HoofedEar said:
    Not sure if this has been asked or requested, but is there a way to make the skill names appear as "????" until they are learned? I think it would be neat to hide information like that from the player, gives them a bit more incentive to find out what it is!

    Ok I took a shot at adding it myself just from looking at the code, no idea if it even works but I'll test it when I get home:
    JavaScript:
    Fomar.EquipmentSkills.hidden = (Fomar.EquipmentSkills.parameters["Hide Skills before Learning"] == "false")
    
    ...
    
    this.drawMinMaxValue(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills[i], mults[skills[i].id]);
    if (Fomar.EquipmentSkills.hidden == "false")
    {
        this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
    }
    else
    {
        if (this._ap[skillId] != $dataSkills[skillId].meta["ap"])
            {
                this.drawItemName("????", 4, this.lineHeight() * (7.5 + 1.5 * i));
            }
        else
            {
                this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
            }
    }
    Any additions or modifications to code provided by me within this thread automatically become intellectual property of Fomar0153.

    Did this end up working? Also where do you add it into the script? Just at the end?
  20. TheSoulBlade said:
    Did this end up working? Also where do you add it into the script? Just at the end?
    When I tested it out, I tried doing the note tag method of assigning skills to the items, and I was having some trouble because it kept throwing an error that it doesn't recognize the skill ID's

    For instance, I typed "<skills: 12;13;14>" into the note section and I would get a skill ID error. I made sure that the skill itself was set up with the <ap: 10> tag as well. I'll have to do some testing once I get home, I'm at work at the moment so I can't check here sadly.

    As for where the code goes, the Fomar.EquipmentSkills part goes near the top with the others, and the second part of the code, it goes beneath the line I included "this.drawMinMaxValue(4....)". If you do Ctrl+F and paste that line in, put the If-else part right beneath it