Please Help me with naming two actors the same name through an event.

Hunor

Villager
Member
Joined
Jan 1, 2014
Messages
23
Reaction score
5
First Language
English
Primarily Uses
Please help me.  I'm trying to use the name input processing even command to allow the player to name there actor 1, but I want it to at the same time name actor 2 the same name that the player gave to actor 1.

Example:

Let's say that the player named actor 1 "Alex".  Therefore actor 2 will automatically be named "Alex" as well.

Or the player could have named actor 1 "Bob".  Therefore actor 2 will automatically be named "Bob" as well.

The problem is that I do not know how to do this.  I have looked through variables, but I could not find a way to same an actor's name.  I might have over looked something.  Could someone please help me.  Thank you.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
I don't think there is a way to do this via eventing due to the very limited nature of the change name command. It can be done with a quick script call after the name input however:

Code:
$game_actors[2].name = $game_actors[1].name
This will set the second actor in the database to have the current name of the first actor.
 

Hunor

Villager
Member
Joined
Jan 1, 2014
Messages
23
Reaction score
5
First Language
English
Primarily Uses
Alright very much for this.  So, when I use this should I credit you Yato for this?

Just curious.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
lol - if you are going to add EVERY person who helps you to your credits list, you are going to have one HUGE credits list.


Yato may contradict me here, but it's not usual for credit to be given for something like this.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
I agree completely. There is absolutely no need to credit me for a one-line scriptlet that took maybe 30 seconds of my time that I will forget I helped with within the week. :)
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
But I would give credit even for that. You can put special thanks for this kind of situation to show your appreciation I suppose.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You can say "thank you" in the thread. For something so small and simple, that is usually plenty (and yet some people can't even manage that).
 

Makio-Kuta

Canadian Goose
Veteran
Joined
Jul 28, 2012
Messages
1,910
Reaction score
2,364
First Language
English
Primarily Uses
You can also show your appreciation by liking the post ;> (she likes that)
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
You can say "thank you" in the thread. For something so small and simple, that is usually plenty (and yet some people can't even manage that).
LOL yes!

You can also show your appreciation by liking the post ;> (she likes that)
True. Everyone here likes that I suppose. :D
 

Hunor

Villager
Member
Joined
Jan 1, 2014
Messages
23
Reaction score
5
First Language
English
Primarily Uses
Well, I just noticed that when I tried to thank Yato I forgot to say thank you.  Thank you very much Yato for that script line.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
lol! I think you did, but you just left one word out :)


Out of interest, why are you having two actors with the same name? Are you swapping them around at different points in the game or something?


If that's the reason, you could achieve the same thing by just having a single actor, and using the Change Actor Graphic, Change Actor Class, etc. commands to alter the settings on your one actor.
 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Out of interest, why are you having two actors with the same name? Are you swapping them around at different points in the game or something?
Maybe needed to add to the party future, and present self maybe... you know stuff like that! :p

That's a reason it would be needed in my opinion (since there would be the name needed  in the menu too)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
or 'alternate universe' sort of thing - like a real self and a "dream" self, where they looked different.


Both could be done with a single actor and Change Actor Graphic commands.


Or if you could be one of two classes, which could be done with a single actor and the Change Actor Class command.
 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
or 'alternate universe' sort of thing - like a real self and a "dream" self, where they looked different.

Both could be done with a single actor and Change Actor Graphic commands.

Or if you could be one of two classes, which could be done with a single actor and the Change Actor Class command.
What if you need both of them in a party and need them in the menu too at the same time?

I mean that's the only reason you should seek same name in DB anyway of course. :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yeah. That's the only reason I can think of why you would need two actors - if you actually needed both of them in the party at the same time, or, even though their names are the same, they are not actually the same character.


I was just asking, because I don't really like seeing people try to use scripts (including script calls) if there's already an easy way to do it, and they just weren't aware of it :) It's making hard work out of something that shouldn't be hard, and leads them towards using scripts instead of examining non-script ways of doing things. Using multiple actor slots for a single actor just to show some differences (sprite, class, etc) is a "hard way" of doing things that seems to happen quite often. I thought it might be an opportunity to show an "easier" way :)
 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Yeah I got that in the first place.

It is better to keep things as simple as possible I suppose.

:p
 

Hunor

Villager
Member
Joined
Jan 1, 2014
Messages
23
Reaction score
5
First Language
English
Primarily Uses
I wonder if I should even answer you Shaz.  All of you seem to have thought up all of these interesting answers to your question Shaz.  j/k  Well with all joking aside, The different actors were suppose to be different races that the player could transform the main character into just about whenever they want, but I have realized that just using classes that may be the same class, but designed for that race instead is easier.  Th only issue I'm having is what classes each race can have and what to name these classes.  And then I just make  copy of that class for each race that has it and design that class for that race instead of just having a actor for each race that the main character can turn into.  It is easier when you have a class system.  I kind of wish that there was a race system in RPG Maker VX Ace just like there is a Class system, but oh well.  To some it up, I just wanted a why to transform the main character at the player's will into different races and I figured that switching actors was the best way to go, but I change my mind to just changing the actor's Character and Face to that race and to change the class to one of that race.  Sorry for the long explanation.  I got carried away, but I'm happy to now have a way to same the same name between actors in case I want to do that.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yeah, if it's the same actor all the way through and you just want to change "things" about them, it's easier to use one actor, and use the Change Actor Graphic and Change Actor Class commands. There are some gotchas though, with changing the class - the EXP may not convert across, or you might have to do it via a script call so you can tell it to transfer the EXP (otherwise they might go from a level 20 thief to a level 1 cleric or whatever).


There are a couple of scripts around for class systems too.


May be worth checking out, if you don't already have everything working just the way you want to (if you do, leave it as is - if it ain't broke, don't fix it ;) )
 

Hunor

Villager
Member
Joined
Jan 1, 2014
Messages
23
Reaction score
5
First Language
English
Primarily Uses
Yes, I figured out that I can use variables and conditional Branches with levels and EXP or I can just change the first false in this part of the Game_Actor script that comes with the RPG Maker VX Ace program:

#--------------------------------------------------------------------------

  # * Change Class

  #     keep_exp:  Keep EXP

  #--------------------------------------------------------------------------

  def change_class(class_id, keep_exp = false)

    @exp[class_id] = exp if keep_exp

    @class_id = class_id

    change_exp(@exp[@class_id] || 0, false)

    refresh

  end

 

 

If I remember correct from what I found out when I googled a way to keep your character's level when you change classes.  Then you just change the false to true in this line "def change_class(class_id, keep_exp = false)" and your actor's EXP will be kept for all of that actor's classes whenever you have that actor change classes.  Or you can just use variables and under that variable go to Game Data and then click on Actor and then select the actor that you what and then change it to EXP and that variable will save your actor's exp, but you can also use a conditional branch to only allow that to happen if that actor let's say a fighter and not a mage.

 

PS: Sorry about not using a spoiler tag or someone for that script, but I don't know how to use those spoiler tags.

 

And I just learned that you can have a variable detect an actor's level and then you can use a conditional branch to be set to that variable and for it to activate only if the actor is at let's say level 10 if you have the conditional branch set to equal to 10 or set to greater then or equal to 10.  Then it will only activate when that actor is at level 10 or at level 10 or higher.  I think that is interesting and worth just randomly putting out there to end my post.
 

Tigersong

Furry Fellow
Veteran
Joined
Oct 22, 2012
Messages
452
Reaction score
44
First Language
English
Primarily Uses
I can't help but wonder what your in-story reason is for allowing such a dramatic change... Or would that spoil the whole game?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top