Renaming multiple actors in a range?

I name things in the database so I can know what they are, but ingame the names shouldn't appear as informative. For example: Actor 1 = Blonde Neighbor M, Actor 2 = Blonde Neighbor F, Actor 3 = Old Neighbor, Actor 4 = Neighbor Tall w Glasses. In the game their names should all just be "Neighbor" .

Is there a scriptcall I can run at the start that will allow me to rename them as such?
Something like
$gameActors.actor(1...4).setName("Neighbor")

I would like 1...4 instead of 1,2,3,4 because there are far more entries than 4 and listing them individually would be lengthy.

Thanks for listening!
no, the only thing you can do is a loop around a single actor command.
I have something like that to override starting levels. Maybe it works like this?

JavaScript:
for (let actorId = 1; actorId <= 4; actorId++) {
    const actor = $gameActors.actor(actorId);
    if (actor) {
        actor.setName("Neighbor");
    }
}
I name things in the database so I can know what they are, but ingame the names shouldn't appear as informative. For example: Actor 1 = Blonde Neighbor M, Actor 2 = Blonde Neighbor F, Actor 3 = Old Neighbor, Actor 4 = Neighbor Tall w Glasses. In the game their names should all just be "Neighbor" .

Is there a scriptcall I can run at the start that will allow me to rename them as such?
Something like
$gameActors.actor(1...4).setName("Neighbor")

I would like 1...4 instead of 1,2,3,4 because there are far more entries than 4 and listing them individually would be lengthy.

Thanks for listening!
That would be nice, even if it was numeric.... possibly using the X coordinate of screen placement.
if those aren't playable actors, why not use an event instead?
if you make the change, you can also do it directly in the database as well.
so why change it in-game instead?

I don't mind though, just interested knowing your purpose why actor works
above an simple event named "Neighbor".
I'm also curious if there's another way to help you around this.

Are you really having the player control multiple characters named "Neighbor"? If not, there's no reason for them to have actor entries in the database.

That would be nice, even if it was numeric.... possibly using the X coordinate of screen placement.
...what?
I have something like that to override starting levels. Maybe it works like this?

JavaScript:
for (let actorId = 1; actorId <= 4; actorId++) {
    const actor = $gameActors.actor(actorId);
    if (actor) {
        actor.setName("Neighbor");
    }
}
This works perfectly! Thank you very much!

To those inquiring, the reason I couldn't use a simple event or why I have actors named in detailed ways in the database and generic ways in the game is complex. One example is for flashbacks and alternate time periods. I might have several of a character named Mark 2025 age 30, Mark 1987 Flashback, Mark 2013 Flashback, etc. But in game the character just appears as "Mark" . But yes, its a fully playable character so an event wouldnt work well, and it might be in a party in the flashback meaning now there is a second set of another character Cindy 2025 present, Cindy 1987 flashback, etc while ingame each variant is just named Cindy. But having a bunch of characters all named only Mark or Cindy in the database is confusing so I need more identifiers like the year or age. Also, if a person uses their phone the screensaver picture that is referenced checks for their name then searches for the jpg of that file. So Mark.jpg would now be the screensaver for all of the versions of the Mark character without needing a Mark_1987_Flashback.jpg and Mark_Presentday.jpg etc individually. I can also now do checks for if "Mark" is in the party using the name and it will cover all instances without needing to write year or scenerio specific events thanks to being able to streamline and rename them all the base name when the game starts.

Thanks for the help!
no, the only thing you can do is a loop around a single actor command.
I was surprised to see you claim something can't be done just because it can't be done with eventing. Loop through objects and change a property on each isn't even that advanced.
@AquaEcho
and a loop around a single command is exactly the solution offered and used after my post.

Like I told the OP, it can only be done that way - even if someone creates functions that pretends to do it otherwise on a higher level, when going into deeper code it will always be a loop around a single assignment.
because the computer is physically incapable of setting multiple assignments in a single command
ZimXero said:
That would be nice, even if it was numeric.... possibly using the X coordinate of screen placement.


...what?
In regards to the naming convention GoblinA, GoblinB, GoblinC... etc mentioned by the OP. I was wondering if it was possible to use the X (or Y) coordinate of the placement position to determine the range that they asked. So Goblin 752, Goblin 359, Goblin 510,... using coordinates. This could then be ordered or scaled to an actual range scale, if used by the game mechanics in their game.
They just wanted an ID range of 1 to 4 instead of listing them all up like 1,2,3,4. The "range" wasn't about event locations.
They just wanted an ID range of 1 to 4 instead of listing them all up like 1,2,3,4. The "range" wasn't about event locations.
ahh... i see. I took it to mean the distance (range) to target.
"I name things in the database so I know what they are, but in the game the names should not appear as informative. For example: Actor 1 = Blonde Neighbor M, Actor 2 = Blonde Neighbor F, Actor 3 = Old Neighbor, Actor 4 = Tall Neighbor with Glasses. In the game, their names should just be "Neighbor".

Is there a script call I can run at the start that will allow me to rename them as such?"

Naming a character's name is simple, a condition for name X "blonde neighbor" is the same as changing the name to Neighbor.

Doing this in Maker mv (by events)

1. Name actors with any name in different ids.

2. Select the ids and their respective original names.

3. Create the change condition, if the name is original it is changed to a specific name.

5. Verification of name change, a condition that confirms that the name is neighboring, if so, everything is ok.
I still don't understand how what you're talking about seems to be relevant to the original question.

In regards to the naming convention GoblinA, GoblinB, GoblinC... etc mentioned by the OP.
The OP did not mention anything like that. They specifically said they want all the actors to have the same name.

I was wondering if it was possible to use the X (or Y) coordinate of the placement position to determine the range that they asked. So Goblin 752, Goblin 359, Goblin 510,... using coordinates. This could then be ordered or scaled to an actual range scale, if used by the game mechanics in their game.
Coordinates of what? Range from what?
I still don't understand how what you're talking about seems to be relevant to the original question.


The OP did not mention anything like that. They specifically said they want all the actors to have the same name.


Coordinates of what? Range from what?
I took it to mean ZimXero wants to rename enemy battlers as they populate onto the battle scene in ascending order of their screen x or y coordinates

Original thread: https://forums.rpgmakerweb.com/threads/renaming-multiple-actors-in-a-range.173950/