Bobstah's Enhanced Equipment, Item, Items Command, Skill, and Skill Type Restrictions 1.5.3

● ARCHIVED · READ-ONLY
Started by Bobstah 85 posts Page 5 of 5 View original ↗
  1. Hello!
    Problems with the plugin.
    If I put on Armor 01:
    Code:
    <Restrict>
    Armor: 2
    </ Restrict>

    I can only equip Armor 01 when equipping Armor 02.
    But there is a flaw.
    If you remove the Armor 02, the Armor 01 remains equipped.

    Thanks for the help.
  2. wow, this plugin is exactly what I'm looking for!
  3. Late. Love this, just what I'm looking for. Only one small problem;

    I have an item that can be equipped to multiple characters that grants different skills based on who equips it(So Warrior gets a water blade while Healer gets Water Spell). This plug in does just what I need;

    But Warrior shows up as KNOWING the Water spell but can't use it and the Healer clearly knows the Water Blade attack but also can't use it.

    Is there a way to restrict and hide skills that you can't use?
  4. I think there was a plugin for that too.
  5. Is it possible to use the plug-in to make an actor unable to use two of the same weapon type?

    Bobstah said:
    Updated 08/03/2016 09:21 PM ET


    Introduction



    Allows you to restrict equipment, items, the items battle command, skills, and skill types by actor ID, class ID, stat (hp, mp, tp, mhp, atk, cri, pdr, etc) minimum value, stat maximum value, other weapon equipped, other armor equipped, switch on/off, variable minimum value, variable maximum value, and a custom Eval option.


    asdf

    Every set of Restrict tags counts as a group. You can have multiple groups per equipment or item, and the actor only needs to satisfy the conditions of one restriction group to wear the equipment or use the item. Daisy-chaining gear is also accounted for and prevented. Every tag can also be inverted and eval'd for your convenience.






    Features

    • Restrict equipment and item usage based on a multitude of factors!

    • Restrict some global properties, like Skill Types, using all of the restrictions available to items, skill, weapons, and armor!

    • Set multiple restriction groups on a single item. If one of the groups' restrictions is met, the item can be equipped!

    • Request the opposite of any setting! Instead of equipment being limited to Actor #1, it can be any actor except Actor #1! Just prefix your restriction with an !

    • Eval any ID, Variable, or Switch value by surrounding it with $()!

    • Use a custom Eval command to check for a true or false result!



    How to Use
    Add the plugin in your game and view the help information. It describes the notetags and all the crazy modifiers you can use. See the examples section for more information.


    Notetags

    Spoiler
    Spoiler





    A group of restrictions is contained between the <Restrict> tags. You can have more than one group of restrictions per equip or item, and the actor only has to meet one set of restrictions. If you want multiple restrictions to be met, use a single group instead.





    If desired, you can prefix any Restriction with an !. This will cause it to check the opposite of what you specify. If you use it with Actor: 1, for example, anyone but Actor 1 can equip the item.





    You can also replace anything after : with Javascript code inside of $(), like so: Actor: $(yourFunction() ;)





    You can even combine the two: !Actor: $(yourFunction() ;)





    Below are all of the available options:


    <Restrict>


    LevelMin: X - Minimum level.


    LevelMax: X - Maximum level.


    Class: ID - Actor must be class ID.


    Actor: ID - Actor must be this ID.


    State: ID - Actor must have state ID applied.


    Weapon: ID - Actor must be wearing this weapon.


    Armor: ID - Actor must be wearing this armor.


    StatMin(Symbol): X - Stat Symbol must be at least X.


    StatMax(Symbol): X - Stat Symbol must be at most X.


    Switch(ID): On/Off - Switch ID must be on/off.


    VarMin(ID): X - Variable ID must be at least X.


    VarMax(ID): X - Variable ID must be at most X.


    Custom: $(codeHere) - Run some Javascript.


    </Restrict>





    To restrict a global property, like a Skill Type, add the following to any actor's note field:


    <Restrict SType: ID,ID,etc>



    LevelMin: X - Minimum level.


    LevelMax: X - Maximum level.


    Class: ID - Actor must be class ID.


    Actor: ID - Actor must be this ID.


    State: ID - Actor must have state ID applied.


    Weapon: ID - Actor must be wearing this weapon.


    Armor: ID - Actor must be wearing this armor.


    StatMin(Symbol): X - Stat Symbol must be at least X.


    StatMax(Symbol): X - Stat Symbol must be at most X.


    Switch(ID): On/Off - Switch ID must be on/off.


    VarMin(ID): X - Variable ID must be at least X.


    VarMax(ID): X - Variable ID must be at most X.


    Custom: $(codeHere) - Run some Javascript.


    </Restrict>





    You can also restrict the Items battle command by using <Restrict Items> and any of the above options.








    For more information on eval, check the plugin's help documentation.






    Examples





    Spoiler





    Let's make an Evil Sword that anyone but our Paladin, Actor#1, can equip:
    <Restrict>
    !Actor: 1
    </Restrict>

    Next, let's make a potion that someone can only use at level 5, 6, 7, 8, 9, and 10:
    <Restrict>
    LevelMin: 5
    LevelMax: 10
    </Restrict>

    Let's build on that and say that only Actor#3 can equip a piece of armor whenever they want, but other actors can only wear it between levels 5 and 10:<Restrict>
    actor: 3
    </Restrict>
    <Restrict>
    LevelMin: 5
    LevelMax: 10
    </Restrict>

    Building on that even more, let's go all out. The following example will allow any class but class#1 to equip it as long as their atk is at least 5, variable#6 is at least 10, and switch#4 is turned off. Or, they can be actor#3:
    <Restrict>
    !Class: 1
    StatMin(Atk): 5
    VariableMin(6): 10
    Switch(4): off
    </Restrict>
    <Restrict>
    Actor: 3
    </Restrict>

    Next, we'll check to see if an actor has state#3 using the eval feature:
    <Restrict>
    Custom: ($a._states.indexOf(3) !== -1;)
    </Restrict>

    What if we want to restrict a skill to actors that have less than 50% HP?
    <Restrict>
    StatMax(hp):$(a.mhp * 0.5)
    </Restrict>

    What about restricting a skill to actors that have more than 50% HP?
    <Restrict>
    StatMin(hp):$(a.mhp * 0.5)
    </Restrict>

    You can do the same thing with MP and TP, too. If you want to change the percentages, modify 0.5 (50%) to any other number. For example, 23% is 0.23.<Restrict>
    StatMin(mp):$(a.mmp * 0.5)
    StatMax(mp):$(a.mmp* 0.5)
    StatMin(tp):50
    StatMax(tp):50
    </Restrict>






    Plugin
    Get it here - File name is CASE SENSITIVE: BOB_EnhancedRestrictions.js

    Dependencies
    None

    FAQ


    1. How do I use this plugin?


    Read the plugin help and ask any questions here.


    Changelog

    Spoiler
    Spoiler



    1.5.3 (08/03/2016) - Fixed a conflict between this plugin and Yanfly's Equip Core.


    1.5.2 (12/23/2015) - Fixed an issue where Weapon and Armor restrictions would not function when using an Independent/Unique Item script.


    1.5.1 (12/11/2015) - Fixed a restriction logic bug and also added individual actor item restriction checking to the default RPGMV Battle Item list. (Before, it was checking if any party member could use the item.)


    1.5 (12/10/2015) - Added the ability to restrict the Items battle command.


    1.4.2 (11/19/2015) - Fixed a crash bug that could occur when opening the equipment window.


    1.4.1 (11/11/2015) - Fixed a crash bug that would occur if you did not restrict a skill type. Bug introduced in version 1.4.


    1.4 (11/09/2015) - Added the ability to restrict global properties, starting with Skill Types!


    1.3.3a (11/07/2015) - Fixed a bug with my compatibility patch for Ellye's State Damage that could cause the special state settings to not be restored under certain conditions.


    1.3.3 (11/07/2015) - Fixed a crash bug introduced by compatibility with Ellye's State Damage.


    1.3.2 (11/06/2015) - Added a compatibility patch for Ellye's State Damage.


    1.3.1 (Unreleased) - Fixed a bug with Restrictions on armor.


    1.3 (11/06/2015) - Added a new restriction type: State.


    1.2 (11/04/2015) - Added Skill Restrictions.


    1.1 (11/04/2015) - Added Item Restrictions.


    1.0 (11/02/2015) - Initial release.



    Legal


    Free to use in commercial and non-commercial projects with credit. A free copy of the finished game would be nice, but is not required.


    Credit and Thanks
    - Bobstah