Skills that two actors use at once

Robotic-Yomi

Villager
Member
Joined
Jun 17, 2015
Messages
7
Reaction score
1
First Language
English
Primarily Uses
Hello! For my game, the head developer and I couldn't stop thinking about the idea of skills that two actors could use at once for a powerful combination attack. We even came up with quite a few good ideas for it, so we'd just really like to have this system. Problem is, none of the few scripts for combination attacks really fit what we want. What we want for this script is:

  • A simple way to have two actors use an attack at once.
  • Must be compatible with RPG Maker VX Ace.
  • Must be compatible with Yanfly's engine.
  • Rather than most combination attack systems where you would learn the skill automatically upon levelling up and learning the specific combination of skills needed for the attack (like Chrono Trigger's Dual Techs), I simply want the ability to have the skill learned through an event. This is because I feel if I only had the character's current moves to build attacks off of, it would limit my creativity with what the characters can really do.
  • This one is a LOT more important than you'd think and has been the main reason why we couldn't use another script: The combination attacks have to be assigned to the CLASSES, not the actors. This is a very long story that I can elaborate further if needed, but the basics of it is, one character has split personalities and has two completely contrasting personalities and playstyles in one character that can be switched in the middle of battle at will. The actor switches personality via a common event that simply changes her class, but they still are the same actor. Because of this, we really need the attacks to be assigned to the classes rather than the actors, or else they will both end up with each other's attacks despite being one or the other.



I hope this is not too much to ask for! Thank you very much! (More information can be given if needed.)
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
If you're using YEA-BattleEngine, you may want to try my unison addon, otherwise you may want to try my unison item script :)
 

Robotic-Yomi

Villager
Member
Joined
Jun 17, 2015
Messages
7
Reaction score
1
First Language
English
Primarily Uses
If you're using YEA-BattleEngine, you may want to try my unison addon, otherwise you may want to try my unison item script :)


It looks good, thank you very much for your response! But from what I'm seeing, it only allows me to put the tags for the actor noteboxes, rather than class noteboxes. I apologize if I gave it too much of a skim before trying it, but I would like to make sure that it works with class noteboxes instead of actor noteboxes?


(Sorry, I just have a lot of things jotted down in both noteboxes, so I want to know before giving it a shot and if I screw up, I'll have to revert everything and it'll just be a pain)
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
It looks good, thank you very much for your response! But from what I'm seeing, it only allows me to put the tags for the actor noteboxes, rather than class noteboxes. I apologize if I gave it too much of a skim before trying it, but I would like to make sure that it works with class noteboxes instead of actor noteboxes?


(Sorry, I just have a lot of things jotted down in both noteboxes, so I want to know before giving it a shot and if I screw up, I'll have to revert everything and it'll just be a pain)
DoubleX RMVXA Unison Addon to Yanfly Engine Ace - Ace Battle Engine:


# * Skill/Item Notetags: |
# 1. <unison actors: ids> |
# - Sets the list of id of actors needed for the skill/item as ids. |
# For example: |
# <unison actors: 1> means actor with id 1 is required to use it |
# <unison actors: 4, 2> means actors with id 4 and 2 are needed |
# - All actors in list ids needs to be in the battle, inputable, able to |
# use it and pay its cost. They'll all pay the cost after using it. |
# Only actors in list x can select it. |
# 2. <unison def rule: rule |
# - Sets the rule of setting user's def in the skill/item's damage |
# formula as rule, whose symbol is one of those in UNISON_RULES. |
# - The symbol of def must be included in UNISON_DEFS |
# - This notetag needs to be written below <unison item: ids> to work. |
# 3. <unison def actors: ids> |
# - Sets user's method def in the skill/item's damage formula to use its |
# unison rule to combine those of actors with id includedin the list |
# ids. def needs to be able to take no arguments and return a Numeric |
# to work. |
# For example: |
# <unison atk actors: 1> means the user's atk in its damage formula |
# uses thatof actor with id 1 |
# <unison mat actors: 4, 2> means the user's mat in its damage formula |
# uses mat of actors with id 4 and 2 under the skill/item's unison rule|
# - The symbol of def must be included in UNISON_DEFS |
# - This notetag needs to be written below <unison item: ids> to work. |


DoubleX RMVXA Unison Skills/Items v1.01d:


#------------------------------------------------------------------------------|
# * Notetag <unison item: x> for skills and items: |
# x is the list of id of actors needed for the skill or item. For instance: |
# - <unison item: 1> means actor with id 1 is required to use it |
# - <unison item: 4, 2> means actors with id 4 and 2 are needed to use it |
# All actors in list x needs to be in the battle, inputable, able to use it |
# and pay its cost. They'll all pay the cost after using it. Only actors in |
# list x can select it. |
#------------------------------------------------------------------------------|
# * Notetag <unison rule: x> for skills and items: |
# x is the rule of setting parameters used in the damage formula of the |
# skill or item. Notetag setting overrides the universal UNISON_PARAM_RULE. |
# This notetag doesn't work if <unison item: x> is absent or x is nil. |
#------------------------------------------------------------------------------|
# * Notetag <unison param: x> for skills and items: |
# x is the list of id of actors needed for the skill or item and stat is |
# parameters used in its damage formula. For instance: |
# - <unison atk: 1> means atk in its damage formula uses atk of actor with |
# id 1 |
# - <unison mat: 4, 2> means mat in its damage formula uses mat of actors |
# with id 4 and 2 under unison rule specified in <unison rule: x> notetag |
# param can be hp, mp, tp, level, mhp, mmp, atk, def, mat, mdf, agi or luk. |
#------------------------------------------------------------------------------|


All unison skill/item notetags are placed in those skills/items' noteboxes :D
 
Last edited by a moderator:

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
@DoubleX I'm working with Robotic-Yomi on this same game.


I swear I'm not trying to sound rude, I appreciate your help, Robotic-Yomi and I are just making sure that you can choose the required actors by class ID, instead of actor ID. We NEED this for our game in order to have unison skills because one of the actors has two classes they can switch between that totally changes her skills, so it would not make sense for her to share her unison skills when she is in another class. Her primary class is mage, while her other class is physical attacker. That is why her two classes CANNOT share unison skills. In one class, she'll have certain unison skills, while in her other class, she'll have different ones, and the unision skills for the other class can't be used unless she's in that class. They're like different actors, except they share an actor slot. (They're both actor ID 4)

1. <unison actors: ids> | # - Sets the list of id of actors needed for the skill/item as ids. | # For example: | # <unison actors: 1> means actor with id 1 is required to use it | # <unison actors: 4, 2> means actors with id 4 and 2 are needed | # - All actors in list ids needs to be in the battle, inputable, able to | # use it and pay its cost. They'll all pay the cost after using it. | # Only actors in list x can select it. |


This script seems to be that you choose the required actors by actor IDs (in the skill notebox). But that would mean it is applied to actors and not classes, which means we can't use this, unless you can also do it with class IDs.
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
@DoubleX I'm working with Robotic-Yomi on this same game.


I swear I'm not trying to sound rude, I appreciate your help, Robotic-Yomi and I are just making sure that you can choose the required actors by class ID, instead of actor ID. We NEED this for our game in order to have unison skills because one of the actors has two classes they can switch between that totally changes her skills, so it would not make sense for her to share her unison skills when she is in another class. Her primary class is mage, while her other class is physical attacker. That is why her two classes CANNOT share unison skills. In one class, she'll have certain unison skills, while in her other class, she'll have different ones, and the unision skills for the other class can't be used unless she's in that class. They're like different actors, except they share an actor slot. (They're both actor ID 4)


This script seems to be that you choose the required actors by actor IDs (in the skill notebox). But that would mean it is applied to actors and not classes, which means we can't use this, unless you can also do it with class IDs.
If class Id is used instead, then unless you're always certain that no 2 actors having the same unison skill/item will have the same class in the same battle, you'll face something like this:


Suppose an unison skill/item needs 2 actors, 1 having class with id 1 and another having class with id 2 to cast.


Actor 1, 2 having class id 1 and actor 3, 4 having class id 2 have access to the unison item.


Now actor 1 tries to use the unison skill/item. Both actor 3 and 4 can be combined with actor 1 to cast that unison skill/item. But which actor should be chosen?


If you're sure you won't run into case like this, you can try the below snippet(when such cases do come, the one having the smallest actor id will be chosen):


Use the below if you're using DoubleX RMVXA Unison Addon to Yanfly Engine Ace - Ace Battle Engine(just treat <unison actors: ids> as <unison actors: class ids>)


class Game_BattlerBase # Edit

def usable?(item) # Rewrite
return usable_unison?(item) unless actor? && item &&
item.is_a?(RPG::UsableItem) && !item.unison_actor_ids.empty?
return false unless item.unison_actor_ids.include?(self.class.id) # Rewritten
return false unless usable_unison?(item)
return unison_skill_usable?(item) if item.is_a?(RPG::Skill)
return false unless item.is_a?(RPG::Item) && item_conditions_met?(item)
unison_item_usable?(item)
end # usable?

def unison_skill_usable?(item) # Rewrite
alive_mems = $game_party.alive_members
(item.unison_actor_ids - [id]).each { |actor_id|
# Rewritten
actor = alive_mems.find { |mem| mem.class.id == actor_id }
return false unless actor && actor.inputable_unison?
#
return false if $game_party.in_battle && actor.actions.select { |a| a.item }.
size >= actor.actions.size - actor.temp_unison_inputs
return false unless actor.skill_conditions_met?(item)
return false unless actor.skills.any? { |s| s == $data_skills[item.id] }
}
true
end # unison_skill_usable?

def unison_item_usable?(item) # Rewrite
alive_mems = $game_party.alive_members
(item.unison_actor_ids - [id]).each { |actor_id|
# Rewritten
actor = alive_mems.find { |mem| mem.class.id == actor_id }
return false unless actor && actor.inputable?
#
}
true
end # unison_item_usable?

end # Game_BattlerBase

class Game_Battler < Game_BattlerBase # Edit

def use_item(item) # Rewrite
unless item.is_a?(RPG::Skill) && !item.unison_actor_ids.empty?
return use_item_unison(item)
end
# Rewritten
alive_mems = $game_party.alive_members
item.unison_actor_ids.each { |actor_id|
actor = alive_mems.find { |mem| mem.class.id == actor_id }
actor.pay_skill_cost(item) if actor
}
#
item.effects.each { |effect| item_global_effect_apply(effect) }
end # use_item

end # Game_Battler

class Window_BattleLog < Window_Selectable # Edit

def unison_actor_names(ids) # Rewritten
names = ""
size = ids.size
alive_mems = $game_party.alive_members
ids.each_with_index { |actor_id, index|
if index > 0 && index < size - 1
names += ", "
elsif size > 1 && index == size - 1
names += " and "
end
# Rewritten
actor = alive_mems.find { |mem| mem.class.id == actor_id }
names += actor.name if actor
#
}
names
end # unison_actor_names

end # Window_BattleLog

class Scene_Battle < Scene_Base # Edit

def prior_command # Rewrite
prior_command_unison
return unless a = BattleManager.actor
return unless act_slots = @unison_actor_ids[[a.index, a.action_input_index]]
# Rewritten
alive_mems = $game_party.alive_members
act_slots.each { |a_s|
actor = alive_mems.find { |mem| mem.class.id == a_s }
actor.temp_unison_inputs -= 1 if actor
}
#
end # prior_command

def add_unison_actor_ids # Rewrite
# Rewritten
ids = (actor = BattleManager.actor).input.item.unison_actor_ids - [actor.class.id]
#
act_slots = []
index = actor.index
ids.each { |id| act_slots << add_unison_actor_id(index, id) }
@unison_actor_ids[[index, actor.action_input_index]] = act_slots
end # add_unison_actor_ids

# actor_index: The index of the unison invoker of the unison skill/item
# id: The id of the unison invokee to be added
def add_unison_actor_id(actor_index, id) # Rewrite
# Added
return unless a = $game_party.alive_members.find { |mem| mem.class.id == id }
#
a.temp_unison_inputs += 1
index = 0
prior = a.index < actor_index
a.actions.each_with_index { |act, i|
next if act.item || (a.unison_inputs ||= []).include?(i)
prior ? (break index = i) : (next index = i)
}
a.set_unison_input_index(index, prior)
[id, index]
end # add_unison_actor_id

def clear_unison_actor_ids # Rewrite
a = BattleManager.actor
return unless act_slots = @unison_actor_ids[[a.index, a.action_input_index]]
@unison_actor_ids.delete([a.index, a.action_input_index])
# Rewritten
alive_mems = $game_party.alive_members
act_slots.each { |a_s|
actor = alive_mems.find { |mem| mem.class.id == a_s }
actor.unison_inputs.delete(a_s[1]) if actor
}
#
end # clear_unison_actor_ids

end # Scene_Battle


If you're using DoubleX RMVXA Unison Skills/Items v1.01d, I'll post a corresponding snippet later :)
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
The unison script itself works, I tried it with actors who aren't the one with the two classes and it worked perfectly, but for unison skills with the actor who changes class, I can't get it to work. 


<unison actors: class 1, 4>


That's the notetag I'm supposed to use, right?

If class Id is used instead, then unless you're always certain that no 2 actors having the same unison skill/item will have the same class in the same battle, you'll face something like this:


Suppose an unison skill/item needs 2 actors, 1 having class with id 1 and another having class with id 2 to cast.


Actor 1, 2 having class id 1 and actor 3, 4 having class id 2 have access to the unison item.


Now actor 1 tries to use the unison skill/item. Both actor 3 and 4 can be combined with actor 1 to cast that unison skill/item. But which actor should be chosen?


If you're sure you won't run into case like this, you can try the below snippet(when such cases do come, the one having the smallest actor id will be chosen):


Everyone in the game is a different class, so this won't happen.


Also I had one concern. Towards the end of my game, I'm planning for the main protagonist to change class permanently to a more powerful class, but that would mean his unison skills with the actor I had to specify class for would no longer work. Would it be possible to choose class or actor, like say I put


<unison actors: 1, class: 4>


Also, is there support for Yanfly cast animations? It only shows the cast animation for one party member.
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
The notetags are still written as <unison actors: ids>, just that those ids will be treated as actor class ids instead of actor ids.


So if you've written <unison actors: 1, 4>, instead of treating it as needing actors with id 1 and 4, it'll need actors with class id 1 and 4.


Also, I think I should explain how my unison skill/item works a bit more. For an unison skill/item needing actors a1, a2, a3, ..., an to cast, when one of them's trying to input that unison skill/item:


1. All those actors must be inputable


2. All those actors must meet the skill/item usage conditions


3. All those actors must have learned it


So in your case, for the concerned actor that can change class in battle, as long as that actor learns the unison skill/item via only 1 of its classes, when the class changes, that actor will be regarded as not having learned the unison skill/item, making that unison skill/item unusable.
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
...Oh. I get it now.


I'm really sorry I wasted your time with that snippet you had to write, because as it turns out, I never actually needed it in the first place. I removed the snippet, and then did various experiments with the unison skills, and found that in the other class, the skills are not able to be used, and when she switches back, they can be used again, since whenever she switches, she no longer has those moves in the first place. So I never actually needed to do anything special to make it work. My friend and I should have tried this in the first place before asking for that snippet. 


So again, I'm sorry for wasting your time with this. This is solved. Thanks for your help.
 
Last edited by a moderator:

Robotic-Yomi

Villager
Member
Joined
Jun 17, 2015
Messages
7
Reaction score
1
First Language
English
Primarily Uses
I verify that HopeFragment is the developer I was talking about, and that the script works! Thank you so much DoubleX, we really appreciate everything you've done and proper credit will be given to you in our game!
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Oh, DoubleX, I found a bug with the Unison Actors script.


If you select your attacks for the two actors required for the unison skill, but don't finish selecting attacks yet and press X to go back and select different attacks, the unison skills are disabled as if you already selected an attack for the other required actor, but didn't because you cancelled it.
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
Oh, DoubleX, I found a bug with the Unison Actors script.


If you select your attacks for the two actors required for the unison skill, but don't finish selecting attacks yet and press X to go back and select different attacks, the unison skills are disabled as if you already selected an attack for the other required actor, but didn't because you cancelled it.
May you please post a video illustrating the issue? I don't want to sound rude or cruel, but your description's rather ambiguous to me :)
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
May you please post a video illustrating the issue? I don't want to sound rude or cruel, but your description's rather ambiguous to me :)
Oh, don't worry I understand. I didn't really know how to explain it well in words. I hope this demonstrates it well enough?










Another thing that might have to be fixed is that it doesn't support the Yanfly cast animations script, only the one that initiates it does the cast animation. It would be cool if I could choose which cast animation the both of them would use for the skill (like one uses one cast animation and the other uses a different one), but that's not a requirement. 
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
Oh, don't worry I understand. I didn't really know how to explain it well in words. I hope this demonstrates it well enough?










Another thing that might have to be fixed is that it doesn't support the Yanfly cast animations script, only the one that initiates it does the cast animation. It would be cool if I could choose which cast animation the both of them would use for the skill (like one uses one cast animation and the other uses a different one), but that's not a requirement. 
Unfortunately, that's not a bug, but a reason why the unison addon needs the clear addon to work.


In YEA-BattleEngine, once the skill/item is inputted(even before its targets are selected) for an action slot, the only 2 ways to remove that skill/item from that action slot are:


1. Right after inputting that skill/item(i.e.: When choosing targets for that skill/item), cancel the target selection instead of confirming it


2. Input another skill/item for that action slot


This is vital for YEA-BattleEngine as it lets users skip from the currently selected action slot to the next one without finishing inputting the former, meaning that just going back to the previously inputted action slot won't clear it so users can freely navigate between action slots without having to input them again.


Besides, in the unison addon, when actor A tries to input an unison skill/item needing actor B, actor B will need to have at least 1 empty action slot in order for actor A to be able to input that unison skill/item.


