Rpg maker mv can get information from computer?

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
23
Reaction score
1
First Language
portugues
Primarily Uses
N/A
I was wondering if there is any mode or plugin that takes the username, or uses PC time, such as game time, or any plugin that does something similar, taking information from the computer and using it in the game  

Thank you very much in advance :elhappy::hhappy:
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
934
Reaction score
682
First Language
English
Primarily Uses
RMMV
@Edilsonsoares Sure, you can use the 'OS' feature of NWJS, the game player included with RPG Maker MV. Be aware that the following code only works in NWJS.

Code:
// Load the 'OS' module
var os = require('os');
// Execute the 'userinfo' method and read the 'username' property
os.userInfo().username;
Code:
// Load the 'OS' module
var os = require('os');
// Execute the 'uptime' method
os.uptime();
The full list of methods and properties of the 'OS' module can be found here.
 

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
23
Reaction score
1
First Language
portugues
Primarily Uses
N/A
@Edilsonsoares Sure, you can use the 'OS' feature of NWJS, the game player included with RPG Maker MV. Be aware that the following code only works in NWJS.

Code:
// Load the 'OS' module
var os = require('os');
// Execute the 'userinfo' method and read the 'username' property
os.userInfo().username;
Code:
// Load the 'OS' module
var os = require('os');
// Execute the 'uptime' method
os.uptime();
The full list of methods and properties of the 'OS' module can be found here.


I got a little confused, do I need to download and put NWJS in my game? and how would i use these codes? in the text? or in m system? sorry, I'm a little layman
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
934
Reaction score
682
First Language
English
Primarily Uses
RMMV
@Edilsonsoares Ah, sorry, the player which loads up whenever you do a test play or deploy for a Windows environment is NWJS. Basically, what I am saying is that the code I used will only function within that player. For instance if you upload your game to ichi.io and open your game in another browser (Chrome, Firefox, etc), the code will not work.
 

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
23
Reaction score
1
First Language
portugues
Primarily Uses
N/A
@Edilsonsoares Ah, sorry, the player which loads up whenever you do a test play or deploy for a Windows environment is NWJS. Basically, what I am saying is that the code I used will only function within that player. For instance if you upload your game to ichi.io and open your game in another browser (Chrome, Firefox, etc), the code will not work.
dayum, I thought it would be something like, writing a text in the dialog box, like "Congratulations" Carlos001 "(pc nick) a simpler thing
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
934
Reaction score
682
First Language
English
Primarily Uses
RMMV
@Edilsonsoares Well, you could do this :

Code:
◆Control Variables:#0001 = require('os').userInfo().username;
◆Text:None, Window, Bottom
:    :Hello \V[1] !
Basically, set a variable before the message using the 'script' option in the 'Control Variable' event command. Then use the text code \V[n] (where n is the variable id) to spit out the user name.
 

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
23
Reaction score
1
First Language
portugues
Primarily Uses
N/A
@Edilsonsoares Well, you could do this :

Code:
◆Control Variables:#0001 = require('os').userInfo().username;
◆Text:None, Window, Bottom
:    :Hello \V[1] !
Basically, set a variable before the message using the 'script' option in the 'Control Variable' event command. Then use the text code \V[n] (where n is the variable id) to spit out the user name.
I'm feeling a little dumb now, thank you so much for your help now, for example, and just one thing that is not yet understood how to put Node.js in my project, now it's not my computer, for example, I'm a layman, and not being able to put Node.js in my project :eswt2:
 

Black Mamba

Veteran
Veteran
Joined
Mar 6, 2014
Messages
261
Reaction score
77
First Language
pt-br
Primarily Uses
can i make like doki doki literature club, when you progress the game it delete some game files?
 

myenemy

Veteran
Veteran
Joined
Jan 17, 2014
Messages
40
Reaction score
15
First Language
Spanish
Primarily Uses
RMMV
can i make like doki doki literature club, when you progress the game it delete some game files?
You can if the game has the right permisions on the machine. Ask for a request for more info instead stealing a thread.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,382
Reaction score
864
First Language
EN
Primarily Uses
RMMV
I'm feeling a little dumb now, thank you so much for your help now, for example, and just one thing that is not yet understood how to put Node.js in my project, now it's not my computer, for example, I'm a layman, and not being able to put Node.js in my project :eswt2:
NW is built on Node, and RMMV games (as Ossra stated) are built on NW. You don't have to include any extra modules or anything like that. The provided script calls can be used as-is, no further action necessary.

As mentioned, it'll only work for a local application, i.e. an app on the player's system. Standard browser security blocks remote attempts to access your private information. HTML-deployed RMMV games are sandboxed, which basically means they're extremely limited in what they can do outside that box, with good reason!
 

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,410
Reaction score
10,848
First Language
English
Primarily Uses
RMVXA
@Black Mamba

Please do not hijack a thread by asking a different question from that of the OP.


Please start a separate thread.
 

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
23
Reaction score
1
First Language
portugues
Primarily Uses
N/A
NW is built on Node, and RMMV games (as Ossra stated) are built on NW. You don't have to include any extra modules or anything like that. The provided script calls can be used as-is, no further action necessary.

As mentioned, it'll only work for a local application, i.e. an app on the player's system. Standard browser security blocks remote attempts to access your private information. HTML-deployed RMMV games are sandboxed, which basically means they're extremely limited in what they can do outside that box, with good reason!


thank you very much, you don't know how you made me happy, I tried here and it worked
 

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
23
Reaction score
1
First Language
portugues
Primarily Uses
N/A
@Edilsonsoares Sure, you can use the 'OS' feature of NWJS, the game player included with RPG Maker MV. Be aware that the following code only works in NWJS.

Code:
// Load the 'OS' module
var os = require('os');
// Execute the 'userinfo' method and read the 'username' property
os.userInfo().username;
Code:
// Load the 'OS' module
var os = require('os');
// Execute the 'uptime' method
os.uptime();
The full list of methods and properties of the 'OS' module can be found here.

I tried here and it worked, thank you very much
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Remember, life is sh*t. But it will difinitely be less sh*t in the future! Stay happy everyone ^^ ...*continues to die inside*
Why is it that every time I take a short break from here, we get a new moderator?
Stream will be going live early today as I will be working on some music before I transition to art! When I switch to art, I will be focusing on making a new stream avatar~ Feel free to drop by!
For anyone who has uploaded a game to Steam and wonders if they actually check your game's build when you first upload it, I can personally vouch for Steam.
6 more towns to make in my game. SIX. not done with interiors yet but SIX EXTERIORS.

Forum statistics

Threads
93,497
Messages
913,028
Members
123,035
Latest member
Crowderr
Top