RPG Maker MV

RPG Maker MV

Iguana Guy May 24, 2018 @ 9:56pm
Enemies Display/Use "Attack" Despite Applied State? <PLUGIN ADD + FIX>
So I have three screenshots here: The enemy setup, the "Bite" skill, and the "Bloodlust" state.
The way it should work is when the wolf is affected by bloodlust it will attack anyone including self and always use the "Bite" skill. (It even has bite skill as default attack.) the skill does not cost MP or TP either. Whenever I playtest this though ( On map not battletest screen) after the wolves are in bloodlust, the attack displyed at the top is "Attack with default sword icon" not my bite skill which it should be? I tried removing the action sequence in the notetag but that didn't change anything either. Is my restriction of "attack anyone" blocking the bite skill or why does it not accept it as a usable battle attack. I am using Yanfly SV battler plugin, Skill Core and Buff/StatesCore as well. The Weapon animation in the notetag is the "bite" animation so for now it at least looks like a beast attack, but I want the attack to actually be "Bite" and not "Attack"
What am I missing or not understanding here?

https://steamcommunity.com/sharedfiles/filedetails/?id=1393954767

https://steamcommunity.com/sharedfiles/filedetails/?id=1393954953

https://steamcommunity.com/sharedfiles/filedetails/?id=1393954875

Plugins are up to date as far as I know.

ANSWER EDIT: I also had to fix the fact that I had no "scope" on my Bite skill set. So I had to set that to "1 enemy" as well. I must have toggled it off during my troubleshoot phase. Had to make sure this plugin was higher up near Yanfly Battle Core in the plugin list too. Just under animated SV enemies one works so far. Also had to add a <Cast Animation: 0> to bite skill to prevent that powerup effect each time ( But that is just cosmetic fix) All I need to do now is speed up the start of the action sequence because it seems to go slower now - probably due to the animation and confusion plugins both affecting the enemy at turn start - It does work now, Thanks!
Last edited by Iguana Guy; May 25, 2018 @ 7:17pm
Originally posted by Caethyril:
I hunted through the code a bit and it looks like, even with Yanfly's Battle Engine Core, any action restriction (Attack Enemy, Attack Anyone, Attack Ally) counts as "confusion", which, long story short, ends up setting the battler's action to the attack skill. (A similar thing happens with counter-attacks, though Yanfly has another plugin to help with that.)

However, I found this creative little plugin by DoubleX: https://rpgmaker.net/scripts/651/ (raw: https://pastebin.com/raw/LX7qJ74P). Quickly tested and it seems to be compatible with BEC, too! ^_^

There are no plugin parameters so you don't need to name it anything in particular. What it does is make confused battlers (i.e. ones affected by a state with Attack Ally, Attack Enemy, or Attack Any restriction) use something more similar to autobattle: the skill is selected from their known skills with the targetting inverted (so heal casts on enemies, attack targets allies, etc). Basically, just add a notetag like this to your "bloodlust" state:
<confusion edit: true, true>
The first "true" here tells the plugin to invert targetting. If set to false then the state will act like an "autobattle" state. The second "true" just prevents self-targetting~

[Edits for clarification.]
< >
Showing 1-12 of 12 comments
XIIIthHarbinger May 25, 2018 @ 12:38am 
I could be wrong here,

However, from the notetags you are using default attack isn't being replaced, like it is with a plugin like Yanfly's Weapon Unleash. & skills 1 & 2 effectively can't be removed without rather invasive scripting to my knowledge.

Additionally 5 is the default priority, so by setting it at 5 you aren't giving the program a reason to assign preeminence to Bite.

Personally most of my enemies have their own unique attack skills, based on types, which I use via Yanfly's Weapon Unleash, to apply notetags to the enemy types.

I.e. snakes have their particular bite, scorpions & wasps sting, bears claw, demi human attack styles are based on weapons used, human enemies the same.

I don't see anything in the notetags you are using that would replace the skill name & icon, with those you have assigned to bite.

