theweirdnerd

Villager
Member
Joined
Oct 9, 2020
Messages
13
Reaction score
5
First Language
English
Primarily Uses
RMMV
I've had an idea that works in the battle editor, but I want to know if anyone has a better/more efficient way of doing it. I want enemies to follow a certain hierarchy. It's not nearly as complex as it sounds. In certain enemy troops, there is a commander enemy and a bunch of grunt enemies. The commander enemy doesn't attack often but he can buff the grunts stats, making the little guys dangerous. The player can either focus on the grunts and take on the big guy on his own. Orrrrrr, if the player takes out the commander, the little guys get inflicted with the Fear status effect, making the fight easier.
My issue is the way that I've been doing it. I select the commander troop with a conditional branch, then once their HP reaches 0%, I choose each individual grunt enemy and set their status to fear. Is there a more efficient way of doing this so I don't spend as much time editing each troop that has this mechanic?
I'll include a screen cap of how I've been doing it. When there is more than one commander and multiple grunts, things can get pretty tedious controlling which grunt gets the status effect.
 

Attachments

  • Capture.PNG
    Capture.PNG
    71 KB · Views: 4

ave36

Veteran
Veteran
Joined
Jun 23, 2019
Messages
167
Reaction score
62
First Language
Russian
Primarily Uses
RMMV
I have a similar enemy encounter, a giant, partially submerged octopus with a body and arms. If you inflict a status effect on the body, arms get the status effect as well, and if you kill the body, arms die, too. I use the same method as you. There probably is a way to do this via lunatic scripting, but I see no reason why.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,335
First Language
English
Primarily Uses
RMMZ
That's probably the best way to do this without plugins. I don't know specifically what plugins to use or how to use them but there's likely a way to reduce the tediousness.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
888
Reaction score
475
First Language
English
Primarily Uses
RMMV
You could use Yanfly's Buffs and States Core, put a Custom Apply Effect on the Knockout state and put your code in there. I don't know if that would make it any simpler to have access to proper JavaScript for your purposes (rather than just event commands and conditionals). But at least it could be centralized so you don't have to copy it around to every troop that uses it *shrug*
 

kirbwarrior

Veteran
Veteran
Joined
Nov 13, 2014
Messages
827
Reaction score
566
First Language
English
Primarily Uses
N/A
Well, for now, you can set that page to hit all enemies except #1 (you have it only hit two, I think it's fine if it tries to apply a state to an enemy that isn't there), then just copy the page into other battle events. You just have to remember to make the commander #1.

You could use Yanfly's Buffs and States Core, put a Custom Apply Effect on the Knockout state and put your code in there. I don't know if that would make it any simpler to have access to proper JavaScript for your purposes (rather than just event commands and conditionals). But at least it could be centralized so you don't have to copy it around to every troop that uses it *shrug*
What you could do is make a 'commander' state that would get removed upon Knockout. Part of its removal hits the whole team with a specified state. Another thought is to have the commander state do nothing but be a passive state (again, with yanfly plugins) and a subordinate state that kicks in if no one in the party has the commander state with whatever downsides you want.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
888
Reaction score
475
First Language
English
Primarily Uses
RMMV
What you could do is make a 'commander' state that would get removed upon Knockout. Part of its removal hits the whole team with a specified state.
I suggested it the way I did (custom apply in Knockout's tags) because custom remove tags don't always (ever?) get called when the target dies.
Another thought is to have the commander state do nothing but be a passive state (again, with yanfly plugins) and a subordinate state that kicks in if no one in the party has the commander state with whatever downsides you want.
That works, too.
 

kirbwarrior

Veteran
Veteran
Joined
Nov 13, 2014
Messages
827
Reaction score
566
First Language
English
Primarily Uses
N/A
I suggested it the way I did (custom apply in Knockout's tags) because custom remove tags don't always (ever?) get called when the target dies.
Good to know, thanks!

Another thought (again with Yanfly) is to use the aura states to boost the commander's team. When the aura is gone, they'll go back to normal. This can even let you use enemies you have elsewhere, power them up for the boss fight, and they go back to normal when the commander is gone. You can even do this without any event pages by just having it be the first skill the commander uses.

Actually, based on that, you could have the commander's buffs last only a turn and used at start of turn so they're 'always on'. Just make sure the buffs are big enough that the commander dying gives them effectively what stats you want from Fear. Mind, if Fear does more than stat changes, this won't work.
 

Latest Threads

Latest Profile Posts

Just finished my first Slip into Ruby since last July! It'll be up and added to the main post tomorrow, along with a new Jump into Javascript.
to pass the time.pngTesting out making boxes and packs of items. These things are always fun to do.
Rural Japan Tiles, Giant Dragon Sprite, Paint Icons? & Game Spicy Pixel Fonts | RPG Maker News #31

just hopped into project recruitment... hoping to maybe find some artists to help with parallax maps and whatnot. I could do them myself, but I'm not really good at it so I'd prefer to stick to my strengths which is character art and SOME UI elements.

Forum statistics

Threads
111,101
Messages
1,058,285
Members
144,305
Latest member
Fertrick
Top