Questions on the new "@require" plugin param

So I'm working on MV plugin and I noticed new options for the plugin Manager...it's nice! although some options in it are kinda confused like the "require" 


what's that?



Plugin Parameters



If the user has an audio or image file with plugin parameter settings available, you must edit the comment in the plugin to set the plugin parameter.


Code:
 * @param ME
 * @desc The ME name for sample music effect.
 * @default Organ
 * @require 1
 * @dir audio/me/
 * @type file


@require 1


This indicates that there is a required asset for this parameter.


@dir


Sets the folder which contains the file. This is not required for animations.


@type


If the type of value is a file, set as file, for animation set as animation.
That's not new - that came in with 1.2.0.  You need to use it if your plugin uses resources and you want to make sure they're copied over when the project is deployed, if the user checks the 'exclude unused resources' box.


There are several versions - I think the one you showed is where there's a plugin that allows the user to specify an ME file in the plugin parameters.  If your plugin has the resource names hardcoded, it's a lot easier - it's just a one-liner.  They've also provided a way to pull the resource names from metadata from the note boxes.
That's not new - that came in with 1.2.0.  You need to use it if your plugin uses resources and you want to make sure they're copied over when the project is deployed, if the user checks the 'exclude unused resources' box.


There are several versions - I think the one you showed is where there's a plugin that allows the user to specify an image file in the plugin parameters.  If your plugin has the image names hardcoded, it's a lot easier - it's just a one-liner.  They've also provided a way to pull the resource names from metadata from the note boxes.  My recently released plugin for Upper Autotiles handles it manually - because a single tileset in the database could have multiple notes with the same keyword (by default, MV only saves the last one in metadata so I couldn't use it), I had to make my plugin update itself with a @require line for each image that was listed in any of the tileset notes.

I see well I wasn't on new this was a 1.2 haha


so if have manual included files 


such like this 


* =========================================================================
* ■ Exclude Files from being erased on deployment
* -------------------------------------------------------------------------
* @requiredAssets img/System/mapMenuButton
* @requiredAssets img/System/backMenuButton
* =========================================================================


I have to include @dir and @require ?
If your assets are hardcoded you only have to put in one line -  the one you've shown above.


The format in your first post is used when you don't know the name of the resources that are being used - when you add parameters so the user can put in their own file name.


So if the file name is a parameter, you have to add the extra lines to the header where you define the parameter.
thanks shaz 🙂  


I was really confused with that >_>"

Original thread: https://forums.rpgmakerweb.com/threads/questions-on-the-new-require-plugin-param.66659/