Yanfly Weapon Unleash question

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
776
Reaction score
487
First Language
English
Primarily Uses
RMMV
Good day everyone.


I'm hoping someone here has already tried this and might be able to point me in the direction of a plugin or script that will handle this for me. Here goes.


I want spells that when cast, cause a different spell to happen when the target attacks, in addition to their normal attack. I suspect Weapon Unleash is capable of doing this, but it has no documentation for that specifically.


Example:


Black Mage casts 'enfire' on Knight. Knight is given a state that last 5 turns. Whenever the knight does a normal attack it hits as normal, but then casts Fire I on the target as well (using the knight's caster stats if that matters). Fire I would be a normal black magic spell that anyone would have access to, not a spell made specifically for this unleash.


The weapon unleash replaces the normal attack with the given skill - and I can probably use an action sequence as a workaround, to cause a normal attack and then a spell, but I'm not too sure how that would work, and I'd probably need a different skill for each unleash instead of just using the normal spells that black mages have.


Any ideas?


-Thanks
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
776
Reaction score
487
First Language
English
Primarily Uses
RMMV
I managed to get this to work for player characters using an action sequence, a variable set to actorId of the actor performing the action, and a common event using forceaction to make the actor do a spell right after attacking.


<setup action>
display action
immortal: targets, true
</setup action>
<Target Action>
motion attack: user
perform action
wait for action
attack animation: target
move target: forward, -15, 5
wait for animation
action effect: target
perform finish
clear battle log
change variable 10 = user.actorId();
common event: 1
</Target Action>
<finish action>
immortal: targets, false
</finish action>


I also set up the actual spell action sequence to be able to detect if it was invoked from a weapon unleash, or if it had been cast normally and modify the sequence slightly.


The only downside to this is that I can't get it to work when an enemy uses it, because they don't have actorIds. For the rare enemies that use this effect, I will have to use battle events to do the same thing.
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@ramza


If you save the Id of the enemy in a variable (through lunatic mode), you can do if...else statements on the common event to each enemy index based on the variable value.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
776
Reaction score
487
First Language
English
Primarily Uses
RMMV
I could make the default skills crazy complicated with note tags and whatnot, but as I can see it, the only use-case where an enemy is using this sort of attack is a boss fight, so it doesn't really need the level of granularity that the player characters have.


In the case of the common event, it'd be next to impossible to force an action on an enemy in a troop without knowing which battler position he is, and if I know that already, I might as well be making it in a battle event, or an event common to that particular battle (ie: boss fight). I could probably flub around some other variables I know nothing about and pull it's index ID and it's battler ID out of somewhere, but that just leads to 8 more forked conditions in the common event, because I can't seem to find a way to call a forceaction from a script call.


On a related note, the forceaction is eating an extra turn for the user - if he's poisoned, he takes a hit for attacking and then another hit for using the spell as his forceaction. Is there a way to prevent this without modifying existing states too much?
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@ramza


Ohh if you are using this only in boss fights then don't make it more complicated. It's better to use the troops event indeed.


About the force action, there is a way to call it from script, but if you are using yanfly battle engine core, he disabled it because it was causing some errors (don't know which I've never encountered any).


If your state is set to 'action end' there is no way to make it not decrease in the force action because it IS an action. Are you using default turn battle or tick based battle (ATB or CTB)? Because Yanfly has released a plugin (Tick-based regen) to make regen states (that includes poison) only do damage and decrease their turn based on ticks.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
776
Reaction score
487
First Language
English
Primarily Uses
RMMV
I'm using yanfly's CTB system in non-tick based mode. The state in question is a turn-end state, and the game is considering the 'attack' action the end of one turn, and the force-action the end of a second turn (because the same actor did both actions I guess).


I messed around with many configurations and multiple types of ticking state plugins, including yanfly's tick based regen, but always ran into issues with it. Either multiple ticks would happen in quick succession, or damage would tick before and after an actor's turn... sometimes both. Right now I'm using custom turn ends and custom remove effects in the state core plugin to do some turn based damage effects. For this weapon unleash skill in particular, I can just hide the turn counter and secretly double it, as workaround, since the number would be hidden, the player would be none-the-wiser.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top