- Joined
- Jun 23, 2014
- Messages
- 331
- Reaction score
- 181
- First Language
- English
- Primarily Uses
- RMMV
THIS PLUGIN IS NO LONGER AVAILABLE IN THIS FORUM
A dual tech allows two characters to join forces and combine their skills into one more powerful skill. However, the use of one requires you to spend the cost of both characters' composite skills, so it can get quite MP (or TP) costly!
To use it, just enter the following into the Note box of any skill:
<Dual:Actor1ID,Actor1Skill,Actor2ID,Actor2Skill[,HitRate]>
You can add more actors (up to ten, though you'll need an extra plugin to use more than four in battle, of course) by just listing them after Actor2's details and before HitRate.
<Dual:Actor1ID,Actor1Skill,Actor2ID,Actor2Skill,Actor3ID,Actor3Skill,...[,HitRate]>
Make sure the parameters (other than HitRate, if you use it) always come in pairs; one for the actor ID and one for the skill.
The ActorIDs should be their database ID numbers; the Skills can either be skill names or ID numbers. So:
<Dual:1,Fire,2,Ice>
will work, so long as actor #1 learns Fire and actor #2 learns Ice.
"HitRate" is optional, and accepts the following values:
"user" - Uses the hit rate for the actor that used the skill.
"first" or "actor1" - Uses the hit rate for the actor defined by Actor1ID.
"second" or "actor2" - Uses the hit rate for the actor defined by Actor2ID.
(You can go up to actor10, but only "first" and "second" are defined by written-out ordinal numbers.)
"highest" - Between all actors, select the highest hit rate.
"lowest" - Between all actors, select the lowest hit rate.
NOTE: I have disabled the "sum" HitRate, since it doesn't really make a lot of sense even for two characters, and certainly not for more than that.
If you don't set a HitRate, the hit rate will be the same as if you set it to "user". Magical and Certain Hit skills ignore hit rates anyway, so you may as well not bother with HitRate for those.
For the damage formulae of dual and triple tech skills, you may refer to the actors with "c", "d", etc., with "c" being the first actor defined in the tag, "d" the second, and so on up to "l" (lowercase L). "a" still works for the one who initiated the skill, and "b" is, as always, the target.
THINGS TO NOTE:
For the time being, this dualtech script only uses the turn of one character (in fact, both associated characters can use the dualtech skill in the same turn, if they both can and you can afford the cost!)
As dualtechs are (at least at present) tied to specific actors, you'll have to make new versions for different pairings, even if they know the same skills.
Each party member has to learn the dualtech ability on their own. So if you want both party members calling it, teach both of them the dualtech skill. If you want one character to always initiate it, give it only to that one. However, the dualtech will only appear when the composite spells are learned and both characters are in the party, so feel free to teach every single one at level 1 if you don't want to have special unlock conditions for them.
If you want to break the dependency of a dualtech on another tech, set it as a component to itself. This can be done for either or both of the actors defined in the skill. If you do this, the actor will use any MP or TP costs (or any other costs from plugins) associated with the dualtech skill in the database. Otherwise, the actor will ignore those costs and only spend the cost of the component skill.
You can also teach the skill to a character not defined in the tag, which will (for that actor alone) treat the user as a part of the tech, and the user's "component" will be the tech itself. If you do this, however, it is not recommended to define the tech as a component for itself for any other actor.
It lists the actors' names in the skill cost, which can get really, really unwieldy. To combat this, if you define Game_Actor.icon() to return icon IDs for each actor, you'll get icons instead. Down below, I have a small snippet of code that can do this for you (but there are other, more flexible ways to do it.) Or you can use the cycle parameters, mentioned below.
This script is now fully compatible with Yanfly's SkillCore 1.01 and SkillCooldowns 1.02a! For compatibility purposes, please put this plugin below all plugins that modify skill cost or skill cost display in any fashion (plugins that do this that I'm aware of are the two aforementioned Yanfly plugins and Unconnected42's Ammunition plugin.)
If you are using skill costs that come from a universal resource pool (in other words, something the entire party can access like money or items, not something individual like HP, MP, or TP) it is heavily recommended that you do not give the same type of cost to multiple actors for the same dualtech! (For instance, it is not recommended that Actor 1 uses a skill that uses up one Potion and Actor 2 uses a skill that uses up two Potions. If you have exactly two Potions, the plugin will actually let you use the skill and wind up with negative one Potions.) If the cost for each actor comes from a different pool (like Actor 1 uses a Potion, and Actor 2 uses a Hi-Potion), that's okay, whether it's universal or not. Or, if you have a plugin that allows you to define extra restrictions beyond cost, you can simply set the dualtech to require you to have three Potions in your inventory (for the above example).
You don't need to worry about this one unless you're a plugin creator yourself: If you write a plugin that modifies Window_SkillList.drawSkillCost, please have it return the width of the remaining space after drawing the cost in order to maintain compatibility with this plugin. The function returns nothing in the base engine (which the plugin accounts for... by treating no return value as though it was looking at the base engine's version of drawSkillCost). To see an example of what I mean, Yanfly's plugins already do that.
I have added parameters with version 1.0.3 to allow the skill windows to cycle through the actors involved in a dualtech instead of displaying them all at once. For very short skill costs and icons, this is probably not useful, but for long skill costs coupled with names, it can save a lot of space!
This script does not, in any way, modify animations. I would recommend using a plugin like Yanfly's Action Sequence if you're using a side-view system.
NEW!!
If you do not wish to show the user of the skill when the user does not have any cost (MP, TP, or otherwise), you can set the "Always Show User" parameter to false. This will only hide the user of the skill, no one else, and only when they have no cost of any sort. This is compatible with Cycle Actors if you're using that.
Screenshots:
Turn Linking under Yanfly's CTB and ATB!
Yep, it's that update that kept not happening, and it's here! Well, for Yanfly's CTB and ATB, at any rate. This is in beta, so be forewarned of (and please report) any bugs.
In order to use turn linking, make the first parameter of the Dual tag "Linked", like so:
<Dual:Linked,1,Move1,2,Move2,HitRate>
If the dualtech is linked, then it takes everyone's turn to use it, and it will only activate once everyone has had a turn from the moment the first member activates the skill. If, for any reason, the skill becomes unusable before everyone is ready, it's canceled and everyone gets their turns back.
In CTB, the characters who are waiting for the other actors to get ready disappear from the CTB list; this is expected behavior (in best case, they'd somehow get stacked with the other party members, but I'm pleased enough it's working as well as it is for now.) As the last actor gets their turn, their icon will switch over to the FIRST actor, who uses the dualtech (that's just kinda how it worked out, but could be changed in the future.) After the skill is used, everyone should be returned to the CTB list as normal.
A dual tech allows two characters to join forces and combine their skills into one more powerful skill. However, the use of one requires you to spend the cost of both characters' composite skills, so it can get quite MP (or TP) costly!
To use it, just enter the following into the Note box of any skill:
<Dual:Actor1ID,Actor1Skill,Actor2ID,Actor2Skill[,HitRate]>
You can add more actors (up to ten, though you'll need an extra plugin to use more than four in battle, of course) by just listing them after Actor2's details and before HitRate.
<Dual:Actor1ID,Actor1Skill,Actor2ID,Actor2Skill,Actor3ID,Actor3Skill,...[,HitRate]>
Make sure the parameters (other than HitRate, if you use it) always come in pairs; one for the actor ID and one for the skill.
The ActorIDs should be their database ID numbers; the Skills can either be skill names or ID numbers. So:
<Dual:1,Fire,2,Ice>
will work, so long as actor #1 learns Fire and actor #2 learns Ice.
"HitRate" is optional, and accepts the following values:
"user" - Uses the hit rate for the actor that used the skill.
"first" or "actor1" - Uses the hit rate for the actor defined by Actor1ID.
"second" or "actor2" - Uses the hit rate for the actor defined by Actor2ID.
(You can go up to actor10, but only "first" and "second" are defined by written-out ordinal numbers.)
"highest" - Between all actors, select the highest hit rate.
"lowest" - Between all actors, select the lowest hit rate.
NOTE: I have disabled the "sum" HitRate, since it doesn't really make a lot of sense even for two characters, and certainly not for more than that.
If you don't set a HitRate, the hit rate will be the same as if you set it to "user". Magical and Certain Hit skills ignore hit rates anyway, so you may as well not bother with HitRate for those.
For the damage formulae of dual and triple tech skills, you may refer to the actors with "c", "d", etc., with "c" being the first actor defined in the tag, "d" the second, and so on up to "l" (lowercase L). "a" still works for the one who initiated the skill, and "b" is, as always, the target.
THINGS TO NOTE:
For the time being, this dualtech script only uses the turn of one character (in fact, both associated characters can use the dualtech skill in the same turn, if they both can and you can afford the cost!)
As dualtechs are (at least at present) tied to specific actors, you'll have to make new versions for different pairings, even if they know the same skills.
Each party member has to learn the dualtech ability on their own. So if you want both party members calling it, teach both of them the dualtech skill. If you want one character to always initiate it, give it only to that one. However, the dualtech will only appear when the composite spells are learned and both characters are in the party, so feel free to teach every single one at level 1 if you don't want to have special unlock conditions for them.
If you want to break the dependency of a dualtech on another tech, set it as a component to itself. This can be done for either or both of the actors defined in the skill. If you do this, the actor will use any MP or TP costs (or any other costs from plugins) associated with the dualtech skill in the database. Otherwise, the actor will ignore those costs and only spend the cost of the component skill.
You can also teach the skill to a character not defined in the tag, which will (for that actor alone) treat the user as a part of the tech, and the user's "component" will be the tech itself. If you do this, however, it is not recommended to define the tech as a component for itself for any other actor.
It lists the actors' names in the skill cost, which can get really, really unwieldy. To combat this, if you define Game_Actor.icon() to return icon IDs for each actor, you'll get icons instead. Down below, I have a small snippet of code that can do this for you (but there are other, more flexible ways to do it.) Or you can use the cycle parameters, mentioned below.
This script is now fully compatible with Yanfly's SkillCore 1.01 and SkillCooldowns 1.02a! For compatibility purposes, please put this plugin below all plugins that modify skill cost or skill cost display in any fashion (plugins that do this that I'm aware of are the two aforementioned Yanfly plugins and Unconnected42's Ammunition plugin.)
If you are using skill costs that come from a universal resource pool (in other words, something the entire party can access like money or items, not something individual like HP, MP, or TP) it is heavily recommended that you do not give the same type of cost to multiple actors for the same dualtech! (For instance, it is not recommended that Actor 1 uses a skill that uses up one Potion and Actor 2 uses a skill that uses up two Potions. If you have exactly two Potions, the plugin will actually let you use the skill and wind up with negative one Potions.) If the cost for each actor comes from a different pool (like Actor 1 uses a Potion, and Actor 2 uses a Hi-Potion), that's okay, whether it's universal or not. Or, if you have a plugin that allows you to define extra restrictions beyond cost, you can simply set the dualtech to require you to have three Potions in your inventory (for the above example).
You don't need to worry about this one unless you're a plugin creator yourself: If you write a plugin that modifies Window_SkillList.drawSkillCost, please have it return the width of the remaining space after drawing the cost in order to maintain compatibility with this plugin. The function returns nothing in the base engine (which the plugin accounts for... by treating no return value as though it was looking at the base engine's version of drawSkillCost). To see an example of what I mean, Yanfly's plugins already do that.
I have added parameters with version 1.0.3 to allow the skill windows to cycle through the actors involved in a dualtech instead of displaying them all at once. For very short skill costs and icons, this is probably not useful, but for long skill costs coupled with names, it can save a lot of space!
This script does not, in any way, modify animations. I would recommend using a plugin like Yanfly's Action Sequence if you're using a side-view system.
NEW!!
If you do not wish to show the user of the skill when the user does not have any cost (MP, TP, or otherwise), you can set the "Always Show User" parameter to false. This will only hide the user of the skill, no one else, and only when they have no cost of any sort. This is compatible with Cycle Actors if you're using that.
Screenshots:
Spoiler
How it looks (with Game_Actor.icon() defined and appropriate icons included):
The skill being used. Note that both Therese and Marsha lost MP.
How it should look in the database. Actor 2 (Therese) is the first one defined in the "Dual" tag, so she's "c" in the formula. Marsha is "d". Whoever initiates the command is "a".
Whoops, Therese forgot to bring her axe this time! Power Slash requires an axe, so even though we're in Marsha's command window, and even though Fire Slash itself has no weapon requirements, Fire Slash won't be available.
Whoops, Marsha forgot to bring her Therese this time! Without Therese, the skill doesn't even appear on Marsha's skill list.
How it looks (with Game_Actor.icon() defined and appropriate icons included):

The skill being used. Note that both Therese and Marsha lost MP.

How it should look in the database. Actor 2 (Therese) is the first one defined in the "Dual" tag, so she's "c" in the formula. Marsha is "d". Whoever initiates the command is "a".

Whoops, Therese forgot to bring her axe this time! Power Slash requires an axe, so even though we're in Marsha's command window, and even though Fire Slash itself has no weapon requirements, Fire Slash won't be available.

Whoops, Marsha forgot to bring her Therese this time! Without Therese, the skill doesn't even appear on Marsha's skill list.

Turn Linking under Yanfly's CTB and ATB!
Yep, it's that update that kept not happening, and it's here! Well, for Yanfly's CTB and ATB, at any rate. This is in beta, so be forewarned of (and please report) any bugs.
In order to use turn linking, make the first parameter of the Dual tag "Linked", like so:
<Dual:Linked,1,Move1,2,Move2,HitRate>
If the dualtech is linked, then it takes everyone's turn to use it, and it will only activate once everyone has had a turn from the moment the first member activates the skill. If, for any reason, the skill becomes unusable before everyone is ready, it's canceled and everyone gets their turns back.
In CTB, the characters who are waiting for the other actors to get ready disappear from the CTB list; this is expected behavior (in best case, they'd somehow get stacked with the other party members, but I'm pleased enough it's working as well as it is for now.) As the last actor gets their turn, their icon will switch over to the FIRST actor, who uses the dualtech (that's just kinda how it worked out, but could be changed in the future.) After the skill is used, everyone should be returned to the CTB list as normal.
Last edited: