Hey quick question... I want to make an ultimate item that revives all fallen allies and restores all HP and MP. Is that possible? If I chose "all allies" that doesn't include dead ones, does it?
Can you make an item that works on all party members dead and alive?
RPG Maker MV Supportyou're correct, and the solution is either to trick the engne or to use a plugin.
the trick would be to have two skills, one that targets allies AND calls a common event, and inside that event use force-action to use the second skill on the dead allies.
the trick would be to have two skills, one that targets allies AND calls a common event, and inside that event use force-action to use the second skill on the dead allies.
Ok. How would that work if it's an item, though?
Or do you know of any plugins that get around this?
Or do you know of any plugins that get around this?
items and skills are exactly the same
Ok but how would I do this? Can I have a common event use a skill that none of the characters actually have?
EDIT: Also, how would it work? If I set the item to All allies (dead) and say revive all allies and then run a common script, players won't be able to use this item if there is nobody dead in the party. If, on the other hand, if I set it to all allies, and have it restore HP and MP for all living allies and then run a common event that uses a skill (?) to revive all dead allies and restore their HP and MP... I suppose that would work. But even then when players are selecting the item, it will APPEAR that the item only works on living allies and not dead ones and that will be confusing.
Also, can a common event run a skill mid-battle that nobody in the party actually has?
EDIT: Also, how would it work? If I set the item to All allies (dead) and say revive all allies and then run a common script, players won't be able to use this item if there is nobody dead in the party. If, on the other hand, if I set it to all allies, and have it restore HP and MP for all living allies and then run a common event that uses a skill (?) to revive all dead allies and restore their HP and MP... I suppose that would work. But even then when players are selecting the item, it will APPEAR that the item only works on living allies and not dead ones and that will be confusing.
Also, can a common event run a skill mid-battle that nobody in the party actually has?
force action will always execute the skill, it doesn't care about conditions.
but no, to run a common event before turn end you'll have to use a plugin. And then you can better use a different plugin to change the targeting instead of the common event timing.
but no, to run a common event before turn end you'll have to use a plugin. And then you can better use a different plugin to change the targeting instead of the common event timing.
Or just remove the damage formula and attach a common event to the item, and in the common event, revive all dead allies, and then restores full HP and MP to the party.
You can do this with yanfly's action sequence pack 1. Set the skill to target all allies (this selection is merely cosmetic because we'll be overriding the actual targeting with the "all friends" selector) then add this set of action sequences:
<Whole Action>
perform action
action animation: all friends
wait for animation
action effect: all friends
death break
perform finish
</Whole Action>
For the skill's in-editor effects, set it to remove state 1 (death), restore hp (100%) and recover MP (100%). No common events required.
<Whole Action>
perform action
action animation: all friends
wait for animation
action effect: all friends
death break
perform finish
</Whole Action>
For the skill's in-editor effects, set it to remove state 1 (death), restore hp (100%) and recover MP (100%). No common events required.
no, but a plugin - and not all games and projects are compatible with yanfly's action sequences.
so depending on the battlesystem the OP uses it might be neccessary to go the common event route.
The common event always works because it is inside the engine default.
Well rather than the common event approach, it'd probably be better to just inject the forceAction directly via the damage formula. So, the item itself would target all living allies and have the following parameters:
Targets all allies, restore MP (100%), and in the damage formula (0% variance): a.forceAction(xxx, 10); b.mhp
Then, create a skill with the same name as the item that targets all dead allies, removes state 1 (death, 100%), recovers HP (100%), and recovers MP (100%)
Set the "xxx" in the forceAction command to the ID of the second skill, and presto. No plugins, no common events, but...imo it's not as clean as the action sequence approach, so that is still recommended if possible.
Edit: Actually, scrap that. Shaz's approach is probably best (1 skill, 1 common event that removes death, then recovers hp/mp for all allies) and is the closest to professional-looking that you're going to get next to the action sequence approach (due to the level of customization you can get regarding how the skill effects are presented to the player). I guess being a code-oriented individual has me looking to common events last when I probably shouldn't be selling them short.
Original thread: https://forums.rpgmakerweb.com/threads/can-you-make-an-item-that-works-on-all-party-members-dead-and-alive.120079/