Ramza's Shield Block Plugin -UPDATED APRIL 3 2019-

● ARCHIVED · READ-ONLY
Started by ramza 126 posts Page 4 of 7 View original ↗
  1. Could I effectively create both a shield block state AND a parry state (which would display a weapon instead of a shield), and have them both on the same character, or would the plugin not discern between the two?
  2. The plugin doesn't have support for weapons on the note tags, so your parrying weapon would need to be an armor for it to have any block notetags on it in the first place.

    Having multiple items with block chance stack additively, but the animations come only from the item in the shield slot, so you'd need to change the block state so that it also checks your parrying weapon for an animation, possibly change the motion it uses to an attack motion, and maybe throw in a % check to have the state decide if the block was really a party or not.

    It's doable, maybe, but I can't recommend it.
  3. I have updated this plugin to v2.15, adding the following feature:
    • Equipment optimization will now take block chance into account on a shield, at a rate of 1% block chance == 1 parameter. A shield with 5 points better block chance will be treated as better than a shield that has up to 4 less defense on it, as a result.
    • Added some backend compatibility changes to make this plugin more compatible with my other plugins.
  4. Hey there, big fan of this plugin, it is perfect for my game.:smile: I recently was forced to to upgrade to the new YEP_StatusMenuCore by some of it's child plugins and am now really missing being able to see my Blk%. I was just wondering if there was any chance you would be updating your edit of that plugin, or if maybe there was a simple copy paste I could do with your edit and the new plugin. Either way this plugin rocks, keep up the amazing work.
  5. Jeremiah Eastman said:
    Hey there, big fan of this plugin, it is perfect for my game.:smile: I recently was forced to to upgrade to the new YEP_StatusMenuCore by some of it's child plugins and am now really missing being able to see my Blk%. I was just wondering if there was any chance you would be updating your edit of that plugin, or if maybe there was a simple copy paste I could do with your edit and the new plugin. Either way this plugin rocks, keep up the amazing work.
    Alright, so I can certainly redo the dirty edit I made originally again for the newer version, but it might be easier with a patch instead.

    So paste the following code into a blank .js file, and import it into your plugin manager BELOW the statusmenucore script.
    Code:
    Ramza.Wind_StatusInfo_prototype_draw_Attribute_Data = Window_StatusInfo.prototype.drawAttributeData
     Window_StatusInfo.prototype.drawAttributeData = function(attr, dx, dy, dw) {
        switch (attr) {
            case 'blk':
            this.drawAttributeName('PUT THE DESIRED LONG ATTRIBUTE NAME HERE', dx, dy, dw);
            if (this._actor.isStateAffected(Ramza.BlockParams.blockStateId)){
                this.drawAttributeRate(this._actor.blk, dx, dy, dw);
            } else {
                this.drawAttributeRate(0, dx, dy, dw);
            }
            break;
            default:
            Ramza.Wind_StatusInfo_prototype_draw_Attribute_Data.call(this, attr, dx, dy, dw)
            break
            }
    }
    Replace the big capital-lettered section in there with the desired long name for block chance. That should work. Let me know if it doesn't I take a better look.
  6. Thank you so much for helping with this. :smile: This method will be perfect but it doesn't quite work yet. I believe it's missing a { but I am not sure where it goes. I'll post a pic the error. And again thanks so much for this.
  7. @Jeremiah Eastman
    Sorry to ninja this, but just remove the last } from the code. :)
  8. Ahh, I had tried that but got another error so thought that was wrong.:smile: Thanks much Waynee:smile:, I'll post a pic of the new error.

    Edit:
    Scratch that second error, I had it under the wrong core, whoops.:smile: Thanks for this fix Ramza it all works great, you rock.:smile:
  9. Are you sure that you placed it BELOW YEP_StatusMenuCore and that YEP_StatusMenuCore is enabled?
  10. waynee95 said:
    Are you sure that you placed it BELOW YEP_StatusMenuCore and that YEP_StatusMenuCore is enabled?

    Nah I had it under the wrong core, the buffstates core just looked to similar in the big list.:smile: It's all working now, I edited the above post to let everyone know it was solved and works great. If anyone else wants to update their plugins this is a great fix. Thanks again for all the help you two keep up the great work.:smile:
  11. I have made a small update to this plugin, bringing it up to version 2.16 with the following change:
    • Aliased Game_ActionResult.prototype.clear() instead of overwriting it. This has no effect on the functionality of this plugin, but will make it much more compatible with other plugins that modify how the action result sequence goes.
  12. Somethings wrong with the passive state. I'm getting a "cannot read property of blockValue of null" error. Not sure with 0 he means.
  13. The state is getting blockValue from the item in your actor's offhand (equipslot 1). If your actor has nothing in his offhand, it would be checking 'null' for blockValue. This means that the ally must have something in his offhand in order to block without causing this problem, which is why the passive state works best when it is passively given by the shield item that will be doing the blocking.

    To resolve the issue, insure that a player can't possibly block without a shield equipped, the best way to do this is the have the passive state applied only by shields, and not passively on an actor or class.
  14. Thanks ramza.

    However, blocking with weapons is a thing (parrying) and since not everyone in my game uses a shield, I'm trying to do it this way:

    Every character has a certain block rate in their xparams. That rate can be increased by equips. Wonder if it was possible to forego the check for blockvalue in offhand, but take everything else into account instead
    (Sorry for being complicated :biggrin:)
  15. Sure. If we look at the custom state we're using, you can see exactly where it pulls blockValue from the item held in slot 1 of the actor:
    Code:
    var blockValue = (target.isEnemy() ? target.enemy().blockValue : target.equips()[1].blockValue)
    While I never technically enabled the ability to have blockValue on weapons, you can override this part in the state with a different code that checks if the offhand is empty, and then uses a different value if that's found to be true. You could even insert some code above this check to set how much the block value would be based on the item in the mainhand, or the actor, or almost anything else:

    Code:
    <Custom React Effect>
    var parryValue = 15
    var parryPercent = 30
    var blockValue = (target.isEnemy() ? target.enemy().blockValue : (!target.equips()[1]) ? parryValue : target.equips()[1].blockValue)
    var blockPercent = (target.isEnemy() ? target.enemy().blockPercent : (!target.equips()[1]) ? parryPercent : target.equips()[1].blockPercent)
    if (target.result().isBlocked()) {
        value -= Math.round(value * (blockPercent/100));
        value -= blockValue
        value = Math.max(value, 0)
        var blockAnim = (target.isEnemy() ? target.enemy().blockAnimation : target.equips()[1].blockAnimation)
          target.startAnimation(blockAnim, true, 0);
          target.requestMotion('guard')
    }
    </Custom React Effect>
    <Custom Deselect Effect>
    setTimeout(function () {
     target.requestMotion('walk')
    }, 180);
    </Custom Deselect Effect>
    (note that blockPercent will also give the same issue so I included that in the state).

    The plugin itself doesn't have the ability to read block note tags from weapons though, so I'm not real sure this will work at all without making that change, TBH.
  16. Hi Ramza, i really like this plugin, this makes the "normal" sword a must have in a team, without this plugin all the characters would be using Big Swords. So i have some ideas to improve this concept, can this be done?
    • The shield break Skill that can destroy a shield, really DESTROY the "armor" removing it from the battle and the inventory.
    • The substitute flag effect, when you equip a shield you activate the substitute flag, but when they use this he 'block' the attack
    • the counter attack whit some types of shields when you 'block' the attack the actor counter whit the default ataque

    Thanks for you time and hope you enjoy this ideas, keep up the good work :)
  17. Tatsumaro said:
    Hi Ramza, i really like this plugin, this makes the "normal" sword a must have in a team, without this plugin all the characters would be using Big Swords. So i have some ideas to improve this concept, can this be done?
    • The shield break Skill that can destroy a shield, really DESTROY the "armor" removing it from the battle and the inventory.
    • The substitute flag effect, when you equip a shield you activate the substitute flag, but when they use this he 'block' the attack
    • the counter attack whit some types of shields when you 'block' the attack the actor counter whit the default ataque

    Thanks for you time and hope you enjoy this ideas, keep up the good work :)

    Of the three suggestions you made, two of them can actually be done fairly easily without the use of even this plugin at all.

    Shield Break can be a normal skill, which uses yanfly's selection control plugin, and an after eval from skill core. Selection control is used to make sure the shield break skill can only be used on a target that has a block passive state enabled on it (implying they're using a shield). The after eval would be used to destroy the shield on the ally afflicted with the skill, or lower the defense param of an enemy, although it might be tricky to try to remove the passive block state from an enemy in this way, now that I think about it...

    A sample notebox for this might look something like this:
    Code:
    <Select Conditions>
    state: 36
    </Select Conditions>
    <After Eval>
    if (!target.isEnemy()){
    target._equips[1].setObject(null)
    } else {
    target.addParam(3, -10)
    //maybe add a state to the target to reduce block chance by 100%?
    }
    </After Eval>

    While I'm not currently 100% sure, I'm fairly certain the custom counter eval from counter control can be used to check the actionresult that just occurred to see if it was blocked, allowing the counter skill to be enabled if it was. A notebox for a skill like that might look something like this:
    Code:
    <Counter Condition>
    Physical hit
    eval: target.result().isBlocked()
    </Counter Condition>

    The substitute flag would need a little bit more work to the block state, but might also be doable. I'm not sure how the substitution effect is calculated, but I'm sure it's possible to see if the blocker is being a substitute, and either apply a temporary state to him to increase his block chance by a substantial amount, or modify the block state to check if the target is being a substitute before giving a 100% block chance during the react effect. I have no example to show for this, but I'll look into it at a later time.
  18. Hi ramza, thanks for all the work. So i'm testing the codes and:
    • just realise that when you substitute flag and add 100% block state to 1 actor you became an " IMMORTAL GOOD" because all the ataques will be stopped, so lets just call that a "stupid" idea :rswt, and git it a rest. ( the default % works just fine)
    • i'm really not familiarized with java coding and steal training to embrace all this RPG MAKER " dialect " can you please correct my reading of the code?
      Code:
      <Select Conditions>
      // this is the state i create for the Shield Block Plugin, i think
      state: 36
      </Select Conditions>
      <After Eval>
      if (!target.isEnemy()){
      // "_equips[X]" X bing the number for the Armor Types in Types
      target._equips[1].setObject(null)
      } else {
      // im not even going to trai understanding what is this :)
      target.addParam(3, -10)
      //maybe add a state to the target to reduce block chance by 100%?
      }
      </After Eval>
    • steal in the Shield Break i have done some testing and the results are:
    1. the defense points of the character decrease after the ataque
    2. target._equips[1].setObject(null) removes the armor, i rely talking about the clouding, the actor is naked ate the battle end. The shield is in Armor Types 1 but in Equipment Types 3, if i create a new Armor Type for the shield i dont have the Seal Equip option in weapons traits.
    3. it targets actors even if its not inflicted whit whit no state: 36, and it steals removes the chest piece
    • the Counter Condition code didn't work i don't know whai.

    All of this takes to my second point in this long text. I saw that you open your "script shop" PERFECT i believe you are the best man for this job :)

    I need 3 things done in my game:
    1. A code that, when switch X is on and all team elements are dead, before the end of the battle, a Skill has 23% chance of reviving all the team members.
    2. I'm using Character Creator EX and
      CCEX Dynamic Actors from SDR to create a more visual look for my game, i need to remove the "shield" of my character arms in battle when is target white Shield Break
    3. some work in the menu related whit Moogle_X_EquipmentLearning, there is a window that i wood like to only appear if is needed and remove the "right" "left" conundra from the menu. This is hard to explain like this, i prefer to make a video explaining everything.
    Please send me a budget, if you want i can sand you my project so you can see what i'm talking about the 2 and 3 "quests" :cutesmile:.

    PS: i also love to hear you feedback of my mechanics.
  19. Ramza, would it be possible to give bucklers a chance of only negating certain attacks? For example, an Iceflame shield(Yes, I did get it from Bravely Default) is guaranteed to negate fire and water (or ice, hence the name) attacks, but has a much lower chance of negating physical attacks that are not of the fire or water(or ice) attributes. Would that be possible, using this plugin?