MV SRD Summon Core and Yanfly CTB plugin conflict/workaround?

I know that Yanfly's CTB is depricated and no longer supported, but I'm noticing a bit of a conflict in regards to summon duration with SRD's Summon Core plugin.

What I'm basically trying to do is have my actor's summon command summon an additional actor into the party and have them last for a specific number of actions (in this case, 3) before disappearing. Everything works with the exception of the number of turns the summon is supposed to last, only being able to perform 1 actions before disappearing. I'm guessing that this is due to how turns in the CTB plugin are calculated (I'm using the default settings with Timed States in the BattleEngineCore set to true).

Since I know there is a javascript command that can manually call a desummoning of the actor, and since timed states seem to work fine, I tried to create a state that would automatically be applied to the actor upon summoning and would call this function upon expiration, so I used Yanfly's Auto Passive States plugin to try to apply this state to the summoned actor, but unless I'm misunderstanding how it works, the state doesn't seem to count down (I'm guessing Auto Passive States reapplies the state every turn?).

Is there a method I can use to achieve what I'm looking for? I have all the Yanfly plugins in the suggested order on Yanfly's page.
I used Yanfly's Auto Passive States plugin to try to apply this state to the summoned actor, but unless I'm misunderstanding how it works, the state doesn't seem to count down (I'm guessing Auto Passive States reapplies the state every turn?).
Not quite - the whole point of a passive state is it has no duration. It doesn't get reapplied, it never has any number of turns applied to it in the first place to be counted down.

However, you should be able to use the Skill Core to apply a regular state to the newly-summoned actor.

If you actually show how your skill is set up, you can probably get more specific help.
Let's assume you're using default settings.

One turn is defined as 200 tick or the lowest agility times 8, whichever is smallest.

Per tick, each battler gains the number of points equal to their agility.

One tick is equal to one animation frame while the CTB system runs to get the next active battler.

Each battler requires 7000 points or the highest agility on the battlefield times 120, whichever is highest.

If you're in a battle with a 30 agi slime versus a 60 agi battler, one turn is defined to be 200 ticks. Each character requires 7200 points to act once. Per 200 ticks or "one turn". Your character gets 1.66666 actions. For five turns, your character gets 8.33333 actions.
Here's a reply I sent to another person who was confused over how "one turn" is defined in Yanfly's CTB plugin. You may be using default settings but I know nothing about your battler agility values so this is all I can provide
Is there a method I can use to achieve what I'm looking for? I have all the Yanfly plugins in the suggested order on Yanfly's page.
without checking how the summon core works, would it be possible to give the summoned actor a state with an apply effect that sets a variable to 3 and an action end effect that decrements the variable and unsummons/kills them when it hits 0?
If you actually show how your skill is set up, you can probably get more specific help.

I've included the setup in the attachments. My thought process was to have the skill call a common event to apply the state to the actor, but it doesn't appear to be working? I'm guessing the event is being called before the actual summoning, so I'm assuming there's some kind of javascript code that can handle this?

Here's a reply I sent to another person who was confused over how "one turn" is defined in Yanfly's CTB plugin. You may be using default settings but I know nothing about your battler agility values so this is all I can provide

At level 1, the battlers agility values (assuming no equipment bonuses) range between 5 and 13, while at max level (99) they range between 70 and 130. On average, the values should be about 10 and 100, respectively
I'm guessing the event is being called before the actual summoning, so I'm assuming there's some kind of javascript code that can handle this?
yanfly's skill core's after eval tag should let you be able to run an addState() on the actor to be summoned.
I've included the setup in the attachments. My thought process was to have the skill call a common event to apply the state to the actor, but it doesn't appear to be working? I'm guessing the event is being called before the actual summoning, so I'm assuming there's some kind of javascript code that can handle this?



At level 1, the battlers agility values (assuming no equipment bonuses) range between 5 and 13, while at max level (99) they range between 70 and 130. On average, the values should be about 10 and 100, respectively
Agility values ranging from 10 to 100 means that some battlers may get ten times more actions than the slowest battler.

So let's assume again we are using default settings and let us assume we're in a battle where the agi values across all battlers range from 10 to 100 agi. One turn is defined as 80 ticks. A battler would also need 12000 points to get one action.

A battler with 10 agi gains 10 points per tick, and would need 1200 ticks to gain one action. This means 15 turns would pass before they get one action.

Meanwhile a battler with 100 agi gains 100 points per tick and would need 120 ticks to gain one action. This means 1.5 turns will pass before they gain one action.

If you want your summon to last for as many turns where a 10 agi battler gets three moves, we need to set that summon to last for 45 turns. If we want that summon to last as long as a 100 agi battler gets three turns, we need to set that summon to last for 4.5 turns. If we set it to last for three turns, that 100 agi battler will act only two turns before the summon dissappears. Realistically once the summon is created, a turn already has elapsed and would get only one action before dissappearing (assuming this summoned battler has 100 AGI) but they likely have a lower agi value resulting in getting less actions per turn. So far the math seems to add up and this is likely the reason why we ended up the "bug" described in the OP.

tl;dr, It's not actually a bug, just a logical result of the AGI values and the plugin settings provided. There is no plugin incompatibility here.
The problem is that you don't actually summon an actor, you summon a Game_Summon Object.

So anything that targets an actor ID (like the above event command) is going to fail, because your summon isn't that actor.

Try giving your skill this notetag from Yanfly's Skill Core:
Code:
<After Eval>
$gameParty.summonMembers()[$gameParty.summonMembers().length-1].addState(69);
</After Eval>

where 69 is the ID of your state that expires in 3 turns and removes the summons.
The problem is that you don't actually summon an actor, you summon a Game_Summon Object.

So anything that targets an actor ID (like the above event command) is going to fail, because your summon isn't that actor.

Try giving your skill this notetag from Yanfly's Skill Core:
Code:
<After Eval>
$gameParty.summonMembers()[$gameParty.summonMembers().length-1].addState(69);
</After Eval>

where 69 is the ID of your state that expires in 3 turns and removes the summons.

Works exactly as I wanted it. Thanks a bunch.

@Gensun Since the agility values scale via level, most enemies will have agility values ranging around where the actors should be for that level so outside of the issue in my OP, I doubt this will be much of an issue outside of fringe cases such as higher levels battling earlier enemies and visa-versa?
Works exactly as I wanted it. Thanks a bunch.

@Gensun Since the agility values scale via level, most enemies will have agility values ranging around where the actors should be for that level so outside of the issue in my OP, I doubt this will be much of an issue outside of fringe cases such as higher levels battling earlier enemies and visa-versa?
So if we give every battler 50 agi, they need 200 ticks for one turn to pass, and 7000 points to gain one action. Every battler gets 1.42 actions for each turn and the summon will have around 4 actions before they expire.

Though if you keep agility values too close, you've defeated the purpose of a CTB turn system. Up to you on what you want to do.

Original thread: https://forums.rpgmakerweb.com/threads/srd-summon-core-and-yanfly-ctb-plugin-conflict-workaround.165232/