• We've opened up applications for site moderators! Head over to the announcement to learn more!
[PE v19.x] Non-binary Support

[PE v19.x] Non-binary Support 1.0

Pokémon Essentials Version
v19.1 ✅
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?
addBackgroundPlane(@sprites,"bg","Trainer Card/bg",@viewport)
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)
NONBINARYTEXTSHADOWCOLOR = Color.new (-255.51, -255)"

and finally replace the part of UI_Load that goes from line 78 to line 84 with
"if @trainer.male?
textpos.push([@trainer.name,56*2,29*2,0,MALETEXTCOLOR,MALETEXTSHADOWCOLOR])
elsif @trainer.female?
textpos.push([@trainer.name,56*2,29*2,0,FEMALETEXTCOLOR,FEMALETEXTSHADOWCOLOR])
elsif @trainer.nonbinary?
textpos.push([@trainer.name,56*2,29*2,0,NONBINARYCOLOR,NONBINARYTEXTSHADOWCOLOR])
else
textpos.push([@trainer.name,56*2,29*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
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
Downloads
73
Views
806
First release
Last update
Rating
4.00 star(s) 2 ratings

Latest reviews

this is the only nb script ive found so far! Though this script doesnt work without Westrah's edits, who was lovely enough to help me!
Overall it works. However, some tweaking to the lines of code were needed due to simple syntax errors. Currently having an issue with Trainer Card displaying completely but unsure if that is user error at this time.
Top