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

[Scripting Question] How to define new terrain tags and assign a sound effect to walking on them?

56
Posts
5
Years
  • What the title says, really. I want to have footstep sounds in my game, but I don't know how to define new ones.

    For instance, since according to the wiki there are only 16 used terrain tags, I'd like to -

    Set the terrain tag 17 to be for Overworld Grass, and have no effect other than playing a grass walking sound effect when walking on it.

    Is there any way to do this? Thank you.
     
    56
    Posts
    5
    Years
  • Thank you, I have that. But still, I'm unsure of how to define new ones.

    My issue is, for example, every grass tile in the tileset is terrain tag 0, so it plays a generic footstep noise. However, the only types of footstep noises that are able to be used on regular walkable tiles are Rock, Sand, Bridge and Neutral. There are way more tile types than those 4, not to mention indoor floors and rugs and the like.

    I want to be able to define a brand new terrain tag, assign it to the tile of my liking, and have that terrain tag play a specific sound when the tile is walked on.

    Like this - I want the indoor stone floor tiles to have the terrain tag of XX. The terrain tag XX plays the sound "Stonefloorstep.ogg". Does this help you? I'm trying my best to figure out the best way to put it lol.

    Is that possible? If so, how?
     
    311
    Posts
    4
    Years
  • This is for v18.1

    You're gonna want to do a global search for
    Code:
    module PBTerrain
    and add your new terrain tag there. This video goes over how to set up a new terrain tag, and all the steps for that. You can stop is around 1:45, as the rest isn't relevant for what you're trying to do.

    Then you can set up a new
    Code:
    Tag[x] = ["se_step_name"]
    in the terrain step sounds script section.

    More specific information for assigning your terrain tag to the sound is within the script itself, starting on line 27
     
    56
    Posts
    5
    Years
  • Bump

    As a late addition, would there be any way for NPCs to make walking sounds on the terrain tiles? I'm pretty sure i saw a script for it but i can't find it now.
     
    Back
    Top