Barrier Script, Version 1.0 (Completed)
by bgillisp
Introduction
This script allows you to create a state that will add a barrier to a character. All attacks to the character will hit the barrier instead of their HP, until the barrier falls. Also, barriers can fall due to time running out and will be auto-removed at that point.
Features
Adds a barrier which can be used to protect characters until the barrier falls.
How to Use
-Add the script in the materials section, but below main
-Start a new game to use! If you don't, some of the variables will not exist, and it WILL crash when you add the state.
-If you have any battle engines, you may wish to add this below the battle engine script.
-To add a barrier, first add the state to the skill that adds the barrier. Then in the notes section of the skill, add a notetag to either make the barrier a static barrier (fixed HP), or based on the caster's MAT.
Example:
<HP Barrier: 100> will make a 100 HP barrier
<HP Barrier MAT: 2.50> will make a barrier that has HP equal to 2.5 * the caster's MAT.
You can now heal your barriers with skills or items! To do this, set the item or skill to be hp restore, and use the damage formula box to set it up. Then, add the notetag <HP Barrier: Restore> in the notes box to tell it to apply this to a barrier, and not an actor or enemy.
Also, you can now set a barrier's max HP to block with the notetag: <HP Barrier MAX: x>, where x is the highest HP you ever want that barrier to have.
Finally, you can make it so that equipment enhances or weakens your barriers, and actors and enemies can have stronger or weaker barriers than the norm. To do this, add the notetag <HP Barrier Modify: x>, where x is the number you want multiplied to the barrier (use 2 to double all barriers, 0.5 to half all barriers, 0 to make no barriers work, etc). Be advised at the moment this only affects barriers cast *on* the wearer, not cast by the wearer. Currently investigating how to fix this.
If you are using version 0.96b onwards, read the directions in the header of the script, as you now have to use skills/items, and not states. Short version, set up the skill which creates the barrier first, fill in the damage box with the formula which creates the barrier, and set it to HP Restore. Then, add the notetag <HP Barrier: Create> in the notebox of the skill or item which creates the barrier. Once you do this,
the barrier will last until it runs out of HP. More details on how to do things like make the barrier last x turns or only until a battle ends are in the script directions.
Demo
A short one is available here with the script: https://www.mediafir...vvmgdw426re527a
Script
The script without the demo is available here, version 0.96. This version uses states for the barriers http://pastebin.com/03HRqB0Z
For version 0.96b onwards of this script (it says 0.96a in the pastebin, will change that next upload) using skills/items for the barriers: http://pastebin.com/5T5ZKcSd
FAQ
Q: I add the notetag and it didn't work!
A: Spacing is important. Did you remember the space between the : and the number? Also I think it is case-sensitive, so make sure to use caps for HP.
Q: I added a barrier and it was ridiculously huge!
A: I have the script set up to where you post the number that is being multiplied, not the percent. So if you want it to be 250% of MAT, you pass 2.5. Passing 250% will result in a really high number being multiplied and near invincible enemies.
Q: This script does not work with script xxxx.
A: I can *try* to add a fix. If you wish me to try it, please post a link to a demo with the conflicting script and my script included, and I'll do what I can between my project and work schedules. However, work has gotten really busy and will be until December, so fixes might be a couple weeks to implement.
Q: I would like to see feature yyyy added.
A: Post said feature below and I'll see what I can do.
Author's Notes
This is now version 1.0! I would like to thank spaceman5 for the idea (and testing), and Zevia, Supernurse, and Ryidamist for the bug catches and posts on here, and anyone else who tested it and didn't post suggestions.
Terms of Use
Free for use in commercial and non-commercial games with credit given.
Mods, if you want to move this to the completed scripts forum since it is considered completed now, feel free.
by bgillisp
Introduction
This script allows you to create a state that will add a barrier to a character. All attacks to the character will hit the barrier instead of their HP, until the barrier falls. Also, barriers can fall due to time running out and will be auto-removed at that point.
Features
Adds a barrier which can be used to protect characters until the barrier falls.
How to Use
-Add the script in the materials section, but below main
-Start a new game to use! If you don't, some of the variables will not exist, and it WILL crash when you add the state.
-If you have any battle engines, you may wish to add this below the battle engine script.
-To add a barrier, first add the state to the skill that adds the barrier. Then in the notes section of the skill, add a notetag to either make the barrier a static barrier (fixed HP), or based on the caster's MAT.
Example:
<HP Barrier: 100> will make a 100 HP barrier
<HP Barrier MAT: 2.50> will make a barrier that has HP equal to 2.5 * the caster's MAT.
You can now heal your barriers with skills or items! To do this, set the item or skill to be hp restore, and use the damage formula box to set it up. Then, add the notetag <HP Barrier: Restore> in the notes box to tell it to apply this to a barrier, and not an actor or enemy.
Also, you can now set a barrier's max HP to block with the notetag: <HP Barrier MAX: x>, where x is the highest HP you ever want that barrier to have.
Finally, you can make it so that equipment enhances or weakens your barriers, and actors and enemies can have stronger or weaker barriers than the norm. To do this, add the notetag <HP Barrier Modify: x>, where x is the number you want multiplied to the barrier (use 2 to double all barriers, 0.5 to half all barriers, 0 to make no barriers work, etc). Be advised at the moment this only affects barriers cast *on* the wearer, not cast by the wearer. Currently investigating how to fix this.
If you are using version 0.96b onwards, read the directions in the header of the script, as you now have to use skills/items, and not states. Short version, set up the skill which creates the barrier first, fill in the damage box with the formula which creates the barrier, and set it to HP Restore. Then, add the notetag <HP Barrier: Create> in the notebox of the skill or item which creates the barrier. Once you do this,
the barrier will last until it runs out of HP. More details on how to do things like make the barrier last x turns or only until a battle ends are in the script directions.
Demo
A short one is available here with the script: https://www.mediafir...vvmgdw426re527a
Script
The script without the demo is available here, version 0.96. This version uses states for the barriers http://pastebin.com/03HRqB0Z
For version 0.96b onwards of this script (it says 0.96a in the pastebin, will change that next upload) using skills/items for the barriers: http://pastebin.com/5T5ZKcSd
FAQ
Q: I add the notetag and it didn't work!
A: Spacing is important. Did you remember the space between the : and the number? Also I think it is case-sensitive, so make sure to use caps for HP.
Q: I added a barrier and it was ridiculously huge!
A: I have the script set up to where you post the number that is being multiplied, not the percent. So if you want it to be 250% of MAT, you pass 2.5. Passing 250% will result in a really high number being multiplied and near invincible enemies.
Q: This script does not work with script xxxx.
A: I can *try* to add a fix. If you wish me to try it, please post a link to a demo with the conflicting script and my script included, and I'll do what I can between my project and work schedules. However, work has gotten really busy and will be until December, so fixes might be a couple weeks to implement.
Q: I would like to see feature yyyy added.
A: Post said feature below and I'll see what I can do.
Author's Notes
This is now version 1.0! I would like to thank spaceman5 for the idea (and testing), and Zevia, Supernurse, and Ryidamist for the bug catches and posts on here, and anyone else who tested it and didn't post suggestions.
Terms of Use
Free for use in commercial and non-commercial games with credit given.
Mods, if you want to move this to the completed scripts forum since it is considered completed now, feel free.
Last edited by a moderator:



