Pc name in game

(sorry for my english, i'm italian)
HI! i'm new here and i installed RPG maker 2 weeks ago and i made a game for my friends and it turned up kinda cool.
I want to add in at the end a dialogue that says: You had fun (PCNAME)?
I know some games can put your computer name in a dialogue.
Can i make the same thing in Rpg maker MV?
I don't know anything about code and if it's possible can someone guide me?
Thanks.
Welcome!
I Googled "rpg maker mv script computer name":
Welcome!
I Googled "rpg maker mv script computer name":
I already readed this but i don't understand what i have to do...
I have the code and i can add a script with that code:

// Loads the OS module into variable 'os' var os = require('os'); // The 'os.hostname()' function returns the name of the computer console.log(os.hostname()); // You could store the name of the computer in a variable, if you want ... $gameVariables.setValue(1, os.hostname()); // ... so you can retrieve it at a later time console.log($gameVariables.value(1)); // You can also access the username of the user with the 'os.userInfo()' function console.log(os.userInfo().username);

And than?
Sorry for these questions but i am new in this world
I already readed this but i don't understand what i have to do...

// You could store the name of the computer in a variable, if you want ...
$gameVariables.setValue(1, os.hostname());
So then you use the variable.

For example, the Show Text event command says you can display a variable by doing \V[1]
I want to add in at the end a dialogue that says: You had fun (PCNAME)?
I know some games can put your computer name in a dialogue.
Can i make the same thing in Rpg maker MV?
I don't know anything about code and if it's possible can someone guide me?
Thanks.
Wow; this is giving me chills. It reminds me of how some horror games have something programmed into them that searches for your user or PC name and then addresses you as it, like the game is cursed because it knows your name.
So then you use the variable.

For example, the Show Text event command says you can display a variable by doing \V[1]
i tried, but it says DESKTOP-[some numbers] instead of the name.
I trided another command:

$gameActors.actor(0001).setName(os.userInfo().username);

This sets the pc name as the name of the carachter and it works perfectly.
But i would like to do in a message...
How can i do?
Wow; this is giving me chills. It reminds me of how some horror games have something programmed into them that searches for your user or PC name and then addresses you as it, like the game is cursed because it knows your name.
Yes i always liked those types of games!
i love when they do that.
Yes i always liked those types of games!
i love when they do that.
Yeah I like it too; it's really creepy, but it's interesting.

Also one other thing I can understand why you're confused by all this coding stuff in the plugins and scripts; I find it confusing as well. It can get complicated sometimes, too, and then you really need to ask for help.
O
So then you use the variable.

For example, the Show Text event command says you can display a variable by doing \V[1]
I DID IT!

i modified (knowing nothing about coding XD) the code and i did this:

var os = require('os'); $gameVariables.setValue(1, os.userInfo().username);

I don't know if it's good but it works!

Thanks a lot !
I trided another command:

$gameActors.actor(0001).setName(os.userInfo().username);

This sets the pc name as the name of the carachter and it works perfectly.
That's exactly what the thread I linked you to, which you quoted before, said :rswt2:

However, you should not use leading zeros. Just $gameActors.actor(1)

Maybe you're having problems reading it because it's English, but the code is using regular words to tell you what you're getting. It says username and hostname. It's up to you to use which one you want.
That's exactly what the thread I linked you to, which you quoted before, said :rswt2:

However, you should not use leading zeros. Just $gameActors.actor(1)

Maybe you're having problems reading it because it's English, but the code is using regular words to tell you what you're getting. It says username and hostname. It's up to you to use which one you want.
Oh... now i feel dumb hahaha.
Sorry but my english is not soo good XD.
Thanks a lot anyways

Original thread: https://forums.rpgmakerweb.com/threads/pc-name-in-game.160809/