kanyatanishande

Veteran
Veteran
Joined
Mar 3, 2021
Messages
66
Reaction score
8
First Language
English
Primarily Uses
RMMV
This is short and sweet and simply a sort of continuation to my last post.

All I want to know is if there is a way to check the file system my game's directory is running off of, using just Javascript. I've tried googling and nothing worked. Basically, if the file system isn't NTFS, I wanna put a little message in saying "Psst... your file system doesn't seem to be NTFS. That one is the best, I recommend you use it." That's all.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,242
Reaction score
1,201
First Language
English
Primarily Uses
RMMV
I know this isn't an answer but I just wanted to put it out there...really? What is the point of this - do you expect someone will reformat their hard drive for the sake of playing your RPG Maker game? :stickytongue:

And are you doing something so intensive with said RPG Maker game that it actually makes a difference? I have never had a AAA game, which are much more resource intensive, function any differently because of my file system type.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
Hello again.
I believed there was something related in NW.js, but I didn't find anything.

EDITED:

So I used a command line of Windows:
Code:
fsutil fsinfo volumeinfo %homedrive%
Result:
Code:
Volume Name :
Volume Serial Number : 0x????????
Max Component Length : 255
File System Name : NTFS
Supports Case-sensitive filenames
(...)

Part of Plugin (NW.js):
REMOVED

All that's left is to remove the line breaks, below are the references:
REMOVED

Good luck
 
Last edited:

kanyatanishande

Veteran
Veteran
Joined
Mar 3, 2021
Messages
66
Reaction score
8
First Language
English
Primarily Uses
RMMV
I know this isn't an answer but I just wanted to put it out there...really? What is the point of this - do you expect someone will reformat their hard drive for the sake of playing your RPG Maker game? :stickytongue:

And are you doing something so intensive with said RPG Maker game that it actually makes a difference? I have never had a AAA game, which are much more resource intensive, function any differently because of my file system type.
No, I don’t expect people to reformat their disks, plus, at least I’m not doing a lockout for it. NTFS only would kill Linux support and I was planning to port my game there, so I only wanted to make a message pointing out NTFS is the most flexible file system and I recommend it, the player won’t be required to use it (which was actually my original plan). Hell, for the sake of compatibility I’ll even remove that message from the Linux port (assuming I even get the checker to work).
Hello again.
I believed there was something related in NW.js, but I didn't find anything.

So I used a command line by NW.js itself, with that I created a Plugin that lists some useful things and others not so much.
Code:
wmic logicaldisk get DeviceID,FreeSpace,FileSystem,Size

Result:
View attachment 201097

All that's left is to remove the line breaks, below are the references:

Good luck
Do I need to add something to my plugins folder or do I just paste the code into the prompt and it works? If I need to add something, how do I do it?
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
This command line is only for Windows Prompt/Batchscript (Windows), to work in Javascript I used NW.js (child-process).

See in the following image that the command line is different, if it was just to include the command, it would not be necessary to create a Plugin, it would be enough to call the Script event command. :LZScheeze:

I understand what you want to do, but this command will not work on Linux or Mac, I know a little bit about the Linux command line, but not enough to do this.:LZSteary:

I didn't make the Plugin available because as I said, I have to eliminate line breaks and because I assumed you could say that you would use it in different distributions of your game. o_O

I tried to find anything related in the "process" of NW.js, but I didn't find it, I'll have to study more the Linux command lines and this can take time.

Edit:
Testing on Linux. So far what I got is this, but I'm not sure it's right.
List all Filesystem directories:
REMOVED

List only NTFS:
REMOVED

And I'll still need to check which partition the game is running.

Good luck
 
Last edited:

kanyatanishande

Veteran
Veteran
Joined
Mar 3, 2021
Messages
66
Reaction score
8
First Language
English
Primarily Uses
RMMV
This command line is only for Windows Prompt/Batchscript (Windows), to work in Javascript I used NW.js (child-process).

I understand what you want to do, but this command will not work on Linux or Mac, I know a little bit about the Linux command line, but not enough to do this.:LZSteary:
Is NW.js what RPGMaker MV uses, or is it just JavaScript? I’m also not sure if NW is referring to Node, I assume not.

