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

[制作教程] Introduction to the new Plugin Manager in RPG Maker MV 1.5.0+

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

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    RPG Maker MV just get updated with the new Plugin Manager. You can create powerful plugins like the following one now!

    [/url]

    An example plugin is available in the attachment and also on [url=https://github.com/orzFly/rpgmaker-mv-plugins/blob/master/plugins/PluginEditorDemo.js]GitHub
    . This plugin is intended to demonstrate the new Plugin Manager in RPG Maker MV v1.5.0 only so it doesn't have any real functionalities.

    (This post is also available on GitHub which may have a better formatting.)

    Group Parameters (@parent)
    You can use @parent to set the parent parameter. Just append the name of parent parameter after @parent.

                    Code:       
    /*: * @param C:\ * * @param Windows * @parent C:\ * * @param System32 * @parent Windows * * @param notepad.exe * @parent System32 * * @param shell32.dll * @parent System32 * * @param explorer.exe * @parent Windows * * @param D:\ * * @param Documents * @parent D:\ */


    [/url]

    This won't change the syntax when reading the values in game.

                    Code:       
    PluginManager.parameters('TreeDemo')['notepad.exe']


    Localization Labels (@text)
    The name of the parameter can be different from the name shown in editor now. You can use @text to specify the name shown in editor.

                    Code:       
    /*: * @param enable * @text Enable the Quest System * @default true * * @param mainmenu * @text Show in Main Menu * @parent enable */


    [url=https://forums.rpgmakerweb.com/attachments/text-png.66247/]


    To retrieve the value in game, use the name specified by @param instead @text:

                    Code:       
    PluginManager.parameters('TextDemo')['enable']# => "true"PluginManager.parameters('TextDemo')['Enable the Quest System']# => undefined


    Typings (@type)
    Text
                    Code:       
    @type text


    This directive will create the edtior for single-line string. Just like all the previous version, this is the very basic one.

    If you specify an invalid type or just omit the @type directive, this will be used.

    [/url]

    Note
                    Code:       
    @type note

    This directive will create the editor for multi-line string.

    [url=https://forums.rpgmakerweb.com/attachments/type-note-png.66254/]


    Note: the result of this directive is a JSON-escaped string. This means if you are reading the value in game, you need to JSON.parse it to get the real value.

                    Code:       
    var value = PluginManager.parameters('PluginEditorDemo')['Note']console.log(value)# => "Aluxes: Eventually...\nAluxes: I can say something longer than one line!\nAluxes: This is super powerful!\norzFly: Oh well..."console.log(JSON.parse(value))# => Aluxes: Eventually...# => Aluxes: I can say something longer than one line!# => Aluxes: This is super powerful!# => orzFly: Oh well...

    Number
                    Code:       
    @type number

    This directive will create the editor for a number with the up/down spin button.

    [/url]

                    Code:       
    @max 100@min -100


    These two directives can be used to set the range for the parameter.

                    Code:       
    @decimals 2


    This directive will allow the number to have some decimal places. If this is omitted, the number can only be an integer.

    File

                    Code:       
    @type file


    This directive will create the editor for specifying an image resource or an audio resource.

    [url=https://forums.rpgmakerweb.com/attachments/type-file-png.66253/]


                    Code:       
    @dir audio/bgm/


    This directive will set the base directory for the file so the file picker will be scoped to this directory. This path will not be included in the result.

                    Code:       
    @require 1


    If this directive is present, the file specified by this parameter will be included in the deployment if "Exclude unused files" is chosen.

    Object Selector

                    Code:       
    @type animation@type actor@type class@type skill@type item@type weapon@type armor@type enemy@type troop@type state@type tileset@type common_event@type switch@type variable


    These directives will create the editor allowing the use to pick an item of the object. The object ID will be the result. If None is chosen, the result will be 0.

    [/url]

    [url=https://forums.rpgmakerweb.com/attachments/type-variable-png.66259/]


                    Code:       
    @require 1


    (@type animation only) If this directive is present, the animation specified by this parameter will be included in the deployment if "Exclude unused files" is chosen.

    Boolean

                    Code:       
    @type boolean


    This directive will create the editor with two radio options returning a true/false value. The default labels are "ON" and "OFF".

    [/url]

                    Code:       
    @on Enable@off Disable

    You can override the label with @on and @off directives.

    [url=https://forums.rpgmakerweb.com/attachments/type-boolean-custom-png.66251/]


    Select
                    Code:       
    @type select@option XP@option VX@option VX Ace@option MV

    This directive will create a drop-down box allowing the user to pick one from predefined options. The value will be the label of the option.

    [/url]

                    Code:       
    @type select@option XP@value 1.0@option VX@value 2.0@option VX Ace@value 2.1@option MV@value 3.0

    You can also override the value by providing the @value directive for each @option.

    Combo
                    Code:       
    @type combo@option XP@option VX@option VX Ace@option MV

    This directive will create a text box with a drop-down menu allowing the user to type the text on his own. The user also can pick one from predefined options.

    @value directives are not supported in Combo mode.

    [url=https://forums.rpgmakerweb.com/attachments/type-combo-png.66252/]


    List
    By append [] to any valid type, the editor will be upgraded to a list type. For example, these directives are all valid.

                    Code:       
    @type text[]@type note[]@type number[]@type variable[]@type item[]@type combo[]@type file[]@type struct<Anything>[]

    [/url]

    Note: the result of this type is a JSON-escaped array of strings. This means if you are reading the value in game, you need to JSON.parse it to get the real value.

                    Code:       
    var value = PluginManager.parameters('PluginEditorDemo')['Text List']console.log(value)# => ["orzFly","orzDive","orzSwim"]console.log(value[2])# => ovar realValue = JSON.parse(value)console.log(realValue[2])# => orzSwim


    Structure
    You can define a structure by starting a new comment block in the file. You can put it after the main comment block. The first line defines the name of this struct ("ItemAward" in the example). You can define parameters like normal inside this structure block.
                    Code:       
    /*~struct~ItemAward: * @param Item * @type item * * @param Count * @type number * @min 1 * @max 99 * @default 1 */

    You can later use this structure by using a special type:
                    Code:       
    @type struct<ItemAward>

    [url=https://forums.rpgmakerweb.com/attachments/type-struct-png.66257/]


    Note: the result of this type is a JSON-escaped object. This means if you are reading the value in game, you need to JSON.parse it to get the real value.
                    Code:       
    var value = PluginManager.parameters('PluginEditorDemo')['Structure']console.log(value)# => {"Text":"orzFly","Note":"\"The quick brown fox jumps over the lazy dog.\\nThe lazy dog jumps over the quick brown fox.\\nThe quick brown fox jumps over the quick brown fox.\\nThe lazy dog jumps over the lazy dog.\"","Number":"233","Item":"1","Animation":"1","File (img/)":"system/GameOver"}console.log(value["Text"])# => undefinedvar realValue = JSON.parse(value)console.log(realValue["Text"])# => orzFly




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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 14:20 , Processed in 0.099718 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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