MARREND'S PROFILE

Marrend
Guardian of the Description Thread
21781
Life is a story. Which is the one that defines you?
Baclyae Revolution
A humble tribute to the Suikoden series!

Search

Filter

2024 Misao nomination monthly data

March numbers available! This moth saw 21 nominations, bringing our total to 31! February's value being so low is somewhat expected, but, with the site being down, or otherwise unavailable for the last two weeks of that month certainly didn't help.

The Featured Game Thread

What's on tap for April's feature? The real one, not a fake one, if that's gonna be a thing this year.

Marrend's Custom Counter

Depends on the "counter stance" definition. Like, I have a game made in Ace where there's a skill called "Absorb Stance", that induces a state on the users that has it's target rate shoot through the roof, and lowers DEF/MDF values. However, incoming damage is treated as MP recovery, with, perhaps, some additional math to account for the general trend of MP values being lower than HP values when the MP recovery is applied.

Celes' [Runic] command in Final Fantasy 6 did something similar, I think? My memory is certainly more than fuzzy on this point, but, I think it was limited to absorbing MP from magical attacks, and only gained MP equal to the cost of the spell. I don't quite remember, it's been a long, long, time, and it's a command I barely personally used.

Marrend's Custom Counter

I initially only checked actors, where a custom counter skill would be obtained via their equipped weapon. I did a check for enemies as well, where it's obtained via the notes field on the enemy. It seemed to work for both battler types, and checking through various scopes to ensure that what was going on is, in fact, what I thought should be going on. As far as such tests were concerned, it worked as intended.

Though, as an aside, it was kinda funny, at least for a little while, to see a healing skill used as a counter attack, even if the battle was going exactly nowhere because of that.

Marrend's Custom Counter

I can't say for sure if I can get the animation for the indicated skill to animate/play, nor how to indicate a side-view motion for allied battlers, other than the "attack" motion of the equipped weapon. However, at the very least, getting a counter attack skill to target the battler that is counterattacking is certainly more doable! Plugin updated!

However, I am inclined to note that the way I've set this up, only one target is viable for counter attack skills. You can choose a scope of "all allies" or "all enemies", but, skills will revert to the attacking unit in the case of a skill that targets enemies. Likewise, skills will revert to the defending unit in the case of a skill that targets allies. However, this restriction could be circumvented by use of Common Events, should such be desired.

Marrend's Custom Counter

- It seemingly keeps the default attack animation

This... makes a certain amount of sense? I remember needing to insert code into deathblows so that the "standard" light/medium/heavy attacks, regardless of what skill IDs are used, use the default attack animation, rather than the default skill animation in regards to side-view sprite animations. I fully admit that I might not have been too concerned about side-view systems when I wrote this. *nervous laughter*

I then used a buff as a counter attack and when the enemy countered, the actor got buffed instead of the enemy. I set the scope to "1 ally" and "to self" just in case but both times the actor got buffed.

I've a feeling this very likely involves...

// Executes counter-attack skill.
BattleManager.invokeCounterAttack = function(subject, target) {
	skill = $dataSkills[target.counterSkillId()];
	if (target.canPaySkillCost(skill)) {
	    const action = new Game_Action(target);
		action.setCounterAttack();
		target.paySkillCost(skill);
		action.apply(subject);
		this._logWindow.displayCounter(target);
		this._logWindow.displayActionResults(target, subject);
	};
};

...this code, right here, which is an overwrite of...

BattleManager.invokeCounterAttack = function(subject, target) {
    const action = new Game_Action(target);
    action.setAttack();
    action.apply(subject);
    this._logWindow.displayCounter(target);
    this._logWindow.displayActionResults(target, subject);
};

...the default code when a counter attack is invoked. I could be wrong, but, my current thoughts are that the variables passed into either of these methods might always be the same. As in, 'subject` would be the battler triggering the counterattack, and `target` would be the battler performing the counterattack. Though, looking at the action queue/array again again again again again to research this further would be in order.

Marrend's Custom Counter

All I can says is that's it's my idiocy, and I apologize for not noticing this earlier. For what it is worth, the notetag should use a colon...

<counterskill: id>


...like so, rather than utilize the equals sign. Both this page, and the script's help file have been updated. You might not necessarily "need" to get the updated file to get it to work, but, regardless of if you do or not, if replacing the notetag with this syntax still doesn't work for you, let me know!