Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Slip Damage / Inventory Questions

Ok, I couldn't find quite what I was looking for in the forums or through a search engine, so I'll have to ask here. :sad:

First question: Slip Damage. I went into the Script Editor and changed it from -10% HP during combat to -5%, and that worked just fine. However, I do not want the player to be able to "die" or get the "knockout" / "game over" status from Poison *outside* of combat. How do I do that?

Second question: Items. My game is based on my novel, Fallacia, and I tell the tale from three different perspectives for a good portion of the book. Each time I switch from PoV to PoV, the game carries over all the current gold and items from the first PoV.

If at all possible, I'd like to have them have separate "inventories". It's not a *huge* deal, because I have taken some precautions. Just curious.

- Potato Man
 
In the slip_damage_effect method, above the line (should look something like this:
self.hp -= self.damage

Above that add:
self.damage = [self.damage, self.hp - 1].min

If you want it to only work outside of battle, change the line I gave you to:
self.damage = [self.damage, self.hp - 1].min unless $game_temp.in_battle

That should work to prevent slip damage from KO'ing a target.
 
:biggrin: Thank you, SephirothSpawn. Much appreciation.

EDIT:
Uh....Perhaps I did it incorrectly? Is this right:

#--------------------------------------------------------------------------
# * Application of Slip Damage Effects
#--------------------------------------------------------------------------
def slip_damage_effect
# Set damage
self.damage = self.maxhp / 5
# Dispersion
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Subtract damage from HP
self.damage = [self.damage, self.hp - 1].min unless $game_temp.in_battle
self.hp -= self.damage
# End Method
return true
end
 
I was bored so i played around with this. To get it to work the way you want i had to also go into Game_Party and change line 294 from
if actor.hp > 0 and actor.slip_damage?
to
if actor.hp > 10 and actor.slip_damage?

And as far as separate inventories, to the best of my knowledge there is no easy way to do it. I think you would have to mark each item held in inventory in variables as well as your gold.

Hope this helps :)
 
Ah, that clears it up a bit. I've only changed a couple things (like this) in my script so far. Perhaps scripting isn't impossibly difficult as I thought it once was.

Thanks, zorreeam.

- Potato Man
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top