• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Custom Feature Question] How do I add a third gender to the game?

  • 413
    Posts
    5
    Years
    I wish to add a third Gender option to Pokemon Essentials.

    You know how if a Pokemon isn't coded to be always male, always female, or genderless, it's coded to generate a random number and make the Pokemon female if it's over a threshold determined by its Gender Ratio (such as FemaleOneEighth or Female50Percent)?

    How do I code a Pokemon to, when created, check if its random number is an even number, making it Gender3 if true and checking its female/male status normally if the number is odd?

    How do I code this Gender to be able to breed with anything that isn't genderless, taking the Male slot by default unless it's partner is male in which case it takes the female slot, and how do I code this Gender to interact with Gender-based effects like Cute Charm/Attract/Rivalry by allowing it to Attract and be Attracted by any Pokemon, count as whichever Gender allows it to evolve in the case of Pokemon like Combee and Salazzle, and trigger the boost of Rivalry whether the Gender3 or their foe has Rivalry?

    I've already drawn the gender symbol, if that helps.
     
    Checking the parity of a number is an easy bitwise check:
    Code:
    if randNum & 1 == 0
      #set gender flag to Gender3
    end
     
    Back
    Top