How to Enemy Skill deliver a specific amount of damage?

Background:

I'm trying to use battle eventing to create a battle-style quiz. My quiz is set up as follows:

  • Both player and enemy have 100 HP.
  • Five questions using "Show Choices".
    • If answer is correct, Force Action of player's "Hit" skill (formula=25)
    • If answer is incorrect, Force Action of "Enemy Attack" skill
In this way, I want to require the player to answer 4/5 questions correctly in order to pass the quiz.​

Problem:

No matter what I plug in to the formula for the "Enemy Attack" skill, I cannot get it to deliver exactly 50 damage.

Everything is pretty bare bones right now as this was just meant to be a very mini game. I've tried tinkering with the enemy's attack (Set to 1, he will only do 2 damage. Set to anything else and he does a variable amount). I've tried tinkering with the "Enemy Attack" skill formula (even just making it equal 50, which worked for the player's "Hit" skill), but still haven't found a solution. What am I doing wrong?
​
Screenshots:

Spoiler
MnW5H49.png

PrLZ9Ex.png

2nIEIdI.png

uc7VVmC.png

BgSyTU0.png
Is there a reason why you can't just use 50 as your formula? That should always do 50 HP damage.
Is there a reason why you can't just use 50 as your formula? That should always do 50 HP damage.

This was the first thing I tried, but for some reason it's only doing 2 damage. I then tried changing the enemy's attack stat, but that resulted in inconsistent damage amounts.
@bennardo Is "Variance" set to 0%?
And the enemy is using the correct skill, right? Hmmm, strange... :LZSskeptic:
@bennardo Is "Variance" set to 0%?

Yes, the variance is set to 0% for both skills.

And the enemy is using the correct skill, right? Hmmm, strange... :LZSskeptic:

Yes, I have quadruple checked for sanity's sake and the enemy only knows the correct skill. I'm really perplexed!
B is the skill target. Which means the damage of the enemy skill is based on actor max HP, and according to the class graphs that is a very low number.
B is the skill target. Which means the damage of the enemy skill is based on actor max HP, and according to the class graphs that is a very low number.

Yes, the actor's max HP is only 100. Because I'm trying to make a quiz battle, the player can only miss one out of five questions. I initially tried making the enemy's skill simply do 50 damage (knocking out the player if they miss more than one question), but for some reason that only resulted in 2 damage. I then tried making the enemy skill formula do 50% damage to the player's max hp instead. This also did not work and instead resulted in over 100 damage.
if setting the formula to 50 doesnt work. try making the enemy have 50 atk n use formula a.atk with nothing else

if that still doesnt work. try making the skill use a common event
if setting the formula to 50 doesnt work. try making the enemy have 50 atk n use formula a.atk with nothing else

if that still doesnt work. try making the skill use a common event

I just tried this and for some reason it's still doing 190-200 damage. I'm going crazy...

I'm not sure that I can use common events. I'm already using Yanfly's Picture Common Events Plugin to make my game playable via touchscreen, so I've had to disable common events during my battles in order to hide the touchscreen UI.
in the "other" section of a skill theres "common event" i doubt yanfly's plugins would break being able to use those default game abilities.

id suggest turning off all plugins to runs some tests.
turn on each plugin 1 by 1 using formula "50" so can figure out what is causing the game to break this bad. from the looks of the database pics this is still realy early in development n who knows what problems will come up later if dont figure this out now
in the "other" section of a skill theres "common event" i doubt yanfly's plugins would break being able to use those default game abilities.

id suggest turning off all plugins to runs some tests.
turn on each plugin 1 by 1 using formula "50" so can figure out what is causing the game to break this bad. from the looks of the database pics this is still realy early in development n who knows what problems will come up later if dont figure this out now

This was great advice. Unfortunately, the problem is persisting even with all of my plugins turned off (plus a program reboot to double-check that they were all disabled).

I guess I'll have to go the route of using a common event, but that really is a shame for something that should be so straightforward.
.............😅

Alright, so the trophy goes to @SmashArt. Although the only skill the enemy knew was my custom 50damage "Enemy Attack" skill, the forced action in my battle event was the program default skill "Attack."

Good ol' fashioned user error... haha.... ha....
Haha, that's an easy mistake to make, glad you figured it out in the end! 😂
Thanks. Still... after eight straight hours of trying to figure this out, I'm ready to toss myself directly into the garbage 😩
Why don't you try this in your formula:
b.mhp * 0.5
This should reduce the target's Max HP in half every time
@Cinderbird If you would have read the whole thread, you would have found out that was one of the things he tried. However it turned out that he was testing a wrong skill so the logic of the skill was never in question, just that he used wrong one.
@Alisu my bad, I never saw the screenshots. Sorry for that!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-enemy-skill-deliver-a-specific-amount-of-damage.94284/