Help with states in battle Poison=/=Death

Riku_Masamune

Veteran
Veteran
Joined
Aug 23, 2016
Messages
31
Reaction score
8
First Language
English
Primarily Uses
RMMZ
Well, I tried searching in Google to see if this question had been answered, but no I couldn't find anything... BUT! Onto the question... Well, from the title it has to deal with enemies dying from poison. But is there a way to fix it to were enemies actually fade out when they die from poison, instead of just standing there like they had a heart attack then going into victory screen?

I tried finding my own way through the problem, but couldn't figure it out. So, does anyone have an idea?
 

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
I can't seem to make the poison effect be lethal in the first place, care to share that accomplishment? Did you edit this function to not use the if branch, or do you use a different method of poison than the default?

Code:
Game_Battler.prototype.regenerateHp = function() {
    var value = Math.floor(this.mhp * this.hrg);
    value = Math.max(value, -this.maxSlipDamage());
    if (value !== 0) {
        this.gainHp(value);
    }
};
 
Last edited:

Riku_Masamune

Veteran
Veteran
Joined
Aug 23, 2016
Messages
31
Reaction score
8
First Language
English
Primarily Uses
RMMZ
Setting the Ex-Parameter to a negative value. It's all in software by default. But if you just guard the whole time the enemy looses x%b.hp, on a turn it looses the remainder of it's HP, it just has a "heart attack" and just stop whilst the actors do their victory dance.
 

Attachments

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
I tried that but it seems like it gets down to 1hp and just doesn't take anymore damage. But since yours apparently does, and you're using the -hp regeneration thing just toss this into a .js file and add it as a plugin and you should be good, lemme know if it doesn't work

Code:
(function(){
Fugama = Fugama || {}
Fugama.Pfix = Fugama.Pfix || {}

Fugama.Pfix.Game_Battler_prototype_onTurnEnd = Game_Battler.prototype.onTurnEnd;
Game_Battler.prototype.onTurnEnd = function(){
    Fugama.Pfix.Game_Battler_prototype_onTurnEnd.call(this);
    if (this.hp <== 0){
        this.performCollapse();
    }
}
})();
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
@Fugama : If poison isn't KO'ing your enemies, that means you didn't turn on KO by slip damage (under system settings). If you don't do that, no one will ever die from poison (players or enemies), barring some custom code.

I've moved this thread to Plug-In Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

Riku_Masamune

Veteran
Veteran
Joined
Aug 23, 2016
Messages
31
Reaction score
8
First Language
English
Primarily Uses
RMMZ
Nope, thanks for the effort though. Still has a "heart attack".
 

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
I can't seem to replicate the effect in a project with no plugins, the enemies collapse (shake and fade out) as per usual when they die by poison
 

Riku_Masamune

Veteran
Veteran
Joined
Aug 23, 2016
Messages
31
Reaction score
8
First Language
English
Primarily Uses
RMMZ
I can't seem to replicate the effect in a project with no plugins, the enemies collapse (shake and fade out) as per usual when they die by poison
Guess I'll just thumb through my plugins then. I know a friend is also having this problem on VX Ace. Thanks for trying to help.
 

Riku_Masamune

Veteran
Veteran
Joined
Aug 23, 2016
Messages
31
Reaction score
8
First Language
English
Primarily Uses
RMMZ
Admin can close the thread: It was a simple overlook with Yanfly's ATB plugin. Which since it's discontinued, can't write a bug report on.
 

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
Code:
Game_Battler.prototype.regenerateHp = function() {
    var value = Math.floor(this.mhp * this.hrg);
    value = Math.max(value, -this.maxSlipDamage());
    if (value >= this.hp && !this.isActor){
        this.performCollapse();
} else {
    if (value !== 0) {
        this.gainHp(value);
    }
}
};
That's the last thing I can think of, it makes it so it'll collapse instead of applying damage if the damage is greater than the enemy's HP (sideview actors will still just display the death motion)
 

Riku_Masamune

Veteran
Veteran
Joined
Aug 23, 2016
Messages
31
Reaction score
8
First Language
English
Primarily Uses
RMMZ
I'll test that out with the ATB Plugin. Thanks for your effort.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top