public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

MVPlugin case changer (Test tool)

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Plugin case changer (Test tool)
  • Original author: Zeriab
  • Original date: October 23, 2015
  • Source thread: https://forums.rpgmakerweb.com/threads/plugin-case-changer-test-tool.46559/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)

Summary

Plugin case changer (Test tool)¨ Changes the casing of plugin commands Introduction This little plugin is to help scripters being aware of and making conscious choices about case-sensitivity and test during plugin development. It also helps plugin users bug scripters about such issues, and hopefully help establish a best practice rule: Plugin commands comparison should be case-insensitive by default except where the sensitivity has a functional meaning.

Archived First Post

Plugin case changer (Test tool)¨

Changes the casing of plugin commands

Introduction

This little plugin is to help scripters being aware of and making conscious choices about case-sensitivity and test during plugin development. It also helps plugin users bug scripters about such issues, and hopefully help establish a best practice rule: Plugin commands comparison should be case-insensitive by default except where the sensitivity has a functional meaning.

Download

You can download the script from my MediaFire account or copy it from the code block in the spoiler.

//=============================================================================// Plugin Case Changer// Zeriab_PluginCaseChanger.js// Last Updated: 2015.08.23//=============================================================================var Imported = Imported || {};Imported.Zeriab_PluginCaseChanger = true;var Zeriab = Zeriab || {};/*: * @plugindesc Changes the casing of plug-in commands * @author Zeriab * * @param Command text * @desc Change the casing of the command text? * @default false * * @param First argument * @desc Change the casing of the first argument? (Typically set/add/create, i.e. an action specification for the plugin) * @default true * * @param Additional arguments * @desc Change the casing of all additional arguments? * @default false * * @param Case type * @desc 1: lowercase, 2: UPPERCASE, 3: Captilize * @default 1 * * @help * * Use this plug-in to help nudge scripters and programmers into making the use of Plugin Commands * case-insensitive except where needed. * * For example for Yanfly's scripts there is no reason why "MessageRows 6" should be treated * differently from "Messagerows 6". In some instances preserving casing can be necessary. When * Displaying text for example. */(function () { Zeriab.Casing = Zeriab.Casing || {}; Zeriab.Casing.Parameters = PluginManager.parameters('Zeriab_PluginCaseChanger'); _ChangeCommandText = ('true' === Zeriab.Casing.Parameters["Command text"].toLowerCase()) ? true : false; _ChangeActionArgument = ('false' === Zeriab.Casing.Parameters["First argument"].toLowerCase()) ? false : true; _ChangeAdditionalArguments = ('true' === Zeriab.Casing.Parameters["Additional arguments"].toLowerCase()) ? true : false; _CaseType = Zeriab.Casing.Parameters["Case type"].trim(); // Plugin Command override Game_Interpreter.prototype.command356 = function () { var args = this._params[0].split(" "); var command = args.shift(); // Inserted code to alter command and argument casing // >>CommandText<< [FirstArg [SecondArg ThirdArg ...]] if (_ChangeCommandText) { command = Zeriab.Casing.Change(command, _CaseType); } // CommandText [>>FirstArg<< [SecondArg ThirdArg ...]] if (_ChangeActionArgument) { if (args && args[0]) { args[0] = Zeriab.Casing.Change(args[0], _CaseType); } } // CommandText [FirstArg [>>SecondArg ThirdArg ...<<]] if (_ChangeAdditionalArguments) { if (args && args.length > 1) { for (i = 1; i < args.length; i++) { args = Zeriab.Casing.Change(args, _CaseType); } } } // Standard code from here command.toLowerCase(); command.toUpperCase(); this.pluginCommand(command, args); return true; }; /** * Makes a number string with leading zeros. * * @method Zeriab.Casing.Change * @param {String} s The string to alter casing * @param {String} type The type of casing request * @return {String} A string with casing corresponting to the type */ Zeriab.Casing.Change = function (s, type) { switch (type.toLowerCase()) { case '3': case 'capitalize': s_first = s.substring(0, 1); s_rest = s.substr(1); s = s_first.toUpperCase() + s_rest.toLowerCase(); break; case '2': case 'uppercase': s = s.toUpperCase(); break; case '1': case 'lowercase': default: s = s.toLowerCase(); break; } return s; };})();
Terms of Use

Copyright (C) 2015 ZeriabThis software is provided 'as-is', without any express or implied warranty.In no event will the authors be held liable for any damages arising fromthe use of this software.Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute itfreely, subject to the following restrictions:1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is not required.2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
Instruction

Use this plug-in to help nudge scripters and programmers into making the use of Plugin Commands case-insensitive except where needed. For example for Yanfly's scripts there is no reason why "MessageRows 6" should be treated differently from "Messagerows 6". In some instances preserving casing can be necessary. When displaying text for example.

Plugin parameter options

  • Command text ~ Change the casing of the command text?
  • First argument ~ Change the casing of the first argument? (Typically set/add/create, i.e. an action specification for the plugin)
  • Additional arguments ~ Change the casing of all additional arguments?
  • Case type ~ Choose between following case conversions1 - lowercase
  • 2 - UPPERCASE
  • 3 - Captilize
As an example let's look at my Extra Maps script.My plugin follows the convention on plugin commands PluginIdentifier action arg1, arg2, ... with only 1 argument, so we can have plugin commands such as ExtraMaps set church. What happens if someone accidentally use extramaps set church or ExtraMaps Set church? Silent failure, nothing happens. Map folder is not changed.

The casing doesn't really matter for neither the plugin identifier nor the action. The church is a folder name. As the folder name is case sensitive on some systems preserving the casing is important. For testing my plugin I therefore chose to change the casing of the command text and the first argument, but not the additional arguments. What about the Case type? I ran my test demo once per case type, found an error and fixed it. Unfortunately I forgot to give it to Archeia, so the plugin in the release package is the old one. Sorry! ;A;

Yes, yes, I know it's a small thing. But we might as well be nice to the game devs who end up using our plugins, right? ^^

*hugs*

- Zeriab

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

Terms of Use Spoiler Copyright (C) 2015 ZeriabThis software is provided 'as-is', without any express or implied warranty.In no event will the authors be held liable for any damages arising fromthe use of this software.Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute itfreely, subject to the following restrictions:1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If...

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rmmv#plugin-archive

Replies (0)

No replies yet.

0 replies 3 views

Log in to reply.

User Avatar