06-06-2015, 05:48 AM
Theory One: Make "@subject" (the caster/active battler) an array, and all subsequent references to @subject loop through the contents over a single battler.
Problem with that I discover though, is that it could run into trouble down the line - I could end up with every characters in the combo set trying to use the skill, each one after another! Not quite what I want. (I'm not saying this does happen, but it probably would if I wasn't careful.)
Theory Two: Only have reference to an array of battlers in the conditions they're expected.
With this, I then wrapped animated battler processes for casting animations in code to play casting animations from an array of casters. It would either only contain @subject, or the users of the combo in @unity_subjects.
The first theory was my initial plan. While it would be adaptable for other systems down the line or other projects, it could easily turn my code into a convoluted mess if I got lost or screwed up, and I didn't want to risk that. The second theory sort of follows MP's suggestion in that it tries to focus on specific elements to edit.
The first also assumed I would later edit a lot more code, but this sounded a bad idea, and as it turns out... unnecessary. Ace lets me write my own formulas per-skill! Why would I make things harder for myself? All I needed was to put something like $game_actors[1].mat+$game_actors[2].mat in as the formula in the database, and it would work.
PHP Code:
@subject = []
for a in real_item.unity_conditions[:actors]
@subject.push($game_actors[a])
end
@subject.each {|a|
a.make_actions; a.current_action.set_skill(real_item.id)
}
Theory Two: Only have reference to an array of battlers in the conditions they're expected.
PHP Code:
@unity_subjects = []
for a in real_item.unity_conditions[:actors]
@unity_subjects.push($game_actors[a])
end
@subject.current_action.set_skill(real_item.id)
The first theory was my initial plan. While it would be adaptable for other systems down the line or other projects, it could easily turn my code into a convoluted mess if I got lost or screwed up, and I didn't want to risk that. The second theory sort of follows MP's suggestion in that it tries to focus on specific elements to edit.
The first also assumed I would later edit a lot more code, but this sounded a bad idea, and as it turns out... unnecessary. Ace lets me write my own formulas per-skill! Why would I make things harder for myself? All I needed was to put something like $game_actors[1].mat+$game_actors[2].mat in as the formula in the database, and it would work.