Combining the above, in your case, there are only 2 ways to make the unison skills/items usable again:


1. Select Yasuhiro, input a new skill/item, but then cancel the target selection


2. Select Yasuhiro and use the clear addon to clear the selected action slot


P.S.: Thanks to your previous reply, I've thoroughly reviewed the unison addon and found some nontrivial bugs that are unrelated to your issues. It's now updated :)


P.P.S: I might have to open a separate tutorial thread just to explain the behaviors of unison skills/items in the unison addon :D
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Oh wow, I feel stupid. But at least it apparently helped you fix actual bugs it had.


I'll have to make sure to explain in-game that "in order to select a unison skill after already selecting a command for actor B, you first need to cancel the previous command by pressing shift while they're selected" in the part of the game where unison skills first get introduced so players don't come to me saying they found a "bug" when really they didn't know they need to press shift first.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
Added this little clarification:


New Terms


Unison skill/item - Skill/item needing more than 1 battler to be used


Unison actors - All actors needed for the same unison skill/item


Unison invoker - The unison actor actually selecting and executing the unison skill/item


Unison invokee - Unison actor that's not the unison invoker


Empty action slot - An action slot without a skill/item but can be inputted with a skill/item


Inputted action slot - An action slot with a skill/item inputted


Reserved action slot - An action slot that can't be inputted with a skill/item


