It doesn't have to be a very comprehensive list, but I am hoping that it can be CASE INSENSITIVE. IE Ralph == ralph == RaLpH etc. It does NOT need to use Regular Expressions or anything so complicated.
The closest thing I can compare it to is PHP's in_array() or substr() functions.
For example, in PHP it would be like this:
$profane_names = array('Penis','Groin','CrotchFruit');
$name = Penis
if in_array(strtolower($name))
{
return TRUE;
}
Im also hoping that it could match substrings. For example, say COOT was a bad word, the name COOTY would be not allowed. Of course, that is just an example. Need the Case Insensitive part like bad tho!
Im limiting the Name to 5 Characters, so yes, I know CrotchFruit won't fit, and since its not really that big of a deal, I don't really care if the Player decides creative workarounds. Im just going for the obvious ones. 5 Letter ones and shorter. Bitc*, Cu**, Whor*, etc. without touching George Carlin's fav 7 of the worst of the worst to try to keep my examples of profanity to at least moderate levels.
Basically, what I want to do is flat out PUNISH the player for the first hour or so of the game (which I already put the dialouge in the events) for picking an absolutely obvious douchebag name by having other characters being excessively rude to the Player (not the character) by saying stuff like "What kind of a name is \n[1]?", then ending the game without warning when another character that is supposed to Join the Party decides that they dont want anything to do with anyone with one of those names and telling them "Your story ends here, \n[1]".
I apologize for the examples of the profanity that I used, however, I believe that I am not the only one who thinks that any game they make gets ruined when players are allowed to name their characters inappropriately, but would still like for the players to have the option of picking their characters names. Its one thing to name your character "Mario" or "Luigi", but when players enter (well, just use your imaginations) in a fantasy enviornment, it detracts from the immersion factor and comprimises our efforts at a storytelling experience. Thus, I want to make the punishment of the player a semi enjoyable experience, but point out to them that this is not the way I intend for the game to be played. That way I don't alienate the audience, but it provides a totally different and much shorter experience.