Rpg maker mv can get information from computer?

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
28
Reaction score
2
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
1,076
Reaction score
854
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
28
Reaction score
2
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
1,076
Reaction score
854
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
28
Reaction score
2
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.
Damn, 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
1,076
Reaction score
854
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
28
Reaction score
2
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
266
Reaction score
88
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
67
Reaction score
30
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
2,088
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
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

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Black Mamba [mod]Please do not hijack a thread by asking a different question from that of the OP.[/mod]
Please start a separate thread.
 

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
28
Reaction score
2
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
28
Reaction score
2
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top