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

[制作教程] Adding your own tools to RPG Maker MV

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 207 天

    连续签到: 1 天

    [LV.7]常住居民III

    3646

    主题

    862

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 17:16 | 显示全部楼层 |阅读模式
    You've seen that Sakan and Mado can be integrated directly into MV's Tools menu and main toolbar, but how would you do that for your own tools? This tutorial will introduce you to the tools system and teach you how to create your own tool entry.





    Requirements
    A tool (executable) to add, a text editor, and graphics editing program if you want an icon for the tool. Tools are only directly supported on Windows and Mac.

    RPG Maker tools are just separate programs that can be launched which works with your project. There's nothing really special about a tool, other than it takes the project file path as a command line argument, and ships with some metadata so it can be added into MV's menus.

    How to create a tool
    Unfortunately, this is an extremely broad topic, so I can't actually cover this here. However, the basic premise of a tool is it takes the path to the project file as the first command line argument. Using this path, you should be able to determine where the project is (the folder that contains the project file), and be able to read and manipulate the project with a standard layout. What you want to do with your tool is up to you, and you can use any language to program it as long as it compiles into an executable.

    Important: the project path passed to your tool is not quoted. This means if there are spaces in the path, it'll be split up into separate arguments. Make sure you get the entire command line string and process that instead of using the args list provided by your language.

    Creating tool metadata
    Tool metadata lives in an "Identification" folder inside your tool's installation folder, and consists of two parts: a tool declaration file, and an icon for the toolbar. Note for Mac, the "Identification" folder is inside the .app.

    The "app" file
    Directly in the "Identification" folder, you should create a plain text file named "app". Just "app", no file extension or ".txt" at the end. Inside it should be three lines indicating the name of your tool, the version, and a short description. For example:

                    Code:        
    Example Tool 1.0.0 Shows argument passed to the tool.


    The first line is the name of your tool, and should be at most 27 characters long if you want it to fit in the default column width in the tools manager. The second line is the version. It currently doesn't appear to be used. The third line is a short description of the tool, and should be at most 35 characters long if you want it to fit in the default column width. You may add additional lines to the file, but those won't be referenced anywhere.

    The toolbar icon
    Inside your "Identification" folder, create another folder named "toolbar". Inside that, create a 28x28px image named "icon.png". This image will serve as the icon for the tool's toolbar icon in the RPG Maker editor after you add the tool. You can omit the file, but then it will just show a red question mark.

    The name of your executable
    For some reason, tool scanning is not open-ended, and the editor will only detect your tool if it has a specific file name. The following are the names that the editor will detect:

    Windows:

    • TilesetBuilder.exe
    • WindowBuilder.exe
    • SceneBuilder.exe
    Mac:

    • Tileset Builder.app
    • タイルセットビルダー.app
    • Window Builder.app
    • ウィンドウビルダー.app
    • Scene Builder.app
    • シーンビルダー.app
    Make sure you use one of the names listed for your platform.

    Adding the tool
    Put your tool files and "Identification" folder inside a single folder. Depending on how you've obtained your copy of RPG Maker, you can put this tool folder in the following locations for it to be automatically detected by the editor:

    Windows:

    • Standalone: %PROGRAMFILES(X86)%\KADOKAWA
    • Steam: %PROGRAMFILES(X86)%\Steam\steamapps\common\RPG Maker MV\tool
    Note: for the Steam version, it really is hardcoded to the default library location in Program Files. It's probably an oversight that it isn't looking inside where RPG Maker is currently installed, despite it being perfectly tenable within the current framework.

    Mac:

    • Any version: inside your Applications folder
    • Steam: ~/Library/Application Support/Steam/steamapps/common/RPG Maker MV
    To add the tool to your menus and toolbars, open a project, then go to "Tools -> RPG Maker MV Tools...". If you've added your tool to the locations the editor searches for, it should show up under Found Tools. If not, click "Select Path...", and browse to the tool's folder (or its parent folder). If it doesn't show up even after browsing, then you have used an unrecognized file name. Select the tool, click "Add", then "OK". The tool should now show up in your Tools menu and at the end of your toolbar. Click on the toolbar button or the Tools menu item to launch the tool with your currently open project. Note you cannot launch tools or manage them if you do not have a project open.

    An example tool
    This tool shows an example metadata setup, and the program itself just tells you the first command line argument, so you can see what to expect when you're writing your own tool. Follow the instructions under "Adding the tool" to try it out within RPG Maker. Source code for the tool is included.

    Download: https://www.dropbox.com/s/q60m29n63uejxs3/ExampleTool.zip?dl=0


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-10 02:07 , Processed in 0.090108 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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