Author Topic: [XP] Percentage Health States  (Read 7847 times)

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
[XP] Percentage Health States
« on: June 16, 2009, 10:18:19 PM »
Percentage Health States
Authors: Aqua
Version: 1.5
Type: Battle States Add-on
Key Term: Battle Add-on

Introduction

This script makes it so that battlers will gain states when they are below a certain percentage of health.  The states would be automatically lost when the battler's health is above the configured percentage.
Note:  this affects all actors and enemies.

For example, you could have a state for when HP is critical and battlers gain more attack as a last effort to win.

Features

  • Seperate percentages for each state
  • Automatically gain/lose the configured states
  • Very easy configuration
  • Actor/Enemy specific states possible

Screenshots

Not really needed.
Imagine that Arshes gains Sharp when his HP falls below 20%

Demo

Don't think it'd be really necessary, but post if you do want one.

Script

(click to show/hide)

Instructions
New script slot > Below RTP scripts > Above Main

Code: [Select]
# Configure the below modules in the following format:
#
# MODULE = [[X, Y]]
#
# MODULE is the below modules.  You don't change these, and they all follow the
#    same format.
# X is the percent of health for the state to activate (can be a decimal).
# Y is the state id.


Compatibility

Might not be compatible with exotic scripts.
Compatible with Blizz-ABS.  Paste above if using with Blizz-ABS

Credits and Thanks

  • Aqua for making it.
  • Subsonic_Noise for requesting that I release it.
  • Starrodkirby86 for letting me rant to him.

Author's Notes

Hope you enjoy this!

I might add Scene_Map checker later.
« Last Edit: June 17, 2009, 07:58:05 PM by Aqua »

Subsonic_Noise

  • Guest
Re: [XP] Percentage Health States
« Reply #1 on: June 16, 2009, 10:21:44 PM »
Nice script^^ I'll definitely use it in my game.
AND I'm in the credits XD
 level ++

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Percentage Health States
« Reply #2 on: June 16, 2009, 10:37:03 PM »
Thanks, Aqua!

Been looking for something like this for a LOOOOONG time.
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Percentage Health States
« Reply #3 on: June 17, 2009, 11:20:13 AM »
*levels up*

I'm bookmarking this for a later date since it's such a nifty little feature which could add more to the battle system. :D

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19870
  • LV: 641
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Percentage Health States
« Reply #4 on: June 17, 2009, 12:30:12 PM »
Want me to Tons' it?
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Sally

  • Sallygirl :P
  • Chaos User
  • ******
  • Posts: 1283
  • LV: 12
  • Gender: Female
    • View Profile
Re: [XP] Percentage Health States
« Reply #5 on: June 17, 2009, 03:57:20 PM »
what about specific actors? like actor1 gains this at 20%
but actor2 gain something different at 20%.

nice script btw.

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Percentage Health States
« Reply #6 on: June 17, 2009, 06:13:56 PM »
@S, S, & Re: Glad you like it.

@Blizz:  Sure! :P

@Sally:  I said in the author's notes that I'll add more features.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6583
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Percentage Health States
« Reply #7 on: June 17, 2009, 06:16:06 PM »
aqua heres a feature you should add. The state can only be added to the actor if the hp is the right percent and a certain weapon is equipped. I had an idea for this and it required the feature I just said.

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Percentage Health States
« Reply #8 on: June 17, 2009, 06:30:52 PM »
Forgot to take slip damage into account... I'll do this now.

@G_G:  You can just do that with the config when I update it to have actor specific states.
It'd be like...
Code: [Select]
when ID
   if $game_actors[ID].weapon_id == WEAPON
      return [%_HEALTH, STATE_ID]
   else
      return [Whatever XD]
   end

Edit:
I'm also wondering if there's a better place to put my method... hmmm...
« Last Edit: June 17, 2009, 06:34:21 PM by Aqua »

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Percentage Health States
« Reply #9 on: June 17, 2009, 07:03:07 PM »
Forgot to take slip damage into account... I'll do this now.

@G_G:  You can just do that with the config when I update it to have actor specific states.
It'd be like...
Code: [Select]
when ID
   if $game_actors[ID].weapon_id == WEAPON
      return [%_HEALTH, STATE_ID]
   else
      return [Whatever XD]
   end

Edit:
I'm also wondering if there's a better place to put my method... hmmm...

Forgot to take slip damage into account? I don't understand. The state that I've been using (Wounded at < 40%) causes SEVERE debilitation, accuracy/attack/etc wise, but they also "bleed out", which is slip damage, and works fine. Just thought it might be relevant.
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Percentage Health States
« Reply #10 on: June 17, 2009, 07:07:53 PM »
I mean... didn't take into account that states should activate when slip damage causes you to go under X% of health.

I fixed this in the new version which I'm still working on XD

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Percentage Health States
« Reply #11 on: June 17, 2009, 07:11:54 PM »
I mean... didn't take into account that states should activate when slip damage causes you to go under X% of health.

I fixed this in the new version which I'm still working on XD


Ahhhh. Thanks, Aqua ^_^.

Say, I know that it updates when an enemy attacks you, but what if you, say, step on a damaging tile or something? Also, I know that it updates if health is over the given percent, but will it update if you actually heal someone, or do they have to be healed, and then hit, and still be over the percent?

Thank you ^_^
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Percentage Health States
« Reply #12 on: June 17, 2009, 07:37:11 PM »
So you're saying I should add a Scene_Map checker? XD

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Percentage Health States
« Reply #13 on: June 17, 2009, 07:47:20 PM »
So you're saying I should add a Scene_Map checker? XD

I think that it would be helpful. I don't have any specific occurances of damaging tiles, but it's an army-type thing, so booby-traps/mines/etc are likely. I would definitely get some use out of it, and I think that I wouldn't be alone.

Just saying. Maybe make it configurable?

Code: [Select]
map_check = true # set to false to ONLY regulate in battle.
something simple like that.

What do you think?
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Percentage Health States
« Reply #14 on: June 17, 2009, 07:59:08 PM »
Updated!

Added only actor/only enemy states, actor/enemy specific states & slip damage checker.
Also improved the coding. (I think...)

Edit:
Topic locked.

*points to Tons*
« Last Edit: June 18, 2009, 06:08:12 PM by Blizzard »