Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
756
Reaction score
629
First Language
French
Primarily Uses
Shield and Break system from Octopath traveler.
Wz049pz.jpg


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
192
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
756
Reaction score
629
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
675
Reaction score
438
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
756
Reaction score
629
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
675
Reaction score
438
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
62
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
756
Reaction score
629
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
62
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
756
Reaction score
629
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
756
Reaction score
629
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
62
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
756
Reaction score
629
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
62
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

  • display.png
    display.png
    387.5 KB · Views: 18

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
756
Reaction score
629
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

Veteran
Veteran
Joined
May 12, 2019
Messages
39
Reaction score
7
First Language
French
Primarily Uses
RMMV
please how to get it working for enemies
 

Astfgl66

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

Anohe1

Veteran
Veteran
Joined
May 12, 2019
Messages
39
Reaction score
7
First Language
French
Primarily Uses
RMMV
No it is working I just messed up things thank you very much
 

Archlvt

Veteran
Veteran
Joined
Mar 8, 2019
Messages
74
Reaction score
7
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
756
Reaction score
629
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Someday, I hope they make a game where 95% of the animation budget went to turning valves and opening door animations, leaving every other animation looking like a CDI zelda cutscene.
programming at 12 years old: "I love how it works!"
programming at 18: "I love that it works."
programming at 25: "I love why it works."
programming at 30: "I love when it works."
programming at 50: "How did this work?"
Why can't I insert picture in this profile post? Only insert image -> by URL. No option to upload from my pc?
Trying out a new Battle Ui.
BattleUI.png
And.... I couldn't help myself. I linked my card game Lore and Concepts back to my RPG Maker game and made them take place in the same universe. I think that means I need to get back to work on my RPG Maker Game. There's obviously a story here my brain wants to tell.

Forum statistics

Threads
129,758
Messages
1,204,885
Members
170,846
Latest member
suball
Top