Also, if the command only works on Windows I’ll only include it in the Windows package; Windows uses NTFS anyway so the only way to get rid of the NTFS nag is to drag the game to desktop or something (either a thumb drive that uses NTFS or any path in the C drive, unless somehow you manage to get a hold of the Windows on FAT project, then you need a thumb drive). ‍♀️
Edit: not sure what happened but the female shrug emoji turned into the female symbol. wtf
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,242
Reaction score
1,201
First Language
English
Primarily Uses
RMMV
I know this is unlikely to get a better answer than before, but I'll try just once more...what exactly is your desired goal here, beyond making people delete your game because of an annoying message every time they play? :stickytongue:
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
Is NW.js what RPGMaker MV uses, or is it just JavaScript? I’m also not sure if NW is referring to Node, I assume not.
RMMV/MZ games distributed for Windows, Mac or Linux use NW.js (Node) because it has support, so they can create the "SaveFile" and even modify other files, in addition to providing support for various functions blocked in browsers by question of security.
Web Browser distributions (via HTTP) use localStorage (pure JavaScript).
The Android and IOS distributions also use localStorage, to modify files on the device they need Cordova to have access, there are other APIs, but this one is the most recommended.

Also, if the command only works on Windows I’ll only include it in the Windows package; Windows uses NTFS anyway so the only way to get rid of the NTFS nag is to drag the game to desktop or something (either a thumb drive that uses NTFS or any path in the C drive, unless somehow you manage to get a hold of the Windows on FAT project, then you need a thumb drive).
Let's say that the player tries to run the game that is in a Fat32 Pen-Drive or in a Backup partition or even in the mapped Windows network (SMB Server), it is possible with NW.js to verify if the game is out of the place where the system is operational. B)
JavaScript:
if (process.env.SystemDrive != process.execPath.slice(0,2)){
    alert("It looks like this application has been moved or installed in the wrong location and may not work correctly.\nI recommend that you reinstall in the indicated location.");
}

Tips:
Operacional System -> process.platform (Return win32 on Windows)
Architeture -> process.arch (Return x32 or x64)

♀️
Edit: not sure what happened but the female shrug emoji turned into the female symbol. wtf
It should be an equivalent if the browser or site system cannot interpret it. ¯\_(ツ)_/¯

Edited:
Working on Linux. As I don't know a way to open the terminal in this distribution so I put the command in a map event to create a text file with the result:
 
Last edited:

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
I can't test it on macOS, I tested it on Windows (x64) and on Linux, it worked normally.
I made it as an object because if necessary I will return values such as disk size, space consumed in Bytes and percentage.

Instructions:
Call getFSCurrent which will return object with data, example:
JavaScript:
{type: "ntfs"}

Call getFSCurrent.type, it will return the FileSystem type in String, example:
JavaScript:
"ntfs"

If trying to read on a mobile device or via Web Browser it will return only an empty Object:
JavaScript:
{}

Hope this solves your problem, even if temporarily.
And sorry for my weird English and the code is a little dirty, I'm not a programmer. :LZSjoy:

Good luck.

Attachment removed
 
Last edited:

Synrec

Veteran
Veteran
Joined
Nov 6, 2019
Messages
168
Reaction score
100
First Language
English
Primarily Uses
RMMV
What about using the require('fs') call? Does that work? Never had to go that deep in node for rpg maker
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
What about using the require('fs') call? Does that work? Never had to go that deep in node for rpg maker
If it was a reply to my Plugin, I'm sorry to inform you, but I tried, even on Stack Overflow I didn't find anything referring to it.

If you can give an example of how it's done with 'fs' it would be much better.

Thnx
 

Synrec

Veteran
Veteran
Joined
Nov 6, 2019
Messages
168
Reaction score
100
First Language
English
Primarily Uses
RMMV
If it was a reply to my Plugin, I'm sorry to inform you, but I tried, even on Stack Overflow I didn't find anything referring to it.

If you can give an example of how it's done with 'fs' it would be much better.

Thnx
Sorry, my mistake, it's OS

Not sure what version of node rpg maker uses which is why I can't really say this is accurate or if rpg maker does something different which may disable some functionality of fs but on the node docs


Check for OS

Then create a variable

const os = require('os')

This brings os functionality of node into the plugin.

