Questions on Skills and enemy names

I'm thinking of adding an all out attack skill that reduces the user's defense for the rest of the turn and an attack that makes the user attack first regardless of agility differences. Anyone know how I could do that?

As for enemy names I want to make it so that when the enemy's HP reaches 50% their name changes to yellow and when it's below 25% it changes to red. Anyone know if there's a plugin for that or if I could simply code that in myself?

Thanks in advance.
lucy-desi.gif


1. It would be helpful if you described the skills and their effects in more detail. "All out attack skill" means nothing to us.

2. What enemy names? Enemy names show up in battle in a couple of places by default, but you may also be using plugins that add new instances where the enemy name is displayed. It would be helpful if you posted a screenshot showing the specific instance of text you are referring to. Otherwise, if you are using custom plugins, someone would have to spend several replies trying to coerce said plugin(s) out of you.
Well, for the skill I can give... what I think you're asking. You can add a debuff to defense for 1 turn, simple enough, I think.
You can also increase the skill speed, that plays a part in determining turn order, so just... crank that up to an absurd level and it should work in most cases, I think

But yeah, what Kenen said about the enemy names
lucy-desi.gif


1. It would be helpful if you described the skills and their effects in more detail. "All out attack skill" means nothing to us.

2. What enemy names? Enemy names show up in battle in a couple of places by default, but you may also be using plugins that add new instances where the enemy name is displayed. It would be helpful if you posted a screenshot showing the specific instance of text you are referring to. Otherwise, if you are using custom plugins, someone would have to spend several replies trying to coerce said plugin(s) out of you.
It's pretty simple. All out attack just means a strong attack (I took care of that with regular damage calculation). The attack itself makes user get lowered defense for that turn which makes them vulnerable to getting counterattacked. The lowered defense part is what i have problems with since I can only get the debuffs to affect enemies through the effect menu.

As for enemy names I mean right here
image_2025-01-07_010640535.png

Where it mentions Gnome A and Gnome B. I want to make so that if their HP drops to 50% those names become yellow and when they drop to 25% they become red.

I'm not using any plugins whatsoever this is the default version of things.
Well, for the skill I can give... what I think you're asking. You can add a debuff to defense for 1 turn, simple enough, I think.
You can also increase the skill speed, that plays a part in determining turn order, so just... crank that up to an absurd level and it should work in most cases, I think

But yeah, what Kenen said about the enemy names
When I try adding a debuff to defense it only ends up affecting the enemy and not the user. Do I have to do some coding for this or is there a way to do it in the database without any coding?

About enemy names I mean right here.
image_2025-01-07_011209918.png


I don't have any plugins or anything, I just want the names here in this menu to change color to reflect the respective enemy's HP.
Create a state for the debuff. You can make it last as many turns as you want.
In the damage formula :
a.addState(x); damage formula

x is the state id from the data base.
Create a state for the debuff. You can make it last as many turns as you want.
In the damage formula :
a.addState(x); damage formula

x is the state id from the data base.
I got it to work thanks a bunch! Do you know where I can find a list of the commands I can put in the damage formula?
For future reference, there is an alternative.

a.addDebuff(paramID, turns)

Param ids start at zero, not one. Defence, therefore, is id 3, not id 4 as you might expect looking at the list. If you want the debuff to last e.g. 2 turns it would be:
a.addDebuff(3, 2); damage formula

I tend not to use this because I can make the states exactly as I want. For example, the standard debuff rate is 25%. But I might want 20% or 30% or whatever.
You didn't specify that the debuff was to apply to the user, so people naturally assumed you meant the enemy.
they did
attack skill that reduces the user's defense for the rest of the turn
The attack itself makes user get lowered defense for that turn which makes them vulnerable to getting counterattacked

As for enemy names I want to make it so that when the enemy's HP reaches 50% their name changes to yellow and when it's below 25% it changes to red. Anyone know if there's a plugin for that or if I could simply code that in myself?
as for the hp, if thats the only place you want that to happen in, then try saving this as a .js file and adding it to your project as a plugin
Code:
Window_BattleEnemy.prototype.drawItem = function(index) {
    this.resetTextColor();
    const name = this._enemies[index].name();
    const rect = this.itemLineRect(index);
    if (this._enemies[index].hpRate()<.5)
        this.changeTextColor("#ffff40");
    if (this._enemies[index].hpRate()<.25)
        this.changeTextColor("#ff2020");
    this.drawText(name, rect.x, rect.y, rect.width);
    this.resetTextColor()
};
I know, which is why it was edited out from my post almost immediately, some 20+ minutes before you posted, and why the OP didn't comment some 10 minutes before.
I know, which is why it was edited out from my post almost immediately, some 20+ minutes before you posted, and why the OP didn't comment some 10 minutes before.
i didnt refresh the page or get the blue banner that new posts were made before posting, so i never saw the edit or replies after i stepped away and tested the plugin. my b

I tend not to use this because I can make the states exactly as I want. For example, the standard debuff rate is 25%. But I might want 20% or 30% or whatever.
theres also one additional caveat that may or may not be relevant and makes states a bit better for this in the damage formula - that code gets ran per hit it makes. so if by chance the skill hits multiple targets, the user gains multiple debuffs / loses multiple buffs per use. multiple applications of the state wouldnt do any harm

I got it to work thanks a bunch! Do you know where I can find a list of the commands I can put in the damage formula?
Check out both of these threads and it should be a good start
they did




as for the hp, if thats the only place you want that to happen in, then try saving this as a .js file and adding it to your project as a plugin
Code:
Window_BattleEnemy.prototype.drawItem = function(index) {
    this.resetTextColor();
    const name = this._enemies[index].name();
    const rect = this.itemLineRect(index);
    if (this._enemies[index].hpRate()<.5)
        this.changeTextColor("#ffff40");
    if (this._enemies[index].hpRate()<.25)
        this.changeTextColor("#ff2020");
    this.drawText(name, rect.x, rect.y, rect.width);
    this.resetTextColor()
};
I put your code in a .js file and put it in the plugins folder but when I turned it on in the plugin manager, nothing happened. Did I screw it up somewhere?
did you save your project? plugin changes dont register till you do.
did you save your project? plugin changes dont register till you do.
IT WORKS! HUZZAH!

Thanks a bunch for the help!

Original thread: https://forums.rpgmakerweb.com/threads/questions-on-skills-and-enemy-names.174486/