Adding your own tools to RPG Maker MV

Discussion in 'RPG Maker MV Tutorials' started by cyanic, Nov 9, 2017.

    Tags:
  1. cyanic

    cyanic Veteran

    Messages:
    46
    Likes Received:
    32
    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.

    [​IMG]

    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.

    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
    Mac:
    • Tileset Builder.app
    • タイルセットビルダー.app
    • Window 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
     
    #1
  2. mystic0

    mystic0 Freeman

    Messages:
    21
    Likes Received:
    7
    Location:
    Seattle, WA
    First Language:
    English
    Primarily Uses:
    N/A
    Thank you so much for this!
     
    #2
  3. Joy Diamond

    Joy Diamond Talkative

    Messages:
    135
    Likes Received:
    170
    First Language:
    English
    Primarily Uses:
    RMMV
    Super useful & easy to follow explanation, cyanic. Thanks! :smile: I'll be using this for sure ...

    I was able to follow it & get my tool working (an RPG Maker MV game as a tool for RPG Maker MV):
    • My only initial confusion was I needed to create 'Identification/app' & 'Identification/toolbar/icon.png".
    • But after looking at your ExampleTool.zip I was able to figure it out.
    I was also confused what the icon.png was for (I thought it would appear in the 'Tools' sub-menu -- and could not find it):
    • After I fixed it so it was no longer a red question mark (I had accidentally named it crystal.png instead of icon.png) it worked fine & appears on the toolbar.
    This all took only about 10 minutes ... so onwards now to create my RPG Maker MV tool ...
     
    #3

Share This Page