Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
I am trying to work out a skill which absorbs both HP and MP.  By default you can have one or the other, but not both, by selecting from the Damage Type drop down menu.  Does anyone know a cunning way of overcoming this limitation?  All I can think of is to add a call to a common event which does a force action on a second skill which absorbs one of them, but that does seem a bit dubious as a method.

Thanks.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,715
Reaction score
15,839
First Language
English
Primarily Uses
RMMV
You could add a script that looks for a tag in the note of the skill, and if found, does both.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
I'm reluctant to add a script in just to do one skill if I can possibly avoid it - but if I can't, do you know a straightforward one which would do this?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,715
Reaction score
15,839
First Language
English
Primarily Uses
RMMV
No, I don't know any scripts that would do it, because, like you, I don't like adding scripts that are all-singing and all-dancing just for the sake of one feature.


If I wanted this, I would write a script that did this and nothing else. If you decide to go the script way because you can't figure out a good, easy non-script way, I suggest you make a request for a script to do exactly what you want and nothing else, and ignore all the "hey, this base engine with these 50 add-ons will do that" suggestions ;)
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
348
Primarily Uses
It seems to be plausible with just the formula box. Set the type to hp drain and use the following to add mp drain.

Code:
b.result.mp_damage = (mp damage formula); (regular formula)
Assuming the hp damage and mp damage are different values. If you wanted the same value, it would be something along the lines of:

Code:
d = (formula); b.result.mp_damage = d; d
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
@Yato

Just for the sake of clarity:

I would select the HP Drain from the drop down menu so that the engine knows to do that part, and then the formula you have suggested adds the MP bit.  

Is that correct?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,715
Reaction score
15,839
First Language
English
Primarily Uses
RMMV
My concern with that is all the other things that happen after the formula has been calculated - there's a variance, elements, other stuff that wouldn't be calculated on the MP Drain. Does the hit/miss/critical logic get run before or after the damage calculation?


Could you end up with MP Drain on skill use when it says the skill actually missed and no HP Drain happens?
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
348
Primarily Uses
@ksjp: Yeah, sorry. I realized I hadn't mentioned that and edited it in (after you saw the post, evidently).


And I'll have to think more deeply on those points, Shaz. I can't say it's an area I'm the most familiar with.


[Edit] Some quick tests indicate miss calculation is separate from damage calculation, so it works fine in that regard. As per variance, I suppose that's going to depend on what's needed for the skill. Something simple could be done in the formula box, but a new method could always be created if need be.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
Just done a quick test, and the formula damages MP, but it doesn't absorb it.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
348
Primarily Uses
With the type set to HP Drain? Works on my test of a new project. Any scripts that might be conflicting? And does the enemy actually have MP? I know I made that mistake on my first test.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
I tried it out in a new project, everything default.  My actual formula is this (with HP Drain selected)

b.result.mp_damage = (10 +a.mat - b.mdf); 200 + a.mat * - b.mdf

EDIT

It's difficult to say, because the figures fly past so quickly, but it looks like it's not absorbing HP either - at least the character seems to be perilously close to death at the moment, with being hit and not healed.
 
Last edited by a moderator:

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
348
Primarily Uses
I took the formula you posted, fixed the error in the second half which was resulting in no hp damage (a.mat * - b.mdf) (multiplication and subtraction), pasted it in a brand new project, and it's working for me?
 
Last edited by a moderator:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
Oops.  Okay, I fixed the typo and carefully watched the figures.

Clearly damage was being done, because the enemies (3 wisps, who have 60MP each) were defeated, but the HP of the character did not increase, which it should have done if he'd been absorbing their HP, rather than just damaging them, and the MP figure went down each turn by the cost of the skill, it did not seem to absorb anything.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
348
Primarily Uses
Screenshots of the skill in the database or idk? It's hard to troubleshoot the problem if I can't replicate it.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
Here you are.  I have it as Certain Hit at the moment so that I don't have to contend with misses.

Skill%20shot_zps1nx5ttz3.png


EDIT

As you can't see the full damage formula, here it is copy/pasted

b.result.mp_damage = (10 +a.mat - b.mdf); 200 + a.mat - b.mdf

EDIT AGAIN

I am an idiot and a fool.  At some stage I must have clicked it back to HP damage from HP drain.

AND FINAL EDIT

It now works as intended.  Cringe, wince, sorry about wasting your time.  Crawls away into a corner in embarrassment.

Thank you for all your help.
 
Last edited by a moderator:

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
348
Primarily Uses
It needs to be set to HP drain. You have it set to HP damage right now.
 
Last edited by a moderator:

Stapleton

Underground
Veteran
Joined
May 23, 2014
Messages
265
Reaction score
194
First Language
Gaeilge
Primarily Uses
N/A
try changing the type to HP drain or mp drain

edit: what yato said
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
As you can see from my edits, I spotted that after posting, and I feel such a fool.

Once more, thank you Yato for your help.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,715
Reaction score
15,839
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

one of the coolest things I've learned from the forums is the ability to give yourself a hitbox. I have a move you can do on the fields. shoulder tackle. thanks to the forums, that tackle triggers self A switches on some events. NPC's and the environment now react to the tackle. awesome.
I really liked how this one turned out! :kaopride:
WYqMPf6.png

Character (Yes, this is a character): Nibiru the Primal Being from Yugioh.
Dragon Quest style enemy selection plugin work in progress:

Quest_Targeting.png

It's a simple targeting system from the NES era. Select an enemy group; single-target skills will target the first enemy in that group.

Quest-Targeting-Animated.gif
Somehow that granny topic got me... maybe I can come up with some more thematic stuff :3
Going live for tonight's stream! Kytt isn't feeling 100% tonight so the wifestream will be tomorrow and I'll be playing Final Fantasy XIV for this one instead. Twitch

Forum statistics

Threads
121,935
Messages
1,145,269
Members
160,207
Latest member
RiceKun
Top