Then make a variable equal to os.platform()

And that should be it.
 

kanyatanishande

Veteran
Veteran
Joined
Mar 3, 2021
Messages
66
Reaction score
8
First Language
English
Primarily Uses
RMMV
I can't test it on macOS, I tested it on Windows (x64) and on Linux, it worked normally.
I made it as an object because if necessary I will return values such as disk size, space consumed in Bytes and percentage.

Instructions:
Call getFSCurrent which will return object with data, example:
JavaScript:
{type: "ntfs"}

Call getFSCurrent.type, it will return the FileSystem type in String, example:
JavaScript:
"ntfs"

If trying to read on a mobile device or via Web Browser it will return only an empty Object:
JavaScript:
{}

Hope this solves your problem, even if temporarily.
And sorry for my weird English and the code is a little dirty, I'm not a programmer. :LZSjoy:

Good luck.
I just downloaded the plugin but I haven't tested it yet, and I have confidence this will work. Thank you for the help!
 

kanyatanishande

Veteran
Veteran
Joined
Mar 3, 2021
Messages
66
Reaction score
8
First Language
English
Primarily Uses
RMMV
So uh, I'm sure you can guess why I wrote this reply.

To put things shortly... something went *very* wrong.
Not only did the conditional branch I set up say "fat" in a message box (I programmed it to do that in the "else" section for a conditional branch where it checks for an NTFS file system), but... all of my drives use NTFS. I either didn't properly write something or the code messed up. I'm guessing it's the first one. Here's how I set things up:

1632091804396.png
So, if the file system is NTFS, it does nothing, but if the file system is anything else, it says "F A T". It said that, but as I said, none of my drives are formatted with FAT/exFAT, etc. Yes, I checked ALL of them in properties. Did I do something wrong?
I'm extremely confused.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
Open the console and enter the command to see what returns:
test-in-console.png
 
Last edited:

kanyatanishande

Veteran
Veteran
Joined
Mar 3, 2021
Messages
66
Reaction score
8
First Language
English
Primarily Uses
RMMV
Sorry for the late response. It says... undefined.

1633147369326.png
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
Did you actually open the game from Game.exe?
Perhaps you created the game in an older version of the RMMV and missed updating the files in the JS folder.

Otherwise you wouldn't have this PIXI error on the console.

Test this command on the console:
JavaScript:
process.platform
 
Last edited:

kanyatanishande

Veteran
Veteran
Joined
Mar 3, 2021
Messages
66
Reaction score
8
First Language
English
Primarily Uses
RMMV
When I put in process.platform it outputs win32.
Does it say that regardless of bits (so if my device were 64 bit, which it is, it would still say win32)?
I'm using RPGMV 1.5.0, I assume that's not the latest version.
Upon comparing our consoles I see you're on 4.5.4 and I'm on 4.4.1. What do I do to update just the files and not MV itself? (I don't feel like updating)
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
879
Reaction score
439
First Language
PT-BR
Primarily Uses
RM2k3
so if my device were 64 bit, which it is, it would still say win32
That's one method, to be honest I've never actually tested RMMV games on a Windows 32, only 64.
The same happens in browsers, but I'll end up dropping the subject.

I'm using RPGMV 1.5.0, I assume that's not the latest version.
The most current version is 1.6.2.

I tested my plugin on Linux too and it worked, let's try one more thing.
You will open the console of any project without any plugin, and type each of these commands in order and copy in the same order what each one returned:
REMOVED
Example:
REMOVED

Only then will I be able to understand what is going wrong with your project.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

does anyone feel like explaining to me the difference between simulation and emulation? you have my full permission to be as pedantic as you want.
About the Deer, I had to cut some piece of video due the *swearing* Youtube copyrights issues...
A caveman pokes his head in...
I was listening to songs by Chuck E Cheese's voice actor (Jaret Reddick from Bowling for Soup) when the meds I was taking for my stomach virus apparently stopped working. I can't take my next dose until morning, but it's no use anyway. I'm officially sick again. Of course, I'll definitely take the next dose either way, but it's useless now.
New profile picture! This time, it's representative of my current project.

Forum statistics

Threads
116,003
Messages
1,094,822
Members
151,306
Latest member
rpgLord69
Top