pbChangePlayer(2)
(as boy is 0, and girl is 1 by default.)No worries, it's actually pretty easy, though there's some extra stuff you probably will want to adjust.
So the only changes you REALLY need to make is creating a PlayerC entry in metadata.txt, with a new trainertype of course. in the Trainer types, you can set it to Mixed/X/2, which are all the third gender option. That'll let you set up all the sprites needed for a new player (you of course need to sprite them).
Then it's just a matter of editing the intro to have a third gender option in the gender selection, and dopbChangePlayer(2)
(as boy is 0, and girl is 1 by default.)
Now while that is basically all you NEED to do, there's some extra stuff that would add a dash of quality. These mostly involve text colours that references the trainer gender. There's like 4 big spots involving text colour, the continue panel in UI_Load, the save panel in UI_Save, the first page of the Pokemon Summary UI_Summary, and the text color code \pg in Messages. If you don't change these, the third gender will default to black or the male colour in the case of the save screen.
There's also the trainer card and pokegear, which also change colour on player gender, that would require similar changes to the above, otherwise the third gender will use the male graphic.
Of course, I have no proper replacement colours/graphics, so no code sample here, but feel free to ask for more clarification if you have trouble doing these extra changes if you want them.
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])
else
textpos.push([@trainer.name,56*2,29*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
end
case @trainer.gender
when 0 # Male
textpos.push([@trainer.name,56*2,29*2,0,MALETEXTCOLOR,MALETEXTSHADOWCOLOR])
when 1 # Female
textpos.push([@trainer.name,56*2,29*2,0,FEMALETEXTCOLOR,FEMALETEXTSHADOWCOLOR])
when 2 # NB
textpos.push([@trainer.name,56*2,29*2,0,NBTEXTCOLOR,NBTEXTSHADOWCOLOR])
else # just as insurance, probably won't ever run tbh
textpos.push([@trainer.name,56*2,29*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
end
NBTEXTCOLOR
and NBTEXTSHADOWCOLOR
at the top with the other constants. textColor = ["0070F8,78B8E8","E82010,F8A8B8","0070F8,78B8E8"][$Trainer.gender]
"0070F8,78B8E8"
to the new main and shadow colours. it's RGB hex, very easy to get from Paint or similar programs
ownerbase = Color.new(64,64,64)
ownershadow = Color.new(176,176,176)
case @pokemon.owner.gender
when 0
ownerbase = Color.new(24, 112, 216)
ownershadow = Color.new(136, 168, 208)
when 1
ownerbase = Color.new(248, 56, 32)
ownershadow = Color.new(224, 152, 144)
end
ownerbase = Color.new(64,64,64)
ownershadow = Color.new(176,176,176)
case @pokemon.owner.gender
when 0
ownerbase = Color.new(24, 112, 216)
ownershadow = Color.new(136, 168, 208)
when 1
ownerbase = Color.new(248, 56, 32)
ownershadow = Color.new(224, 152, 144)
when 2
ownerbase = Color.new(248, 56, 32)
ownershadow = Color.new(224, 152, 144)
end
cardexists = pbResolveBitmap(sprintf("Graphics/Pictures/Trainer Card/card_f"))
@sprites["card"] = IconSprite.new(0,0,@viewport)
if $Trainer.female? && cardexists
@sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card_f")
else
@sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card")
end
@sprites["card"] = IconSprite.new(0,0,@viewport)
card_bg = sprintf("Graphics/Pictures/Trainer Card/card_%d",$Trainer.gender)
if pbResolveBitmap(card_bg)
@sprites["card"].setBitmap(card_bg)
else
@sprites["card"].setBitmap("Graphics/Pictures/Trainer Card/card")
end
text.gsub!(/\\pg/i,"\\b") if $Trainer && $Trainer.male?
text.gsub!(/\\pg/i,"\\r") if $Trainer && $Trainer.female?
text.gsub!(/\\pg/i,"\\b") if $Trainer && $Trainer.male?
text.gsub!(/\\pg/i,"\\r") if $Trainer && $Trainer.female?
text.gsub!(/\\pg/i,"\\c[9]") if $Trainer && $Trainer.gender==2