Hi everyone I need ideas to create a state in wich if the character is dead the other dead allies become alive.
This idea come from the hability "conservation of life" (CoL) from Bravely Default game and is explained as "When K.O.'d, revive all allies and fully restore HP."
Any help? I needed to script something in the CoL State as "If a.HP is 0 then (if b is dead) add HP to b" (being b as all allies in battle)
<Custom Deselect Effect>
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Play the auto-life animation on target.
target.startAnimation(49);
// Set the amount of HP recovered to 10%.
var rate = 0.10;
// Calculate the HP healed.
var heal = Math.floor(target.mhp * rate);
// Remove the Auto-Life state.
target.removeState(stateId);
// Heal the target.
target.gainHp(heal);
// Make the damage popup show for the heal.
target.startDamagePopup();
// Clear the target's results.
target.clearResult();
}
</Custom Deselect Effect>
Is there anyway to change the objective target of the healing to all the group except the user instead of the user?
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Play the auto-life animation on target.
user.startAnimation(49);
// Set the forced action for the user.
user.forceAction(108, ally);
// Prepare the battle engine for the forced action.
BattleManager.forceAction(user);
// Process the forced action.
BattleManager.processForcedAction();
// Remove the Auto-Life state.
user.removeState(31);
}
</Custom Deselect Effect>
This is what I have so far, with a skill healing someone else, i thought I would take a crack at it, although I have made little to no progress, if you already found a solution please share. Right now I only got it to heal one person and the user, i don't know what ally would be in this case though.
Okay, so after trial and error, I found what you wanted. The plugins involved are: YEP_BuffsStatesCore, YEP_X_StatesCategories, YEP_TargetCore and YEP_X_SelectionControl for good measure. I used Yanfly's Chain Lightning tip and trick video and the Autolife to make it.
<Category: Bypass Death Removal>
<Custom Deselect Effect>
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Set the forced action for the user.
user.forceAction(108, user);
// Prepare the battle engine for the forced action.
BattleManager.forceAction(user);
// Process the forced action.
BattleManager.processForcedAction();
// Remove the Auto-Life state.
user.removeState(31);
}
</Custom Deselect Effect>
Put this in your state, and put this in a skill
<Single or Multiple Select>
<Custom Target Eval>
// Adds the selected target to the target list.
targets.push(target);
// Grab the group of alive foes as candidates.
var members = foes.aliveMembers();
// Remove the target from the group of candidates.
members.splice(members.indexOf(target), 1);
// This is the number of extra targets to select with Chain Lightning.
var extraTargets = 3;
// Loop the extra targets.
while (extraTargets--) {
// Grab a random foe from the alive foes.
var member = members[Math.floor(Math.random() * members.length)];
// Check to see if the member exists.
if (member) {
// Add the member to the group of targets.
targets.push(member);
// Remove the member as a viable candidate.
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>
<Actor or Enemy Select>
In effects, put Recover HP 100% and Remove State Knockout 100%
I put scope to all allies dead for good measure, made it work twice.
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Play the auto-life animation on target.
user.startAnimation(49);
// Set the forced action for the user.
user.forceAction(108, ally);
// Prepare the battle engine for the forced action.
BattleManager.forceAction(user);
// Process the forced action.
BattleManager.processForcedAction();
// Remove the Auto-Life state.
user.removeState(31);
}
</Custom Deselect Effect>
This is what I have so far, with a skill healing someone else, i thought I would take a crack at it, although I have made little to no progress, if you already found a solution please share. Right now I only got it to heal one person and the user, i don't know what ally would be in this case though.
Okay, so after trial and error, I found what you wanted. The plugins involved are: YEP_BuffsStatesCore, YEP_X_StatesCategories, YEP_TargetCore and YEP_X_SelectionControl for good measure. I used Yanfly's Chain Lightning tip and trick video and the Autolife to make it.
<Category: Bypass Death Removal>
<Custom Deselect Effect>
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Set the forced action for the user.
user.forceAction(108, user);
// Prepare the battle engine for the forced action.
BattleManager.forceAction(user);
// Process the forced action.
BattleManager.processForcedAction();
// Remove the Auto-Life state.
user.removeState(31);
}
</Custom Deselect Effect>
Put this in your state, and put this in a skill
<Single or Multiple Select>
<Custom Target Eval>
// Adds the selected target to the target list.
targets.push(target);
// Grab the group of alive foes as candidates.
var members = foes.aliveMembers();
// Remove the target from the group of candidates.
members.splice(members.indexOf(target), 1);
// This is the number of extra targets to select with Chain Lightning.
var extraTargets = 3;
// Loop the extra targets.
while (extraTargets--) {
// Grab a random foe from the alive foes.
var member = members[Math.floor(Math.random() * members.length)];
// Check to see if the member exists.
if (member) {
// Add the member to the group of targets.
targets.push(member);
// Remove the member as a viable candidate.
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>
<Actor or Enemy Select>
In effects, put Recover HP 100% and Remove State Knockout 100%
I put scope to all allies dead for good measure, made it work twice.
Yay, now back in action Happy Christmas time, coming back!
Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.