So I am trying to make a plugin with Chat GPT, and I thought it was simple, but I have tried over 10 times with no results at all. Except one of the versions squished the battle status window. ANYWAY, what I am trying to do is make it so that all state icons appear at once during battle, like if an actor has 3 states, the status window shows all 3 states at once instead of them flashing between each other. This is the code the AI spat out:
//=============================================================================
// DS_MultipleStatusIcons.js
//=============================================================================
/*:
* @plugindesc Displays multiple status icons for RPG Maker MZ
* @Author ChatGPT
*
* @param X Position
* @desc The X position of the icons
* @Default 6
*
* @param Y Position
* @desc The Y position of the icons
* @Default 64
*
* @param Max Columns
* @desc The maximum number of columns of status icons before a new row is started
* @Default 3
*
* @Help DS_MultipleStatusIcons.js
*
* This plugin displays multiple status icons for each actor in the battle status window during battle.
*
* Compatibility:
* - This plugin should be compatible with most VisuStella MZ plugins
*
*/
var Imported = Imported || {};
Imported.DS_MultipleStatusIcons = true;
(function() {
var parameters = PluginManager.parameters('DS_MultipleStatusIcons');
var xPos = Number(parameters['X Position']) || 6;
var yPos = Number(parameters['Y Position']) || 64;
var maxColumns = Number(parameters['Max Columns']) || 3;
// Override VisuStella MZ Library Engine's drawActorIcons method
if (typeof Window_BattleStatus !== 'undefined') {
var _alias_Window_BattleStatus_drawActorIcons = Window_BattleStatus.prototype.drawActorIcons;
Window_BattleStatus.prototype.drawActorIcons = function(actor, x, y, width) {
width = width || 144;
var icons = actor.allIcons();
var rows = Math.ceil(icons.length / maxColumns);
for (var i = 0; i < icons.length; i++) {
var row = Math.floor(i / maxColumns);
var col = i % maxColumns;
this.drawIcon(icons, x + col * Window_Base._iconWidth, y + row * Window_Base._iconHeight);
}
};
}
// Override VisuStella MZ Library Engine's drawActorSimpleStatus method
if (typeof Window_BattleStatus !== 'undefined') {
var _alias_Window_BattleStatus_drawActorSimpleStatus = Window_BattleStatus.prototype.drawActorSimpleStatus;
Window_BattleStatus.prototype.drawActorSimpleStatus = function(actor, x, y, width) {
_alias_Window_BattleStatus_drawActorSimpleStatus.call(this, actor, x, y, width);
this.drawActorIcons(actor, x + 162, y);
};
}
})();
----THAT'S IT----
I know like 0.000001% of Javascript. Is this even in the ballpark? Or maybe there is a small fix? Help!!!!
//=============================================================================
// DS_MultipleStatusIcons.js
//=============================================================================
/*:
* @plugindesc Displays multiple status icons for RPG Maker MZ
* @Author ChatGPT
*
* @param X Position
* @desc The X position of the icons
* @Default 6
*
* @param Y Position
* @desc The Y position of the icons
* @Default 64
*
* @param Max Columns
* @desc The maximum number of columns of status icons before a new row is started
* @Default 3
*
* @Help DS_MultipleStatusIcons.js
*
* This plugin displays multiple status icons for each actor in the battle status window during battle.
*
* Compatibility:
* - This plugin should be compatible with most VisuStella MZ plugins
*
*/
var Imported = Imported || {};
Imported.DS_MultipleStatusIcons = true;
(function() {
var parameters = PluginManager.parameters('DS_MultipleStatusIcons');
var xPos = Number(parameters['X Position']) || 6;
var yPos = Number(parameters['Y Position']) || 64;
var maxColumns = Number(parameters['Max Columns']) || 3;
// Override VisuStella MZ Library Engine's drawActorIcons method
if (typeof Window_BattleStatus !== 'undefined') {
var _alias_Window_BattleStatus_drawActorIcons = Window_BattleStatus.prototype.drawActorIcons;
Window_BattleStatus.prototype.drawActorIcons = function(actor, x, y, width) {
width = width || 144;
var icons = actor.allIcons();
var rows = Math.ceil(icons.length / maxColumns);
for (var i = 0; i < icons.length; i++) {
var row = Math.floor(i / maxColumns);
var col = i % maxColumns;
this.drawIcon(icons, x + col * Window_Base._iconWidth, y + row * Window_Base._iconHeight);
}
};
}
// Override VisuStella MZ Library Engine's drawActorSimpleStatus method
if (typeof Window_BattleStatus !== 'undefined') {
var _alias_Window_BattleStatus_drawActorSimpleStatus = Window_BattleStatus.prototype.drawActorSimpleStatus;
Window_BattleStatus.prototype.drawActorSimpleStatus = function(actor, x, y, width) {
_alias_Window_BattleStatus_drawActorSimpleStatus.call(this, actor, x, y, width);
this.drawActorIcons(actor, x + 162, y);
};
}
})();
----THAT'S IT----
I know like 0.000001% of Javascript. Is this even in the ballpark? Or maybe there is a small fix? Help!!!!