Looks like I'm quite late to the party, but for the next poor soul to find this thread in 3 years or so:
I played around with the plugin and managed to add the following things:
- freely customizable knockback, both vertically and horizontally, so uppercuts etc. are now possible
- freely customizable knockback duration, for flying even longer! (or shorter)
- freely customizable hitstun (this is handled differently from knockback, so you can have the enemy fly for 1 second, but keep him frozen for 5. Not sure if it works vice versa though xD
- added the option to turn off invincibility after being hit. By default you are untouchable for as long as you are stunned. So to make (true) combos possible I added an option to toggle that on and off in the plugin parameters (see Screenshot 8)
I would feel bad posting Moghunters script without their permission here, so instead here's a step by step guide of what I did:
Make a backup (copy paste the plugin somewhere so have a working version in case you mess up)
Open the plugin in the code editor of your choice (worst case even the Windows 'Notepad' works fine, but that one doesn't count lines. Instead I'd recommend downloading Notepad++, it's free and does all you need in this case.
Add the following code at line 79 (see Screenshot 1):
* @param Damage Reaction
*
@desc true: battlers stay vulnerable after damage false: battlers are invulnerable during hitstun (default)
*
@Default false
Add the following code at line 358 (see Screenshot 2):
var globalSkillID = 1;
var knockbackX = 2;
var knockbackY = 2;
var knockbackDuration = 15;
var hitstun = 30;
Add the following code at line 393 (see Screenshot 3):
Moghunter.lmbsDamageReaction = String(Moghunter.parameters['Damage Reaction'] || 'false');
Add the following code at line 1022 (see Screenshot 4):
var knockbackCounterX = 0;
var knockbackCounterY = 0;
var knockbackCounterDuration = 0;
var hitstunCounter = 0;
Add the following code at line 1034 (also see Screenshot 4):
if (note_data[0].toLowerCase() == "lmbs knockbackx"){
var par = note_data[1].split(':');
knockbackX = Number(par[0]);
knockbackCounterX = knockbackCounterX + 100;
} else {
knockbackCounterX = knockbackCounterX - 1;
};
if (note_data[0].toLowerCase() == "lmbs knockbacky"){
var par = note_data[1].split(':');
knockbackY = Number(par[0]);
knockbackCounterY = knockbackCounterY + 100;
} else {
knockbackCounterY = knockbackCounterY - 1;
};
if (note_data[0].toLowerCase() == "lmbs knockback duration"){
var par = note_data[1].split(':');
knockbackDuration = Number(par[0]);
knockbackCounterDuration = knockbackCounterDuration + 100;
} else {
knockbackCounterDuration = knockbackCounterDuration - 1;
};
if (note_data[0].toLowerCase() == "lmbs hitstun"){
var par = note_data[1].split(':');
hitstun = Number(par[0]);
hitstunCounter = hitstunCounter + 100;
} else {
hitstunCounter = hitstunCounter - 1;
};
Add the following code at line 1149 (see Screenshot 5):
if (knockbackCounterX < 0){
knockbackX = 2;
};
if (knockbackCounterY < 0){
knockbackY = 2;
};
if (knockbackCounterDuration < 0){
knockbackDuration = 15;
};
if (hitstunCounter < 0){
hitstun = 30;
};
Replace the code for 'LMBS is Invulnerable' starting from line 1345 with the following (see Screenshot 6):
Game_Battler.prototype.lmbsIsInvunerable = function() {
if (!eval(Moghunter.lmbsDamageReaction)){
if (this._lmbs_Knockback[3] > 0) {return true};
};
return false;
};
Replace the code for 'LMBS is Knockbacking' starting from line 1392 with the following (see Screenshot 7):
Game_Battler.prototype.lmbsUpdateKnockback = function() {
this._lmbs_Knockback[2]--;
this._lmbs_Knockback[4]++;
var gpower = this._lmbs_Knockback[1] == 2 ? this.lmbsGravityPower() : this.lmbsGravityPower() / 2;
if (this.lmbsCanFly()) {gpower = this._lmbs_Knockback[1] == 2 ? this.lmbsGravityPower() : 1;}
var gpower2 = this._lmbs_Knockback[1] == 2 ? this.lmbsGravityPower() : 3;
if (this._lmbs_Knockback[4] < knockbackDuration) {
this._lmbs_Y -= this.lmbsCanFly() ? -gpower2 : knockbackY;
if (this._lmbs_Y < $gameSystem._lmbsGroundHeight) {
this._lmbs_X -= this._lmbs_Direction === 2 ? -1 * knockbackX : knockbackX;
}
} else if (this._lmbs_Knockback[4] < (knockbackDuration / 15 * 25)) {
this._lmbs_X -= this._lmbs_Direction === 2 ? -1 * knockbackX : knockbackX;
this._lmbs_Y += gpower;
} else {
this._lmbs_Y += gpower;
};
if (this._lmbs_Knockback[2] <= 0) {
this._lmbs_Knockback[1] = 0;
this._lmbs_Knockback[2] = 0;
this._lmbs_Knockback[4] = 0;
this._lmbs_Knockback[5] = 0;
this.lmbsSetTarget();
};
};
Last but not least save the whole thing and you're good!
Now to use the new features just add the following new notetags for your skills, just like all the other ones that already exist:
LMBS KnockbackX: 2
LMBS KnockbackY: 2
LMBS Knockback Duration: 15
LMBS Hitstun: 30
These numbers are the default values the plugin used before. Of course you can change them however you like. Any skill that you don't assign any of these notetags to will default to these values like before.
When it comes to programming I am an absolute amateur and only scraping on the surface, so any real programmer would punch me for this code. But it's definitely still better than having nothing at all ^^
▶ YouTube video
Here's a quick video of me trying out the new features, balacing this will be a pain -.-
I'm not really active at all on this site, so if you have a question and I don't respond for a while, feel free to send me a mail to
[ISPOILER]
[email hidden][/ISPOILER]
If you'll excuse me, I'm off rebuilding and rebalancing my entire combat system now xD