RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
I need a Script and Event for Profanity in Character Names

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 70
RMRK Junior
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.
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

**
Rep: +0/-0Level 68
RMRK Junior
Test this script and tell me if it goes well and is what you want.

Code: [Select]
#==============================================================================
# Banned words
# By gerkrt/gerrtunk, Heretic86(Idea)
# Version: 1.0
# License: MIT, credits
# Date: 12/07/2011
# IMPORTANT NOTE: to acces the more actualitzed or corrected version of this
# script check here: http://usuarios.multimania.es/kisap/english_list.html
#==============================================================================
 
=begin
 
------INTRODUCTION------

This script let you check if actors names have banned words in they.

-------INSTRUCTIONS---------

Add any new words in Banned_words list, adding a , 'X' each time.
The switch is actived when the scripts call found what where seeking.
Note that yu can use the scripts in a conditions and efects.

is_banned?(actor_id): Call script that check if the actor have a  banned name.
  is_banned?(1) --> check for alexis actor id 1
 
is_word?(actor_id, word): Call script that check if the actors name is the word.
  is_word?(1, 'Wep')  --> check for alexis actor id and the word 'Wep'

Note that this script is case unsesitive.
=end

module Wep
  Banned_words = 'Wep', 'Joan', 'melodic'
  Switch_for_banned = 1
end

class Interpreter

  #--------------------------------------------------------------------------
  # * Is banned?
  #--------------------------------------------------------------------------
  def is_banned?(actor_id)
    for bw in Wep::Banned_words
      if bw.upcase == $game_actors[actor_id].name.upcase
        $game_switches[Wep::Switch_for_banned] = true
        return true
      end
    end
    return false
  end
 
  #--------------------------------------------------------------------------
  # * Is word?
  #--------------------------------------------------------------------------
  def is_word?(actor_id, bw)
    if bw.upcase == $game_actors[actor_id].name.upcase
      $game_switches[Wep::Switch_for_banned] = true
      return true
    end
    return false
  end
end


*
A-pow 2015
Rep:
Level 81
2014 Best RPG Maker User - GraphicsFor frequently finding and reporting spam and spam bots2013 Most Unsung MemberSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.How can I help you? :Da^2 + b^2 = c^2Secret Santa 2012 ParticipantSilver - GIAW 10Silver - GIAW 9Bronze - GIAW HalloweenGold - Game In A Week VII
Do what you want, but if you're really that concerned about it, why make the character nameable at all?

You might as well add in any girl names to the list (if the character is male, which I am assuming) and any other sort of insults such as "loser" or "retard". By the time you got rid of any *IMMERSION BREAKING* names, you might as well have just made a pre-approved list of names the player could use.
« Last Edit: July 12, 2011, 09:12:13 PM by Acolyte »

*
Last Stop
Rep:
Level 88
Everyone Off
Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.Secret Santa 2012 ParticipantSilver - GIAW 10Silver - GIAW 92011 Biggest Drama WhoreBronze - GIAW HalloweenGold - Game In A Week VII
Fuck, The Legendary Lone Swordsman!

*
Rep:
Level 82
GIAW 14: 1st Place (Easy Mode)2013 Project of the Year2013 Best RPG Maker User (Programming)2013 Most Promising ProjectParticipant - GIAW 11Bronze - GIAW 10
And his evil, robotic brother ... P3n0r?

To be honest, there's just too many ways to get around such a script. There's also swear words from other languages to take into account as well. Plus, if they were truly hardcore, they could just import the Actors.rvdata in another project or otherwise edit the name.

People are going to do what they want if they want to do it. It's best to just shrug and let them have their fun.

EDIT : That said, good work on quickly writing up a script to help, gerkrt. Although I disagree with banning names, I don't want to diminish the help that was offered.
« Last Edit: July 12, 2011, 09:30:51 PM by Exhydra »

UPDATED 05-29-14


IS YOUR PROJECT OPTIMIZED?
UPDATED 07/04/15 - v2.5

RPG MAKER TOOLBOX
UPDATED 07/04/15 - v1.5

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Wouldn't it be easier to store the banned names in an array though?

Not that it really matters, I'm just insane.
it's like a metaphor or something i don't know

**
Rep: +0/-0Level 68
RMRK Junior
And his evil, robotic brother ... P3n0r?

To be honest, there's just too many ways to get around such a script. There's also swear words from other languages to take into account as well. Plus, if they were truly hardcore, they could just import the Actors.rvdata in another project or otherwise edit the name.

People are going to do what they want if they want to do it. It's best to just shrug and let them have their fun.

EDIT : That said, good work on quickly writing up a script to help, gerkrt. Although I disagree with banning names, I don't want to diminish the help that was offered.

I think his idea is to can react to actors names, in a funny or interesting way, i dont see why its bad this or anybody will make that to evade it.

*
Rep:
Level 82
GIAW 14: 1st Place (Easy Mode)2013 Project of the Year2013 Best RPG Maker User (Programming)2013 Most Promising ProjectParticipant - GIAW 11Bronze - GIAW 10
Yeah, I guess I misread the reason he had listed for wanting the script to begin with.

However, people get their fun in different ways, so if they want to name their character a bad word, then they should be able to have it. Which they can with this script, but it comes along with a punishment ... which they might find amusing in itself. Or they might find it annoying and close the game, who knows.

Anyway, the player has to want to be immersed in the game to begin with ... it's not something you can really force on them.

UPDATED 05-29-14


IS YOUR PROJECT OPTIMIZED?
UPDATED 07/04/15 - v2.5

RPG MAKER TOOLBOX
UPDATED 07/04/15 - v1.5

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
You can give the player the option to choose a name among small selection.
It does gives a different feeling, but I think it's a nicer way to control the name than allowing the player to enter any which name and then saying that's not allowed whether blacklisting or whitelisting is used.

You can also allow the player to choose certain characteristics of the actor and then generate/specify (depending on the number of possible options) a name to reflect those choices. This do put pressure on you to actively use the information in game, so you may not feel the extra burden is worth it.

*hugs*