RPG Maker Forums

Hey everyone,

thought I'd share a couple of minor plugins I wrote for my project. Really nothing special, but perhaps useful for some of you.

The first one is my Adjustable Commands Window plugin. It allows you to customize certain aspects of the command window on your title screen.

Not too many options at the moment, but I might add more.

SBX_Adjustable_CommandWindow.js

/*: * @plugindesc Allows you to adjust various settings for the command window. * * @author ShawnBaxe * * @param Enable Exit Command * @desc Whether the "exit" command is to be shown (set to false for mobile and web!) * @default true * * @param Exit Command Text * @desc The text to be displayed for the "exit" command * @default Exit Game * * @param Text Offset * @desc X offset for command items * @default 0 * * @param Text Align * @desc Valid values are left, right or center * @default left * * @param Text Color * @desc Adjust the text color here... * @default #ffffff * * @param Window Type * @desc Valid values are default, dim or hidden * @default default * * @help This plugin allows you to customize certains aspects of the command window (title screen). * You can show/hide the 'exit' command and customize its text for example. * * Besides that you can: * - Set an offset for the command window text * - Set an alignment for the text * - Adjust the text color (e.g. #ff5531) * - Set the window to either hidden (only text is being rendered), dimmed or default (normal visibility) * * Nothing fancy really, but it gives you some freedom of choice. */// Parameter collection --------------------------------------------------------var parameters = PluginManager.parameters('SBX_Adjustable_CommandWindow');// Adjustable parameters -------------------------------------------------------// Exit command-relatedvar showExitCommand = String(parameters['Enable Exit Command'] || 'true');var exitCmdText = String(parameters['Exit Command Text'] || 'Exit Game');// Text placementvar textAlignment = String(parameters['Text Align'] || 'left');var textOffset = Number(parameters['Text Offset'] || 0);// Text colorvar textColor = String(parameters['Text Color'] || '#ffffff');// Window stylevar windowType = String(parameters['Window Type'] || 'default');//==============================================================================// makeCommandList()//==============================================================================// Add commands to the title menu window (command window).//==============================================================================Window_TitleCommand.prototype.makeCommandList = function() { this.addCommand(TextManager.newGame, 'newGame'); this.addCommand(TextManager.continue_, 'continue', this.isContinueEnabled()); this.addCommand(TextManager.options, 'options'); if(showExitCommand == 'true') { this.addCommand(exitCmdText, 'exitGame'); }};//==============================================================================// createCommandWindow()//==============================================================================// Create and show the command window//==============================================================================Scene_Title.prototype.createCommandWindow = function() { this._commandWindow = new Window_TitleCommand(); this._commandWindow.setHandler('newGame', this.commandNewGame.bind(this)); this._commandWindow.setHandler('continue', this.commandContinue.bind(this)); this._commandWindow.setHandler('options', this.commandOptions.bind(this)); if(showExitCommand == 'true') { this._commandWindow.setHandler('exitGame', this.commandExitGame.bind(this)); } // Set display mode/window style switch(windowType) { case 'default': this._commandWindow.setBackgroundType(0); break; case 'dim': this._commandWindow.setBackgroundType(1); break; case 'hidden': this._commandWindow.opacity = 0; this._commandWindow.hideBackgroundDimmer(); break; } this.addWindow(this._commandWindow);};//==============================================================================// commandExitGame()//==============================================================================// COMMAND:// Exit the game//==============================================================================Scene_Title.prototype.commandExitGame = function() { this._commandWindow.close(); this.fadeOutAll(); SceneManager.exit();};//==============================================================================// drawItem()//==============================================================================// Draws a command window item//==============================================================================Window_Command.prototype.drawItem = function(index) { var rect = this.itemRectForText(index); var align = this.itemTextAlign(); this.changeTextColor(textColor); this.changePaintOpacity(this.isCommandEnabled(index)); this.drawText(this.commandName(index), rect.x + textOffset, rect.y, rect.width, align); this.resetTextColor();};//==============================================================================// itemTextAlign()//==============================================================================// Returns requested text alignment (left, right or center)//==============================================================================Window_Command.prototype.itemTextAlign = function() { return textAlignment;};
Example Screenshot:





The second one allows you to change some text colors (for example for your stats). Again...nothing super cool, but maybe useful.

SBX_Adjustable_TextColors.js

/*: * @plugindesc Allows you to adjust text colors. * * @author ShawnBaxe * * @param Stats Color * @desc Changes the color of stat values inside the menu (ATK, DEF, ...) * @default #88fa6a * * @param Experience Label Color * @desc * @default #79dcfd * * @param Level Label Color * @desc * @default #88fa6a * * @param HP Label Color * @desc * @default #f7ffa1 * * @param MP Label Color * @desc * @default #f7ffa1 * * @param TP Label Color * @desc * @default #f7ffa1 * * @param Equip Stat Color * @desc * @default #f7ffa1 * * @param Right Arrow Color * @desc * @default #f7ffa1 * * @param Equip Slot Color * @desc * @default #ffbb51 * * @param MP Cost Color * @desc * @default #f7ffa1 * * @param TP Cost Color * @desc * @default #f7ffa1 * * @param Stat Gain Color * @desc * @default #88fa6a * * @param Stat Loss Color * @desc * @default #ff5151 * * @param Stat NoChange Color * @desc * @default #ffffff * * @help Customize text colors to your liking. Most text blocks * are covered - at least those you find in the menu. */// Parameter collection --------------------------------------------------------var parameters = PluginManager.parameters('SBX_Adjustable_TextColors');// Adjustable parameters -------------------------------------------------------var parameterColor = String(parameters['Stats Color'] || '#88fa6a');var expInfoColor = String(parameters['Experience Label Color']|| '#79dcfd');var levelColor = String(parameters['Level Label Color'] || '#88fa6a');var hpLabelColor = String(parameters['HP Label Color'] || '#f7ffa1');var mpLabelColor = String(parameters['MP Label Color'] || '#f7ffa1');var tpLabelColor = String(parameters['TP Label Color'] || '#f7ffa1');var equipParamColor = String(parameters['Equip Stat Color'] || '#f7ffa1');var rightArrowColor = String(parameters['Right Arrow Color'] || '#f7ffa1');var equipSlotColor = String(parameters['Equip Slot Color'] || '#ffbb51');var mpCostColor = String(parameters['MP Cost Color'] || '#f7ffa1');var tpCostColor = String(parameters['TP Cost Color'] || '#f7ffa1');var statGainColor = String(parameters['Stat Gain Color'] || '#88fa6a');var statLossColor = String(parameters['Stat Loss Color'] || '#ff5151');var statNoChangeColor = String(parameters['Stat NoChange Color'] || '#ffffff');//==============================================================================// Level text//==============================================================================Window_Base.prototype.drawActorLevel = function(actor, x, y) { this.changeTextColor(levelColor); this.drawText(TextManager.levelA, x, y, 48); this.resetTextColor(); this.drawText(actor.level, x + 84, y, 36, 'right');};//==============================================================================// drawActorHp()//==============================================================================// Draws HP-related stuff (gauge, label, etc.)//==============================================================================Window_Base.prototype.drawActorHp = function(actor, x, y, width) { width = width || 186; var color1 = this.hpGaugeColor1(); var color2 = this.hpGaugeColor2(); this.drawGauge(x, y, width, actor.hpRate(), color1, color2); this.changeTextColor(hpLabelColor); this.drawText(TextManager.hpA, x, y, 44); this.drawCurrentAndMax(actor.hp, actor.mhp, x, y, width, this.hpColor(actor), this.normalColor());};//==============================================================================// drawActorMp()//==============================================================================// Draws MP-related stuff (gauge, label, etc.)//==============================================================================Window_Base.prototype.drawActorMp = function(actor, x, y, width) { width = width || 186; var color1 = this.mpGaugeColor1(); var color2 = this.mpGaugeColor2(); this.drawGauge(x, y, width, actor.mpRate(), color1, color2); this.changeTextColor(mpLabelColor); this.drawText(TextManager.mpA, x, y, 44); this.drawCurrentAndMax(actor.mp, actor.mmp, x, y, width, this.mpColor(actor), this.normalColor());};//==============================================================================// drawActorTp()//==============================================================================// Draws TP-related stuff (gauge, label, etc.)//==============================================================================Window_Base.prototype.drawActorTp = function(actor, x, y, width) { width = width || 96; var color1 = this.tpGaugeColor1(); var color2 = this.tpGaugeColor2(); this.drawGauge(x, y, width, actor.tpRate(), color1, color2); this.changeTextColor(tpLabelColor); this.drawText(TextManager.tpA, x, y, 44); this.changeTextColor(this.tpColor(actor)); this.drawText(actor.tp, x + width - 64, y, 64, 'right');};//==============================================================================// drawParameters()//==============================================================================// Draws Parameter values (ATK, DEF, etc.)//==============================================================================Window_Status.prototype.drawParameters = function(x, y) { var lineHeight = this.lineHeight(); for (var i = 0; i < 6; i++) { var paramId = i + 2; var y2 = y + lineHeight * i; this.changeTextColor(parameterColor); this.drawText(TextManager.param(paramId), x, y2, 160); this.resetTextColor(); this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right'); }};//==============================================================================// drawParamName()//==============================================================================// Draws parameter names (ATK, DEF, etc.)//==============================================================================Window_EquipStatus.prototype.drawParamName = function(x, y, paramId) { this.changeTextColor(equipParamColor); this.drawText(TextManager.param(paramId), x, y, 120);};//==============================================================================// drawRightArrow()//==============================================================================// Draws right arrow as used for parameter comparisons (equip)//==============================================================================Window_EquipStatus.prototype.drawRightArrow = function(x, y) { this.changeTextColor(rightArrowColor); this.drawText('\u2192', x, y, 32, 'center');};//==============================================================================// drawNewParam()//==============================================================================// Draws new parameter values (equip)//==============================================================================Window_EquipStatus.prototype.drawNewParam = function(x, y, paramId) { var newValue = this._tempActor.param(paramId); var diffvalue = newValue - this._actor.param(paramId); if(diffvalue < 0) { this.changeTextColor(statLossColor); } else if(diffvalue == 0) { this.changeTextColor(statNoChangeColor); } else { this.changeTextColor(statGainColor); } //this.changeTextColor(this.paramchangeTextColor(diffvalue)); this.drawText(newValue, x, y, 48, 'right');};//==============================================================================// drawItem()//==============================================================================// Draws slot and item names for the equipment menu//==============================================================================Window_EquipSlot.prototype.drawItem = function(index) { if (this._actor) { var rect = this.itemRectForText(index); this.changeTextColor(equipSlotColor); this.changePaintOpacity(this.isEnabled(index)); this.drawText(this.slotName(index), rect.x, rect.y, 138, this.lineHeight()); this.drawItemName(this._actor.equips()[index], rect.x + 138, rect.y); this.changePaintOpacity(true); }};//==============================================================================// drawExpInfo()//==============================================================================// Draws Experience-related stuff//==============================================================================Window_Status.prototype.drawExpInfo = function(x, y) { var lineHeight = this.lineHeight(); var expTotal = TextManager.expTotal.format(TextManager.exp); var expNext = TextManager.expNext.format(TextManager.level); var value1 = this._actor.currentExp(); var value2 = this._actor.nextRequiredExp(); if (this._actor.isMaxLevel()) { value1 = '-------'; value2 = '-------'; } this.changeTextColor(expInfoColor); this.drawText(expTotal, x, y + lineHeight * 0, 270); this.drawText(expNext, x, y + lineHeight * 2, 270); this.resetTextColor(); this.drawText(value1, x, y + lineHeight * 1, 270, 'right'); this.drawText(value2, x, y + lineHeight * 3, 270, 'right');};
Example Screenshot:





Since I haven't done any scripting for any RPG Maker so far (and I even don't use JS that much...I'm a C++ guy), I'm sure my scripts aren't particularly good in style, efficiency and so forth, but they do work.

Hope you like this stuff. Feedback is always appreciated :)

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,035
Messages
1,018,459
Members
137,821
Latest member
Capterson
Top