Slip Damage Questions

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
1. So my poison state is meant to knock a player out outside of battle if they don't cure it in time. I've ticked K.O. by Slip Damage in System, but then when my character walks around poisoned, as soon as she gets to 0 HP, it'll give the KO message I made, but you won't get a game over. She'll just remain at 0 HP, and you can't heal her. You only get game over as soon as you enter a new battle.

Is there any way to fix this?

2. Is there a way to make it so that slip damage makes your screen flash occasionally while you walk? Like it does in Pokemon?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Slip damage SHOULD make your screen flash, and you SHOULD get a gameover. You don't have any scripts that might interfere with this, do you?


Try setting up your state and system settings the same way in a completely new project. See if the screen flashes and if KO gives a gameover. If it works there, it's definitely a script you've added that's causing it to do something different.
 
Last edited by a moderator:

JosephSeraph

White Mage
Restaff
Joined
Mar 7, 2014
Messages
1,186
Reaction score
1,444
First Language
Portuguese
This can all be solved with Paralell Process common events. Run one with a conditional that checks if the character's HP is zero, then carries out a Game Over if so.

Run another one that checks every second if HP has been detracted (by storing HP in variable A, waiting a bit and storing HP again in Variable B, comparing both; and if a difference is shown you either flash the screen or create a conditional branch for a random chance of it happening.)

Heck, you could even event your own poison system this way, and have it detract per frames instead of per step.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Except then you're setting up TWO parallel process events (+lag if they're not done carefully) to do something that the game should do by default anyway.


Always better to find and fix the cause of problems than to introduce workarounds. ;)
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
I have a LOT of scripts... > >;; Like wow so many... I don't know why any would interfere.

And there is no condition for the HP outside of battles.

EDIT:

These are my scripts.

[SIZE=14.4444446563721px][/SIZE]

• Victor Engine - Basic Module v1.35
• Victor Engine - Item Command v1.0
• Yanfly Ace Battle Engine v1.22