Actor inputable check


An actor's inputable if and only if that actor has at least 1 empty action slot. Only empty and inputted action slots can be selected.


Unison skill/item usability check


1. The actor trying to select an unison skill/item must be an unison actor of that skill/item


2. That actor must pass all the ordinary skill/item usability checks


3. For skills, all unison invokees must be movable, without autobattle nor confusion, meet the ordinary skill conditions, have learned that skill, and have at least 1 empty action slot or reserved action slot that is reserved by the currently inputted unison skill in the currently selected action slot


4. For items, all unison invokees must be movable and without autobattle nor confusion
 
Last edited by a moderator:

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
That basically clears everything up regarding the terms, but how exactly is damage calculated?


Does it do an average of the two actors' attacking stat? (the one that is specified in the damage formula, ATK or MAT.)


Because I'm wondering if, with the custom damage formulas, it would be possible to specify which actor will use their ATK stat and which actor will use their MAT stat? For example, one actor has high ATK and low MAT and is a physical attacker for everything, and another actor has low ATK but high MAT and is a mage for everything. I wouldn't want the physical attacker to use his pathetic MAT stat, but also I don't want the mage to use her pathetic ATK stat.


If I were to give them unison skills together, I'd want the physical attacker to use his ATK stat for the damage calculation, but the mage's MAT stat for the damage calculation.


