Okay so I'm 100% certain that everything I say here is going to be some flavour of the wrong word for what I'm talking about so just bare with me while I clumsily stumble:
I want to make my game check the value of the party member before deciding whether to draw an MP gauge, a TP gauge, or neither. Different characters use different gauges, you see.
So, here's where I'm at:
This is the built in function for drawing a gauge with Tp involved. I intend to hijack this function because I have no goddamn clue how to make my own plugin. I will comment out the parts I plan to replace so that if anything goes wrong I can always put it back.
What I want to do is put the in game actor ID for each actor being checked with this function into an if statement that measures that value against a pool of fixed numerical integers (there are only 4 player characters so it need not be flexible or elegant, merely functional) so I can hard code specific actors to have specific gauge drawing parameters.
The trouble is, I have literally no idea how to write any code at all. Every time I've used control f4 to search through for subroutine declarations and tried to hobble together something to make this happen, it's just squawked at me that "undefined is not a function" or whatever the hell it keeps saying.
I can code in game, but the raw script walls are not my friend. In my head, it looks something like this:
How do I translate this into actual, functional code?
I want to make my game check the value of the party member before deciding whether to draw an MP gauge, a TP gauge, or neither. Different characters use different gauges, you see.
So, here's where I'm at:
JavaScript:
Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
this.drawActorHp(actor, rect.x + 0, rect.y, 108);
this.drawActorMp(actor, rect.x + 123, rect.y, 96);
this.drawActorTp(actor, rect.x + 234, rect.y, 96);
This is the built in function for drawing a gauge with Tp involved. I intend to hijack this function because I have no goddamn clue how to make my own plugin. I will comment out the parts I plan to replace so that if anything goes wrong I can always put it back.
What I want to do is put the in game actor ID for each actor being checked with this function into an if statement that measures that value against a pool of fixed numerical integers (there are only 4 player characters so it need not be flexible or elegant, merely functional) so I can hard code specific actors to have specific gauge drawing parameters.
The trouble is, I have literally no idea how to write any code at all. Every time I've used control f4 to search through for subroutine declarations and tried to hobble together something to make this happen, it's just squawked at me that "undefined is not a function" or whatever the hell it keeps saying.
I can code in game, but the raw script walls are not my friend. In my head, it looks something like this:
JavaScript:
Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
if \\the actor's in game ID is equal to 2
then
this.drawActorHp(actor, rect.x + 0, rect.y, 108);
this.drawActorMp(actor, rect.x + better number, rect.y, 96);
else if \\the actor's in game ID is equal to 3
then
this.drawActorHp(actor, rect.x + 0, rect.y, 108);
this.drawActorTp(actor, rect.x + better number, rect.y, 96);
else
this.drawActorHp(actor, rect.x + 0, rect.y, 108);
}
How do I translate this into actual, functional code?