Jump to content

Recommended Posts

HP Shield

Author: Tsukihime

 

UogXA.jpg

 

Overview

 

Need some shields during battle? Just use a skill that gives you HP shield to take more hits before your actor falls!

 

While the shield is in effect, all damage will be absorbed by the shield.

 

Features

  • Shield effect that absorbs damage taken
  • Applies during and outside of battle
Usage

 

Tag skills or items that you want to have this effect with

 

<shp: [formula]>
Just write a valid formula to calculate how much shields you get

 

<shp: a.def>
<shp: a.mhp + v[1]>
<shp: a.mhp*0.5>
a = user

b = target

v = game variables

s = game switches

 

Download

 

Script: Download here

 

This assumes the default huds so if you're using something else you'll have to add the gauges yourself.

 

Notes

 

This is just a proof-of-concept. Modify it to suit your needs.

This script is a preview of my Effects-Plus series that extends the current Effects system.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Oooh, nice! I wanted one of these a while back!

Just wondering, if the user takes an attack more than the shield, does the shield break and thats that, or the actor gets damage?

I think you should put that as an option :)

 

Also, is there a way to set it so specific shields last, say, 3 turns?

Edited by Anton

Share this post


Link to post
Share on other sites

Ya the shield just breaks. I guess the user should be taking any left-over damage, but I'm not sure where to add that.

 

I probably should've implemented this as a state rather than an effect.

That way, shields can break when the state wears off or when you're out of shields.

 

I'm not sure if I will get around to implementing it that way since this was just to demonstrate how to add new effects lol

Share this post


Link to post
Share on other sites

I'm happy the shield just breaks, actually :)

It'd be awful having a shield and the character is still a OHKO...

Reminds me of substitute from pokemon. :D

Share this post


Link to post
Share on other sites

Hi, I'm having a problem with this script...

 

I can get the spell to go off correctly and give someone a shield. (In this case, say my guy, Hero, casts the spell on himself. His health is at 400/500 and the shield gives him 200 extra health. Now he is sitting @ 600 HP.)

 

Occasionally, the shield will cause Hero to be completely healed, so that when the shield wears off, he is at full health. (After I cast the spell and the next person in line takes their turn, Hero's health jumps up to 700. He has the 200 for the shield, but his normal HP gets restored from 400 to the max of 500.) THIS DOES NOT ALWAYS HAPPEN.

 

The second glitch, which ALWAYS happens, is that after the shield breaks, the person who had the shield will have their health steadily drop. (Example: Hero has used up all 200 HP of his shield because the enemy hit him for 200. As the enemy's turn ends, Hero's helth drops by 20, leaving him with 480 HP.) Is this supposed to happen? Please help! I would LOVE to use this script in my game!

Share this post


Link to post
Share on other sites

I'd love to see this updated to work with the health gauges in http://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/, maybe by splitting the Health bar in half exactly like how the TP and MP gauges are splint in half?

 

Also it would be neat if Equipment could give the actor a default HP Shield to start with every battle, and a way to have it regenerate on it's own.

 

Currently if I wanted to do that (in case someone else reads this and wants to use it):,

 

1) A Turn 0 Troop Event for each actor that checks to see if they are wearing any type of "shield"

2) Force action a skill that restores HP Shield based on which "shield" is equipped

3) Copy the step 1 troop event but set it on Turn, and check mark End of turn

4) Force Action a much weaker version of the skill to have it "regenerate" HP Shields during the battle.

 

To remove the Actor Name casts X! when the force action happens, you could use something Tsukihime gave me the other day:




class Window_BattleLog < Window_Selectable

alias :th_no_cast_msg_display_use_item :display_use_item
def display_use_item(subject, item)
return if item.note =~ /<no_message>/i
th_no_cast_msg_display_use_item(subject, item)
end
end

 

 

Tag your shield skills with <no_message>

Edited by onikuma

Share this post


Link to post
Share on other sites

I have the formula at <shp: a.mat / 2>, but when I use it, but if they have taken damage it fully heals them. Example: hp= 22/25, mat is 12 / 2, so in theory, it should be hp 19+6=28/25. It shows 28/22, but when I think the next turn happens (or just a second later), it goes to 31/22. It doesn't seem to happen if I haven't taken damage. Is there a way to make it so it won't jump when I use hp shield?

I'm using https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/ if it helps

Edited by Ninten0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×