HP Barrier Script, Version 1.1 (Updated 10/23/2014)

Leaferson Kenraise

Ambitious Dreamer
Veteran
Joined
Jul 25, 2014
Messages
64
Reaction score
14
First Language
English
Primarily Uses
N/A
This really could be a great addition to my game! I thank you so very much for making such a script.

But I am going to have trouble already, knowing I'm using MOG's battle system. I don't mind making an bar for it... but how is the real question... Unless I accidentally skipped the answer when reading this.
 

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
What will happen if I re-cast a barrier on the target that still has a barrier in effect? Will the barrier be reset or the effect added to the existing barrier?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Depends on how you set it. You can use a notetag to have it create the barrier (which will recast it), or to restore it (which will add to it).
 

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
Depends on how you set it. You can use a notetag to have it create the barrier (which will recast it), or to restore it (which will add to it).
Thanks! I'm ooking for something like this for my project. It seems to be very easy to set up with simple note tags.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
It does take a few minutes, but once you get it all set up a simple copy/paste can expand on it. For instance, in my game I have the skill Earth Barrier which uses these notetags:

<HP Barrier: Create>

<HP Barrier State: 132>

<HP Barrier Heal Multiplier: 0.8>

<cooldown: 5>

The cooldown is from Yanfly's script, so the player cannot spam it every turn. The first one tells the system we are going to create a barrier, with the HP as noted in the damage box above (also make sure it is on HP Restore, I have no idea what will happen if you don't).

The second links it to the state noted here, and tells the system you have a barrier that when state 132 is removed, remove the barrier too.

The third tells them to heal the player of 80% of the same HP that is put to the barrier (optional, but I use it as a split healing/damage prevention spell).

Then, I also tell it to add state 132 in the effects column, so the state is added. If that is missing, the barrier will probably fail.

Only weakness is the system is not set up for more than one barrier, as that would require an array, and I'm weak in how to use those in Ruby. Maybe once I learn them I can update this to add arrays and then multiple barriers will be possible.
 

omen613

Veteran
Veteran
Joined
May 22, 2012
Messages
309
Reaction score
109
First Language
English
Primarily Uses
Hope this script is still supported...

but is there a way to restore the users barrier on a damaging skill?

I have a shield pummel attack that I want to strike the foe 3 times and add more HP to the user's barrier for each strike that connects.

Maybe a script call i can use on a common event to add HP to a specific actor's barrier?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Hmmm...I think what you want will require a call common event, as you can add to the barrier via a script call. Let me investigate and see what the call is.

Edit: Here it is. I added a variable called hp_barrier to the entire Game_Battler class. A direct script call via x.hp_barrier, where x is the identifying information of whose barrier to modify should allow you to add onto it. I made the variable an accessor, so anyone should be able to modify it at their own risk.

Unfortunately, I never did figure out the command to tell you who the target was in common events, maybe someone else can help with that? However, try self.hp_barrier += amount to add in a script call via a common event, and see if it works.

Edit2: Maybe this will work too. Under the damage formula:

a.hp_barrier += amount to add; your damage formula? Afraid I can't test it right now but I think this would work.
 
Last edited by a moderator:

omen613

Veteran
Veteran
Joined
May 22, 2012
Messages
309
Reaction score
109
First Language
English
Primarily Uses
a.hp_barrier += amount to add; your damage formula? Afraid I can't test it right now but I think this would work.
This worked! thanks bgillisp for such a speedy response to this.

Have a nice weekend!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Just a small update to the FAQ before the inevitable MV questions come in. Summary: Yes, I plan to convert it to MV, but I need to learn the language first, so it will take a while (as in, a few months).
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top