Player Pronouns (alt)

Player Pronouns (alt)

Pokémon Essentials Version
v18.1 ✅
Pronouns PC.gif
Custom.gif


Okay, so, first and foremost, the differences between this resource and Fiona's! You should know that, even though Fiona's was developed in 17.2, it's still perfectly compatible with 18.1, so you do have options!
  • Fiona's resource doesn't have an option for custom pronouns, this one does
  • Fiona's resource also doesn't account for the verb difference of "he is" vs "they are", this one does
  • Fiona's resource has eleven pre-set pronouns, I condensed this one to He/Him, She/Her, They/Them, and Custom.
  • Fiona's message calls are abbreviated based on the function- for example, "He/She/They" gets called by "Pps", player pronouns subjective. I personally find that a little hard to remember, so I tried to make the calls just the word- \he is "he/she/they", \hes is "he is/she is/they are", etc.
    • But, if this is a deal-breaker for you, I'm pretty sure you can easily change the message calls in Fiona's to make it easier for you
  • Fiona's is backwards-compatible with v17, I'm pretty sure this one will only work on v18.

If you still want to use this one, just paste this into a new script section above Main!

Ruby:
module Tech_Pronouns
  attr_accessor :they
  attr_accessor :them
  attr_accessor :their
  attr_accessor :theirs
  attr_accessor :themself
  attr_accessor :is
    @they              = "they"
    @them              = "them"
    @their             = "their"
    @theirs            = "theirs"
    @themself          = "themself"
    @is                = false
end



def pronounsHim
    $Trainer.they              = "he"
    $Trainer.them              = "him"
    $Trainer.their             = "his"
    $Trainer.theirs            = "his"
    $Trainer.themself          = "himself"
    $Trainer.is                = true
end

def pronounsHer
    $Trainer.they              = "she"
    $Trainer.them              = "her"
    $Trainer.their             = "her"
    $Trainer.theirs            = "hers"
    $Trainer.themself          = "herself"
    $Trainer.is                = true
end

def pronounsThey
    $Trainer.they              = "they"
    $Trainer.them              = "them"
    $Trainer.their             = "their"
    $Trainer.theirs            = "theirs"
    $Trainer.themself          = "themself"
    $Trainer.is                = false
end


def pronounsCustom
  pronoun = ""
  pronoun = pbMessageFreeText(_INTL("He/She/They"),"",false,8)
  $Trainer.they     = pronoun
  pronoun = pbMessageFreeText(_INTL("Him/Her/Them"),"",false,8)
  $Trainer.them     = pronoun
  pronoun = pbMessageFreeText(_INTL("His/Her/Their"),"",false,8)
  $Trainer.their    = pronoun
  pronoun = pbMessageFreeText(_INTL("His/Hers/Theirs"),"",false,8)
  $Trainer.theirs   = pronoun
  pronoun = pbMessageFreeText(_INTL("Himself/Herself/Theirself"),"",false,8)
  $Trainer.themself = pronoun
  command = 0
  loop do
    command = pbMessage(_INTL("{1} is or {1} are?",$Trainer.they),[
       _INTL("{1} is",$Trainer.they),
       _INTL("{1} are",$Trainer.they)
       ],-1,nil,command)
    case command
    when 0;
      $Trainer.is = true
      break
    when 1;
      $Trainer.is = false
      break
    end
  end
end

def pbPronouns
  command = 0
  loop do
    command = pbMessage(_INTL("Update pronouns?"),[
       _INTL("He/Him"),
       _INTL("She/Her"),
       _INTL("They/Them"),
       _INTL("Custom"),
       _INTL("Exit")
       ],-1,nil,command)
    case command
    when 0;
      pronounsHim
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
    when 1;
      pronounsHer
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
    when 2;
      pronounsThey
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
    when 3;
      pronounsCustom
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
      else; break
    end
  end
end

class PokeBattle_Trainer
  include Tech_Pronouns
end

def pbTrainerPCMenu
  command = 0
  loop do
    command = pbMessage(_INTL("What do you want to do?"),[
       _INTL("Item Storage"),
       _INTL("Mailbox"),
       _INTL("Pronouns"),
       _INTL("Turn Off")
       ],-1,nil,command)
    case command
    when 0; pbPCItemStorage
    when 1; pbPCMailbox
    when 2; pbPronouns
    else; break
    end
  end
