Open zackhsb opened 7 years ago
I would recommend sending a message to yanfly directly as he would understand his scripts better than me.
Ok. Would you know how to get a hold of him? I've heard he doesn't reply to messages left on his website.
Ok, here is another way I might be able to go about it. Just don't know a lot about ruby. The default ace engine allows you to play a battle animation through a common event. The only problem is it only lets you select enemies to use them on. Would there be a way to get the animation to play on the previously dead ally? Doesn't have to be a script. Something as simple as a line of code to put under the "script" button under "advanced."
Or another option (if this is easier) would be to have an item (when used) invoke another item or a skill that would play the animation. There is a script that allows skills to invoke other skills using note tags, but I haven't seen one for items.
You would need to first be able to determine who is the "previously dead ally", if any. This could potentially be done using script calls as well, but you're basically building a battle mechanic using script calls, which will be very tricky. I'm not sure if you mean "an ally who was dead, but is now alive", or "the most recent ally that died", but both are equally tricky to keep track of if you're going to use script calls.
Once you know who the previously dead ally is you can use script calls to set whether an animation should be played or not.
However it isn't something that I would think about until you figure out how to actually get the ally you want.
What about making a script that uses notetags in items where it will invoke another item? So every time a phoenix down is used, it will invoke another item animation? I have seen scripts like this for skills. Do you know of one for items? Or if I supplied you with a script that already uses it with skills, would it be fairly quick to adjust it to work with items?
Depending on how the script is written, it may be easy to modify it.
It's not a very long script: (pasted below)
$imported = {} if $imported.nil? $imported["YEA-RandomSkillInvoke"] = true
module YEA module REGEXP module SKILL
RANDOM_INVOKE =
/<(?:RANDOM_INVOKE|random invoke):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
end # SKILL end # REGEXP end # YEA
module DataManager
class <<self; alias load_database_rsi load_database; end def self.load_database load_database_rsi load_notetags_rsi end
def self.load_notetags_rsi for skill in $data_skills next if skill.nil? skill.load_notetags_rsi end end
end # DataManager
class RPG::Skill < RPG::UsableItem
attr_accessor :random_invoke
def load_notetags_rsi @random_invoke = []
self.note.split(/[\r\n]+/).each { |line|
case line
#---
when YEA::REGEXP::SKILL::RANDOM_INVOKE
$1.scan(/\d+/).each { |num|
@random_invoke.push(num.to_i) if num.to_i > 0 }
#---
end
} # self.note.split
#---
end
end # RPG::Weapon
class Game_Battler < Game_BattlerBase
def invoke_random_skill return unless current_action.item.is_a?(RPG::Skill) valid_skills = [current_action.item] for random_skill_id in current_action.item.random_invoke next unless usable?($data_skills[random_skill_id]) valid_skills.push($data_skills[random_skill_id]) end skill_id = valid_skills.sample.id current_action.set_skill(skill_id) end
end # Game_Battler
class Scene_Battle < Scene_Base
alias scene_battle_use_item_rsi use_item def use_item @subject.invoke_random_skill scene_battle_use_item_rsi end
end # Scene_Battle
If you're going to be replacing an item with another item, why not just have the phoenix down item play an animation?
It's not like using that script will allow you to chain multiple skills together.
From what I can gather, for some reason, the yanfly visual battlers script won't play animations on characters with the death status. So I would have one item (phoenix down) that would remove the death status, then have the next item play the animation on the previously dead character. I am not an expert scripter or else I would have already changed yanfly's scripts around to play animations on dead characters. Could you alter the above script I pasted for skills and make them work for items? or even have the item call a skill that can play the animation? Any help will be greatly appreciated. I thought it would be easier to change the random skill script to include items rather than find out what's missing in the visual battlers script and change it to work.
Are you sure the script you pasted works the way you are describing? That it executes one skill, and then executes another skill?
If it doesn't do that, then changing it to support items won't solve the problem. The description of the script suggests it only executes one skill.
sorry for the late reply. have been ill. anyway, I did test the script and it works. Seems like it should work for items if it is adjusted to do so. The script isn't that long. Can you please help?
I only need it to execute one skill. For example (if the phoenix down item) can select another item or skill that can play a phoenix down animation, then it should work. Seems to me that the only problem is the way yanfly wrote his visual battlers script is to not play animations on characters with death status. So the item would remove death status, then call either a skill or other item from the database to play the animation once the death status is removed. I hope I'm explaining it well. I tested the script and made a dummy skill invoke another skill from the database. It worked fine.
The script only does execute one skill. That's all it needs to do. So you have a skill that you add to the database and add the random invoke tag in the notebox of the skill you want it to call. So if I had a skill called "Fire Breath" that had in its notebox <random invoke: 10>. When I used the spell in battle, it would call whatever skill was in the 10th position in the skill database.
If you ever have time to get around to it that would be great. In any case, thanks for at least listening.
Not sure if this is the right place to ask this, but I am using rpg maker ace with yanfly core engine, battle script and visual battlers. I've come across a problem that spell animations won't display in battle when being used on a dead character. So a life spell or phoenix down animation won't display when being used on a dead character. It still removes the death status and even plays the sound effect, but it doesn't show the animation to go along with it. Is there a fix for this? I'm sure I'm not the only one to have come across this. Please let me know if there is any more info you need from me.