So I'm working on my game, and I know that a lot of players are going to be entering stupid stuff when naming the player. I've tried using Conditional Branches but I know that's gonna take way too long, even though I've done it before when I used RPG Maker 2000 but I just can't redo all the hard work in another engine.
EDIT Dang it... I forgot to put this in the Script requests... 😔
I haven't seen a script for this, but someone else might have.
Just as a quick aside...what difference does it make to you what players name their characters? Have you implemented something for some kind of online functionality where other people could see those names? If not, how does it matter?
Instead of banning words I would go the different path of having a whitelist of permissible names. Maybe I'll have like 3-10 different names to choose from.
I experimented with this and it it is really pretty easy. I don't know what the script would be for XP, but here is an example from MZ using Java Script.
if ($gameActors.actor(1).name().toLowerCase().includes("balls") ||
$gameActors.actor(1).name().toLowerCase().includes("") ||
$gameActors.actor(1).name().toLowerCase().includes("wimp")) {
$gameVariables.setValue(5, 2);
}
Essentially, you can add as many of these check lines as you want. For my experiment, I think I had close to 100. It was interesting trying to brainstorm content to exclude and it looks rather funny as one long script.
I am using a simple Variable value to determine if the name is ok or not. If the value is "2" like in the example above, whatever they typed in contains an unacceptable word or partial word. Otherwise the name is good to go.
Again, I don't know how this translates to whatever XP uses.
And I thought about this a bit too. Unless you advertise it to the player, many would never know that this sort of name check even exists.
Anyway, good luck!
Have you considered a Eula for your game? In your End User License Agreement, you can list all of the alphanumeric strings that characters many NOT be called. If they do, and you find out, you can sue them for breech of contract, or disable their game within the allowances of your agreement.
I can see a system like this being really useful in a game intended for a younger audience--I can't imagine it would be a nice look if you made a game that was supposed to be for nine-year-olds and someone posted screenshots of their character with a name that is generally not considered appropriate for use around nine-year-olds XD Someone familiar with the idea of being able to name the characters in the game would know that that wasn't something that was strictly supposed to be in there, but someone who isn't familiar with that idea might get the wrong impression. Disallowing them seems like an erring-on-the-side-of-caution thing, to me.
(I'm aware most people here aren't developing games for nine-year-olds, but still--I was, at one point, so perhaps someone else is too.)
or you can go the South Park way and subvert the naming altogether.
in Stick Of Truth, you're forced to come out of the character creation screen as "Douchebag"
I feel like you are making the game to be exclusively played by your friends, and you expect them to do this just to bug you. In that case banning would be a great inside joke and the perfect premeditated revenge. You can even add a taunting message when they try a banned name. But I wouldn't do this in a public game, though.
As a random player, if this would happen to me before I got sucked into the game, I would already be done with it. Specially if I tried 2 or 3 names. Or what of a youtuber wants to stream your game, and their accountname is banned because it has a dirty word?
If it is a public game, then you can encourage your friends to use their real name or nickname. You could put special inside jokes in the game that no-one else would get, which only appear if actor 1 is named exactly the way you told your friend to name themselves.
I know this might sound silly, but have you considered just not letting the player rename a character? Or you could give a list of names to choose from if you want to let them give some personality to their game.
I didn't do it for this reason, but one of my games gave the player a choice of one written character (letter, number, symbol, whatever). The main actor was a robot named something like TILOX- and the chosen character is added to the end. I mostly did it because I like being able to differentiate save files but it quickly became a cute feature the testplayers loved. You could adapt this idea to help prevent abuse.
This thread is closed due to being reported as solved. If you need it reopened, let us know. Thank you!