Confira o Videos Épicos #45!
5 Respostas   128 Visualizações
0 Membros e 1 Visitante estão vendo este tópico.
// ================================================// newSave.js// ================================================/*: * @plugindesc Mudanças na tela de save * @author Tiaramisu * * @param Altura da janela * @default 300 * @type number * * @param Largura da janela * @default 400 * @type number * * @param Posição horizontal * @default 200 * @type number * * @param Posição vertical * @default 250 * @type number * * @param Posição do texto do personagem * @default 100 * @type number * * @param Posição do texto do arquivo * @default 175 * @type number */var NewSave = NewSave || {};NewSave.params = PluginManager.parameters('New Save');NewSave.windowH = parseInt(NewSave.params['Altura da janela'] || 300);NewSave.windowW = parseInt(NewSave.params['Largura da janela'] || 400);NewSave.windowX = parseInt(NewSave.params['Posição horizontal'] || -200);NewSave.windowY = parseInt(NewSave.params['Posição vertical'] || -50);NewSave.heroString = parseInt(NewSave.params['Posição do texto do personagem'] || 150);NewSave.fileString = parseInt(NewSave.params['Posição do texto do arquivo'] || 175);Window_SavefileList.prototype.initialize = function(x, y, width, height) { console.log(NewSave); let _x = Graphics.boxWidth / 2 + NewSave.windowX; let _y = Graphics.boxHeight / 2 + NewSave.windowY; let _w = NewSave.windowW; let _h = NewSave.windowH; Window_Selectable.prototype.initialize.call(this, _x, _y, _w, _h); this.activate(); this._mode = null;};Window_SavefileList.prototype.maxItems = function() { return 3;};Window_SavefileList.prototype.maxVisibleItems = function() { return 3;}Window_SavefileList.prototype.drawItem = function(index) { var id = index + 1; var valid = DataManager.isThisGameFile(id); var rect = this.itemRectForText(index); this.resetTextColor(); if (this._mode === 'load') { this.changePaintOpacity(valid); } this.drawFileId(id, rect); this.changePaintOpacity(valid); this.drawContents(rect, valid); this.changePaintOpacity(true);};Window_SavefileList.prototype.drawFileId = function(id, rect) { this.drawText(TextManager.file + ' ' + id, (rect.x + rect.width / 2) - NewSave.fileString, rect.y + rect.height / 8, 180);};Window_SavefileList.prototype.drawContents = function(rect, valid) { var bottom = rect.y + rect.height; let lineHeight = this.lineHeight(); let y2 = bottom - lineHeight; let name = $gameActors._data[1].name() let class_ = $dataClasses.filter((c) => c !== null && c.id === $gameActors._data[1]._classId); if (valid) { console.log(0); this.drawText(`${name} - ${class_[0].name}`, NewSave.heroString, bottom - 37); }};
Algo assim está bom pra você?Código: [Selecionar]// ================================================// newSave.js// ================================================/*: * @plugindesc Mudanças na tela de save * @author Tiaramisu * * @param Altura da janela * @default 300 * @type number * * @param Largura da janela * @default 400 * @type number * * @param Posição horizontal * @default 200 * @type number * * @param Posição vertical * @default 250 * @type number * * @param Posição do texto do personagem * @default 100 * @type number * * @param Posição do texto do arquivo * @default 175 * @type number */var NewSave = NewSave || {};NewSave.params = PluginManager.parameters('New Save');NewSave.windowH = parseInt(NewSave.params['Altura da janela'] || 300);NewSave.windowW = parseInt(NewSave.params['Largura da janela'] || 400);NewSave.windowX = parseInt(NewSave.params['Posição horizontal'] || -200);NewSave.windowY = parseInt(NewSave.params['Posição vertical'] || -50);NewSave.heroString = parseInt(NewSave.params['Posição do texto do personagem'] || 150);NewSave.fileString = parseInt(NewSave.params['Posição do texto do arquivo'] || 175);Window_SavefileList.prototype.initialize = function(x, y, width, height) { console.log(NewSave); let _x = Graphics.boxWidth / 2 + NewSave.windowX; let _y = Graphics.boxHeight / 2 + NewSave.windowY; let _w = NewSave.windowW; let _h = NewSave.windowH; Window_Selectable.prototype.initialize.call(this, _x, _y, _w, _h); this.activate(); this._mode = null;};Window_SavefileList.prototype.maxItems = function() { return 3;};Window_SavefileList.prototype.maxVisibleItems = function() { return 3;}Window_SavefileList.prototype.drawItem = function(index) { var id = index + 1; var valid = DataManager.isThisGameFile(id); var rect = this.itemRectForText(index); this.resetTextColor(); if (this._mode === 'load') { this.changePaintOpacity(valid); } this.drawFileId(id, rect); this.changePaintOpacity(valid); this.drawContents(rect, valid); this.changePaintOpacity(true);};Window_SavefileList.prototype.drawFileId = function(id, rect) { this.drawText(TextManager.file + ' ' + id, (rect.x + rect.width / 2) - NewSave.fileString, rect.y + rect.height / 8, 180);};Window_SavefileList.prototype.drawContents = function(rect, valid) { var bottom = rect.y + rect.height; let lineHeight = this.lineHeight(); let y2 = bottom - lineHeight; let name = $gameActors._data[1].name() let class_ = $dataClasses.filter((c) => c !== null && c.id === $gameActors._data[1]._classId); if (valid) { console.log(0); this.drawText(`${name} - ${class_[0].name}`, NewSave.heroString, bottom - 37); }};Você pode mexer na posição das coisas também. Não de tudo e nem de todas as formas porque to com preguiça.
// ================================================// newSave.js// ================================================/*: * @plugindesc Mudanças na tela de save * @author Tiaramisu * * @param Altura da janela * @default 300 * @type number * * @param Largura da janela * @default 400 * @type number * * @param Posição horizontal * @default 200 * @type number * * @param Posição vertical * @default 250 * @type number * * @param Posição do texto do personagem * @default 100 * @type number * * @param Posição do texto do arquivo * @default 175 * @type number */var NewSave = NewSave || {};NewSave.params = PluginManager.parameters('New Save');NewSave.windowH = parseInt(NewSave.params['Altura da janela'] || 300);NewSave.windowW = parseInt(NewSave.params['Largura da janela'] || 400);NewSave.windowX = parseInt(NewSave.params['Posição horizontal'] || -200);NewSave.windowY = parseInt(NewSave.params['Posição vertical'] || -50);NewSave.heroString = parseInt(NewSave.params['Posição do texto do personagem'] || 150);NewSave.fileString = parseInt(NewSave.params['Posição do texto do arquivo'] || 175);Window_SavefileList.prototype.initialize = function(x, y, width, height) { console.log(NewSave); let _x = Graphics.boxWidth / 2 + NewSave.windowX; let _y = Graphics.boxHeight / 2 + NewSave.windowY; let _w = NewSave.windowW; let _h = NewSave.windowH; Window_Selectable.prototype.initialize.call(this, _x, _y, _w, _h); this.activate(); this._mode = null;};Window_SavefileList.prototype.maxItems = function() { return 3;};Window_SavefileList.prototype.maxVisibleItems = function() { return 3;}Window_SavefileList.prototype.drawItem = function(index) { var id = index + 1; var valid = DataManager.isThisGameFile(id); var rect = this.itemRectForText(index); this.resetTextColor(); if (this._mode === 'load') { this.changePaintOpacity(valid); } this.drawFileId(id, rect); this.changePaintOpacity(valid); this.drawContents(rect, valid); this.changePaintOpacity(true);};Window_SavefileList.prototype.drawFileId = function(id, rect) { this.drawText(TextManager.file + ' ' + id, (rect.x + rect.width / 2) - NewSave.fileString, rect.y + rect.height / 8, 180);};Window_SavefileList.prototype.drawContents = function(rect, valid) { var bottom = rect.y + rect.height; let lineHeight = this.lineHeight(); let y2 = bottom - lineHeight; let name = $gameActors._data[1].name() if (valid) { console.log(0); this.drawText(`${name}`, NewSave.heroString, bottom - 37); }};