Jay's Dual Tech system

● ARCHIVED · READ-ONLY
Started by HeroicJay 329 posts Page 9 of 17 View original ↗
  1. HeroicJay said:
    Hm. My best guess is that your antivirus doesn't trust .js files. Do you have this sort of trouble with other plugins on Pastebin?



    No. This is the only plugin that's annoyed my antivirus it seems. It isn't even Pastebin, as it did the same thing when I simply copy&pasted the raw code into notepad++ and saved it from there. I just turned my antivirus off momentarily to download the file and it did work, but yeah. Idk what's causing it to set it off. 
  2. Hi Jay, it's not critical but just pointing it out your plug-in disables the <Hide if Learned Skill: x> function of Yanfly's SkillCore plug-in. Since I have to use that function in my game couldn't use your plug-in now. Might be good to fix it if it's an easy fix.
  3. I freaking love this :D Can it be done with three actors?
  4. watermark said:
    Hi Jay, it's not critical but just pointing it out your plug-in disables the <Hide if Learned Skill: x> function of Yanfly's SkillCore plug-in. Since I have to use that function in my game couldn't use your plug-in now. Might be good to fix it if it's an easy fix.



    I'll look into it tonight.


    EDIT: Okay, I see why that happened. It was a case of "I really shouldn't have written this one function the way I did anyway; this way makes more sense." Try it now.

    EmperorZelos said:
    I freaking love this :D Can it be done with three actors?



    It can be done with up to 10, if you have a plugin that allows for 10 actors (which is deliberately overkill; I had to have a limit, but wanted to put a limit that was more than even people with "more than four characters" plugins would likely ever need.)
  5. How do you set it more than 2 then? Same way and still call it "dualtech"?
  6. The tag is still "dual", you just put more than two people in it.


    <Dual:1,Fire,2,Ice,3,Lightning,4,Jump,5,Heal> or whatever.


    Also, the original way of doing triple techs before I modified the plugin a bit still works: if you give the skill to someone not in the tag, they're added to the tech for that character's use only. So if you give <Dual:1,Fire,2,Ice> to character 3, character 3 can use it like a triple tech. This is no longer necessary at all (in fact, it's probably harder to use well than the method listed above), but hey, it's there.
  7. What's happening to me?


    Am I the only one can't use this plugin ???
  8. Hm, can't say what's wrong from what I'm seeing there. You did, of course, remember to save the project before the test battle? The test battle system can be finicky about that.
  9. Everytime i test, eveytime  i save project.


    Would you please help me team viewer?
  10. Sounds like something I've been looking for for my next project. I'll have a closer look at this in the next 2 weeks, thanks for your effort! :)
  11. I'm afraid I'm in the same boat as huynhminhyntd. Animations work fine, but no damage seems to be done, no MP is taken away, and the MP costs to use the skill is not being displayed.


    I'm using the Yanfly sample project as a means to test out the new skills so I can come to grips with them. I've tried my best in trying to replicate dual skills using Lunatic mode (including using different formulas to calculate at every different stage of the attack (first attack done by character a and their MAT, second attack done by character b and their MAT, third attack using both characters and their combined MAT and combined elements)) but falling short due to the difficulties of implementing restrictions on skills (I couldn't disable the skill if the 2nd character was unable to move nor had enough MP to execute the skill.)


    Your plugin seems to address the one problem I had, but it just seems like I can't even get off the starting line. I'm wondering if it is either compatible with the latest Yanfly plugins, or if I just installed it wrong (I just copied the pastebin, put it into a notepad, saved it as a .js, uploaded it into the sample project by putting it at the bottom, and then decided to test.)


    If I could get this plugin to work (as noted, same problem as huynhminhyntd), then the whole world of dual/triple/quad techs open up!
  12. Loll


    Maybe this plugin wont work with some yan plugin that we dont know, this problem didn't find and fix ?
  13. I don't have enough info here. I have no issue with this plugin, and I have a number of Yanfly's plguins. I don't use all of them, though, and I don't think they're all up to date (though at least Core should be)...


    What happens if you disable the Yanfly plugins? Does it work then?


    Perhaps you could send me a project where this happens? Try to use Yanfly rules for this.
  14. HeroicJay said:
    I don't have enough info here. I have no issue with this plugin, and I have a number of Yanfly's plguins. I don't use all of them, though, and I don't think they're all up to date (though at least Core should be)...


    What happens if you disable the Yanfly plugins? Does it work then?


    Perhaps you could send me a project where this happens? Try to use Yanfly rules for this.



    My testing conditions iss using Yanfly's Sample Project (Which does have all of them.) that came out on the 15th of this month. I could try update it to the latest one (22nd) and see if any changes are noted and if it is successful.


    Perhaps maybe if I know which ones you're using that emulate the conditions successfully, maybe I could try the same thing. Maybe we can compare what versions those plugins are, and see if there are any major differences. 
  15. *eh* It's Saturday and I'm not busy. I'll hammer on it for a bit. Since I know how the plugin works, perhaps I can narrow down why it apparently doesn't.


    Uh... where is the sample project? I'm having trouble finding it. EDIT: Oh, it, uh, requires a Patreon donation. I have never used Patreon, and I don't want to set up an account right now.


    EDIT2: Well, after updating, dualtechs still work for me with the Yanfly set I am currently using for my main project. This set is:


    - Core


    - Battle Core


    - Battle CTB Extension


    - All three action sequence packs


    - Animated SV enemies


    - Extra Enemy Drops


    - Message Core & Extension


    - Event Mini Label


    - Equip Core


    - Battle AI Core


    - Victory Aftermath & Extension


    - Auto Passive States


    - Skill Learn System


    - Steal/Snatch


    - Weapon Animation


    - FPS Sync Option


    So clearly it's not one of those at fault, or I have them set in such a way that they're not interfering.


    EDIT3: I have installed every single one of Yanfly's Battle Plugins to my project. The battles are showing lots of signs of screwing with (Ames's Cleanse spell now targets only enemies for some reason; I just installed them without changing any of my skills' settings, so I'm sure that could be fixed if I cared enough) but dualtechs still work. I only tested the "Battle" plugins though.


    EDIT4: Not a Skill plugin.


    EDIT5: Not a Gameplay plugin either. It's going to be the most seemingly-inconsequential random plugin Yanfly has created, isn't it? My battle test seems to be slowing down from all these plugins, I had to disable one just because it was interfering with the test (but that wasn't the culprit), and dualtechs still work just fine. I'm taking a small break; I'll get back on this later.


    EDIT6: NO REPRO


    Seriously, I have added every single Yanfly plugin that huynhminhyntd had in his video and then some. Battles are a complete mess. Gameplay is lagging horribly. Dualtechs. Still. Work! Are you really, really sure you did everything right? Saved after messing with the plugins? Named the plugin "Jay_Dualtechs.js"? You've gotta give me something more to work with here, like a sample project where you're seeing this bug, or maybe press F8 and see if you get an error there.
  16. Alright, good news, I've found what the problem is.


    For reasons I can't figure out, you know those // and * that is in the plugin? Those were removed from my file, so, when I booted up the debugger, it told me the function === was undefined. Then I looked into the file, and for some reason, those were gone. It stalled at the very first line. It was very weird, because I downloaded it direct as well. 


    The 2nd time I did it, I think I saw what the problem actually was, because now half of it was missing. It was my anti-virus making a mess of it somehow. I have no idea how that worked, but it just did.


    Finally, third time was the charm. I decided to manually copy it all and make my own file. Everything works perfectly now. No anti-virus to screw it up, and well, the plugin works a treat.


    I have the suspect feeling that might have happened to  huynhminhyntd , maybe just for reasons unknown, something happened while downloading it. I would manually coping the script into a notepad and saving it, and ensure that everything is there. It should work fine after that.


    Thanks for your commitment, though I suppose in a roundabout way, we at least know that it is pretty much fully compatible with Yanfly's engine. My apologies for the hassle, I can understand that these things can be very frustrating. 
  17. Hey bob7, would you please show me how to fix that problem?


    By picture or video or some thing like that? Thanks first. I really dizzy with this
  18. It's very disconcerting that antivirus software seems to dislike my plugin - you're not the first to report that - since all it does is just modify some features in RPG Maker, but glad one of you was able to sort it out.


    For huynhminhyntd : Try to copy this and replace the contents of the plugin with it (open it in Notepad):

    Spoiler
    Code:
    //=============================================================================
    // Dualtech system
    // Jay_Dualtechs.js
    // Version 1.1.1b
    //=============================================================================
    
    var Imported = Imported || {};
    Imported.Jay_Dualtechs = true;
    
    var Jay = Jay || {};
    Jay.Dualtechs = Jay.Dualtechs || {};
    
    //=============================================================================
     /*:
     * @plugindesc Adds functionality for multitech skills.
     *
     * @author Jason R. Godding
     *
     * @param Cycle Actors
     * @desc Set to "true" to have skill costs cycle between actors. 
     * Set to "false" to display costs for all actors at once.
     * @default false
     *
     * @param Cycle Length
     * @desc How long it takes to switch actors with "Cycle Actors". 
     * 60 = 1 second.
     * @default 60
     *
     * @param Always Display User
     * @desc "true": User's name/face will be displayed with no cost.
     * "false": User's name/face won't be displayed with no cost.
     * @default true
     *
     * @help Allows certain skills to be dualtechs, combining two characters' skills
     * into one. For dualtechs that do not have special unlock conditions, just
     * have the characters learn them at level 1; they won't show up unless
     * both characters are present and have the necessary skills.
     *
     * A dualtech skill should have the following tag in its note box:
     * <Dual:ID1,Skill1,ID2,Skill2,ID3,...,HitRate>
     *
     * ID1 is the character ID of one of the characters involved.
     * Skill1 is the skill required for that character, either as an ID or skill name.
     * ID2 and Skill2 likewise refer to the second character. You can include up
     * to 10 characters with skills.
     *
     * Hit Rate is optional and only useful for dualtechs that are not Certain Hit. 
     * Without it, it will use the Hit Rate of the user. HitRate is always defined last. You may define
     * the following values for Hit Rate:
     *
     * user - Uses the user's hit rate.
     * first - Uses the first actor's (ID1's) hit rate.
     * second - Uses the second actor's (ID2's) hit rate.
     * highest - Uses the hit rate of the actor whose hit rate is highest.
     * lowest - Uses the hit rate of the actor whose hit rate is lowest.
     * actor# - Uses the hit rate of the actor who is defined in place # in the Dual
     *          tag. So "actor3" would get the hit rate of whichever actor is
     *          defined third (not necessarily the third character in the database!)
     *
     * For battle algorithms, "a" still refers to the user of the skill (defined as the
     * one who actually used the skill from the menu), and "b" to the target. But now,
     * there is "c", the character defined by ID1, and "d", the character defined by ID2,
     * which do not change based on which character selected the skill. These continue on
     * to "e" for ID3, "f" for ID4, all the way up to "l".
     *
     * If Game_Actor.icon() is defined, it will show an icon of each user of the skill.
     * Otherwise, it will show the characters' names, which can get kind of unweildy.
     * Game_Actor.icon() is not defined in here.
     *
     * The component skills of the actors can use any sort of cost you can dream of, even
     * those defined with other plugins. However, and this is important, certain "universal"
     * costs must ONLY be defined for at most one character in the tech! Universal costs
     * are those not tied to a specific actor, like items, gold, Yanfly's Party Limit gauge,
     * and so on. You can use multiple universal costs, but each cost can only be used by
     * one character. Non-universal costs (such as HP, MP, or TP) are perfectly valid
     * for multiple characters to use.
     *
     * Teaching a multitech skill to someone other than those defined in the Dual tag will
     * cause the user to be treated as a member of the multitech, but without having to
     * define a component (the user will spend the costs associated with the multitech).
     * However, it will only work with the user. (Example: If the Dual tag lists Joe and Bob,
     * but Alice learns the tech, then Alice can use it as a triple tech. However, Joe
     * and Bob would not be able to use it while keeping Alice as a part of it.)
     *
     * If you define the dualtech as a component for itself for any actor, then you drop
     * the dependency on another skill and instead use the costs and restrictions defined
     * to the dualtech. One or both characters may be set this way. It is not recommended to
     * set a skill as a component to itself for any actor if the user of the skill is not,
     * itself, defined in the dual tag.
     *
     * If a different skill is listed as the component, the MP and other associated costs
     * of the dualtech skill will be ignored (but not its restrictions).
     *
     * It is not required that all members of the tech learn the tech itself - if Joe and Bob
     * have a dualtech, you can teach it only to Joe and it will still work. However, Bob will
     * not be able to initiate the dualtech. Bob must still learn his component skill either way,
     * though.
     *
     * This does not define animations for the characters; only the user will animate. If you
     * are using side-view battles, it is recommended you use a plugin that allows for such
     * animations, such as Yanfly's Action Sequence plugins.
     *
     * At present, choosing to use a dualtech will only actually use up the turn of the
     * character who uses the skill. Also, dualtechs are not compatible with enemy battlers.
     *
     * This is compatible with Yanfly's Skill Core plugin v. 1.01, as well as any other
     * plugins that affect the skill cost that follow the recommendation below. Please
     * place this plugin after all such plugins in your plugin list.
     * 
     * === NOTE TO OTHER PLUGIN WRITERS ===
     *
     * If you are writing a plugin that adds other sorts of skill costs or modifies the
     * display of the skill cost in any way, please have Window_SkillList.drawSkillCost
     * return the width of the remaining text area after drawing the cost of your skill
     * to maintain compatibility with this plugin.
     *
     * ====================================
     *
     * Version 1.1.1b - Fixed a compatibility issue.
     *
     * Version 1.1.1 - Added "Display User with No Cost" parameter.
     *
     * Version 1.1 - You can now define up to 10 characters for a tech.
     *
     * Version 1.0.5d - Fixed an incompatibility issue with Bobstah's Battle Commands.
     *
     * Version 1.0.5c - Fixed a couple of minor issues for triple techs.
     *
     * Version 1.0.5b - Last version contained a clumsy bug that let actors use non-
     *  dualtech skills even when they have insufficient MP! Oops. Fixed that.
     *
     * Version 1.0.5 - Fixed another minor bug and added commands for determining which
     *  actor's Hit Rate to use for a skill.
     *
     * Version 1.0.4 - Fixed a minor bug and added a segment to the help file.
     *
     * Version 1.0.3 - Added the option to cycle between actors instead of displaying all
     *  of them at once.
     *
     * Version 1.0.2 - Fixed compatibility with Yanfly's Skill Core (and other similar
     *  plugins.)
     *
     * Version 1.0.1 - Fixed an issue where skills temporarily granted to an actor through
     *  Traits would not activate dualtechs.
     *
     * Version 1.0 - First version.
     * 
     * This plugin is free for non-commercial and commercial use, but please credit 
     * Jason R. Godding if you use it. Thank you.
     * 
     */
    
    Jay.Parameters = Jay.Parameters || {};
    Jay.Parameters.Dualtechs = PluginManager.parameters('Jay_Dualtechs');
    
    Jay.Param = Jay.Param || {};
    Jay.Param.CycleActors = String(Jay.Parameters.Dualtechs['Cycle Actors']) === 'true';
    Jay.Param.CycleLength = Number(Jay.Parameters.Dualtechs['Cycle Length']);
    Jay.Param.AlwaysShowUser = String(Jay.Parameters.Dualtechs['Always Display User']) === 'true';
    
    Jay.Dualtechs.dualSkillData = function(dualData) {
    	var dualParams = dualData.split(',');
    	var returnParams = {};
    	var len = dualParams.length;
    
    	if(len%2 === 0) { // Or, in other words, if the number of parameters is even
    		returnParams.accType = 'user';
    	}
    	else {
    		returnParams.accType = dualParams[len-1];
    		len--;
    	}
    
    	returnParams.actors = [];
    	returnParams.skills = [];
    
    	for(var i=0; i < len; i += 2) {
    		returnParams.actors.push(Number(dualParams[i]));
    		if(isNaN(dualParams[i+1])) {
    			returnParams.skills.push($dataSkills.filter(function(skill) { 
    				return skill !== null && skill.name === dualParams[i+1]; 
    				})[0].id);
    		}
    		else {
    			returnParams.skills.push(Number(dualParams[i+1]));
    		}
    	}
    
    	return returnParams;
    }
    
    Jay.Dualtechs.skillListIncludes = Window_SkillList.prototype.includes;
    Window_SkillList.prototype.includes = function(item) {
    	if(item.meta.Dual) {
    		var dualParams = Jay.Dualtechs.dualSkillData(item.meta.Dual);
    
    		for(var i=0; i<dualParams.actors.length; i++) {
    			var actorId = dualParams.actors[i];
    			var skillId = dualParams.skills[i];
    			if ($gameParty.members().indexOf($gameActors.actor(actorId)) === -1) {
    				return false;
    			}
    			if(!$gameActors.actor(actorId).skills().contains($dataSkills[skillId])) {
    				return false;
    			}
    		}
    	}
    
    	return Jay.Dualtechs.skillListIncludes.call(this, item);
    };
    
    Jay.Dualtechs.updateWindow = Window_SkillList.prototype.update;
    Window_SkillList.prototype.update = function() {
    	if (Jay.Param.CycleActors && !this._cycleTimer) {
    		this._cycleTimer = 0;
    		this._cyclePhase = 0;
    	}
    	this._cycleTimer += 1;
    	if(this._cycleTimer >= Jay.Param.CycleLength + 1) {
    		this._cycleTimer = 1;
    		this._cyclePhase += 1;
    		if(this._cyclePhase >= 2520) {
    			this._cyclePhase -= 2520;
    		}
    		this.refresh();
    	}
    	Jay.Dualtechs.updateWindow.call(this);
    }
    
    Jay.Dualtechs.drawSkillCost = Window_SkillList.prototype.drawSkillCost;
    Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
    	if(!skill.meta.Dual) {
    		return this.drawNonDualSkillCost(skill, x, y, width);
    	}
    
    	var dualParams = Jay.Dualtechs.dualSkillData(skill.meta.Dual);
    	var actorCount = dualParams.actors.length;
    	var endWidth = width;
    
    	var userIsInTech = dualParams.actors.contains(this._actor.actorId());
    
    	if(Jay.Param.CycleActors) {
    		var oldEndWidth = endWidth;
    		if(!userIsInTech) {
    			actorCount++;
    		}
    		var actorToShow = this._cyclePhase%actorCount;
    		if(!userIsInTech) {
    			actorToShow--;
    		}
    		if(!Jay.Param.AlwaysShowUser) {
    			if(userIsInTech) {
    				var userIndex = dualParams.actors.indexOf(this._actor.actorId());
    				if(this.drawComponentSkillCost(this._actor,
    					$dataSkills[dualParams.skills[userIndex]], Graphics.boxHeight, 0,
    					endWidth) === endWidth) {
    					actorToShow = this._cyclePhase%(actorCount - 1);
    					if(actorToShow >= userIndex) {
    						actorToShow++;
    					}
    				}
    				
    			}
    			else {
    				if(this.drawComponentSkillCost(this._actor, skill, Graphics.boxHeight, 0, 
    					endWidth) === endWidth) {
    					actorToShow = this._cyclePhase%(actorCount - 1);
    				}
    			}
    		}
    		if(actorToShow === -1) {
    			endWidth = this.drawComponentSkillCost(this._actor, skill, x, y, endWidth);
    		}
    		else {
    			endWidth = this.drawComponentSkillCost($gameActors.actor(dualParams.actors[actorToShow]),
    				$dataSkills[dualParams.skills[actorToShow]], x, y, endWidth);
    		}
    	}
    	else {
    		for(var i=actorCount-1; i>=0; i--) {
    			endWidth = this.drawComponentSkillCost($gameActors.actor(dualParams.actors[i]),
    				$dataSkills[dualParams.skills[i]], x, y, endWidth);
    		}
    		if(!userIsInTech) {
    			endWidth = this.drawComponentSkillCost(this._actor, skill, x, y, endWidth);
    		}
    	}
    
    	return endWidth;
    }
    
    Window_SkillList.prototype.drawNonDualSkillCost = function(skill, x, y, width) {
    	var returnWidth = Jay.Dualtechs.drawSkillCost.call(this, skill, x, y, width);
    		
    	if (returnWidth === undefined) {
    		if (this._actor.skillTpCost(skill) > 0) {
    			returnWidth = width - this.textWidth(skill.tpCost);
    		} else if (this._actor.skillMpCost(skill) > 0) {
    			returnWidth = width - this.textWidth(skill.mpCost);
    		} else {
    			returnWidth = width;
    		}
    	}
    		
    	return returnWidth;
    }
    
    Window_SkillList.prototype.drawComponentSkillCost = function(actor, skill, x, y, width) {
    	var endWidth = this.drawNonDualSkillCost(skill, x, y, width);
    
    	this.resetTextColor();
    
    	if(endWidth === width && actor === this._actor && !Jay.Param.AlwaysShowUser) {
    		return endWidth;
    	}
    
    	if(actor.icon) {
    		this.drawIcon(actor.icon(), x + endWidth - Window_Base._iconWidth - 2, y + 2);
    		endWidth -= Window_Base._iconWidth + 10;
    	}
    	else {
    		if(endWidth === width) {
    			this.drawText(actor.name(), x, y, endWidth, 'right');
    			endWidth -= this.textWidth(" " + actor.name());
    		}
    		else {
    			this.drawText(actor.name() + ":", x, y, endWidth, 'right');
    			endWidth -= this.textWidth(" " + actor.name() + ":");
    		}
    	}
    
    	return endWidth;
    }
    
    Jay.Dualtechs.meetsSkillConditions = Game_BattlerBase.prototype.meetsSkillConditions;
    Game_BattlerBase.prototype.meetsSkillConditions = function(skill) {
    	if(skill.meta.Dual) {	
    		if (this.isEnemy()) {
    			return false;
    		}
    
    		var dualParams = Jay.Dualtechs.dualSkillData(skill.meta.Dual);
    
    		var actorList = $gameParty.members();
    		var testedUser = false;
    
    		for(var i=0; i<dualParams.actors.length; i++) {
    			var actor = $gameActors.actor(dualParams.actors[i]);
    			if(actorList.indexOf(actor) === -1) {
    				return false;
    			}
    			if(!Jay.Dualtechs.meetsSkillConditions.call(actor, $dataSkills[dualParams.skills[i]])) {
    				return false;
    			}
    			if(this === actor) {
    				testedUser = true;
    				if(!(this.meetsUsableItemConditions(skill) && this.isSkillWtypeOk(skill) &&
    					!this.isSkillSealed(skill.id) && 
    					!this.isSkillTypeSealed(skill.stypeId))) {
    					return false;
    				}
    			}
    		}
    		
    		if(testedUser) {
    			return true;
    		}
    	}
    
    	return Jay.Dualtechs.meetsSkillConditions.call(this, skill);
    }
    
    Jay.Dualtechs.paySkillCost = Game_BattlerBase.prototype.paySkillCost;
    Game_BattlerBase.prototype.paySkillCost = function(skill) {
    	if(skill.meta.Dual) {	
    		var dualParams = Jay.Dualtechs.dualSkillData(skill.meta.Dual);
    		var userPaid = false;
    		
    		for(var i=0; i<dualParams.actors.length; i++) {
    			Jay.Dualtechs.paySkillCost.call($gameActors.actor(dualParams.actors[i]),
    				$dataSkills[dualParams.skills[i]]);
    			if(this === $gameActors.actor(dualParams.actors[i])) {
    				userPaid = true;
    			}
    		}
    		
    		if(userPaid) {
    			return;
    		}
    	}
    	
    	Jay.Dualtechs.paySkillCost.call(this, skill);
    }
    
    Jay.Dualtechs.evalDamageFormula = Game_Action.prototype.evalDamageFormula;
    Game_Action.prototype.evalDamageFormula = function(target) {
    	if(!this.item().meta.Dual) {
    		return Jay.Dualtechs.evalDamageFormula.call(this, target);
    	}
    	try {
    		var item = this.item();
    		var dualParams = Jay.Dualtechs.dualSkillData(item.meta.Dual);
    		var c = $gameActors.actor(dualParams.actors[0]);
    		var d = $gameActors.actor(dualParams.actors[1]);
    		var e = $gameActors.actor(dualParams.actors[2]);
    		var f = $gameActors.actor(dualParams.actors[3]);
    		var g = $gameActors.actor(dualParams.actors[4]);
    		var h = $gameActors.actor(dualParams.actors[5]);
    		var i = $gameActors.actor(dualParams.actors[6]);
    		var j = $gameActors.actor(dualParams.actors[7]);
    		var k = $gameActors.actor(dualParams.actors[8]);
    		var l = $gameActors.actor(dualParams.actors[9]);
    		var a = this.subject();
    		var b = target;
    		var v = $gameVariables._data;
    		var sign = ([3, 4].contains(item.damage.type) ? -1 : 1);
    		return Math.max(eval(item.damage.formula), 0) * sign;
    	} 
    	catch (e) {
    		return 0;
    	}
    }
    
    Game_Action.prototype.itemHit = function(target) {
    	if (this.isPhysical()) {
    		var hitRate = this.subject().hit;
    		if (this.item().meta.Dual) {
    			var dualParams = Jay.Dualtechs.dualSkillData(this.item().meta.Dual);
    			switch (dualParams.accType) {
    			case "user":
    				hitRate = this.subject().hit;
    				break;
    			case "first":
    			case "actor1":
    				hitRate = $gameActors.actor(dualParams.actors[0]).hit;
    				break;
    			case "second":
    			case "actor2":
    				hitRate = $gameActors.actor(dualParams.actors[1]).hit;
    				break;
    			case "actor3":
    				hitRate = $gameActors.actor(dualParams.actors[2]).hit;
    				break;
    			case "actor4":
    				hitRate = $gameActors.actor(dualParams.actors[3]).hit;
    				break;
    			case "actor5":
    				hitRate = $gameActors.actor(dualParams.actors[4]).hit;
    				break;
    			case "actor6":
    				hitRate = $gameActors.actor(dualParams.actors[5]).hit;
    				break;
    			case "actor7":
    				hitRate = $gameActors.actor(dualParams.actors[6]).hit;
    				break;
    			case "actor8":
    				hitRate = $gameActors.actor(dualParams.actors[7]).hit;
    				break;
    			case "actor9":
    				hitRate = $gameActors.actor(dualParams.actors[8]).hit;
    				break;
    			case "actor10":
    				hitRate = $gameActors.actor(dualParams.actors[9]).hit;
    				break;
    			case "higher":
    			case "highest":
    			case "max":
    				for(var i=0; i<dualParams.actors.length; i++) {
    					var newHitRate = $gameActors.actor(dualParams.actors[i]).hit;
    					if (newHitRate > hitRate) {
    						hitRate = newHitRate;
    					}
    				}
    				break;
    			case "lower":
    			case "lowest":
    			case "min":
    				for(var i=0; i<dualParams.actors.length; i++) {
    					var newHitRate = $gameActors.actor(dualParams.actors[i]).hit;
    					if (newHitRate < hitRate) {
    						hitRate = newHitRate;
    					}
    				}
    				break;
    			}
    		}
    		return this.item().successRate * 0.01 * hitRate;
    	} else {
    		return this.item().successRate * 0.01;
    	}
    };
  19. I ran into an issue when using this.  Not a real game breaking one, but something that is still a little troublesome.  I have it set to where one character learns the dual tech and the other doesn't, and it makes use of the requirements of skills from both characters.  The issue I'm having is that required skill from the character without the dual tech takes 75% of his MP (Yes I am using Yanfly's Skill Core) and when I go to look at the dual tech it displays the cost as more MP than what he has.  The thing is that it seems that's all it is, just display, because I can still use the skill and it still takes 75% out but it's just displaying 223 MP as the cost when he only has 160.  I think what's happening is that since the dual tech is on the first character and not him, it's displaying the calculation for her MP instead of his, because among the two of them she has somewhere around 300 MP.  


    Yeah it's not stopping them from using the skill, but it's displaying the wrong thing.  I'm about to try having him be the one to learn the skill to see if it displays properly from him, but I just thought you should know what kind of strange happenings are going on.
  20. Actually, and I'm saying this before looking at it, but it sounds like your diagnosis is probably correct: it's displaying 75% of the MP of the character that knows the dualtech, not the character who would be spending that amount. I'll look into it in a bit.


    EDIT: It's just a matter of tricking the menu into thinking it's for the appropriate character for a moment. Try the new version.