gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi, does anyone have any idea how to add a counter attack/parry to the ABS chrono engine, just to negate damage, similar to dodge or block, it doesn't need to return an auto attack. It could just be another instance of dodge chance, but with a different name = parry. Please, this would really help me.
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
Hi, does anyone have any idea how to add a counter attack/parry to the ABS chrono engine, just to negate damage, similar to dodge or block, it doesn't need to return an auto attack. It could just be another instance of dodge chance, but with a different name = parry. Please, this would really help me.
You'd either have to modify the source code because it would require an additional check for dodging during the tool event damage check. If I were doing it I'd build it off the shielding/blocking functions as a template.

Or do something like an extra button common event that gives the player a temporary invulnerability state and only works for a few frames
 
  • Like
Reactions: gaa

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Do you know anyone who could do that? I'd pay for it, of course.
And another question, how much would it cost, how complicated is it?
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
There is a subforum for comissions you can post in once you have 30 posts. Could you clarify how you want this dodge/parry mechanic to differ from the shield?
 
  • Like
Reactions: gaa

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
There is a subforum for comissions you can post in once you have 30 posts. Could you clarify how you want this dodge/parry mechanic to differ from the shield?
I want it to be a passive ability on a percentage basis, just like dodge, but the parry name will pop up.

(Also would be cool to add a x % chance to passively block damage based on a variable and +x% while holding shield.
If this is too hard to change, then I want to drain stamina while holding the shield, and when stamina is 0, the shield is no longer held.)
BTW: Thank you for reply AquaEcho
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
So the player doesn't have to press anything to parry/block? There is just an extra percent chance to parry when taking damage? If the player stands there and does nothing while being attacked some percentage of attacks get blocked? What stat affects the parry chance?

then I want to drain stamina while holding the shield, and when stamina is 0, the shield is no longer held.)
This shouldn't be difficult but you would have to modify the ChronoCT code. Probably just add an extra function modified from the dashing check to check for shielding.
 
Last edited:
  • Like
Reactions: gaa

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
So the player doesn't have to press anything to parry/block? There is just an extra percent chance to parry when taking damage? If the player stands there and does nothing while being attacked some percentage of attacks get blocked? What stat affects the parry chance?
Yes, the player doesn't have to press anything, just like with the dodge.
Yes if the player is standing, a percentage of attacks will be blocked.

Stat: The parry chance can be basically a counter attack, except it doesn't return damage. Or just a variable, whatever.
I think it would be really hard to make an option of a perfect parry(returning damage),
Normal "Parry"(dodge attack/block), and if switch is on "(Perfect) Parry" will return damage.
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
Yes, the player doesn't have to press anything, just like with the dodge.
Yes if the player is standing, a percentage of attacks will be blocked.

Stat: The parry chance can be basically a counter attack, except it doesn't return damage. Or just a variable, whatever.
I think it would be really hard to make an option of a perfect parry(returning damage),
Normal "Parry"(dodge attack/block), and if switch is on "(Perfect) Parry" will return damage.
Then this isn't really a ChronoEngine problem and you could just start a new thread asking how to add an extra "parry" stat in the battle formula.

You could probably do both parry and perfect parry as two different states, then just check for the state, but battle formulas aren't my specialty so I'd advise a new thread.
 
Last edited:

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Then this isn't really a ChronoEngine problem and you could just start a new thread asking how to add an extra "parry" stat in the battle formula.

You could probably do both parry and perfect parry as two different states, then just check for the state, but battle formulas aren't my specialty so I'd advise a new thread.
Unfortunately nope, ABS chrono attacks works differently than turn based attacks
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
Unfortunately nope, ABS chrono attacks works differently than turn based attacks
The ABS uses the same battle formula the turn based system does. ChronoEngine just adds on map tool event collision checks. The battler, weapon and states data come from the database just like the default battle system.
 
  • Like
Reactions: gaa

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
OP, since that other plugin didn't work, I wrote you a quick plugin that will give anyone with a state an X percent chance to guard an attack. Create a state with the notetag <blockChance:25> where 25 is the percent of attacks you want guarded. You can use this with Yanfly Auto Passive States if you want the player to always have this state under certain conditions.
1696997949227.png

