• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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

25
Posts
7
Years
    • Seen Apr 20, 2017
    It says on the wiki (http://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?
     
    1,682
    Posts
    8
    Years
    • Seen today
    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