Help with damage pop up display

Hi,

I'm using Yanfly's Ace Battle Engine to show damage pop ups https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/ . 

In my game, all basic attacks and skills use a custom formula which, depending on parameters, will either do HP damage, MP damage, or both.

I would like a way to script the following:

1) when the player only takes HP damage, only the HP damage pop up appears (this is how it is currently)

2) when the player takes both HP and MP damage, damage pops up appear for both (so it would say like -3 HP and -5 MP or whatever)

3) when the player only takes MP damage, only the MP damage pop up appears

I know this might sound simple but I have no idea how to do it, and this would help me so much, thank you.
Have you tested this out in battle?  The reason I am asking is that I am using the same script, and I too have skills which deal both HP and MP damage - though in my case it is draining, which may be the significant difference - and I have got both pieces of information automatically.  I didn't have to change anything. 
Yep I have; the player loses MP or whatever the correct resource he should lose depending on the formula, but only HP damage info is popped up.

Yeah, drain must be different.
This is actually a bit odd, because looking at the script I can see no substantive difference between the various popups to account for some appearing and not others.  My understanding is that all popups are treated equally, and that you see as many popups as are applicable.  Here, for example, is a screenie showing HP and MP drain being applied, along with various status effects.  The damage is shown over the enemies on the left, and the drain (= healing) shown over the character on the right.  (Ignore faces, they are placeholders.)

damage%20popups_zpse2mqlrwj.png


It's true that it doesn't say e.g. 180 HP the way it says 56 MP, but that's the same for all skills, not just this one, so I don't think that's significant.  Have you amended lines #288 - 313 at all?
The only changes I made are aesthetic ones, i.e. for a nulled attack it just says "0" and for a missed or evaded attack it says "BLOCKED"

Are you saying that if you put b.mp -= x   in a custom hp damage formula, both the HP and MP damage pops up for you?  Even without using 'Drain' ?
No, my formula is much more complicated than that because I want it to do several things.  But one thing is crucial.  I have HP Drain in the 'Damage Type' box, and then in the formula I only have  the drain for MP.  

I am, therefore, wondering if you did the same sort of structure for your skill, whether that would make it work.  i.e. in the Damage Type box, select HP damage.  

Then in your damage formula have something like:

b.result.mp_damage=(your mp damage formula here); your HP damage formula here

the semi-colon is crucial, and the hp damage formula is not in brackets.

So it might look like

b.result.mp_damage=(40 +a.mat - b.mdf); a.atk *4 - b.def * 2
Oh man!

I was using the same structure, but I had it as b.mp -= mpdmgformula; hpdmgformula

I just changed it to b.result.mp_damage = mpdmgformula; hpdmgformula

and that did the trick!

THANK YOU SO MUCH!  I'm just going to test this some more to make sure there are no bugs or other issues; mods please don't close the thread just yet!  Thanks again Ksjp.
Glad to help.
Alright...one more question.  So the way it works by default is showing the MP damage above the HP damage.  Is there any way to reverse this?  Basically just make the MP damage pop-up occur in the x/y coordinates that the HP damage pop-up currently occurs in, and vice versa.

Looking at the script, I'm worried that it creates the HP damage pop up first, and then just stacks things on top of that, so it might be difficult to change this order without a lot of work...I could be wrong though.

Would I just take lines 1210-1222 and put them underneath lines 1223-1234?
I haven't a clue  - I'm not a scripter.  All I can suggest is that you try it and see what happens.
Didn't work...I''ll just make a separate topic for this since it is a distinct issue from the original problem I had, which has been solved.  Thanks again, I had a gameplay idea I was really excited about and this will allow me to implement it.
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/help-with-damage-pop-up-display.38662/