How would this work? if I put a.atk in the formula, it'll use both of their ATK stats wouldn't it? and likewise for a.mat.
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
That basically clears everything up regarding the terms, but how exactly is damage calculated?


Does it do an average of the two actors' attacking stat? (the one that is specified in the damage formula, ATK or MAT.)


Because I'm wondering if, with the custom damage formulas, it would be possible to specify which actor will use their ATK stat and which actor will use their MAT stat? For example, one actor has high ATK and low MAT and is a physical attacker for everything, and another actor has low ATK but high MAT and is a mage for everything. I wouldn't want the physical attacker to use his pathetic MAT stat, but also I don't want the mage to use her pathetic ATK stat.


If I were to give them unison skills together, I'd want the physical attacker to use his ATK stat for the damage calculation, but the mage's MAT stat for the damage calculation.


How would this work? if I put a.atk in the formula, it'll use both of their ATK stats wouldn't it? and likewise for a.mat.
Code:
#    2. <unison def rule: rule                                                 |
#       - Sets the rule of setting user's def in the skill/item's damage       |
#         formula as rule, whose symbol is one of those in UNISON_RULES.       |
#       - The symbol of def must be included in UNISON_DEFS                    |
#       - This notetag needs to be written below <unison item: ids> to work.   |
Code:
#    3. <unison def actors: ids>                                               |
#       - Sets user's method def in the skill/item's damage formula to use its |
#         unison rule to combine those of actors with id includedin the list   |
#         ids. def needs to be able to take no arguments and return a Numeric  |
#         to work.                                                             |
#         For example:                                                         |
#         <unison atk actors: 1> means the user's atk in its damage formula    |
#         uses thatof actor with id 1                                          |
#         <unison mat actors: 4, 2> means the user's mat in its damage formula |
#         uses mat of actors with id 4 and 2 under the skill/item's unison rule|
#       - The symbol of def must be included in UNISON_DEFS                    |
#       - This notetag needs to be written below <unison item: ids> to work.   |
Code:
    # Implements the unison method rules
    # The unison method value of all unison battlers can be referneced by vals
    # The unison method rule symbol can be referenced by rule
    # It's a method under Game_BattlerBase
    # It must return a real number 
    UNISON_RULES = %Q(
  def unison_rules(vals, rule) # This line shalln't be changed
    if rule == :min
      vals.min
    elsif rule == :avg
      vals.inject(:+) / vals.size
    elsif rule == :max
      vals.max
    else
      0
    end
  end
    )
