Tsukihime 1,487 Posted May 20, 2012 (edited) HP Shield Author: Tsukihime 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 = userb = 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 March 30, 2016 by Tsukihime Share this post Link to post Share on other sites
ToastyCheese 45 Posted May 21, 2012 Can a formula be used for n? Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 21, 2012 I've updated it so that you can specify formula a = user b = target v = game variables s = game switches Share this post Link to post Share on other sites
ToastyCheese 45 Posted May 21, 2012 Glad I mentioned it Share this post Link to post Share on other sites
Ventwig 25 Posted May 23, 2012 (edited) 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 May 23, 2012 by Anton Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 23, 2012 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
Ventwig 25 Posted May 24, 2012 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. Share this post Link to post Share on other sites
fgfgfdg 0 Posted May 24, 2012 how do i make it as a percentage.. User gains a shield worth 10% of their health Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 24, 2012 (edited) <shp: a.mhp*0.1> or for current HP <shp: a.hp*0.1> Edited May 24, 2012 by Tsukihime Share this post Link to post Share on other sites
hfs.aphelion 0 Posted June 24, 2012 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
Maus Merryjest 17 Posted June 29, 2012 (edited) Is there any way to make it so that a state is activated as long as the shield exists? Edited June 29, 2012 by Maus Merryjest Share this post Link to post Share on other sites
Tsukihime 1,487 Posted June 29, 2012 No, it is a pretty limited script since it was just for testing certain things. Share this post Link to post Share on other sites
onikuma 1 Posted May 20, 2013 (edited) 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_Selectablealias :th_no_cast_msg_display_use_item :display_use_itemdef display_use_item(subject, item)return if item.note =~ /<no_message>/ith_no_cast_msg_display_use_item(subject, item)endend Tag your shield skills with <no_message> Edited May 20, 2013 by onikuma Share this post Link to post Share on other sites
Ninten0 0 Posted April 15, 2015 (edited) 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 April 16, 2015 by Ninten0 Share this post Link to post Share on other sites
SweetTsunami 1 Posted September 30, 2015 Hello, is it possible to make shield absorb only magic / certain elements damage ? Share this post Link to post Share on other sites
MatthewRob 0 Posted December 8, 2015 (edited) Any way to add an animation when an enemy hits you while the shield is active? Edited December 8, 2015 by MatthewRob Share this post Link to post Share on other sites