Questions on the new "@require" plugin param

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
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 ?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
thanks shaz :)  


I was really confused with that >_>"
 

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,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top