end

   unless Kernel.respond_to?(:pbMessageDisplay_Old)
      alias pbMessageDisplay_Old pbMessageDisplay
      def pbMessageDisplay(*args)
        if $Trainer
          if $Trainer.themself
            if $Trainer.is==true
              args[1].gsub!(/\\hes/i,_INTL("{1}'s",$Trainer.they.downcase))
              args[1].gsub!(/\\uheis/i,_INTL("{1} is",$Trainer.they.capitalize))
              args[1].gsub!(/\\heis/i,_INTL("{1} is",$Trainer.they.downcase))
              args[1].gsub!(/\\uhes/i,_INTL("{1}'s",$Trainer.they.capitalize))
            end
            if $Trainer.is==false
              args[1].gsub!(/\\hes/i,_INTL("{1}'re",$Trainer.they.downcase))
              args[1].gsub!(/\\heis/i,_INTL("{1} are",$Trainer.they.downcase))
              args[1].gsub!(/\\uhes/i,_INTL("{1}'re",$Trainer.they.capitalize))
              args[1].gsub!(/\\uheis/i,_INTL("{1} are",$Trainer.they.capitalize))
            end
          args[1].gsub!(/\\he/i,$Trainer.they.downcase)
          args[1].gsub!(/\\uhe/i,$Trainer.they.capitalize) 
          args[1].gsub!(/\\him/i,$Trainer.them.downcase)
          args[1].gsub!(/\\uhim/i,$Trainer.them.capitalize)
          args[1].gsub!(/\\his/i,$Trainer.their.downcase)
          args[1].gsub!(/\\uhis/i,$Trainer.their.capitalize)
          args[1].gsub!(/\\hrs/i,$Trainer.theirs.downcase)
          args[1].gsub!(/\\uhrs/i,$Trainer.theirs.capitalize)
          args[1].gsub!(/\\slf/i,$Trainer.themself.downcase)
          args[1].gsub!(/\\uslf/i,$Trainer.themself.capitalize)
        end
      end
        return pbMessageDisplay_Old(*args)
      end
end
Note that this does also change the User's PC script- if you plan on making further changes to that, you can either edit it from here or just copy my changes into PScreen_PC and work from there!

This originally involved changing a few script sections, and I left that here for posterity.
First we're going to go to PokeBattle_Trainer! Locate this part at the top:
Ruby:
class PokeBattle_Trainer
  attr_accessor :name
  attr_accessor :id
  attr_writer   :metaID
  attr_accessor :trainertype
  attr_writer   :outfit
  attr_accessor :badges
  attr_reader   :money
  attr_accessor :seen
  attr_accessor :owned
  attr_accessor :formseen
  attr_accessor :formlastseen
  attr_accessor :shadowcaught
  attr_accessor :party
  attr_accessor :pokedex    # Whether the Pokédex was obtained
  attr_accessor :pokegear   # Whether the Pokégear was obtained
  attr_writer   :language

Right below that, add
Ruby:
  #pronouns
  attr_accessor :they
  attr_accessor :them
  attr_accessor :their
  attr_accessor :theirs
  attr_accessor :themself
  attr_accessor :is

PokeBattle_Trainer defines the different attributes the player can have- outfits, badges, language, name, etc. This is adding a set of pronouns as their own attribute.

In that same script, scroll to the bottom and find
Ruby:
  def initialize(name,trainertype)
    @name              = name
    @language          = pbGetLanguage
    @trainertype       = trainertype
    @id                = rand(256)
    @id                |= rand(256)<<8
    @id                |= rand(256)<<16
    @id                |= rand(256)<<24
    @metaID            = 0
    @outfit            = 0
    @pokegear          = false
    @pokedex           = false
    clearPokedex
    @shadowcaught      = []
    for i in 1..PBSpecies.maxValue
      @shadowcaught[i] = false
    end
    @badges            = []
    for i in 0...8
      @badges[i]       = false
    end
    @money             = INITIAL_MONEY
    @party             = []

Below that, add
Ruby:
    #pronouns
    @they              = "they"
    @them              = "them"
    @their             = "their"
    @theirs            = "theirs"
    @themself          = "themself"
    @is                = false

