I decided to post here because I'm having an issue with a plugin I'm trying to work and for the life of me I can't figure out how to get it to work, I've changed and fixed many things but nothing seems to work.
I'm trying to make a simple plugin which will allow me to edit some parameters of the draw title function. So I can do things like change the outline color, where it's positioned, etc. The title just completely disappears though, which is definitely not what I'm looking for. 😅
Here is the whole plugin, decided to let you see all the parameter setups too in case I messed up somewhere.
If anyone can help me figure out what's wrong I would be most appreciative! I really hope I can get better at this! :kaomad2:
I'm trying to make a simple plugin which will allow me to edit some parameters of the draw title function. So I can do things like change the outline color, where it's positioned, etc. The title just completely disappears though, which is definitely not what I'm looking for. 😅
Here is the whole plugin, decided to let you see all the parameter setups too in case I messed up somewhere.
Code:
/*:
* @plugindesc This is the plugin description!
* This is my first actual plugin! It will probably suck tho. XD
* @author SmashArtist
*
* @param This is a param title!
* @type this is the param type ex: music , img , stuff
* @desc This is the parameter description
* @default default the param is set to
*
* @param xpos
* @text X Position
* @type Number
* @desc The x position of the title.
* Default: 20
* @default 20
*
* @param ypos
* @text Y Position
* @type Text
* @desc The y position of the title.
* Default: Graphics.height / 4
* @default Graphics.height / 4
*
* @param outline_c
* @text Outline Color
* @type Text
* @desc The outline color of the title.
* Default: black
* @default black
*
* @param outline_w
* @text Outline Width
* @type Number
* @desc The outline width of the title.
* Default: 8
* @default 8
*
* @help
* Everything after the help sign will be the help file for the plugin!
* ....
* .............
* Until the asterix and the slash, then it's all the coding shizzles.
*
* This is the end of the help file! Bye bye! (~ 'v')~
* =================================================================================
* ~~CHANGELOG~~
* =================================================================================
* Ver 1.1 - Made some derpy title draw code editing.
* Ver 1.0 - Plugin made! So far the plugin does nothing, but I will add code later!
* =================================================================================
*/
(function() {
var parameters = PluginManager.parameters('SA_FirstPlugin');
var parameter0 = String(parameters['This is a param title!']);
var xpos = Number(parameters['xpos']);
var ypos = String(parameters['ypos']);
var outline_c = String(parameters['outline_c']);
var outline_w = Number(parameters['outline_w']);
Scene_Title.prototype.drawGameTitle = function() {
var x = xpos;
var y = ypos;
var maxWidth = Graphics.width - x * 2;
var text = $dataSystem.gameTitle;
this._gameTitleSprite.bitmap.outlineColor = outline_c;
this._gameTitleSprite.bitmap.outlineWidth = outline_w;
this._gameTitleSprite.bitmap.fontSize = 72;
this._gameTitleSprite.bitmap.drawText(text, x, y, maxWidth, 48, 'center');
};
})();
If anyone can help me figure out what's wrong I would be most appreciative! I really hope I can get better at this! :kaomad2: