• 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!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our 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.

Quick question about phone.txt

  • 23
    Posts
    8
    Years
    • Seen Apr 20, 2017
    It says on the wiki (https://pokemonessentials.wikia.com/wiki/Phone#Phone_calls_with_trainers)
    that generic phone messages are defined in phone.txt and are comprised of different sections (greetings, bodies1, bodies2, etc.)

    But what about "Generics"?
    According to the wiki: "This is a complete phone call in itself, minus the "Greetings" part.".
    Sadly this is all the information given and from what I've tested, this part of phone.txt isn't used at all.

    Anyone care to correct me/explain?
     
    Generics are used, based off my little code skimming I've done just now.
    Code:
      if phonenum[4]==2 || (rand(2)==0 && phonenum[4]==3)
        # If "can battle" is set, make ready to battle
        call+=pbRandomPhoneItem(phoneData.battleRequests)
        pbSetReadyToBattle(phonenum)
        phonenum[4]=3
      elsif rand(4)<3
        # Choose random body
        call+=pbRandomPhoneItem(phoneData.bodies1)
        call+="\\m"
        call+=pbRandomPhoneItem(phoneData.bodies2)
      else
        # Choose random generic
        call+=pbRandomPhoneItem(phoneData.generics)
      end
    It basically checks if the trainer is going to battle, and picks a battle request. If not, it generates a number between 0 and 3 and if it is less than 3, strings some bodies together, else it uses a generic. That makes a 1 in 4 chance of getting a generic.
    EDIT: it is not 1/4 allthe time, it's 1/2 of a ready trainer not requesting, then another 1/4 chance. So a ready trainer has a 1/8 chance of using a generic.
     
    Last edited:
    Back
    Top