//============================================================================= // Nasty Replace Window with Picture // Version: 1.0.4 //============================================================================= var Imported = Imported || {}; Imported.Nasty_Replace_Window_with_Picture = true; var Nasty = Nasty || {}; //============================================================================= /*: * @plugindesc Use pictures instead of the windowskin image! * * @author Nelderson * * @param Debug Mode? * @desc Print width and height of every window loaded to the console(F8). * @default false * * @param Window 1 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 1 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 2 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 2 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 3 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 3 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 4 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 4 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 5 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 5 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 6 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 6 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 7 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 7 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 8 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 8 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 9 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 9 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 10 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 10 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 11 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 11 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 12 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 12 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 13 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 13 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 14 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 14 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 15 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 15 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 16 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 16 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 17 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 17 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 18 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 18 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 19 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 19 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 20 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 20 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 21 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 21 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 22 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 22 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 23 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 23 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 24 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 24 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 25 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 25 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 26 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 26 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 27 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 27 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 28 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 28 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 29 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 29 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @param Window 30 Object Name * @desc Use this to say which window object you want to switch: * Use the Debug if you need to find names to work with. * * @param Window 30 Picture Name * @desc Name of the picture in the img/pictures folder: * * * @help * ============================================================================ * Introduction and Instructions * ============================================================================ * * Want to make super special windows in your game? Sometimes the windowskin * isnt enough, that's where Nasty Replace Window with Picture plugin comes in! * * All you need to do is define the window object name and the picture name * located in your img/pictures folder * * If you don't know the window object name, fret not! You can use the * nifty debug tool. This will give you a list of all window objects that * are currently loading, and will also tell you the width and height! * * You can also change windows on the fly with the Plugin Command: * ChangeWindowPic Window_Object PictureName * * Ex: * ChangeWindowPic Window_Status Pic3 * * This would change the Status Window background to pic3 in the * img/pictures folder! * * * * HAVE FUN! */ //============================================================================= //============================================================================= // Parameter Variables //============================================================================= Nasty.Replace_Window_with_Pic = Nasty.Replace_Window_with_Pic || {}; (function($){ Nasty.Parameters = $plugins.filter(function(p) { return p.description.contains(''); })[0].parameters; Nasty.Param = Nasty.Param || {}; Nasty.Param.PicWindow_Obj = {}; Nasty.Param.PicWindow_Debug_Mode = String(Nasty.Parameters['Debug Mode?']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 1 Object Name'])] = String(Nasty.Parameters['Window 1 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 2 Object Name'])] = String(Nasty.Parameters['Window 2 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 3 Object Name'])] = String(Nasty.Parameters['Window 3 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 4 Object Name'])] = String(Nasty.Parameters['Window 4 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 5 Object Name'])] = String(Nasty.Parameters['Window 5 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 6 Object Name'])] = String(Nasty.Parameters['Window 6 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 7 Object Name'])] = String(Nasty.Parameters['Window 7 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 8 Object Name'])] = String(Nasty.Parameters['Window 8 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 9 Object Name'])] = String(Nasty.Parameters['Window 9 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 10 Object Name'])] = String(Nasty.Parameters['Window 10 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 11 Object Name'])] = String(Nasty.Parameters['Window 11 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 12 Object Name'])] = String(Nasty.Parameters['Window 12 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 13 Object Name'])] = String(Nasty.Parameters['Window 13 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 14 Object Name'])] = String(Nasty.Parameters['Window 14 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 15 Object Name'])] = String(Nasty.Parameters['Window 15 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 16 Object Name'])] = String(Nasty.Parameters['Window 16 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 17 Object Name'])] = String(Nasty.Parameters['Window 17 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 18 Object Name'])] = String(Nasty.Parameters['Window 18 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 19 Object Name'])] = String(Nasty.Parameters['Window 19 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 20 Object Name'])] = String(Nasty.Parameters['Window 20 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 21 Object Name'])] = String(Nasty.Parameters['Window 21 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 22 Object Name'])] = String(Nasty.Parameters['Window 22 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 23 Object Name'])] = String(Nasty.Parameters['Window 23 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 24 Object Name'])] = String(Nasty.Parameters['Window 24 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 25 Object Name'])] = String(Nasty.Parameters['Window 25 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 26 Object Name'])] = String(Nasty.Parameters['Window 26 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 27 Object Name'])] = String(Nasty.Parameters['Window 27 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 28 Object Name'])] = String(Nasty.Parameters['Window 28 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 29 Object Name'])] = String(Nasty.Parameters['Window 29 Picture Name']); Nasty.Param.PicWindow_Obj[String(Nasty.Parameters['Window 30 Object Name'])] = String(Nasty.Parameters['Window 30 Picture Name']); // Window_Base prototype and aliasing var Nasty_winpic_sprite = {}; var NASTY_PicWindow_Window_Base_Redo = Window_Base.prototype.initialize; Window_Base.prototype.initialize = function(x, y, width, height){ //Aliases must have *this* as the first argument NASTY_PicWindow_Window_Base_Redo.call(this, x, y, width, height); //Check for Window defined in user section? And then replace with pic var Nasty_list_of_winpic_keys = Object.keys(Nasty.Param.PicWindow_Obj); if (Nasty_list_of_winpic_keys.contains(this.constructor.name)){ if (Nasty.Param.PicWindow_Obj[this.constructor.name]){ Nasty_winpic_sprite = new Sprite_Base(); Nasty_winpic_sprite.bitmap = ImageManager.loadPicture(Nasty.Param.PicWindow_Obj[this.constructor.name]); this.addChildToBack(Nasty_winpic_sprite); } else{ console.log("Please Define which Picture to use in the Plugin Manager :)"); } //Make original Wiindow opaque if defined in user section this.opacity = 0; } if (Nasty.Param.PicWindow_Debug_Mode === 'true'){ console.log(this.constructor.name+" Width: "+this.width+" Height: "+ this.height); } }; var NASTY_PicWindo_setBckrd_type_Redo = Window_Base.prototype.setBackgroundType; Window_Base.prototype.setBackgroundType = function(type) { if (Nasty_winpic_sprite){ if (type === 0) { Nasty_winpic_sprite.opacity = 255; } else { Nasty_winpic_sprite.opacity = 0; } NASTY_PicWindo_setBckrd_type_Redo.call(this, type); } }; //============================================================================= // Game_Interpreter - New Plugin Commands //============================================================================= Nasty_picWindow_change_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; Game_Interpreter.prototype.pluginCommand = function(command, args) { Nasty_picWindow_change_Game_Interpreter_pluginCommand.call(this, command, args); if (command === 'ChangeWindowPic') { Nasty.Param.PicWindow_Obj[args[0]] = args[1]; } }; })(Nasty.Replace_Window_with_Pic);