Can you control event notetags?

So, I am using a few plugins that use event notetags to create/modify desired effects.
My question is can those events be modified to only trigger on conditions or triggers?
If not, are the plugin notetags only useful for permanent autorun stuff?

I am very new to plugins so forgive me if I am asking some very basic level questions.
It's very difficult to give you an answer without knowing what you're talking about - all plugins may function differently, so we can't say without names and links to the actual plugins you're using.

But as a general statement, no, the notes field on an event is on the event. You would have to read the instructions for the plugins to see how to control their effects, or use different events with different conditions to control which one is active under which circumstances.
You can dig into the plugin code to see what function the notetag triggers and manually call that function.
It all depends on the plugins you use. In general I would say it can be done if the notetags support javascript.
Some plugins allow you to use either note tags or event comments. Note tags usually apply unconditionally. But comments usually apply only if the specific event page is active, which allows you to make them conditional.

In order for someone to give you a concrete answer, you would have to explain which plugins you're talking about, and what you're trying to do.
Sorry, to be precise I am working with 2 MV scripts.
ExpandEventsAction and Particle Emitter.
They work with event notetags in mz but not sure how to make them conditional.

@AquaEcho I did some digging and in Particle Emitter I found this script call "$gameMap.createPEmitter(id, e, config, eventId)" but not sure how to call it manually.

@Arthran I am not sure what event comments are but I will give it a try tomorrow. Thanks.
You may want to take a step back from trying to implement fancy things with plugins and shore up with some tutorials on events.

You can use the conditions in the upper left section of an event to control whether or not it's active. So you can have two events on your map with different notetags and different conditions and you use switches/variables/whatever to control which is active.
One general problem is that some plugins read notetags only on "new game" and store the results in their own data structure. Changing the notetags after would have no effect because they would never be read again.

In the case of event notetags that is unli8kely - they would probably read on each map load.
but for other plugins that read from the database for example that can go very wrong.