Code:
    # Sets the battler methods to use the unison method rules
    # Its keys must be the battler method name symbols
    # Methods with name method_name will be aliased to method_name_unison
    UNISON_DEFS = {

      # General Form:
      # [:method_class, :super_class] => [
      #   :method_name
      # ]

      [:Game_BattlerBase] => [
        :hp,
        :mp,
        :tp,
        :mhp,
        :mmp,
        :atk,
        :def,
        :mat,
        :mdf,
        :agi
        # Adds new methods here
        
      ],

      [:Game_Actor, :Game_Battler] => [
        :level
        # Adds new methods here
        
      ]

      # Adds new classes here
      

    }
So in your case, try these notetags on those unison skills/items:


<unison atk rule: max>


<unison mat rule: max>


<unison atk actors: ids>


<unison mat actors: ids>


Just make sure they're placed below the <unison item: ids> notetag and the ids value is the same as the id value.


P.S.: If no <unison def rule: rule> is used, the unison invoker's stat will be used :)
 
Last edited by a moderator:

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
OH you already had that covered, I should have looked in the script, sorry  :|


I was going to say the actor who has different classes was going to be a problem, but it won't be since I can just give the other class the original class's same MAT, she never uses her MAT stat for any of her non-unison attacks anyway. I can't believe how perfect your script actually turned out to be for this.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top