So I would either use Yanfly's Weapon Unleash in concert with Yanfly's Side View; or if you don't want to use plugins boost the priority of bite well above 5, & set the priority of attack at well below 5.
The author of this thread has indicated that this post answers the original topic.
Caethyril May 25, 2018 @ 1:06am 
I hunted through the code a bit and it looks like, even with Yanfly's Battle Engine Core, any action restriction (Attack Enemy, Attack Anyone, Attack Ally) counts as "confusion", which, long story short, ends up setting the battler's action to the attack skill. (A similar thing happens with counter-attacks, though Yanfly has another plugin to help with that.)

However, I found this creative little plugin by DoubleX: https://rpgmaker.net/scripts/651/ (raw: https://pastebin.com/raw/LX7qJ74P). Quickly tested and it seems to be compatible with BEC, too! ^_^

There are no plugin parameters so you don't need to name it anything in particular. What it does is make confused battlers (i.e. ones affected by a state with Attack Ally, Attack Enemy, or Attack Any restriction) use something more similar to autobattle: the skill is selected from their known skills with the targetting inverted (so heal casts on enemies, attack targets allies, etc). Basically, just add a notetag like this to your "bloodlust" state:
<confusion edit: true, true>
The first "true" here tells the plugin to invert targetting. If set to false then the state will act like an "autobattle" state. The second "true" just prevents self-targetting~

[Edits for clarification.]
Last edited by Caethyril; May 25, 2018 @ 3:03am
Iguana Guy May 25, 2018 @ 6:25am 
That was my first thought is that setting my enemy state effect to "attack anyone" just bypassed all my other skill sets and defaulted to normal attack. What made me think that was I didn't even have normal attack as an option for the wolves but they did it anyway. I'l try this bit of code you sugest and update my thread here if it works ok. Plus you addressed the issue of them attacking themselves which is funny to watch happen but not really what I wanted either.
Iguana Guy May 26, 2018 @ 1:41pm 
XIII Harbinger - You also had a valid point about the priority setting of the skill "Bite" I noticed that even after this plugin fixed the problem, the "On Fire!" state from the burning barrel removed it and the ones affected went back to normal attacking until I made the "Bloodlust" state a higher priority then both "normal attack" and "On Fire!"
XIIIthHarbinger May 26, 2018 @ 2:00pm 
Originally posted by IguanaGuy:
XIII Harbinger - You also had a valid point about the priority setting of the skill "Bite" I noticed that even after this plugin fixed the problem, the "On Fire!" state from the burning barrel removed it and the ones affected went back to normal attacking until I made the "Bloodlust" state a higher priority then both "normal attack" and "On Fire!"

(shrugs) No worries.

I discovered how priority essentially overrides everything, when I was experimenting with essentially "grappling chain" skills.

I.e. skills where the enemy would apply one skill to inflict a state like "grap" or "constrict", followed by a more powerful attack if the state hadn't been removed on the next turn. Think like a snake grabbing prey, followed by biting down on the immobilized animal.

The enemy wouldn't use the more powerful "grapple followup" reliably until I boosted the priority more than two points above everything else.

I am fairly certain that conditionals simply control whether it's included in pool, but nothing else in the programs eval. So even if the conditionals are met, if they are the same priority level as the baseline attack skill, they will still be routinely ignored in favor of baseline attacks, as well as anything else that has the same priority or higher.

Simply put, if you want to ensure that a skill is activated when the conditionals are met, the priority must be at least two points higher than all other potential skills in the pool.
Iguana Guy May 26, 2018 @ 2:06pm 
There were a lot of changes that had to be implemented to make this work. I am hoping that the effort to make the battle actions seem more plausible will have been worth it. Not sure of the time it will take to make sure every battle I design makes sense.
Caethyril May 26, 2018 @ 3:17pm 
Mmh, default action priority is a little convoluted; for more complex AI I'd recommend a plugin such as Yanfly's Battle AI Core[yanfly.moe].

