MZ [MZ] Help to create a plugin

Hello, greetings.
I'm trying to create a plugin that can make a direct download go to my game folder automatically.
Because there is no "auto updater" plugin, I'm trying to at least make the player just extract the winrar file that was downloaded directly to the game's folder.
Let me clarify more.
I created an option within the game called "Update game", where when clicking, a "rar" file is downloaded directly to the computer, so far so good...
I just wanted a plugin, or a method for this direct download to be directed to the game folder, so all the player has to do to update the game is go to "extract here".
How are you making it download now? However you're doing that, you should be able to plug in the relative file path, no?
Alternatively, if you decide to release your game on Steam, there will be no need for this updater because Steam will update the game files automatically anyway. However, in my experience, an update to the game is usually only a few small files, such as map files and images, and this can all be easily made available for download and all the person has to do is merge the files with the game folders files. Most people these days should know the basic use of a computer, especially if they are playing a game on one.
How are you making it download now? However you're doing that, you should be able to plug in the relative file path, no?
I use direct link from google drive
and how do you get that link to trigger?
and how do you get that link to trigger?
Inside game, i put an option(update game).
There is a plugin that calls a url link.
You need Node FS. https://www.w3schools.com/nodejs/nodejs_filesystem.asp
It is worth noting though that if you use Node FS you can't use web deployment for your game.
Inside game, i put an option(update game).
There is a plugin that calls a url link.
This is what I was asking in my first reply: how are you getting your game to download a file, what code. "A plugin" is an answer, but not a great answer, as it doesn't show any of us what the code looks like to offer modifications to it.

Most people these days should know the basic use of a computer, especially if they are playing a game on one.
I agree that most people should, but my overwhelming experience (which you can find plenty of samples of on here or Steam forums) is that many people don't. Even if they're playing a game on one.
Ok, thank u guys, but unfortunately dont got any solution.
Maybe one day will appear a guy with a plugin that do this job.
There is a plugin that does it, but is just for rpg maker mv, is called SDR Auto updater.
I will wait someone who maybe has the solution.
It is worth noting though that if you use Node FS you can't use web deployment for your game.
Yes and no. You can write your Plugin in a way that it simply does nothing if you're in a browser.

Code:
if (Utils.isNwjs()) {
  const fs = require('fs');
  
  // here you can write your code to download and store files
}

In other news, I don't know if it's a good approach to download a zip file and then make the plugin override your current game files because the game is running right now and then it should not override itself. In real life, programmers want to find mechanisms to download only the "new" and "modified" files, and this usually becomes tricky.

This requires a lot of computer science and some programming knowledge; tell me if you are still interested.
Yes and no. You can write your Plugin in a way that it simply does nothing if you're in a browser.

Code:
if (Utils.isNwjs()) {
  const fs = require('fs');
 
  // here you can write your code to download and store files
}

In other news, I don't know if it's a good approach to download a zip file and then make the plugin override your current game files because the game is running right now and then it should not override itself. In real life, programmers want to find mechanisms to download only the "new" and "modified" files, and this usually becomes tricky.

This requires a lot of computer science and some programming knowledge; tell me if you are still interested.
Right, I meant that functionality won't be available to a web deployment, so if your game relies on it that won't be a viable option.
I will wait someone who maybe has the solution.
then you can wait eternally - the problem is NOT that the solution does not exist, but that the different ways each require different details, and you refused to give those details.

you'll need specific code to get the link you already have on the screen. THAT CODE, that you already use, is what we asked for.
and unless you give that code, no one can tell you how to change that specific code to do what you want.
then you can wait eternally - the problem is NOT that the solution does not exist, but that the different ways each require different details, and you refused to give those details.

you'll need specific code to get the link you already have on the screen. THAT CODE, that you already use, is what we asked for.
and unless you give that code, no one can tell you how to change that specific code to do what you want.
Im not refusing give the details, i just did.
"
Hello, greetings.
I'm trying to create a plugin that can make a direct download go to my game folder automatically.
Because there is no "auto updater" plugin, I'm trying to at least make the player just extract the winrar file that was downloaded directly to the game's folder.
Let me clarify more.
I created an option within the game called "Update game", where when clicking, a "rar" file is downloaded directly to the computer, so far so good...
I just wanted a plugin, or a method for this direct download to be directed to the game folder, so all the player has to do to update the game is go to "extract here"."

I did not say that the solution not exist, i just say that i will wait for someone who have the solution.

Im just using that:

require('nw.gui').Shell.openExternal('https://drive.google.com/drive/folders/1IMUtCDDTY_f0e-Yr7hcXecXcoxFdYIRQ?usp=sharing');

But as i said, i just want to make this download go to game folder automattically.
its not what Andar ment, and you give the reason what works and what is not.

the CODE that you used inside the plugin is what they ASK for in order
to HELP you alter it to make it work.

we can hardly guess WHAT the code looks like you used for downloading.
so we cannot help.
its not what Andar ment, and you give the reason what works and what is not.

the CODE that you used inside the plugin is what they ASK for in order
to HELP you alter it to make it work.

we can hardly guess WHAT the code looks like you used for downloading.
so we cannot help.
I did not create the plugin, i was just trying. ("I'm trying to create a plugin")
I gave up.
you didn't say so, so you had to be more clear from the very start,
how the event look like for this "update" option.

we cannot guess what you did after all.

missing detaiils, screenshots, codes, makes things hard to guess and vague.
more details and being clear is straight answers.
An auto-updater is not something that a Rookie programmer can do. You need to deeply understand computer science topics such as file transfer, NodeJS, ...

There's no one-liner or code snippet that we could copy-paste here. There are multiple ways to achieve an auto-updater, with advantages and disadvantages.

Problems already start with Google Drive. IIRC, you can't hotlink a file in Google Drive, and you can only link to some Google Drive Overview Page or Folder, but not the file itself. So we cannot write a function to download the zip file.
you didn't say so, so you had to be more clear from the very start,
how the event look like for this "update" option.

we cannot guess what you did after all.

missing detaiils, screenshots, codes, makes things hard to guess and vague.
more details and being clear is straight answers.
No, im very clear, i said everything, i dont want to repeat, it is very simple.
I asked SDR to convert Auto updater MV to MZ, now i Will wait.
Thank u guys.

Original thread: https://forums.rpgmakerweb.com/threads/mz-help-to-create-a-plugin.149658/