Actor / Class creation in-game

Hellow!


I would like to get a little help on this. I'm creating a game where you "find" monsters that get added to your team. You can compare to Pokemon for the logistic.


So let's say I want to add an actor to the player's team and there's a maximum of 10 slots.


1. How can I figure that there's a free slot?


2. How can I specify which slot I want it to be added?


For the rest I guess I should be fine by adding the class and stats via scripting.


Thank you!
By default, all RMs fill up the party in order and you can't skip slots.


So reading party size will tell you if there is a free slot, and you can't select where to add the new actor.


For anything else you would need a script, and in that case your answers depend on the script used and can't be given without that script.
I use no script as of now.


I'll ask more questions, I think it will lead towards my answer.


1. With a script call, how can I verify if there's an Actor at ID 2 for exemple?


2. How to add an Actor to ID 2 via script?
I think you should check your teminology - there is no ID to add something to, I assume you mean party position?


There is a topic about script equivalents of event command, there you can look for the script syntax, but basically you can do both by event commands.


You can use control variable to read the ID of the actor in any party position, and if the result is zero then that position is free.


But you cannot add an actor to a specific position.


you can only add an actor to the next empty slot in the party, and if that slot is not the one you want you can use formation commands to switch the actor with the actor that is in the slot where you want the new actor. And again, you cannot skip slots. If you have two actors in the party, then one of them needs to be on slot #1, and the other on slot #2 - there is no way to fill slot #3 with less than three actors in the party.
So I've got my answer now, I've check the script call list and I realized I was a bit confused about the terminology I used.


But yeah, I've figure a loop to check my actors name and if it is empty I can create (or populate) the data in it.


And then add it to the team. Case closed! Thanks for your help!

Original thread: https://forums.rpgmakerweb.com/threads/actor-class-creation-in-game.66910/