Which is why everyone above said it depends on how the plugin works...
@AquaEcho I did some digging and in Particle Emitter I found this script call "$gameMap.createPEmitter(id, e, config, eventId)" but not sure how to call it manually.
That just looks like the script version of the plugin command
createPE [id] [configName] [eventId] [images' name ...]

In which case just use the plugin command or pass the same arguments into the script call. Whichever
Note tags usually apply unconditionally.
True. The notetag runs unconditionally, but if you can use javascript in the tag (which is the case with many yanfly plugins for example) you can use a condition inside the notetag.

So the notetag will still run, but only has effect if the condition is true.

I have no clue which plugins and which notetags they are using though, so no idea if this one is also the case for their plugins
@ATT_Turan If you are talking about conditions panel then yes I know about them, only after realizing that conditions don't work with notetags (Or these specific ones) did I post my question here.

@Andar Any idea how the ones I am using work?

@AquaEcho I understood that but not sure how to implement it. I tried putting it directly but I get this error.
Capture2.PNG

Capture1.PNG

I tried few different things, always get the same error.
Probably I am using wrong format.

@JohnDoeNews I already linked the plugins I am using in my previous comment above but I am not sure how to use javascript in the tag.
Can you please me an example so I know where to start looking.
always get the same error.
Probably I am using wrong format.
yes, but NOT in that command - the screenshot has the correct number of brackets.
next time you get that error, press F8, go to the console and give us a screenshot of the full error trace to determine where the error comes from.

What you did wrong in that command is that the command expects numbers, not variables or names.
you need to use the event ID number etc.
@Andar Normally when using plugin commands its like this
Spoiler
*** You can brief all "PEmitter" to "PE" for short ***

 createPEmitter {id} {config} {eventId} {imageNames ...}
  create a particle emitter.
  id: id of this controller. choose a name you like!
  config: config name download from the website (.json no need)
  eventId: the event which this emitter chase
       -1:player、0:this event、1~:event#
       x:no event, on screen;screen:on screen (only on current map)
  imageNames: image name inside img/particles/.

   ex: createPEmitter star#1 starEmitter x star1 star2
   Create an emitter named star#1, config is starEmitter.json,
   position based on screen. Images are star1.png & star2.png.

The code for the notetag in the plugin is this
Spoiler
var _Game_Event_initialize = Game_Event.prototype.initialize;
Game_Event.prototype.initialize = function(mapId, eventId) {
_Game_Event_initialize.apply(this, arguments);
this.setupTKMPEmitters();
};

Game_Event.prototype.setupTKMPEmitters = function() {
var ma = this.event().metaArray;
if (ma === undefined) return;

var eArray = ma.PEmitter || ma.PE;
if(eArray) {
for(var i = 0; i < eArray.length; i++) {
var e = eArray.split(',');
var id = e.shift().trim();
var config = e.shift().trim();
var eventId = this._eventId;
for(var i = 0; i < e.length; i++) e = e.trim();
$gameMap.createPEmitter(id, e, config, eventId);
}
}


And this is the error I get
Capture3.PNG
Is there a reason you can't just use the pause PE and resume PE commands when you want the particle effect on or off?
Normally when using plugin commands its like this
A script function is not the same as a plugin command, or the plugin commands would never have been needed.
The difference is a conversion step that transforms the text of the plugin command into the numbers the script function needs.
And an ID for a script function is always the number.

That error in particular happens because of the #3 in 'fairy#3' which breaks the script interpreter's try to make something of the nonsense you wrote there ("Syntax error" is the computers way of telling you 'You wrote nonsense').

When using a script function directly, you as the person entering it is responsible for the correct data formats, there is no convenient converter like in a plugin command.
Please replace the texts with their correct numbers and the function will work.
From what I can tell the notetags just autocreate the particle effect on that event on map entry. It would be the same thing as having a map entry event autorun and call the plugin commands to create the effects for those events. If you only want the particle effect created when a switch is on, you would have to either not use the notetags and have its creation in a conditional statement, or let it be autocreated by the notetag and immediately pause or delete it if a condition is not met (but then you would have to recreate or resume it later)
@AquaEcho Not quite sure what you mean.
I am using MZ, so I can't use plugin commands and if I use script call even for pause its gives me the same error "missing ) after argument list" and event notetags don't have a pause/resume command.
Is there another way to use the commands?

If you only want the particle effect created when a switch is on, you would have to either not use the notetags and have its creation in a conditional statement, or let it be autocreated by the notetag and immediately pause or delete it if a condition is not met (but then you would have to recreate or resume it later)
How do I immediately pause or delete that notetag?
I wasn't able to figure it out.

@Andar If I put anything other than "fairy#3" like "fairy" or "3" it says "Reference Error. Not defined"
With "fairy#3" I get "Syntax Error".
Not sure which is worse

Edit: Got some progress.
If I use "fairy#3" WITH quotations it shows some progress.
When I use this command, I get this error now.
Capture5.PNG

Capture4.PNG


On the other hand, I can now use Pause and Resume, I guess that's something I can begin to work with for now.
If I put anything other than "fairy#3" like "fairy" or "3" it says "Reference Error. Not defined"
That is because you do not enter random numbers, you need to get the ID of the fairy#3 event.
Open the event in the editor, it's ID is in the title line above the name.

THAT is the number you need to enter, but without the leading zeroes (so for example if there is "ID:007" then you enter 7 into the script command
I managed to make it work with a huge thanks to @ImaginaryVillain
Apparently, I was doing it right, just had the wrong order.
It works if I put it as "$gameMap.createPEmitter("fairy#1", "fairy2", "fairy5", 7)"
Only needed to interchange the locations of the arguments.
@ATT_Turan If you are talking about conditions panel then yes I know about them, only after realizing that conditions don't work with notetags
you can have two events on your map with different notetags and different conditions and you use switches/variables/whatever to control which is active.

A notetag on an event isn't going to do anything if that event is not active.

Original thread: https://forums.rpgmakerweb.com/threads/can-you-control-event-notetags.163445/