MV Blacklist names

Hello,
I've been searching around but I can't find a similar plugin. Is there a plugin that creates a blacklist for names that the player cannot input? (͡•_ ͡• )
Thank you, I'll keep this as plan B. 🙂
I was thinking of a plugin that retrieves data from another file, somewhat like other plugins do with credits. Because this version is okay, but it might require many conditional branches... (' • A •)
Hm, I'm not sure how to do that.

I guess it depends on what your goal is. There's a content filter plugin that bleeps out certain words from a list?
@ATT_Turan Didn't you mention somewhere that you had a filter plugin that does this?
@Trihan No, I wrote a profanity filter that changes text output from the game.
You can do a quick-and-dirty pluginless implementation of this. Say your file is called blacklist.txt:

JavaScript:
const fs = require("fs");
const fileContents = fs.readFileSync("blacklist.txt", { encoding: "utf8" });
const aryNames = fileContents.split("\r\n");
$gameVariables.setValue(x, aryNames);

Where x is the ID of a free variable into which you can store the list of banned names.

Then after your name input processing, in a conditional branch "script" operand you can put

JavaScript:
$gameVariables.value(x).contains($gameActors.actor(id of actor you named).name())

This will return true if the name includes a string from the file, and false otherwise. You can have the event provide a message and redirect accordingly.

Note that this will not work on web deployments, as nwjs modules like fs aren't supported on those. It will also only match the exact string; if you want it to match on substrings, it requires a slightly different approach for the comparison.
or like in the thread of banning words the conditional script:

Script:/name1|name2|name3|name4|illegal/i.test($gameActors.actor(1).name());

and do stuff if taken else, you got a nice name 🙂

Original thread: https://forums.rpgmakerweb.com/threads/blacklist-names.165256/