Profanity Filter (MV/MZ)

● ARCHIVED · READ-ONLY
Started by ATT_Turan 36 posts Page 1 of 2 View original ↗
  1. Profanity Filter 1.3
    ATT_Turan

    Introduction
    For developers who want to create adult or dark games with the option for a broader appeal, this gives the user the option to turn on and off a profanity filter while playing.

    I have tested the basic functionality, please let me know if you encounter any errors. I will consider making compatibility patches if the other plugin is free to use (or one I own, such as a Yanfly product) and unobfuscated. Otherwise, other authors are free to modify this code to make it compatible with theirs so long as I am still credited.

    Features
    This plugin provides you the option for a profanity filter in your game. It will appear in the options menu of your game for the player to turn on and off.

    You must configure the Profanitites parameter to provide a list of words your project uses that you wish to change with the filter turned on. You also have several options for the filtering style. You can turn all profanities into the same censored word; replace words with a generic character that preserves the length of the word; or with random grawlix.

    Screenshots
    Screenshot 2023-11-07 103156.png

    Screenshot 2023-11-07 103316.png

    Screenshot 2023-11-07 103355.png

    How to Use
    All of this plugin's functionality is via plugin parameters.

    Terms and Credits
    Free for non-commercial and commercial use. Credit ATT_Turan.
  2. As a potty mouthed person myself. DISLIKE.
    Kidding, kidding. More options are always good. :kaoluv:
  3. Haha, this is kind of a neat idea. Great thinking, Turan!
  4. Any particular reason you've made your profanity list type string instead of string[]? Having it as an array would make more sense than a continuous string, IMO, but either way works.

    Also you have a typo in the help: Profanitites ^_^
  5. Trihan said:
    Any particular reason you've made your profanity list type string instead of string[]?
    I haven't delved deeply enough into the parameter types to know that was an option.

    Trihan said:
    Having it as an array would make more sense than a continuous string, IMO, but either way works.
    Why so? Is there a performance difference on how running includes() on it would work? Or you're just thinking organizationally?

    Trihan said:
    Also you have a typo in the help: Profanitites ^_^
    Thanks! Fixed :kaojoy:
  6. ATT_Turan said:
    I haven't delved deeply enough into the parameter types to know that was an option.


    Why so? Is there a performance difference on how running includes() on it would work? Or you're just thinking organizationally?


    Thanks! Fixed :kaojoy:
    Mainly organisationally, but if I remember correctly parsing substrings is always a little more expensive than taking them from an array because strings are arrays of characters anyway.
  7. @Trihan Good to know. If anyone reports any lag in displaying text or anything, I can reconfigure it.
  8. It's very much a nitpick on my part, in practice the difference will be so negligible you'll never notice it. I imagine it wouldn't even cause an issue on the potatest potato of a machine.
  9. Trihan said:
    It's very much a nitpick on my part, in practice the difference will be so negligible you'll never notice it.
    Hey, I'm onboard with that - I'm all about unnecessary efficiency.

    Trihan said:
    I imagine it wouldn't even cause an issue on the potatest potato of a machine.
    I am stunned. Are there degrees of potato?!
  10. If you could see the laptop I'm currently working with, you would understand degrees of potato all too well.
  11. This is greate just wish i saw it eurlier :guffaw:
    Since ive already started doing it by myself using conditional branches and switches Hah Hah
  12. This is a really neat plugin. Kind of reminds me of how I have sound editing software called Goldwave, and it has a professional bleeper like they use on TV to censor out swear words. It's a nice touch, because frankly I don't like it when people curse a lot around me, although ironically I've developed kind of a swearing problem myself lately and have to work on it. I'm getting rapidly better, though; not cursing nearly as much as I used to. I think it probably won't be long before I stop swearing completely like I didn't swear at all before.
  13. Neat plugin, I wonder where you got the inspiration from...

    Though one potential problem is that it doesn't currently support swear words containing non-latin characters, which might be rather confusing for people trying to use it in non-English projects. I'd recommend either mentioning this limitation, or replacing the regex with /[^\p{L}0-9 ]/gu to match words in any language.
  14. @Mac15001900 Thanks for the tip - I'm not well-versed with RegEx, so I had to research the bit I ended up using. I'll implement your suggestion.
  15. ATT_Turan said:
    @Mac15001900 Thanks for the tip - I'm not well-versed with RegEx, so I had to research the bit I ended up using. I'll implement your suggestion.
    I back up his suggestion...if you have a profanity censor function, it should be able to censor out profanities in all languages. After all, anyone from anywhere could be playing.
  16. @SpyroFan67 It already does :stickytongue:

    But your concurrence has been noted.
  17. Well, @#%%. :kaophew:

    This is actually pretty handy. Might be a basic implementation.
  18. OmnislashXX said:
    Well, @#%%. :kaophew:

    This is actually pretty handy. Might be a basic implementation.
    How ironic that you said a swear word while commenting on a plugin that censors out swear words. XD
  19. I would say Irony is my middle name but nah, it's James.
  20. Now I want to add crude language to my game just so I can add this profanity filter to it! Time to make all my characters sound like they came from South Park!

    Question:
    Can this be integrated into the Yanfly Options Core options menu?
    I haven't actually tested to see if smart man Turan already implemented that as a basic feature of the plugin or not. If it is not just natively built in, it might help to inform folks how to do so.