Then put the below code in a new .js plugin file at the bottom of your plugin list. Change 19 to the state number (mine was 19 in the example pic).
Code:
ToolEvent.prototype.isInvunerableAction = function(target,battler) {
    if (battler._ras.invunerable && this.user() != target) {return true};
    var invunerable = false;
    if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return true;
        }
    }
    for (var i = 0; i < battler._ras.invunerableActions.length; i++) {
         var actionID = Number(battler._ras.invunerableActions[i]);
         if (actionID === this._tool.id) {invunerable = true;break};
    };
    return invunerable;
};
 

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
OP, since that other plugin didn't work, I wrote you a quick plugin that will give anyone with a state an X percent chance to guard an attack. Create a state with the notetag <blockChance:25> where 25 is the percent of attacks you want guarded. You can use this with Yanfly Auto Passive States if you want the player to always have this state under certain conditions.
View attachment 279728

Then put the below code in a new .js plugin file at the bottom of your plugin list. Change 19 to the state number (mine was 19 in the example pic).
Code:
ToolEvent.prototype.isInvunerableAction = function(target,battler) {
    if (battler._ras.invunerable && this.user() != target) {return true};
    var invunerable = false;
    if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return true;
        }
    }
    for (var i = 0; i < battler._ras.invunerableActions.length; i++) {
         var actionID = Number(battler._ras.invunerableActions[i]);
         if (actionID === this._tool.id) {invunerable = true;break};
    };
    return invunerable;
};
Hi, thanks a lot, I tried it in the Chrono engine demo, and unfortunately it doesn't work. I've set <blockChance:100>, state 19 and the player is still taking damage.
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
Hi, thanks a lot, I tried it in the Chrono engine demo, and unfortunately it doesn't work. I've set <blockChance:100>, state 19 and the player is still taking damage.
Could you try a number that's not 100 and post a screencap of your state page? Is the player affected with that state?
 

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
1697023075896.png
1697023099162.png
1697023213413.png
Yes, here, I noticed that the guard activates only when the player attacks, it doesn't even need a target.
 
Last edited:

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
View attachment 279737
View attachment 279738
View attachment 279739
Yes, here, I noticed that the guard activates only when the player attacks, it doesn't even need a target.
Oh, you only tested it against touch damage and may be part of the reason the other plugin didn't work. Ok, this should block against touch damage and stop the guard against yourself

Code:
ToolEvent.prototype.isInvunerableAction = function(target,battler) {
    if (battler._ras.invunerable && this.user() != target) {return true};
    var invunerable = false;
    if(this.user() != target && target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return true;
        }
    }
    for (var i = 0; i < battler._ras.invunerableActions.length; i++) {
         var actionID = Number(battler._ras.invunerableActions[i]);
         if (actionID === this._tool.id) {invunerable = true;break};
    };
    return invunerable;
};

Game_Chrono.prototype.executeTouchDamage = function(user,target) {
    if (target.battler()._ras.collisionD > 0) {return};
    if (this.isGuardingDirectionTouch(user,target)) {
        this.executeGuardTouch(user,target);
        return
    };
    if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return;
        }
    }
    var subject = user.battler();
    var action = new Game_Action(subject);
    action.setAbsSubject(subject)
    var oldHP = target.battler()._hp;   
    var coop = [];
    var skillId = user.battler().attackSkillId();
    action.setSkill(skillId);
    action.applyCN(target.battler(),coop);
    target.battler().startDamagePopup();   
    target.battler()._ras.collisionD = 30;
    if (oldHP > target.battler()._hp) {
        this.executeTouchTouchAfterHit(user,target,skillId);
    };
};
 

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Oh, you only tested it against touch damage and may be part of the reason the other plugin didn't work. Ok, this should block against touch damage and stop the guard against yourself

Code:
ToolEvent.prototype.isInvunerableAction = function(target,battler) {
    if (battler._ras.invunerable && this.user() != target) {return true};
    var invunerable = false;
    if(this.user() != target && target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return true;
        }
    }
    for (var i = 0; i < battler._ras.invunerableActions.length; i++) {
         var actionID = Number(battler._ras.invunerableActions[i]);
         if (actionID === this._tool.id) {invunerable = true;break};
    };
    return invunerable;
};

