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

[转载发布] Ryu's Meta Data Handler

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

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    MetaData Handler - v1.04b
    Ryuuji

    Introduction

    A plugin meant to handle metadata from game objectd.
    All metadata are supported. (See list below)
    Metakeys are known as notetags

    Features
    Spoiler: versions log
    V1.0
    Reading, writing and deleting metadata from map events.
    Allow a user to set multiple notetags (meta keys) and have values attached to them.
    V1.01
    Allow a user to use the meta keys in the conditionnal branch part.
    This enables the user to make the event act differently based on its notetag.
    V1.02
    Allow a user to apply actions on an eventId based on a variable value.
    Can be usefull if you spawn new events and want to edit their metadata before proceeding.
    V1.03
    Enables the user to use an array of words for metaKey and metaValue, defaults them at true and parses both true and false as such instead of strings.
    V1.04
    Huge update
    Enables the user to use this tool across all game objects
    Fixed some parsing issues
    Increased the global scope possibilities
    V1.04b
    Fixed the missing map data, thanks to AquaEcho for pointing it out.



    Screenshots
    Spoiler: Conditionnal branch add-on



    How to Use
    - Copy the "Ryu_metaDataHandler.js" file into your project's /js/plugins/ folder
    - Activate plugin using the 'Plugin Manager'
    - Read the 'HELP' documentation (also found in plugin manager).

    Spoiler: Info
                    JavaScript:       
    1. /* v1.04b
    2. *   Fixed the missing map metadata. Thanks to AquaEcho for pointing that out.
    3. *
    4. * v1.04
    5. * This new version enables the user to edit meta data from any game object.
    6. * This is a major update and renders errors with v1.0
    7. * Make sure to upgdate the syntaxes in your game
    8. *
    9. * How to use:
    10. *   Open the command module and use following settings
    11. *   - MDataId or MDataVar (case sensitive)
    12. *     MDataId should be used it you know the exact ID you are trying to affect.
    13. *     MDataVar will use a the value of the variable ID provided.
    14. *  
    15. *   - read, write, delete and readall
    16. *     read will read the value of the provided key from the provided object id.
    17. *     write will write both the key and the value to the provided object id.
    18. *     delete will delete both the key and the value to the provided object id.
    19. *     readall will read all keys and their values from the provided object it.
    20. *  
    21. *   - Gameobject (Weapon, armor, item, enemy, state, skill, class, actor, event, map)
    22. *     Each of those object have their own notetag which can be edited in the
    23. *     game builder and edited through this plugin.
    24. *  
    25. *   - ID (either raw ID or the variable ID containing the id)
    26. *     This will allow the plugin to know what you want to edit
    27. *     Each object has their own id, make sure to use to appropriate id.
    28. *  
    29. *   - MetaKey
    30. *     This is the key attached to a notetag.
    31. *     It should be put between <> to take effect.
    32. *     There is no limit to the amount of keys a user can attach to an object,
    33. *     but try and be reasonnable. :D
    34. *  
    35. *   - MetaValue
    36. *     This is the value attached to a metaKey
    37. *     By default it will be read as a boolean and set to true. (If no values
    38. *     are applied)
    39. *     Meaning : <berrybush> will be turned into <berrybush:true>
    40. *     Rpgmaker MV handles any value as a string, but this plugin will overwrite
    41. *     that and parse both "true" and "false" as a bool.
    42. *     Meaning : <berrybush:true> is handled as <berrybush:"true"> by the software
    43. *     but this plugin overwrites that as a bool upon being used.
    44. *     NOTE : if the plugin is not called, it should not affect anything
    45. *  
    46. *   Examples of use :
    47. *   - MDataId read event 1 berrybush
    48. *   - MDataId write actor 1 surname Ryuuji
    49. *   - MDataVar readall class 99 type
    50. *   - MDataVar delete ennemy 100 healing
    51. *
    52. *   NOTE :
    53. *   MetaKey strings are supported and are to be put between ""
    54. *   MetaValue strings are supported and are to be put between "" (But only possible
    55. *   if the metaKey is a string of words)
    56. *   Needs to be fixed asap ^.^
    57. *
    58. *   Updated checkMeta function allows for even more custimisation
    59. *   You can now use this tool in conditionnal branch and check for values as well
    60. *   This can be done through eventing or scripting
    61. *
    62. *   - Eventing:
    63. *     Select conditionnal branch => Scripting
    64. *     Add the script line :
    65. *     checkMeta('actor', 1, 'surname') === "Ryuuji"
    66. *     - checkMeta is the method
    67. *     - 'actor' is the type of object
    68. *     - 1 is the ID
    69. *     - 'surname' is the key
    70. *     - "Ryuuji" is the value
    71. *     Make sure the watch for spaces :
    72. *     <surname:Ryuuji> is not the same as <surname: Ryuuji>
    73. *   - Scripting
    74. *     Select script...
    75. *     You can script as you usually would here
    76. *     An example would be :
    77. */     // Example conditional branch to check for a specific string value
    78.         if (checkMeta('event', 1, 'berrybush') === 'active') {
    79.             // Actions to perform if the meta key 'type' is 'active'
    80.             $gameMessage.add('This berrybush is active.');
    81.         } else if (checkMeta('event', 1, 'berrybush') === 'inactive') {
    82.             // Actions to perform if the meta key 'type' is 'inactive'
    83.             $gameMessage.add('This berrybush is inactive...');
    84.         } else {
    85.             // Actions to perform if the meta key 'type' has a different value or does not exist
    86.             $gameMessage.add('This berrybush is neither active or inactive...');
    87.         }
    复制代码






    Plugin Commands / Script Calls
    Everything you need to know is in the help section of the plugin


    Download plugin
    Right click and save as(current version 1.04b)
    Download

    Terms and Credits

    Free to use
    Feel free to credit Ryuuji, or not. ^^

    Feedback
    I have a few ideas to increase the scale of this tool, but unless someone specifically needs it, I think I'll pass for now.
    Let me know if you have any ideas or suggestion.
    Bug detected? Let me know!



    Added new versions to widen the scale of the tool.
    V1.01 adds a global scope to use data for conditionnal branching
    V1.02 adds a variable handler (second command option) to act on eventId based on variable value
    V1.03 adds the possibility to use an array of words as metaKey and metaValue and is more optimised.
    V1.04 adds a objectType to be able to use any game object as a reference and increased the global scope to all data, not just bools



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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 02:34 , Processed in 0.134179 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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