[SIZE=14.4444446563721px]• Yanfly Enemy Target Info v1.02[/SIZE]
[SIZE=14.4444446563721px]• Enemy Target Info Add-on: Enemy HP v1.02 (I'm not sure who made this, but it requires the Yanfly Battle Engine)[/SIZE]
[SIZE=14.4444446563721px]• Yanfly Unofficial Add-on Damage/Heal Image Popup[/SIZE]
[SIZE=14.4444446563721px]• Fomar0153's Side View Battle Script v1.0[/SIZE]
[SIZE=14.4444446563721px]• Yanfly Free Turn Battle v1.02[/SIZE]
[SIZE=14.4444446563721px]• Line Break Fix (literally a 7 line long code so it's not big)[/SIZE]
[SIZE=14.4444446563721px]• Hide Actor Stats (something you made for me Shaz, to show an actor's stats as question marks in the menu)[/SIZE]
[SIZE=14.4444446563721px]• Shaz's Remember Event Position v1.0[/SIZE]
[SIZE=14.4444446563721px]• Pacman's Gauge Display v2.0[/SIZE]
• Yanfly Battle Command List v1.09b
[SIZE=14.4444446563721px]• Unique SE (another very simple script to make it so that one specific item would make a different sound than all the others of the same type)[/SIZE]
[SIZE=14.4444446563721px]• Yanfly Move Restrict Region v1.03[/SIZE]
[SIZE=14.4444446563721px]• Shaz's Region Common Events v1.0[/SIZE]
[SIZE=14.4444446563721px]• Tsukihime's Transform Use Items[/SIZE]
[SIZE=14.4444446563721px]• Yanfly Ace Message System v1.05[/SIZE]
[SIZE=14.4444446563721px]• Move Toward Character (yet another simple script)[/SIZE]
[SIZE=14.4444446563721px]• Heal Upon Level-Up (and another, like 19 lines)[/SIZE]
[SIZE=14.4444446563721px]• Modern Algebra's Customizable Item Menu v1.0.1[/SIZE]
[SIZE=14.4444446563721px]• Zeus81's Map Effects v1.4.1[/SIZE]
[SIZE=14.4444446563721px]• Yanfly Gab Window v1.00[/SIZE]
[SIZE=14.4444446563721px][/SIZE]
EDIT 4:

Okay after a LOT of playtesting, I found out why. Because there's more than one character in the party. And so, even when the main character dies, the other character is still alive.

Now I just have to have a way to make the game understand that when the main character dies, it's game over.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
For your lack of red flash - if you are using Yanfly's Battle Engine script it prevents that happening. There is a fix, I'm using it, but I can't find the link as I'm not on my computer. Actually, I'm not sure if I have one anyway. I'll have a hunt, but in the meantime you may well find it with a simple search.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Thank you ksjp17, I found the fix for the second problem, it was an issue with the Yanfly battle engine.

But now there's still the problem with the game not ending when the main character dies through slip damage. I tried doing a conditional branch for when the main character reaches Death, so does the other character, but that didn't work. I thought that 0 HP would naturally automatically apply Death but I guess not?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
That's right, the default is that you only get Game Over when the whole party dies, not when just one actor dies.  I've never noticed a script which changes that, but tbh, I've never wanted to implement that, so I could easily have overlooked it.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
ah, yeah, I never thought of you having more than 1 character.

If your one character is always the leader and you can't move your "companion" character into that first position, add this to a new script slot:

class Game_Party < Game_Unit #-------------------------------------------------------------------------- # * Determine if Everyone is Dead #-------------------------------------------------------------------------- def all_dead? (super && $game_party.in_battle) || leader.hp <= 0 endendI haven't tested this, so it might need a bit of tweaking.I wonder how it works if you're in battle? Do you have another script for battle only that disregards the HP of the companion character?
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
EDIT: Thank you Shaz! It works perfectly. I tested it out solo (to make sure nothing else weird happened), tested it with Baiulus in the party, and then I tested it in battle and it's just what I needed.

I'm about to test it, but here's the breakdown for my characters (and I'll use their names just to make it easier from here on out).

The main character Annabelle. She's the leader and the fighter. Then there's Baiulus, the secondary character. He is always following behind her. In battle, he has target percentage of 0, so therefore cannot be hit and cannot die, without using a script. His purpose in battle is to be the white mage, just to heal. Because of his character and the plot, it would not make sense for him to die so I'm not changing that.
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
If you are going to use Shaz's script, I would also recommend Yanfly's party manager, so you can lock the first actor (Annabelle) into slot 1. Otherwise, the player can switch actors 1 and 2 around, and that will mess up what you intend to do.

Also, about target of 0%. That actually does not prevent the character from taking damage. Anything that hits all party members would hit that person, regardless. Make sure the enemy has all single target spells if you wish to go that route.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
If you are going to use Shaz's script, I would also recommend Yanfly's party manager, so you can lock the first actor (Annabelle) into slot 1. Otherwise, the player can switch actors 1 and 2 around, and that will mess up what you intend to do.

Also, about target of 0%. That actually does not prevent the character from taking damage. Anything that hits all party members would hit that person, regardless. Make sure the enemy has all single target spells if you wish to go that route.
Could you link me to that?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Here is the link to Yanfly's blog. Go to the gifthub link, and you should find it there. Once you have it installed, you can go to the editable region and set a flag to make it so that actor 1 cannot be removed from the party (or moved around) once they are in the party.

Edit: Forgot the link: http://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
No, you don't need that. There's an event command to disable formation. This will stop the player swapping them around. You can even remove it from the menu so they can't even see it.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Ah, I forgot about that Shaz.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Okay never mind now it's not working... Well I mean it kind of is. But the flashing is only working for one state.

I found this script to use to fix it. The state ID for poison is 2, and for burn it's 17. But the flashing only works for the burn.

class Game_Party < Game_Unit def s_any?(state_id) members.any? {|actor| actor.state?(state_id)} end endclass Game_Actor < Game_Battler def turn_end_on_map if $game_party.steps % steps_for_turn == 0 on_turn_end perform_map_damage_effect if $game_party.s_any?(2) end end endclass Game_Actor < Game_Battler def turn_end_on_map if $game_party.steps % steps_for_turn == 0 on_turn_end perform_map_damage_effect if $game_party.s_any?(17) end end endIf I remove the bottom one, then yeah it works for poison, but then not for burn.

I tried making them two separate scripts, putting the poison one under the burn one in Materials, but then poison worked, and burn didn't.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
because you're overwriting the first one with the second one. And you're also overwriting the default one in the RTP with the first one.

If you're ADDING functionality but still want it to perform the default effect, you should alias the method. But why define the same method in the same class twice? Why not just do the damage effect if either state is present?

Code:
class Game_Actor < Game_Battler  def turn_end_on_map    if $game_party.steps % steps_for_turn == 0      on_turn_end      perform_map_damage_effect if $game_party.s_any?(2) || $game_party.s_any?(17) || @result.hp_damage > 0    end  endend
In fact, I'm still curious as to why you need to do this in the first place? Do you have a script that's also overwritten the default behaviour? In that case, I'd question why it's doing that - everything you do to "fix" it without identifying what's causing it, is another thing that could make it mess up even more.
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
It's because I don't know how to write RGSS3 ;x; This is all a language I don't understand.

And it's because this is apparently just a problem that happens with the Yanfly Ace Battle Engine I'm using. [SIZE=14.4444446563721px]ksjp17 told me to look for the fix and that's the script I found, I just changed the number.[/SIZE]

But this works, thank you!
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
So, just for the sake of clarity, each state that one wants to add the red flash to goes into line #5?  For example

class Game_Actor < Game_Battler def turn_end_on_map if $game_party.steps % steps_for_turn == 0 on_turn_end perform_map_damage_effect if $game_party.s_any?(2) || $game_party.s_any?(54) || $game_party.s_any?(57) || @result.hp_damage > 0 end endendIs that right?  Or is this method limited to just 2 states?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yes, you could do that. But it's an inefficient way of doing it.


The engine already HAS the ability to check for slip damage. You are better off using it the way it was meant to be used. That means either rewriting the formula to look through all states on all actors to see if any have slip damage, or finding the offending method in the other script that makes the default NOT work, and fixing it.


I would not use the above at all.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top