Learn Skill from Equipment

● ARCHIVED · READ-ONLY
Started by Fomar0153 127 posts Page 2 of 7 View original ↗
  1. Did you add the param in the comment block at the top to get it to appear in the plugin manager?

    Also:
    JavaScript:
    if (this._ap[skillId] != $dataSkills[skillId].meta["ap"])
    You need a parseInt() around the second half. You're trying to compare an integer with a string.

    HoofedEar said:
    Any additions or modifications to code provided by me within this thread automatically become intellectual property of Fomar0153.
    No they don't. If you share a modified section of my code then if someone was to use it they should credit both of us. If you share some code that builds on my existing code but doesn't use any of my existing code in it, then just you would be credited for that code.

    Sorry been busy, will try and get the only learn certain skill implemented soon.
  2. Fomar0153 said:
    No they don't. If you share a modified section of my code then if someone was to use it they should credit both of us. If you share some code that builds on my existing code but doesn't use any of my existing code in it, then just you would be credited for that code.

    Sorry been busy, will try and get the only learn certain skill implemented soon.
    That's mighty kind of you! That part that was basically me saying that I would willingly give any modifications to the code to you since this ultimately was your brainchild and it doesn't make sense (to me) to be credited for such a small contribution. I appreciate your kindness!

    I did add the comment section to the version I have at home, that's important for being able to toggle it.
    And good call on the parseInt! I'll give that a shot once I get home.

    No worries on being busy either! We all appreciate these useful plugins you've made! :)
  3. HoofedEar said:
    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

    Awesome, thanks. Update us here if you get it working
  4. New Version Available
    1.0 -> 1.1 - 29/08/20
    New feature added: You can now restrict who can learn which skills from equipment.

    If you are using the Restrict Learning option use the following notetag on either the Actor or Class tab of the database.
    <skillsrestrict: n1,n2,n3>
    Replace n1,n2,n3 with the skill ids from the database of the skills want that actor or class to learn. Seperate ids with a comma.
  5. Is there a way to set ap gained by enemy?
  6. I'm guessing you didn't see the bit about needing an AP System?

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

    Once added, notetag the enemies:
    <ap: 5>
    or whatever number you'd like.
  7. just tried it but for some reason, it's not working, turned off all other plugins except the two and ap wasn't being gained from the notetag setting, the default from the param is what is being gained.
  8. Just to check, the AP System should be above the Equipment Skills and the two plugins have their original names?
    Fomar0153_APSystem.js
    Fomar0153_EquipmentSkills.js
  9. Yes and yes, saved the file names exactly and ap is above equipment skills, i will try with a blank project to make sure its not something else.
  10. The notetag to gain AP works on a blank project, so I will have to figure out a workaround.
  11. TheSoulBlade said:
    Awesome, thanks. Update us here if you get it working
    Alright so I got this working after some tweaking.
    Here are the code snippets and where to add them:
    This section should be added to the comments to allow for toggling. Be mindful of the formating based on the other params.
    JavaScript:
    *
    * @param Hide skills
    * @type boolean
    * @desc Do you want to hide skill names before they are learned?
    * @default false
    *

    Scroll down and add this line with the other parameters:
    JavaScript:
    Fomar.EquipmentSkills.hidden = (Fomar.EquipmentSkills.parameters["Hide Skills before Learning"] == "false")

    Next, Ctrl-F and find this line of code
    "this.drawMinMaxValue(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills, mults[skills.id]);"
    And put this right beneath it, erasing the line that was there before:

    JavaScript:
    if (Fomar.EquipmentSkills.hidden == "false")
            {
                this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
            }
            else
            {
                if (this._actor._ap[skills[i].id] != skills[i].meta["ap"])
                {
                    this.drawText("????", 4, this.lineHeight() * (7.5 + 1.5 * i));
                }
                else
                {
                    this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
                }
            }

    I didn't feel comfortable linking a modified version here so you gotta make the changes manually.
    Fomar, please feel free to add this to your original script you would like!
  12. HoofedEar said:
    Alright so I got this working after some tweaking.
    Here are the code snippets and where to add them:
    This section should be added to the comments to allow for toggling. Be mindful of the formating based on the other params.
    JavaScript:
    *
    * @param Hide skills
    * @type boolean
    * @desc Do you want to hide skill names before they are learned?
    * @default false
    *

    Scroll down and add this line with the other parameters:
    JavaScript:
    Fomar.EquipmentSkills.hidden = (Fomar.EquipmentSkills.parameters["Hide Skills before Learning"] == "false")

    Next, Ctrl-F and find this line of code
    "this.drawMinMaxValue(4, this.lineHeight() * (8.5 + 1.5 * i), this.itemLineRect(0).width, this.lineHeight() / 2, skills, mults[skills.id]);"
    And put this right beneath it, erasing the line that was there before:

    JavaScript:
    if (Fomar.EquipmentSkills.hidden == "false")
            {
                this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
            }
            else
            {
                if (this._actor._ap[skills[i].id] != skills[i].meta["ap"])
                {
                    this.drawText("????", 4, this.lineHeight() * (7.5 + 1.5 * i));
                }
                else
                {
                    this.drawItemName(skills[i], 4, this.lineHeight() * (7.5 + 1.5 * i));
                }
            }

    I didn't feel comfortable linking a modified version here so you gotta make the changes manually.
    Fomar, please feel free to add this to your original script you would like!

    So, I believe that I entered everything correctly. However, when I went to test the game out, I can see the "???" but it is overlapping with the skill name. Not sure if I did something wrong.
  13. TheSoulBlade said:
    So, I believe that I entered everything correctly. However, when I went to test the game out, I can see the "???" but it is overlapping with the skill name. Not sure if I did something wrong.
    Sorry for the confusing instructions :kaoswt2:

    Annotation 2020-09-01 062952.png
    Replace the highlighted line with my if-else code. This screenshot uses the new version of Fomar's plugin btw so this should still work
  14. HoofedEar said:
    Sorry for the confusing instructions :kaoswt2:

    View attachment 158879
    Replace the highlighted line with my if-else code. This screenshot uses the new version of Fomar's plugin btw so this should still work
    Not a problem at all! I appreciate your assistance and your instructions werent confusing, its just the first time ive manually added script in an actual plugin system and i am not proficient in it at all. Definitely wanting to get a better grasp on it!
  15. Hi. I am using VisuStella Victory Aftermath and I was wondering if there was some JS snippet or a way to get this plugin to work better with Victory Aftermath. Basically to get the "learned skills" to pop up with Victory Aftermath screen instead of the default text box after a battle. It would just look cleaner that way. Hopefully it can be done with just a JS snippet.
  16. Lovely work! I just wish I could get it to work with other Plugins.
    I use all of the Visustella Plugins (I'm not a coder in the slightest), and I'm struggling to even get the skills to appear in the equip menu.
  17. PixelMister said:
    Lovely work! I just wish I could get it to work with other Plugins.
    I use all of the Visustella Plugins (I'm not a coder in the slightest), and I'm struggling to even get the skills to appear in the equip menu.

    If I remember right you have to use a certain setting for the VisuStella equip menu and also make sure the Equipment Skills plugin is below all the VisuStella plugins.
  18. Knightmare said:
    If I remember right you have to use a certain setting for the VisuStella equip menu and also make sure the Equipment Skills plugin is below all the VisuStella plugins.

    I thought that was the plugin which would hold the parameters for it. I'll keep looking into it. Thank you!
  19. Knightmare said:
    Hi. I am using VisuStella Victory Aftermath and I was wondering if there was some JS snippet or a way to get this plugin to work better with Victory Aftermath. Basically to get the "learned skills" to pop up with Victory Aftermath screen instead of the default text box after a battle. It would just look cleaner that way. Hopefully it can be done with just a JS snippet.

    It's a paid plugin so I don't have access to it, does it have any built in options for displaying custom stuff?

    PixelMister said:
    Lovely work! I just wish I could get it to work with other Plugins.
    I use all of the Visustella Plugins (I'm not a coder in the slightest), and I'm struggling to even get the skills to appear in the equip menu.

    Sorry I don't have any experience using the VisuStella plugins.
  20. Fomar0153 said:
    It's a paid plugin so I don't have access to it, does it have any built in options for displaying custom stuff?

    Actually I looked through it again and it doesn't. I thought there was a customizable JS section in it for after victories but there is not, I know I looked into a lot of plugins all at once and just assumed it had a section for it like pretty much all other VisuStella plugins.

    I MIGHT be able to find a way to do it through VisuStella Battle Core since it lets you run common events after battle. What code snippet do I use to show if someone has learned a skill with your plugin? If I can just get that I think I can fenaggle (sp?) something to make it work. Thanks for the reply.