This section is for setting up the default attributes when a new player character is created. We need something coded in to prevent some errors in the Message script further down the line, so we put this in for now and give the player the option to change it later.


Now, go into PSystem_Utilities and find this:

Ruby:
def getRandomName(maxLength=100)
  return getRandomNameEx(2,nil,nil,maxLength)
end

Below that, add this:
Ruby:
#pronouns
def pronounsHim
    $Trainer.they              = "he"
    $Trainer.them              = "him"
    $Trainer.their             = "his"
    $Trainer.theirs            = "his"
    $Trainer.themself          = "himself"
    $Trainer.is                = true
end

def pronounsHer
    $Trainer.they              = "she"
    $Trainer.them              = "her"
    $Trainer.their             = "her"
    $Trainer.theirs            = "hers"
    $Trainer.themself          = "herself"
    $Trainer.is                = true
end

def pronounsThey
    $Trainer.they              = "they"
    $Trainer.them              = "them"
    $Trainer.their             = "their"
    $Trainer.theirs            = "theirs"
    $Trainer.themself          = "themself"
    $Trainer.is                = false
end


def pronounsCustom
  pronoun = ""
  pronoun = pbMessageFreeText(_INTL("He/She/They"),"",false,8)
  $Trainer.they     = pronoun
  pronoun = pbMessageFreeText(_INTL("Him/Her/Them"),"",false,8)
  $Trainer.them     = pronoun
  pronoun = pbMessageFreeText(_INTL("His/Her/Their"),"",false,8)
  $Trainer.their    = pronoun
  pronoun = pbMessageFreeText(_INTL("His/Hers/Theirs"),"",false,8)
  $Trainer.theirs   = pronoun
  pronoun = pbMessageFreeText(_INTL("Himself/Herself/Theirself"),"",false,8)
  $Trainer.themself = pronoun
  command = 0
  loop do
    command = pbMessage(_INTL("{1} is or {1} are?",$Trainer.they),[
       _INTL("{1} is",$Trainer.they),
       _INTL("{1} are",$Trainer.they)
       ],-1,nil,command)
    case command
    when 0;
      $Trainer.is = true
      break
    when 1;
      $Trainer.is = false
      break
    end
  end
end
This sets up commands that will set the attributes we defined with the respective pronouns. Technically, you could just write these all out in an event, but it's much easier to have just one line of text for the code.

Now go into Messages and find this:
Ruby:
  text.gsub!(/\\pg/i,"\\r") if $Trainer && $Trainer.female?
  text.gsub!(/\\pog/i,"\\r") if $Trainer && $Trainer.male?
  text.gsub!(/\\pog/i,"\\b") if $Trainer && $Trainer.female?
  text.gsub!(/\\pg/i,"")
  text.gsub!(/\\pog/i,"")
  text.gsub!(/\\b/i,"<c3=3050C8,D0D0C8>")
  text.gsub!(/\\r/i,"<c3=E00808,D0D0C8>")

Below that, add
Ruby:
  text.gsub!(/\\hes/i,_INTL("{1}'s",$Trainer.they.downcase))  if $Trainer && $Trainer.is==true
  text.gsub!(/\\hes/i,_INTL("{1}'re",$Trainer.they.downcase))  if $Trainer && $Trainer.is==false
  text.gsub!(/\\heis/i,_INTL("{1} is",$Trainer.they.downcase))  if $Trainer && $Trainer.is==true
  text.gsub!(/\\heis/i,_INTL("{1} are",$Trainer.they.downcase))  if $Trainer && $Trainer.is==false
  text.gsub!(/\\uhes/i,_INTL("{1}'s",$Trainer.they.capitalize))  if $Trainer && $Trainer.is==true
  text.gsub!(/\\uhes/i,_INTL("{1}'re",$Trainer.they.capitalize))  if $Trainer && $Trainer.is==false
  text.gsub!(/\\uheis/i,_INTL("{1} is",$Trainer.they.capitalize))  if $Trainer && $Trainer.is==true
  text.gsub!(/\\uheis/i,_INTL("{1} are",$Trainer.they.capitalize))  if $Trainer && $Trainer.is==false
  text.gsub!(/\\he/i,$Trainer.they.downcase)  if $Trainer
  text.gsub!(/\\uhe/i,$Trainer.they.capitalize)  if $Trainer
  text.gsub!(/\\him/i,$Trainer.them.downcase)  if $Trainer
  text.gsub!(/\\uhim/i,$Trainer.them.capitalize)  if $Trainer
  text.gsub!(/\\his/i,$Trainer.their.downcase)  if $Trainer
  text.gsub!(/\\uhis/i,$Trainer.their.capitalize)  if $Trainer
  text.gsub!(/\\hrs/i,$Trainer.theirs.downcase)  if $Trainer
  text.gsub!(/\\uhrs/i,$Trainer.theirs.capitalize)  if $Trainer
  text.gsub!(/\\slf/i,$Trainer.themself.downcase)  if $Trainer
  text.gsub!(/\\uslf/i,$Trainer.themself.capitalize)  if $Trainer
