# [PE v19.x] Non-binary Support 1.0

Pokémon Essentials Version
Hi! Some time ago I saw a script that allows you to add support for Non-binary people, but that script was for Pokémon SDK, not Pokémon Essentials. So I decided to work on a series of changes to add a non-binary protagonist in a fangame programmed with Pokémon Essentials v19, and this is the result.

Before starting my guide, know that I have added the download of some graphics to use as an example, so if you want to get an idea of what kind of resources to include and what name to give to the files know that there is that (I know, there aren't much differences between the graphics included in the download and those included in Essentials but I wanted to include them anyway.).

So, start by going to line 550 of the "Messages" script and add below that line "text.gsub! (/ \\pg/i,"\\c[3]") if $Trainer &&$ Trainer.nonbinary?" and under line 553 " text.gsub!(/\\pog/i,"\\c[3]") if $Trainer &&$Trainer.nonbinary?", done? Good. We can continue with the guide. (Know that if you don't like the color I used, before going to the second step you can change the color using \\c[A number from 1 to 12] instead of \\c[3].).

Now for the second step you have to go to line 92 of the "TrainerType" script and put under that line "def nonbinary?; return @gender == 3; end", then go to the "Trainer" script below in the [[Date]] section and at line 26 and put under that line ""N" => 3, "n" => 3, "Nonbinary" => 3, "nonbinary" => 3, "3" => 3}],", And finally go to line 49 of the "Trainer" script under the [[Trainers and player]] section and put under that line "def nonbinary?; return GameData::TrainerType.get(@trainer_type).nonbinary?; end" (In case my instructions are not clear, press CTRL + F and search for "def male?" or "def female?" to find those two scripts more easily).

now for the third step go to the UI_Pokegear script and replace everything from line 14 to line 18 with
"if $Trainer.female? @button = AnimatedBitmap.new("Graphics/Pictures/Pokegear/icon_button_f") elsif$Trainer.male?
@button = AnimatedBitmap.new("Graphics/Pictures/Pokegear/icon_button")
elsif $Trainer.nonbinary? @button = AnimatedBitmap.new("Graphics/Pictures/Pokegear/icon_button_nonbinary") end" Then always in that script replace everything from line 73 to line 77 with "if$Trainer.female?
@sprites["background"].setBitmap("Graphics/Pictures/Pokegear/bg_f")
elsif $Trainer.male? @sprites["background"].setBitmap("Graphics/Pictures/Pokegear/bg") elsif$Trainer.nonbinary?
@sprites["background"].setBitmap("Graphics/Pictures/Pokegear/bg_nonbinary")
end"

Then go to UI_TrainerCard and replace what is from line 13 to line 25 with
"#background = pbResolveBitmap(sprintf("Graphics/Pictures/Trainer Card/bg_f"))
if $Trainer.female? addBackgroundPlane(@sprites,"bg","Trainer Card/bg_f",@viewport) elsif$Trainer.male?
elsif $Trainer.nonbinary? addBackgroundPlane(@sprites,"bg","Trainer Card/bg_nonbinary",@viewport) end #cardexists = pbResolveBitmap(sprintf("Graphics/Pictures/Trainer Card/card_f")) @sprites["card"] = IconSprite.new(0,0,@viewport) if$Trainer.female?
@sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card_f")
elsif $Trainer.male? @sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card") elsif$Trainer.nonbinary?
@sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card_nonbinary")
end"

Then for the fourth step go to UI_Load and under line 12 add
"NONBINARYCOLOR = Color.new (-255,255, -255)

and finally replace the part of UI_Load that goes from line 78 to line 84 with
"if @trainer.male?
elsif @trainer.female?
elsif @trainer.nonbinary?
else
end"

Then for the fifth and last step go to the script "Compiler_CompilePBS", at line 1076 and under it add "Nonbinary "=> 3," N "=> 3," 3 "=> 3," "=> 3"", and finally replace line 576 of Compiler_WritePBS with "["Male", "Female","Mixed", "Nonbinary"][t.gender],". Done! You can now have a Non-binary character in your project.
To do so, after the changes you made instead of giving the protagonist "Male" or "Female" as their gender, give them "Nonbinary".

And oh! Don't forget to credit me when using this resource. (OwO)
Credits
EzBound
Author
EzBound
73
Views
806
First release
Last update
Rating
2 ratings