Shield and Break system (Octopath traveler)

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
Shield and Break system from Octopath traveler.


By Astfgl
Credits: Yanfly

Requirements: Yanfly's Core Engine, Battle Engine Core and Element core. Recommended Buffs and States Core.

What it does:
This plugin creates a shield counter for enemies or actors. This shield counter is set to a certain number at the beginning of battle, depending on notetags, and will decrease once a battler is hit by an attack of an element the battler is weak to.
Once that shield counter reaches 0, a state will be inflicted on the battler, defined in parameters or on a case by case basis via notetags.
And that's it for the shield and break system. What the state does, the effects it applies is all up to you. There are instructions in the help file if you want it to behave like Octopath Traveler's.

Max shield number is determined by actor class equipment and states for actors, enemy type and states for enemies. It can also be dynamically modified in battle.

The second part is a weakness icon display array.
This plugin creates for all your enemies a global list that is saved for each enemy type. By default weaknesses are hidden, once you hit it however it will reveal itself, like you can see in the screenshot above.

There are parameters and notetag available to make the shield break and/or weakness display available to actors or enemies only, to hide shield number (like you can see for the actor above), and more. You can for example only use the break system or only use the weakness display.

Download: here

How to use:
Download, name it "AstfglSCB" without the quotes, import it, read the help file, set your parameters, and you should be all set.

Terms of use: For reference, they are written in the plugin file. I pasted them here for your convenience:
Code:
// Free to use non commercially, commercially, repost and
// edit, as long as the final product is kept under the same terms of use.
// Credits required, any of Astfgl, Astgfl (Pierre MATEO), Pierre MATEO
// Credits goes to yanfly for modified parts of battle engine core
Modified as of v1.4 to allow commercial use for free.

Shoutout goes to @Jiffy , for creating Octopath traveler's complete battle engine, with the BP system as well. Get it here.
I believe my version to be more cutomizable, but Jiffy's looks great too and aside from reading the code I haven't tried it, so you should probably try out both and see for yourself.
Unless you want a shield and break system for your actors too, in which case my plugin is your only solution for now.


If you have any request, feel free to leave a message here or via PM.
As usual, goodbye and happy making!
 
Last edited:

SoSick.

Veteran
Veteran
Joined
Jun 29, 2016
Messages
224
Reaction score
190
First Language
english
Primarily Uses
RMMV
Love that you have made this around yanfly plugins, works wonders with no problems.. hoping you soon make it possible to hide shield numbers! Many thanks :)
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
You can.
Use the <shieldDisplay:false> notetag in an actor enemy or state notebox.
It will display a ? symbol instead of a number, just like marsha in the screenshot
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
631
Reaction score
348
First Language
English
Primarily Uses
N/A
Seeing how this works with Yanfly's stuff, I'm pretty optimistic about it. But something about the icon display seems a little off. Have you considered placing the icons horizontally below the HP bar instead of over it? Also, for those who are using custom battle HUDs, is there any other way to display the element icons for the party?
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
I did not code a weakness display for actors. What you're seeing before the actor name is the actor's shield amount. I will not consider adding one as part of the HUD, as this would be hugely dependent on the custom HUD in itself and I can't write a compatibility patch for everyone and every HUD plugin available..
I could probably add something similar to enemies below each actor sprite, though.

It's kinda tough for the icon placement, not everyone has the hp bar plugin enabled. I'll look into allowing you to specify if you want the weakness display one or two lines below the name for those with the hp bar, but it will restrict enemy placement because the weakness display will overlap with the hud if you put the enemy too low then..
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
631
Reaction score
348
First Language
English
Primarily Uses
N/A
Yup. So in other words, not worth coding because there are too many factors to consider. XD. I totally get it. I just figured I'd ask just in case. Thanks anyway!
 

ThunderDragon32

Veteran
Veteran
Joined
Mar 25, 2017
Messages
59
Reaction score
1
First Language
English
Primarily Uses
N/A
@Astfgl66
Does the Weakness Display follow the enemies to other battles, so you wouldn't need to rediscover weaknesses?
If this is already added this would be a cool option to disable/enable.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
Yes the weakness display is saved by enemy type.
I'll make it optionnal, good idea.
 

ThunderDragon32

Veteran
Veteran
Joined
Mar 25, 2017
Messages
59
Reaction score
1
First Language
English
Primarily Uses
N/A
@Astfgl66
Another good feature to add is a notetag for a skill to allow weaknesses to be found.

Or a ability for a actor where 1 undiscovered weakness will be autofound in the beginning of the battle, this is done in Octo path for one of the characters.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
You can already do that with the following functions:
Code:
var ids = []
$gameTroop.members().forEach(function(member){
    var eId = member._enemyId
    if (!ids.contains(eId)) {
        var dis = [];
        for (let i = 1; i < $dataSystem.elements.length; i ++){
            if (Astfgl.enemies.disWeak[eId][i] === 0 && member.elementRate(i) > eval(PluginManager.parameters("OT").defaultElemCutoff)) {dis.push(i)}
        }
        ids.push(eId)
        if (dis.length!==0) {
            var num = Math.floor(Math.random() * Math.floor(dis.length));
            Astfgl.enemies.disWeak[eId][dis[num]] = 1;
        }
    }
})
Put it in a battle start event or as a spell effect and it will reveal one random weakness for each enemy type.

If you want it as a targeted ability for a single enemy: use the following in a skill notetag (from yanfly's skill core or action sequence)
Code:
var member = target
var eId = member._enemyId
var dis = [];
for (let i = 1; i < $dataSystem.elements.length; i ++){
    if (Astfgl.enemies.disWeak[eId][i] === 0 && member.elementRate(i) > eval(PluginManager.parameters("OT").defaultElemCutoff)) {dis.push(i)}
}
if (dis.length!==0) {
    var num = Math.floor(Math.random() * Math.floor(dis.length));
    Astfgl.enemies.disWeak[eId][dis[num]] = 1;
I'll implement them properly in the next update, but you can start using them right now with those script calls.
 
Last edited:

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
Hi everyone!
I've released v1.4 which I think will be the last one for a while.
It features the ability for specific enemies and actors not to use the shield system at all via the <shieldDisplay :none> notetag, the battler.revealRandomWeakness function and the $gameTroop.revealRandomWeakness function which do exactly what they're named after.

You can also now delete know weaknesses after each fight using a parameter so they don't save.

As of v1.4 I consider this feature complete and thus allow commercial use for free to. I will likely not be coming back to it unless there are bugs I missed.
Have fun, and happy making!
 

ThunderDragon32

Veteran
Veteran
Joined
Mar 25, 2017
Messages
59
Reaction score
1
First Language
English
Primarily Uses
N/A
@Astfgl66
Not sure why..but when I used the updated version it completely didn't work.
While when I went back to the old version everything was fine.
Even updated Yanfly plugins..
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
This is not enough info to work with.
What happened was there an error message?
What's the console log when in battle?
 

ThunderDragon32

Veteran
Veteran
Joined
Mar 25, 2017
Messages
59
Reaction score
1
First Language
English
Primarily Uses
N/A
@Astfgl66
Rpg maker MV Version 1.6.1
The plugin seems to not work at all, no error in game but the console does say something about a error.
 

Attachments

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
Alright I've updated it, it looks like I missed a bracket somewhere.
Works fine on my end now.
 

Anohe1

Villager
Member
Joined
May 12, 2019
Messages
24
Reaction score
5
First Language
French
Primarily Uses
RMMV
please how to get it working for enemies
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
Please elaborate what might be your problem.
 

Anohe1

Villager
Member
Joined
May 12, 2019
Messages
24
Reaction score
5
First Language
French
Primarily Uses
RMMV
No it is working I just messed up things thank you very much
 

Archlvt

Villager
Member
Joined
Mar 8, 2019
Messages
29
Reaction score
1
First Language
English
Primarily Uses
RMMV
Sorry if this is considered a necro post, but since there's nowhere on the internet to really scour for information about this plugin, I thought I'd better just post here. Is there a way to make an attack cause multiple points of shield damage? I know multi-hit skills will take off multiple points, but I want one single hit to take off 2, 3, or even 4 points.

Also, I noticed that even if you attack an enemy and miss, it still takes a shield point off just for the attempt. Any way around this?
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
696
Reaction score
539
First Language
French
Primarily Uses
I had half an hour to spare so I did this:


There is no necropost on plugin release threads. It is the most efficient way to reach creators.
I've fixed the bug you mentioned.
You can now make attacks add or substract multiple shield points too.

Code:
*==========================================
 * How to modify shield depletion
 *==========================================
 * You can change the amount from which a skill or item
 * impacts the shield counter using the following notetag:
 * <shImpact: X>
 * This notetag is evaled and is executed in the Game_Action context.
 * 
 * ex: <shImpact: 3> will remove 3 points from the shield gauge if striking a weakness
 * ex: <shImpact: -1> will add 1 point to the shield gauge if striking a weakness
 * ex: <shImpact: if (target.result().critical) {3} else {1}>
 * this will substract 3 on a critical strike and 1 on a regular strike
You can download the new version using the link in the first post.
 

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

Latest Threads

Latest Profile Posts

I've developed a habit of thanking cleaning ladies for their work.
Sorry Aerith... I will abandon your shoes... :guffaw:
Spent a whole bunch of time today reworking the area in the video because someone said it was too illusory. So I reworked it so it changes less, moved the grass up to the same level as the player.... And found enough extra resources to make the grass moves when the player touches it. Also lots more water, because it looks amazing. I'll probably put up a short updated video later today.
I never noticed how NOISY birds can be in the morning..
The worst part of writing the thesis is getting to a point where it's nearly done and you feel like an 8th-grader could've written something on that level.

Forum statistics

Threads
95,766
Messages
931,715
Members
126,169
Latest member
Stearen
Top