target._equips[1] is the equipment item in slot 1 of the target. Slot 1 is the second equipment slot. By default this is the offhand slot (which is to say the shield slot or the second weapon slot if the target is dual wield type). Since you mention that your chest item is being removed, your chest item is probably in slot 1, so change this number to whatever slot your shield actually is in.
The select condition tag probably isn't working because you need a separate yanfly plugin to use it. YEP_X_SelectionControl.
The part you have commented as not understanding, is lowering the defense parameter of the target, but only when that target isn't an actor. This allows the shield break skill to have some functionality when an ally uses it on an enemy, as enemies don't have equipment, their shield can't be removed, so their defense param is lowered instead. I also suggested adding a state to the target to lower their block chance, to simulate the shield actually being gone, as, once again, enemies are never actually wielding shields.
My apologies for not responding to this sooner, I didn't get a notification for this reply to the topic, and was pretty inactive for a while there, so I wasn't checking for new posts on them. I'm not sure how much of the above you still need worked on, it was a while ago, after all, but here's my thoughts anyways:
First one:
- Dealing with effects in a battle where the battle should end, but doesn't is very tricky. You can use the YEP_X_StateCategories plugin to keep the trigger state from being removed when your actors die. This is needed, as without it, no state will have any effect after the death of an actor.
- With the above step implemented, you can then give that state a custom deselect effect that checks if the current target is dead, and then if all of the other allies of that target are also dead, and then does a random number check to see if your 23% chance triggers, then revive all allies. If you're feeling lucky, you could even try a force action to give the effect a neat animation or action sequences.
- I'm not at all familiar with this plugin. If there is a conditional way to not show an armor piece, use that to conditionally only show the shield on the character if they are afflicted with the shield block state (36 from above I think).
- If that isn't an option, it might not be too difficult to add in, or request that SRD add this functionality into his plugin. But again, though, I'm not at all familiar with this plugin so that may prove to be more difficult than I think.
- I should never be anyone's first choice for menu work, it takes me forever, and the end result is usually a hardcoded mess that I wouldn't recommend anyone use. Additionally, I'm not familiar with the equipment learning plugin either, you're probably better off looking for someone with more experience with menus to help you out here.
If we're being honest, a lot of things are possible with this plugin, sometimes you have to think outside the box to figure them out, though.
In this case, the plugin is coded in such a way as that a state or an armor can only have one block value. When you make your buckler, it has a 5% chance to block anything that is specified as a blockable attack, as an example. Likewise, any state that increases or decreases block chance does so with a very specific number in mind, that cannot be changed, so a shield mastery type passive state will only ever increase block chance by a flat 10%, as variables aren't possible to feed into that value.
With that being said, however, there is nothing stopping you from adding a second passive state to your iceflame buckler, that detects an incoming attack as meeting the requirements to be nullified, (ie: being the correct element) and then applies a third state that adds 100% block chance, and then removes that state on a deselect effect.
Picture it like this:
- Iceflame Buckler has a base 5% block chance
- It has two passive states that the player never sees:
- The block state from my plugin, which allows the shield block things
- Fire/Ice null which is used to provide the extra blocking effect against ice/fire attacks.
- The second state is used exclusively to set up our extra resistance to ice/fire, which itself is a third state with a <Block Chance: 100> tag on it.
- Because a passive state is generally always active, we can use it to detect any incoming attacks on the target, before they hit, and change the incoming damage result accordingly, using a <Custom Select Condition> note tag. It might look something like this:
Code:<Custom Select Condition> var fire = 3 var ice = 4 var elements = this.getItemElements(); // Check if the elements contains fire or ice if (elements.contains(fire) || (elements.contains(ice)) { //add state 50 to the target of the attack target.addState(50) } </Custom Select Condition> <Custom Deselect Condition> //remove the state when the attack has concluded target.removeState(50) </Custom Deselect Condition> - Note that I used state id 50 as a placeholder in the above code, change it whatever your third state will be (the one with a <block chance: 100> note tag.
