• 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.

Ambient Pokémon Cries

1,682
Posts
8
Years
    • Seen yesterday
    A 100% Plug-and-Play script for v16.2, it plays a random cry of a Pokémon on the route from all available encounter types, time allowing, every minute, plus/minus rand(5) seconds (but that's the default, play with the constants, yeah)
    Optionally, it allows you to disable and enable the cries with a switch.
    Place it in any script section under PField_Field, because it uses the Events Module, which is defined in PField_Field, and it will give an error otherwise.

    Now includes Roaming pokemon! Use CRY_ROAMERS to activate it.

    I don't want PC to break any scripts, so here's a Pastebin link!
     
    Last edited:
    1,682
    Posts
    8
    Years
    • Seen yesterday
    Cool concept! It would be interesting to use it for the roaming pokemon too.

    Ah, roaming pokemon! I completely forgot about those. I should update it to play those too.

    EDIT: And it's done! I spent more time testing than coding this once again!
     
    Last edited:

    sonicfan7895

    Just a dude, I guess
    122
    Posts
    13
    Years
  • I do have one small gripe to make...

    Is it possible to change it so it never plays a cry when you load up a save file? It always happens to me when I try to test out cry volumes.

    And keep in mind I'm having to load my save in a place with an encounter. This might happen in a finished game, and it might be weird for people to hear, or players could easily exploit what potential encounters there are in an area if they repeatedly close and re-open a game. I don't know, just trying to think about it like a game designer.

    EDIT: If I may clarify, the cry plays when maps are first loaded from a save file with encounters, but they are also played when maps are reloaded. For instance, when I get in a wild Pokemon battle and I come back from it, it'll play the cry in the background. That's what I would like to see fixed.
     
    Last edited:

    mybusiness

    Guest
    0
    Posts
    The fix requested in the above post:
    Code:
    Events.onMapUpdate+=proc {|sender,e|   # Ambiance check
      last=$PokemonTemp.lastCryTime
      now=pbGetTimeNow
      if !last
        $PokemonTemp.lastCryTime=now
      else
        diff=now-last
        quot=diff.floor / TIME_BETWEEN_CRIES
        if (diff > (quot+1)*TIME_BETWEEN_CRIES - RANDOM_TIME_FACTOR) || (quot>0 &&
          (diff < quot*TIME_BETWEEN_CRIES + RANDOM_TIME_FACTOR))
          pbPlayAmbiance
          $PokemonTemp.lastCryTime=now
        end
      end
    }
     
    Last edited:
    Back
    Top