Nicknames and Actor[n]'s Class Names

hi, its the first time im asking question here.
that annoyed me for a while with my game.

as i know , \n[1] would show the the actor 1's name in the windows, what abt nicknames and his classnames?

and yeah, i found this but i dont know any abt code things.. would someone explain a bit?
[TABLE]
[TR]
[TD]16[/TD]
[TD]Actors[/TD]
[TD]$dataActors[/TD]
[TD]Actors.json[/TD]
[TD]nickname[/TD]
[TD]$dataActors[id].nickname [/TD]
[/TR]
[/TABLE]

i also found a setting in Visumz message core
in the text Code Replacements..


const database = $dataActors.nickname;

const id = parseInt(arguments[1]);

const icon = false;

return this.actor.nickname(database, id, icon);

this is what i wrote an keep testing to figure it out


anyone .. please help..
There are plugins you can download that add text codes for things like nicknames, but if you don't have one of those, you can do this pretty simply by setting a game variable to the operand "Script -> $gameActors.actor(your id here).nickname()" then in your message you can use \v[the id of the variable you set] to show the nickname you stored in the variable.
t
There are plugins you can download that add text codes for things like nicknames, but if you don't have one of those, you can do this pretty simply by setting a game variable to the operand "Script -> $gameActors.actor(your id here).nickname()" then in your message you can use \v[the id of the variable you set] to show the nickname you stored in the variable.
thx, ill try it now.
you can do this pretty simply by setting a game variable to the operand "Script -> $gameActors.actor(your id here).nickname()" then in your message you can use \v[the id of the variable you set] to show the nickname you stored in the variable.
First, thanks for this! I learned something new.

But, I'm not going to lie, it took me many attempts to get this to work since I still don't understand scripts very well. I tried all sorts of variations while trying to put the nickname into the script, which apparently isn't correct! DOH! :LZSoops:

It finally worked when I put the nickname in the database under the (DUH) nickname field for that actor. 🤣

But I still learned something!

Adventure!
I know this is an older post, but I was trying to figure this out tonight, and now the solution will be here. You were really close with the Text Code Replacements and Trihan gave you the code, but no one put it together.

In VisuStella Message Core, open Text Code Replacements and make a new one with the following settings:

Match: ActorNickname
Type: \[(\d+)\]
STR: Text: Undefined
JS: Text:
const actorId = parseInt(arguments[1]);
return $gameActors.actor(actorId).nickname();

Then in a message you can put \ActorNickname[id] to display the Nickname of id.

No more eating up variables.

Z

Original thread: https://forums.rpgmakerweb.com/threads/nicknames-and-actor-n-s-class-names.144503/