设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 57|回复: 0

[转载发布] Bobstah's Enhanced Equipment, Item, Items Command, Skill, and Skill Typ

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7976

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29959
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38829

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    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

    SpoilerSpoiler





                                            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

    SpoilerSpoiler



    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 


    本贴来自国际rpgmaker官方论坛作者:Bobstah处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/bobstahs-enhanced-equipment-item-items-command-skill-and-skill-type-restrictions-1-5-3.49224/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 08:35 , Processed in 0.089289 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表