Hello fine folks,
I am working on a game that mixes classic rpg elements with themes and images of the super hero/sentai genre.
A feature of this fusion would involve the player characters taking on alter egos.
e.g. Actor Sam sensing danger turns into Red Comet in order to save the day.
I thought it would be neat if when the players transform for the first time, they would get to create their alter ego's name and
from that point on, the character would always be referred to by that name.
Currently, the way that I'm handling transformations is by manipulating States, and I am using a bit of the Yanfly system to accomplish all of this
My question is, is there a way to have a player name a State, and then have that state be referred to as that for the rest of the game?
A simple way to do it would be to create a dummy actor. Don't give them a name or face, then let the player name the actor, then set the state name to the dummy actor's name. For example. Actor 5 is your dummy actor. State 6 is the state you want to rename. When it's time to name the state, run a Name Input Processing event for actor 5. When input is complete you put this script in the event:
$dataStates[6].name = $gameActors.actor(5).name();
I thought you just wanted to change the name of the state, not the actor because you said "My question is, is there a way to have a player name a State, and then have that state be referred to as that for the rest of the game?" If you want the actor and the state to have the same name, you could just let them rename actor 1 then $dataStates[20].name = $gameActors.actor(1).name();
Or if you just want the actor to be renamed to the name of the state you do: $gameActors.actor(1).setName($dataStates[20].name)
You could create a little event trigger every time you need to transform, which would forcefully rename your actor when they're Red Comet and give back their original name when they're Sam.
◆If:1 is affected by TransformState
◆If:#0005 NameSwitch is ON
◆Script:$gameActors.actor(1).setName($gameActors.actor(2).name())
◆
:Else
◆Name Input Processing:2, 10 characters
◆Script:$gameActors.actor(1).setName($gameActors.actor(2).name())
◆Control Switches:#0005 NameSwitch = ON
◆
:End
◆
:Else
◆Script:$gameActors.actor(1).setName($gameActors.actor(3).name())
◆
:End
Use the above sequence in a common event that either runs on parallel process, or that you activate whenever you need it. 1 refers to Sam, while 2 refers to Red Comet. 3 is a placeholder for Sam's original name so it isn't lost. You could also use the "Change Name" command and input "Sam", unless the player is able to custom name him too.
So basically, if Sam is affected by TransformState, his name will change to Red Comet (or whatever name the player inputs). The first time this happens, they will be able to input a name. From then on, they won't. And then when the state drops off, Red Comet goes back to being ordinary Sam.
In the game, I want characters to have a civilian identity and a super hero identity. I thought using states would be the perfect vehicle to accomplish this. What I was looking for was a way for Actor 1 to be named "Jimmy". But once State[20] was applied to him, he would be named "Super Jimmy". Once the state is removed, he is back to being "Jimmy".
I liked your original suggestion with a dummy actor. I could still tie all of the events and character development to Actor[1] and State[20] but I would refer by name only to the dummy Actor[20]. Unless I am making things more complicated then it has to be:
1. I want players to be able to input their own names for a super hero identity
2. I want to be able to toggle that identity on and off.
I thought manipulating states would be the most efficient way approach "2." I am not attached to the idea of manipulating states to accomplish this, I just thought it would be easier.
ALSO YOU HAVE BEEN A HUGE HELP!! THANK YOU SO MUCH
I have few questions
1- do you want the super hero identity for one actor only in the game or for any actor in your party?
2- when do you want the player chose the name, if he used the item every time or just once in some event?
3- how the identity removed? by death, item removal or event?
Well, what I made from what I understood from you
I let the player write new name for empty dummy actor, then it will change the name of state to the new name of dummy.
then I made a common event that will trigger and change the name of actor to states name + the name of actor like (Super Harold)
then i made another Parallel common event to check whenever the actor lose the state it will change his name back by remove the state name from his name.
btw, i used the original name of actors before the game start, unless u want them to change their actors names, then i have to try again