CriticalGames

Veteran
Veteran
Joined
Aug 8, 2014
Messages
220
Reaction score
65
First Language
English
Primarily Uses
Hi everyone,


I'm currently trying to develop my own Custom Menu Plugin, and while I've been going well (thanks in no small part of SumRndmDde's excellent tutorial series!), I've hit a snag that I just can't figure out and was wondering if anyone had any suggestions.


I'm working on the Actor Status part of the Main Menu, where it displays all of your characters and their HP/MP/Level/etc. This is what I've currently got:


Menu Layout Current.png


And this is what I'm trying to achieve:


Menu Layout Example.png


My game features a total of 7 playable characters, and a maximum of 3 characters in battle, so I thought this was a good way of approaching the layout. So basically I'm trying to make it so that the menu is presented as a row of 2 characters, then a row of 1 character (which is centralised), then a larger than normal gap followed by two rows of 2 characters. I believe I know how to sort out the background with the Battle Party/Reserve Party assets, however...


I cannot for the life of me figure out how to manipulate the x/y/width/height variables of an individual actor's status (e.g. keep the first two party members in their designated columns, but move the third to the centre of the menu). I've tried creating new prototypes (e.g. I made one called drawActor1HP and tried to point it towards the first actor in the party using $gameParty.members()[index] - obviously I got something very wrong there), and looking for the origins of commonly referenced terms like 'actor' and 'ActorSimpleStatus' to see how they're defined. But no luck, I'm afraid - I'm completely stumped! So my question is - is there a piece of syntax that allows me to manipulate a single actor's status graphics? My current script is below; I apologise for the mess (this isn't my forte)!

(function() {

var _Scene_Menu_create = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
_Scene_Menu_create.call(this);
};

Window_MenuStatus.prototype.windowWidth = function() {
return Graphics.boxWidth - 240;
};

Window_MenuStatus.prototype.windowHeight = function() {
return Graphics.boxHeight
};

Window_MenuStatus.prototype.numVisibleRows = function() {
return 4;
};

Window_MenuStatus.prototype.maxCols = function() {
return 2;
};

Window_MenuStatus.prototype.drawItemStatus = function(index) {
var actor = $gameParty.members()[index];
var rect = this.itemRect(index);
var x = rect.x + 68;
var y = rect.y + 40;
var width = rect.width - x - this.textPadding();
var lineHeight = this.lineHeight();
var width2 = 186; //Math.min(200, width - 180 - this.textPadding());
this.drawActorName(actor, x, y);

this.drawActorIcons(actor, x, y + lineHeight * 2);
this.drawActorHp(actor, x, y + lineHeight, width2);
this.drawActorMp(actor, x, y + lineHeight * 2, width2);

Window_MenuStatus.prototype.drawItemImage = function(index) {
var actor = $gameParty.members()[index];
var rect = this.itemRect(index);
this.drawActorFace(actor, rect.x - 52, rect.y + 22, Window_Base._faceWidth, Window_Base._faceHeight);
this.changePaintOpacity(true);
};

Window_Base.prototype.drawActorLevel = function(actor, x, y) {
this.changeTextColor(this.systemColor());
this.drawText(TextManager.levelA, x, y, 48);
this.resetTextColor();
this.drawText(actor.level, x + 36, y, 20, 'right');
};

this.drawActorLevel(actor, (x + 130), y);

};

Window_MenuCommand.prototype.windowWidth = function() {
return 240;
};

Window_MenuCommand.prototype.windowHeight = function() {
return this.fittingHeight(this.numVisibleRows());
};

Window_MenuCommand.prototype.numVisibleRows = function() {
return this.maxItems();
};

})();



Thank you very much for looking! =)
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
807
First Language
English
Primarily Uses
RMMV
You might want to use a for loop to  draw each status the way you want. And on the third iteration change it so its in the middle. I'll  add some code that I think might help later.
 

CriticalGames

Veteran
Veteran
Joined
Aug 8, 2014
Messages
220
Reaction score
65
First Language
English
Primarily Uses
You might want to use a for loop to  draw each status the way you want. And on the third iteration change it so its in the middle. I'll  add some code that I think might help later.



Thank you very much! I'm sorry though - at face value, I'm not really sure how I'd utilise that with the syntax I know. So if you could provide some example code, that'd be a massive help. No rush though =) Thanks again!
 

CriticalGames

Veteran
Veteran
Joined
Aug 8, 2014
Messages
220
Reaction score
65
First Language
English
Primarily Uses
Hi everyone,


Sorry to bump the topic, but I'm afraid I still haven't been able to figure this one out myself. So if anyone has any ideas, that'd be much appreciated =)
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm familiar with MZ thanks to jam now. I say it's a better working and looking MV. Lots of plugins too and FOSSIL helps alot. It's not bad.
Some more progress <3 and in most important news:
ALPACARAPTOR SPRITE! (not animated yet, though :( )
h4u90Sz.png
Caz
At the risk of giving myself even more work to do, I kinda wanna redraw the faces of the MV RTP to be a little less.. uhhhhh..

mv-redraw.png
Hmm...you'd think in this day and age, what with Japanese Schoolgirls frequenting anime, JRGs and whatever else...that someone might have made some gym clothes for the generator. You know, the ones with the short bloomers.
finished the draft of some of this dude's motions!

mc0xoB4.gif


gonna work on the drafts of the other 3 now before i put detail, need to position these rather tall sprites well on the field

waiting for the term to end so i can get more time w this :kaodes:

Forum statistics

Threads
113,641
Messages
1,076,385
Members
147,659
Latest member
Fountairpg
Top