Soul Engine Ace - Actor Banned Names
Version: 2.0
Author: Soulpour777
Date: February 10, 2014
Version History
- Version 1.0 - Only has in script Banned Names.
- Version 2.0 - Hash style proposed adding is changed to accessor attribute in game system.
Description
This script allows you to create a list of Banned Names or Words that allows you to create different effects when a banned word is being entered by the player.
Features
- The game maker can add an array of Banned Names, Swearing Names or Inappropriate Names.
- Add Banned Names
Instructions
Script Calls:
is_actor_banned?(actor_id)
^ check if the actor’s name is banned. e.g. is_actor_banned?(1)
if you wish to print it out on the console, do a script call: p is_actor_banned?(1)
banned_word?(actor_id, banned_names)
^ use this script call to check if the actor’s name is the specific word.
eg: banned_word?(1, 'Eric')
if you wish to print it out on the console, do a script call: p banned_word?(1, 'Eric')
Script Calls Added in Version 2:
$game_system.add_ban_name(name) - Adds a name into the current banned names list.
Script
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# SEA - Banned Names
# By: Soulpour777
# Version 2.0
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Version 1 - Only allows in script names.
# Version 2 - Allows in game and in script names
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Description: This script allows you to create a list of Banned Names or Words
# that allows you to create different effects when a banned word is being
# entered by the player.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Examples:
# 1. Scene Name
# Say for example you are to let the player rename your character and the name
# being entered is banned, you can have this script check that so you can then
# have the player re-enter another name that is not inside the banned names
# list.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is under Actors / Characters Related Script.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Script Calls:
#
# Adding A Name:
# $game_system.add_ban_name(name)
# E.g. $game_system.add_ban_name("Eric")
#
# Check if Actor's name is banned:
# is_actor_banned?(actor_id)
# ^ check if the actor's name is banned. e.g. is_actor_banned?(1)
# if you wish to print it out on the console, do a script call: p is_actor_banned?(1)
#
# Check if Actor's Name is Banned with Specific Name
# banned_word?(actor_id, banned_names)
# ^ use this script call to check if the actor's name is the specific word.
# eg: banned_word?(1, 'Eric')
# if you wish to print it out on the console, do a script call: p banned_word?(1, 'Eric')
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
module BannedNames
BannedNamesList = ["Eric", "Joan"]
end
class Game_System
attr_accessor :curr_banned_names
alias gamesystem_init initialize
def initialize
gamesystem_init
assign_names
end
def add_ban_name(name)
@curr_banned_names.push(name)
end
def assign_names
@curr_banned_names = BannedNames::BannedNamesList
end
end
class Game_Interpreter
def is_actor_banned?(actor_id)
for banned_names in $game_system.curr_banned_names
if banned_names.upcase == $game_actors[actor_id].name.upcase
$game_switches[BannedNames::SwitchForBannedNames] = true
return true
else
return false
end
end
end
def banned_word?(actor_id, banned_names)
if banned_names.upcase == $game_actors[actor_id].name.upcase
$game_switches[BannedNames::SwitchForBannedNames] = true
return true
end
return false
end
end
Credit
Support
For any questions, suggestions or comments about this script, please don't hesitate to comment below or PM me here at RMRK. Please be informed that this script is included on Soul Engine Ace, Soulpour777 (me)'s small project, and some of these works as one.
Known Compatibility Issues
- None at the moment
Author's Notes
Sometimes there are names you can't stand...so you ban them.
Terms of Use
All Soul Engine Ace scripts are bound under my terms of use. if any terms of use in RMRK is not located on my terms of use, do remember to add those terms.