The default enemy AI is kinda explained in the help file, but since it doesn't seem to be well understood in general I'll attempt an explanation here. (The basic principles have hardly changed at all since RM2000 as far as I know.)
  1. First it checks which of the enemy's skills they can currently use.
  2. Next, it goes through the usable skills and filters out the ones whose conditions are not met.
  3. Then it finds the maximum priority value from those that remain: skills with this priority value get three "weight", decreasing by 1 per priority point less than the max to a minimum of zero.
  4. Then it randomly picks a skill based on these weights: a skill with 3 weight is 1.5x as likely to be picked as one with 2 weight; 2 weight is 2x as likely to be picked as 1 weight; 0 weight means it gets ignored. It's all just ratios...if it helps, you can think of weight as being how many copies of a skill are in the list. ^_^
Worked example for clarity: imagine an enemy has these actions...
Skill Condition Priority Attack Always 4 Defend HP < 50% 6 Death-Ray MP = 100% 7 Escape Always 3 Escape Always 2
Now some possible scenarios based on this:
  • If the enemy has 100% MP, max priority available is 7, so anything with 7 - 3 = 4 priority or less is not available for use. Assuming HP < 50%, the action list is reduced to Death-Ray (3 weight) and Defend (2 weight), giving a 3/5 chance (60%) to use Death-Ray, and 40% chance for Defend. If Defend's condition is not met, Death-Ray will be picked 100% of the time.
  • If the enemy's MP and HP are both under 50%, the highest priority available is 6. The action list becomes Defend (weight 3) or Attack (weight 1), so in this case Defend will be used 75% of the time.
  • If HP > 50% and MP < 100%: max priority is 3, weighted skill list is Attack (3), Escape (2), Escape (1) => Attack 50% of the time.
As mentioned, it has its limitations, but you can do some reasonably interesting stuff with it if you're careful. =)
XIIIthHarbinger May 26, 2018 @ 3:31pm 
Makes sense,

I suspected that was how the program was running the math, because the only time I could consistently get the enemy to chain skills in the order I wanted, was to put the next "link" three above all other potential skills.
Iguana Guy May 26, 2018 @ 3:37pm 
Does anyone remember how to make someone cast something on both alive and dead enemies at same time. I have a skill that is supposed to show animation on everyone but it only shows up on the living ones because the target is "all allies" not "all allies dead" I think I got the answer from someone in a chat, but that data was lost in my crash.
Caethyril May 26, 2018 @ 3:54pm 
If you're talking about just showing the animation with action sequences, it looks like there are all enemies and all opponents target types that include dead and living battlers. =)

Short of a workaround like forcing a follow-up skill through a common event, I think you'd need a plugin to get a skill to actually target both living and dead members of a group. Maybe Yanfly's Target Core? Not sure whether this notetag will work:
<Custom Target Eval> targets = targets.concat(foes); </Custom Target Eval>
Last edited by Caethyril; May 26, 2018 @ 3:56pm
Iguana Guy May 26, 2018 @ 9:21pm 
So I was having problems with certain aspects of my toxic muation event due to some strange setup issues.
Apparantly if i just put my common event "Mutation" in the Toxic Spill skill then if the enemies do mutate, their turn order display icon won't update until I attack one of the mutants. (It must do some auto refresh enemy data thing I guess.) But if I put the command to run the same common event on a troop event page ( With conditions to activate page of course) the turn order icons update immediately.
Just something to do with plugin setups I guess, but I'm passing on this little info nugget in case someone else is using turn order display plugin and has a similar problem when using any kind of "enemy swap."
To make the animation work on everyone dead and alive both, I had to do some creative eventing. I may be able to find the correct plugin/script call that works with my setup in the future, but this works smooth enough for now.
Thanks for helping me work through these issues. I think the Toxic Waste Barrel is finally up and running again! Mwah Hah Hah! :steammocking:
Caethyril May 27, 2018 @ 2:13am 
Yus! Toxic barrel party! \o/
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: May 24, 2018 @ 9:56pm
Posts: 12