YEP_X_ActSeq Addon request

ramza

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


I am looking for an enterprising individual to provide me with a way to call an action sequence directly from a skill ID, given in the args of the function call.


Specifically, I am looking for a way to use an action sequence when a custom state becomes active. I was trying to dig through the action sequence and battle engine core plugins to see where it actually decides to pull the action sequences from the skill and execute them, but I can't seem to find that information.


Ideally, I'd like to be able to call a function, and have it perform the action sequence of the skill Id, as if the skill had been used, processing every action sequence argument as if it had been used normally. This way, I could animate a state effect as if it were a skill. Specifically for a re-raise type skill, which yanfly has already provided the code for (here). Without this ability, the animation called in this state plays immediately after death occurs, and the HP recovery happens on the exact same frame, without waiting for the animation to finish. If the next action is an enemy, it will also get to act before the animation is even finished as well.


I think this sort of thing is out of the scope of the support yanfly provides for his tips/tricks and lunatic code, so if anyone could help me out, that'd be awesome.
 

cekobico

Veteran
Veteran
Joined
May 8, 2015
Messages
353
Reaction score
159
First Language
Indonesian
Primarily Uses
One way I could think of is make a 'dummy' skill with the action sequence you desired to play out, and then have the state to forceAction that skill? Would that be what you're looking for? I'm sorry if I don't understand the question.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
776
Reaction score
487
First Language
English
Primarily Uses
RMMV
One way I could think of is make a 'dummy' skill with the action sequence you desired to play out, and then have the state to forceAction that skill? Would that be what you're looking for? I'm sorry if I don't understand the question.
That would be one way to solve it. I even tried that, but couldn't figure out how to make the state force the action.


$gameParty.members()[index].forceAction(skillId, targetIndex);
BattleManager.forceAction($gameParty.members()[index]);


The script call spreadsheet lists the above commands for forcing an action, the second command doesn't seem to even reference a skill to use, so I don't think it's the correct thing to use. The first one might be correct, but I have no idea what to set the indexes to to make the afflicted use the skill on itself.
 

cekobico

Veteran
Veteran
Joined
May 8, 2015
Messages
353
Reaction score
159
First Language
Indonesian
Primarily Uses
Someone in the other Action Sequence thread wrote this: 


var skill = [id of part 2 skill];


var target = -1 or -2; //-1 for random target, -2 for same target as this skill


user.forceAction(skill, target);


BattleManager.forceAction(user);


BattleManager.processForcedAction();


This was supposed to be on <After Eval> tag of a skill, but since it is also an eval, maybe it can work within the state lunatic code?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
776
Reaction score
487
First Language
English
Primarily Uses
RMMV
I managed to get it to perform the setup action portion, but it's not passing the target correctly, so the second half of the sequence doesn't work.


When I changed the sequence to exclusively target the user, it works fine, because it ignores whatever the initial target was. That's workable.


The problem now is that the sequence immediately begins playing before the enemy is finished with it's own sequence, likely because the yanfly auto-life state triggers as soon as HP is zero. If I remove that part of the state, I get gameover as soon as the actor dies, and the sequence doesn't play at all.


edit:


alright, I managed to workaround all of those problems and have a working version. Thanks for your assistance.


View attachment output.mp4
 
Last edited by a moderator:

cekobico

Veteran
Veteran
Joined
May 8, 2015
Messages
353
Reaction score
159
First Language
Indonesian
Primarily Uses
So you got it to work? 


Yay :D :D :D


I'm glad I could help ^^
 

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,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top