Change Captured Enemy Name After Battle

Hi everyone!

I have made a event where using an item you are able to capture enemies and add them to your party. If the party is full it is then sent to storage. (similar to pokemon)

There are 2 things that i just cant seem to get added to this though:

1. Allow the player to name the new captured actor when the battle is over.
2. Right now the catch is 100% anytime you use the item. I am unsure where to set a % chance depending on enemy HP.

heres what I have in my events (they are all the same, just the actor names are changed)


◆If:bat is ON
◆If:outside = 4
◆Script:var newActor = InstanceManager.addActor(4);
: :var party = $gameSystem.reserveParty();
: :party.addActor(newActor.id);
◆
:Else
◆Script:var newActor = InstanceManager.addActor(4);
: :$gameParty.addActor(newActor.id);
◆
:End
◆
:End

Thank you for the assistance everyone 🙂
1. I have a plugin that lets you store an actor's id in a variable then open a name input screen for that actor. You can get it here.

2. I'm not sure exactly what you mean, but for enemy hp, you could use: if $gameTroop.members()[index].hp < x then catch, or use the hp to set a variable to a random number like: Math.randomInt($gameTroop.members()[index].hp) depending on exactly what you're trying to achieve.
According to the script call sticky:

SceneManager.push(Scene_Name);
SceneManager.prepareNextScene(actorId, name length);

Replace actorId with "$gameVariables.value(x)" where x is a variable with the actor's ID stored to it. Put a number in name length to limit how long it can be.

Original thread: https://forums.rpgmakerweb.com/threads/change-captured-enemy-name-after-battle.96501/