This is creating those little message calls we use!

text.gsub!(/\\slf/i,$Trainer.themself.downcase) if $Trainer
  • \slf is what the dev will put in to call this
  • $Trainer.themself is what's being called
  • .downcase is just what I used here to ensure that there's a lowercase and capitalized version for each pronoun,
  • if $Trainer tells the game not to make this until there's a player character defined, to prevent error messages!


Optional- if you'd like an easy script for changing pronouns at the PC, go into PScreen_PC. Find this:
Ruby:
def pbTrainerPCMenu
  command = 0
  loop do
    command = pbMessage(_INTL("What do you want to do?"),[
       _INTL("Item Storage"),
       _INTL("Mailbox"),
       _INTL("Turn Off")
       ],-1,nil,command)
    case command
    when 0; pbPCItemStorage
    when 1; pbPCMailbox
    else; break
    end
  end
end
Change it to:
Ruby:
#pronouns
def pbTrainerPCMenu
  command = 0
  loop do
    command = pbMessage(_INTL("What do you want to do?"),[
       _INTL("Item Storage"),
       _INTL("Mailbox"),
       _INTL("Pronouns"),
       _INTL("Turn Off")
       ],-1,nil,command)
    case command
    when 0; pbPCItemStorage
    when 1; pbPCMailbox
    when 2; pbPronouns
    else; break
    end
  end
end

And above that, put in this:
Ruby:
#pronouns
def pbPronouns
  command = 0
  loop do
    command = pbMessage(_INTL("Update pronouns?"),[
       _INTL("He/Him"),
       _INTL("She/Her"),
       _INTL("They/Them"),
       _INTL("Custom"),
       _INTL("Exit")
       ],-1,nil,command)
    case command
    when 0;
      pronounsHim
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
    when 1;
      pronounsHer
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
    when 2;
      pronounsThey
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
    when 3;
      pronounsCustom
      pbMessage(_INTL("Updated to {1} / {2}.",$Trainer.they,$Trainer.them))
      break
      else; break
    end
  end
end

And that's all there is to it!

Use
The calls are:
  • \he - he/she/they
  • \him - him/her/them
  • \his - his/her/their
  • \hrs - his/hers/theirs
  • \slf - himself/herself/theirself
  • \hes - he's/she's/they're
  • \heis - he is/she is/they are
Add "u" after the slash for uppercase. (\uhe is "He" instead of "he")

This script can be added to already-released games, but existing saves will encounter a problem with any messages, because of the lack of pronouns for them. I'd suggest having an event in a PMC that just ran pronounsThey, so you can run events with messages again, and then having the player change it for themselves at the PC.

Future goals:
Add honorifics like Mr./Ms., Sir/Ma'am, gender-specific nouns like boy/girl,etc
Add a way to save custom pronouns if the player selects pbCustom again
Add a way to have the player's gender text color changed
Add a way to have the trainer card color's changed
Credits
-TechSkylander1518
-Fiona Summers (because I used her code to figure out how to make mine plug-and-play)
-Luke S.J. for the method alias help in Fiona's original code
Author
TechSkylander1518
Views
656
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from TechSkylander1518

Latest updates

  1. I actually don't know Ruby that well lol

    Plug and play, baby! No need to go into a bunch of script sections, just making this a new one...
Top