Game_Chrono.prototype.executeTouchDamage = function(user,target) {
    if (target.battler()._ras.collisionD > 0) {return};
    if (this.isGuardingDirectionTouch(user,target)) {
        this.executeGuardTouch(user,target);
        return
    };
    if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return;
        }
    }
    var subject = user.battler();
    var action = new Game_Action(subject);
    action.setAbsSubject(subject)
    var oldHP = target.battler()._hp;  
    var coop = [];
    var skillId = user.battler().attackSkillId();
    action.setSkill(skillId);
    action.applyCN(target.battler(),coop);
    target.battler().startDamagePopup();  
    target.battler()._ras.collisionD = 30;
    if (oldHP > target.battler()._hp) {
        this.executeTouchTouchAfterHit(user,target,skillId);
    };
};
Thanks again,
Yes, It doesn't show the guard anymore, but the block isn't working.
It would be cool if it showed that guard animation or any different, when attack is blocked
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,206
Reaction score
1,615
First Language
English
Primarily Uses
RMMV
Thanks again,
Yes, It doesn't show the guard anymore, but the block isn't working.
It would be cool if it showed that guard animation or any different, when attack is blocked
Add this.executeGuardTouch(user,target); before return to this section in executeTouchDamage
Code:
if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            this.executeGuardTouch(user,target);
            return;

Full code:
Code:
ToolEvent.prototype.isInvunerableAction = function(target,battler) {
    if (battler._ras.invunerable && this.user() != target) {return true};
    var invunerable = false;
    if(this.user() != target && target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return true;
        }
    }
    for (var i = 0; i < battler._ras.invunerableActions.length; i++) {
         var actionID = Number(battler._ras.invunerableActions[i]);
         if (actionID === this._tool.id) {invunerable = true;break};
    };
    return invunerable;
};

Game_Chrono.prototype.executeTouchDamage = function(user,target) {
    if (target.battler()._ras.collisionD > 0) {return};
    if (this.isGuardingDirectionTouch(user,target)) {
        this.executeGuardTouch(user,target);
        return
    };
    if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            this.executeGuardTouch(user,target);
            return;
        }
    }
    var subject = user.battler();
    var action = new Game_Action(subject);
    action.setAbsSubject(subject)
    var oldHP = target.battler()._hp;   
    var coop = [];
    var skillId = user.battler().attackSkillId();
    action.setSkill(skillId);
    action.applyCN(target.battler(),coop);
    target.battler().startDamagePopup();   
    target.battler()._ras.collisionD = 30;
    if (oldHP > target.battler()._hp) {
        this.executeTouchTouchAfterHit(user,target,skillId);
    };
};
 

gaa

Villager
Member
Joined
Aug 1, 2023
Messages
12
Reaction score
0
First Language
English
Primarily Uses
RMMV
Add this.executeGuardTouch(user,target); before return to this section in executeTouchDamage
Code:
if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            this.executeGuardTouch(user,target);
            return;

Full code:
Code:
ToolEvent.prototype.isInvunerableAction = function(target,battler) {
    if (battler._ras.invunerable && this.user() != target) {return true};
    var invunerable = false;
    if(this.user() != target && target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            return true;
        }
    }
    for (var i = 0; i < battler._ras.invunerableActions.length; i++) {
         var actionID = Number(battler._ras.invunerableActions[i]);
         if (actionID === this._tool.id) {invunerable = true;break};
    };
    return invunerable;
};

Game_Chrono.prototype.executeTouchDamage = function(user,target) {
    if (target.battler()._ras.collisionD > 0) {return};
    if (this.isGuardingDirectionTouch(user,target)) {
        this.executeGuardTouch(user,target);
        return
    };
    if(target.battler().isStateAffected(19)){
        if((Math.random() * 100) < $dataStates[19].meta.blockChance){
            this.executeGuardTouch(user,target);
            return;
        }
    }
    var subject = user.battler();
    var action = new Game_Action(subject);
    action.setAbsSubject(subject)
    var oldHP = target.battler()._hp;  
    var coop = [];
    var skillId = user.battler().attackSkillId();
    action.setSkill(skillId);
    action.applyCN(target.battler(),coop);
    target.battler().startDamagePopup();  
    target.battler()._ras.collisionD = 30;
    if (oldHP > target.battler()._hp) {
        this.executeTouchTouchAfterHit(user,target,skillId);
    };
};
Oh, my God, it works! Thank you so much :yhappy:
 

Latest Threads

Latest Profile Posts

So the concept for my Game Jam project is way more than I can complete before the deadline. But I think I found a way to get the core done and make the incomplete parts either not really noticeable or make them a part of the story for now. That sneaky, dastardly Krampus! Then I can complete the rest. Did I mention that this is fun?
I've been working on a game called "Eternal Sunset". Is there anywhere here i can "show it off" maybe? Wondering what others think.
What do you do when there are lots of offers online but you don't have even a slight chance of ever playing those myriads of games?
Ugh, mispelled my username.

Forum statistics

Threads
136,543
Messages
1,267,346
Members
180,217
Latest member
GabooCat
Top