MV Sending Captured Monsters to Storage (DreamX_CaptureEnemies)

Very strange, if the first one happens it means that the loop event has started... and from the screenshot you sent your event is correct.

It is not necessary to send the project, today or tomorrow I will send the test I did and you can analyze the difference.
That would definitely help!
Feels like the code works, the issue is with the timing. It seems the in battle timing isn't working well; you could try changing the Span to "Moment" instead of Turn, with Conditions of "Turn 0 + 1*X". That's a bit risky, because it will try to run constantly, and could slow your game down; so you'd want to add a "Wait 2" command somewhere in the loop to give your game a little chance to breathe.
I just tried that. If I set Span to Moment it freezes the battle screen and I can't do anything
I just tried that. If I set Span to Moment it freezes the battle screen and I can't do anything

Yeah, was afraid of that. If running it in the battle isn't working, you can try a plugin that will run a common event after every battle ends, and put the code into that common event. For example, SumRndmDde's Battle End Events plugin: http://sumrndm.site/battle-end-events/
Set each parameter to the same common event, then in that common event run the code to check if the party is too large. This would mean you can have 7 members whilst still in the battle, but it should get rid of the extra one to the deposit box as soon as the battle ends.
Yeah, was afraid of that. If running it in the battle isn't working, you can try a plugin that will run a common event after every battle ends, and put the code into that common event. For example, SumRndmDde's Battle End Events plugin: http://sumrndm.site/battle-end-events/
Set each parameter to the same common event, then in that common event run the code to check if the party is too large. This would mean you can have 7 members whilst still in the battle, but it should get rid of the extra one to the deposit box as soon as the battle ends.
It worked! OMG I was so worried that I wouldn't be able to fix this. Thank you so much for the help!

Actually, thank you everyone for the help!
Perfect, so the method I used probably didn't happen to you because there were no more enemies on the screen. The Plugin really is the best solution. I'll ask you to close the topic if you agree.

Edit:
I tested it with several monsters being captured at a single time, and even with the victory message the cycle happened normally and they were all sent to the warehouse normally.
Another thing, let's say that by chance you decide to have the option of capturing two or more monsters in the same battle, then in this case you will need to use a cycle (repeat until completed):
Code:
◆Loop
◆If:Script:$gameParty._actors.length > 6
◆Script:let actor = $gameParty._actors[6];
: :alert(actor);
: :$gameSystem.depositedActors.push(actor);
: :$gameParty.removeActor(actor);
◆Text:None, None, Dim, Top
: :Este monstro foi enviado para o depósito...
◆
:Else
◆Break Loop
◆
:End
◆
:Repeat Above
It is not possible to capture all the event fields, so I put the code directly


I tested it with several monsters being captured at the same time, the cycle occurred normally and they were all sent to the warehouse normally and only then the victory message appears, probably the capture method works differently causing the battle to be canceled.

I used the turn method precisely because I could capture more monsters in a single battle, which would be a differential in a safari-style system where you don't battle, you just try to capture.

The message appears with the monsters already dead:
1.png


And at the end the victory message:
2.png
Perfect, so the method I used probably didn't happen to you because there were no more enemies on the screen. The Plugin really is the best solution. I'll ask you to close the topic if you agree.
It's Ok for me! I'm not sure why that method didn't work, but now everything is working as expected. Your code in the common event with the SumRndmDude's plugin did the trick. Thank you very much for your help.
Hi guys!

I just noticed that an error occurs when changing one of the parameters of the DreamX_CaptureEnemies plugin. The whole process works when the monster is added in battle, however, if I change it to add after the battle, the system allows the capture of the 7th monster in the party, when in fact it should send it to the box.

Here are the plugin parameters.
Screenshot 2025-05-30 195304.png

If true, the enemy monster is added in the party and in the current battle.
But I don't want this. If I put false, the enemy is added at the end of the battle,
But is not sent to the deposit.

Can someone help me with that?

Original thread: https://forums.rpgmakerweb.com/threads/sending-captured-monsters-to-storage-dreamx_captureenemies.177210/