[Plug-in] [Rpgmaker MV] Insert Website link on Title Screen

Software used: Rpgmaker MV

Hi everyone! I’m looking for a way to insert a website link (Like this patreon) to the title screen of an Rpgmaker MV project.

I have tested the Yanfly External Links plugin (it adds a button the the title screen and lets you attach a link) but noticed two things:

  1. The link opens within Rpgmaker and not the browser.
  2. The link looks like its forever loading rather than showing the website’s content.

I’ve received the same results when testing on other computers as well but found a temporary solution.

If I call this script the link I’m using opens up within browser and loads instantly:

game_website = 'https://www.patreon.com/cw/Degspart'

  

require('nw.gui').Shell.openExternal(game_website);

But I’m not sure how to add another title screen button that also allows me to call this script to achieve the results I’m looking for.

Does anyone know of a plugin or code that would allow me to add a new button to the titlescreen while also calling this exact script?

Any guidance is appreciated!

Also, please let me know if I’m using the translation button correctly on this post, I wasn’t quite sure I followed forum guidelines right here.

I think a small plugin would do it. Save this as TitleWebLink.js in your project’s js/plugins folder, then turn it on in the Plugin Manager:

/*:
 * @plugindesc Adds a title screen command that opens a website in the player's browser.
 * @author Baz
 *
 * @param Command Name
 * @desc The text shown on the title screen.
 * @default Patreon
 *
 * @param URL
 * @desc The website to open.
 * @default https://www.patreon.com/cw/Degspart
 */

(function() {
    var params = PluginManager.parameters('TitleWebLink');
    var commandName = String(params['Command Name'] || 'Website');
    var url = String(params['URL'] || '');

    var _makeCommandList = Window_TitleCommand.prototype.makeCommandList;
    Window_TitleCommand.prototype.makeCommandList = function() {
        _makeCommandList.call(this);
        this.addCommand(commandName, 'webLink');
    };

    var _createCommandWindow = Scene_Title.prototype.createCommandWindow;
    Scene_Title.prototype.createCommandWindow = function() {
        _createCommandWindow.call(this);
        this._commandWindow.setHandler('webLink', this.commandWebLink.bind(this));
    };

    Scene_Title.prototype.commandWebLink = function() {
        if (Utils.isNwjs()) {
            require('nw.gui').Shell.openExternal(url);
        } else {
            window.open(url, '_blank');
        }
        this._commandWindow.activate();
    };
})();

You can change the button text and the link in the plugin’s parameters. It runs the same openExternal call you found, so it should open in the player’s browser. Once it’s in, you can turn off YEP External Links so you don’t end up with two buttons.

Your post looks good too. The forum handles translation for other readers, so writing in English is all you need to do.

This works! Thank you very much for you’re expertise here! If you’re alright with it I’ll add you to the credits of my project for programming assistance.