Having an "Actor Input Name" associated with a State?

SuperVegate

Warper
Member
Joined
Jul 8, 2018
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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?
 

robhav

Veteran
Veteran
Joined
Jan 31, 2018
Messages
49
Reaction score
16
First Language
English
Primarily Uses
RMMV
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();
 

SuperVegate

Warper
Member
Joined
Jul 8, 2018
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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();
That didnt work, maybe i'm not understanding this, So this is what I did:

First I created a dummy Actor[ Actor 20] and a new State [State 20].
I have my original Actor Harold[Actor 1]

I made a common event, in that event I used the Name Input Processing command to name that dummy actor[20].
Then I used the Script command and placed the code "$dataStates[20].name = $gameActors.actor(20).name();"

To test if this worked I created an event that would act out my common event.
Then I created an item that gave this state to an Actor and then consumed it to see if my actor's name would change.
It did not. Am I missing something?
 

robhav

Veteran
Veteran
Joined
Jan 31, 2018
Messages
49
Reaction score
16
First Language
English
Primarily Uses
RMMV
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)
 

JGreene

Veteran
Veteran
Joined
Oct 24, 2015
Messages
395
Reaction score
297
First Language
English
Primarily Uses
RMMV
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.
 

SuperVegate

Warper
Member
Joined
Jul 8, 2018
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
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?
 

SuperVegate

Warper
Member
Joined
Jul 8, 2018
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
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?
1. Eventually every actor in the party have a super hero identity
2. The initial transformation will be event controlled. That's when I want them to choose a name.
3. This is what I was kind of playing around with:
- So far I gave the players a button command(c) which lets them go in and out of the state. This also changes the sprite of the character.
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,081
Members
137,582
Latest member
Spartacraft
Top