• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
PE Terrain Step Sounds v19.1

Resource PE Terrain Step Sounds v19.1 1.2

Ikaro5

Entirely Average
Member
Joined
Jun 12, 2021
Posts
8
Ikaro5 submitted a new resource:

PE Terrain Step Sounds v19.1 - Hear sounds when you step on things!

A while back, Enurta released the first version of this script. When v19.1 came out, the script no longer worked. I fixed it up and added some example sounds.

This script uses terrain tags to determine what sound to play. If you add new terrain tags or change existing ones, you can add them here and generate step sounds for the new tags. Additionally, this script supports per-tileset sounds. So, if you have a city tileset that needs a clean-sounding rock step sound, and you have a cave...

Read more about this resource...
 

Ikaro5

Entirely Average
Member
Joined
Jun 12, 2021
Posts
8
Ikaro5 updated PE Terrain Step Sounds v19.1 with a new update entry:

Step Randomization and NPC Support - Version 1.2

This update includes support for non-player events. Additionally, there is now support for step randomization, or Round Robin! This allows you to add additional sounds and cycle through them when walking. This breaks repetition and helps the step sounds to have a less repetitive, machine-gun like sound and a more natural, 'random' sound!

Read the rest of this update entry...
 

PercyGekkouga

Novice
Member
Joined
Jun 6, 2021
Posts
10
Excellent script. Works as intended.

Quick question, what exactly do I have to do to give NPCs quieter footsteps? I'm using the default sounds.
 

Ikaro5

Entirely Average
Member
Joined
Jun 12, 2021
Posts
8
Excellent script. Works as intended.

Quick question, what exactly do I have to do to give NPCs quieter footsteps? I'm using the default sounds.
It can be done from the script. When you first download it, all the sound definitions will look similar to this:
Default:
Expand Collapse Copy
Tag[0] = ["SE_STEPROCK",100,100,"SE_STEPROCK",100,110]
This assigns two sounds to the player's footsteps and pitches the second sound 10% higher than the first. NPCs are assigned these same sounds by default.

To change them, begin with line 117 and change this:
NPC Default Code:
Expand Collapse Copy
    if @rr==0 # 
        sound = step_sound[0]
        volume = step_sound[1]
        pitch = step_sound[2]
        pbSEPlay(sound,volume,pitch)
        @rr = 1
    else
        sound = step_sound[3]
        volume = step_sound[4]
        pitch = step_sound[5]
        pbSEPlay(sound,volume,pitch)
        @rr = 0
to this:
NPC New Code:
Expand Collapse Copy
    if @rr==0 # 
        sound = step_sound[6]
        volume = step_sound[7]
        pitch = step_sound[8]
        pbSEPlay(sound,volume,pitch)
        @rr = 1
    else
        sound = step_sound[9]
        volume = step_sound[10]
        pitch = step_sound[11]
        pbSEPlay(sound,volume,pitch)
        @rr = 0
then go back to the sound assignment and change the default code to this:
Default:
Expand Collapse Copy
Tag[0] = ["SE_STEPROCK",100,100,"SE_STEPROCK",100,110,"SE_STEPROCK",75,100,"SE_STEPROCK",75,110]
These changes will give NPCs footstep sounds that play at 75% volume.

Sorry for the long explanation, but I wanted to cover everything :)
 

PercyGekkouga

Novice
Member
Joined
Jun 6, 2021
Posts
10
It can be done from the script. When you first download it, all the sound definitions will look similar to this:
Default:
Expand Collapse Copy
Tag[0] = ["SE_STEPROCK",100,100,"SE_STEPROCK",100,110]
This assigns two sounds to the player's footsteps and pitches the second sound 10% higher than the first. NPCs are assigned these same sounds by default.

To change them, begin with line 117 and change this:
NPC Default Code:
Expand Collapse Copy
    if @rr==0 #
        sound = step_sound[0]
        volume = step_sound[1]
        pitch = step_sound[2]
        pbSEPlay(sound,volume,pitch)
        @rr = 1
    else
        sound = step_sound[3]
        volume = step_sound[4]
        pitch = step_sound[5]
        pbSEPlay(sound,volume,pitch)
        @rr = 0
to this:
NPC New Code:
Expand Collapse Copy
    if @rr==0 #
        sound = step_sound[6]
        volume = step_sound[7]
        pitch = step_sound[8]
        pbSEPlay(sound,volume,pitch)
        @rr = 1
    else
        sound = step_sound[9]
        volume = step_sound[10]
        pitch = step_sound[11]
        pbSEPlay(sound,volume,pitch)
        @rr = 0
then go back to the sound assignment and change the default code to this:
Default:
Expand Collapse Copy
Tag[0] = ["SE_STEPROCK",100,100,"SE_STEPROCK",100,110,"SE_STEPROCK",75,100,"SE_STEPROCK",75,110]
These changes will give NPCs footstep sounds that play at 75% volume.

Sorry for the long explanation, but I wanted to cover everything :)

Thanks a lot! Did as you said and it worked to perfection.

Just one more thing, would it be possible to give step sounds to every NPC besides the ones with a keyword in their name as opposed to having to add a keyword into every NPC's name?
The latter is extremely tiresome when you've made a lot of progress into your game already. I asked a few people and they agreed too.
Pokemon Shadows EX has already done exactly that so I'm hoping it wouldn't be too much trouble for you.
 
Thanks a lot! Did as you said and it worked to perfection.

Just one more thing, would it be possible to give step sounds to every NPC besides the ones with a keyword in their name as opposed to having to add a keyword into every NPC's name?
The latter is extremely tiresome when you've made a lot of progress into your game already. I asked a few people and they agreed too.
Pokemon Shadows EX has already done exactly that so I'm hoping it wouldn't be too much trouble for you.
How would you distinguish NPCs from events that move but aren’t supposed to have step sounds?
 

PercyGekkouga

Novice
Member
Joined
Jun 6, 2021
Posts
10
How would you distinguish NPCs from events that move but aren’t supposed to have step sounds?
every NPC besides the ones with a keyword in their name
Just that?
Half the time, any npc event that wouldn't have shadows (like doors, berries) wouldn't make any step sounds either.
Like you add .sl in the name of any npc who you don't want a shadow on in Overworld Shadows EX, I would something like .ns (no step).
Would that not work?
 
Just that?
Half the time, any npc event that wouldn't have shadows (like doors, berries) wouldn't make any step sounds either.
Like you add .sl in the name of any npc who you don't want a shadow on in Overworld Shadows EX, I would something like .ns (no step).
Would that not work?
My mistake, I thought you were treating “NPCs” and “events” as two different things. (trees and doors aren’t really “characters”, after all)
 

Ikaro5

Entirely Average
Member
Joined
Jun 12, 2021
Posts
8
Thanks a lot! Did as you said and it worked to perfection.

Just one more thing, would it be possible to give step sounds to every NPC besides the ones with a keyword in their name as opposed to having to add a keyword into every NPC's name?
The latter is extremely tiresome when you've made a lot of progress into your game already. I asked a few people and they agreed too.
Pokemon Shadows EX has already done exactly that so I'm hoping it wouldn't be too much trouble for you.
Should be possible, I'll look into it. It might take me a few days though. It should be fairly simple, but no guarantees.
 

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
308
I updated to Essentials v21.1. Replace Script.rb by:
Ruby:
Expand Collapse Copy
#=================================================================================
# PE Terrain Step Sounds v21.1
# Version 1.2
# by Enurta and Ikaro
#---------------------------------------------------------------------------------
# Create nice aesthetics with terrain noise. As you walk across the ground, this
# will play a step sound to add a little bit of unique sparkle to your game.
# 
#
# Features:
# Specific Sound for Each Terrain and Tileset
# Specify Volume and Pitch
# Round Robin code breaks repetition (no more 'machine gun' steps!)
#
# Instructions:
# Setup the config below as you desire, it's fairly self explanatory, more 
# instructions with each config section.
#=================================================================================   
module PETS
Tag = []
Tileset  = []
StepEnabled = ["Trainer", "NPC", "step"] # Events MUST contain one of these strings in order to produce step sounds.
#=================================================================================
# Enter in sounds for each terrain tag
# Goes from 0-15 for base Pokémon Essentials. Terrain Tag 1 won't be used as it is not used for normal walking space.
# Each terrain type is in the array below.
#
# You can specify the sound file, the volume, and pitch of the file.
# Tag[2] = ["Filename",volume,pitch]
# Filename - Replace with the name of the file that you want to use
# Volume - 0-100; higher is louder
# Pitch - 50-150; lower is deeper
# You can repeat the above three as many times as desired to make use of the Round Robin code.
# If volume and pitch are not specified they will default to 100 for both.
# OGG files seem to throw an error. Working on figuring out why.
#=================================================================================
Tag[0] = ["SE_STEPROCK",100,100,"SE_STEPROCK",100,110] # Nothing
Tag[2] = ["SE_STEPGRASS",100,100,"SE_STEPGRASS",100,110] # Grass
Tag[3] = ["SE_STEPSAND",100,100,"SE_STEPSAND",100,110] # Sand
Tag[4] = ["SE_STEPROCK",100,100,"SE_STEPROCK",100,110] # Rock
Tag[5] = [] # Deep Water
Tag[6] = [] # Still Water
Tag[7] = [] # Water
Tag[8] = [] # Waterfall
Tag[9] = [] # Waterrfal Crest
Tag[10] = [] # Tall Grass
Tag[11] = [] # Underwater Grass
Tag[12] = [] # Ice
Tag[13] = [] # Neutral
Tag[14] = [] # Sooty Grass
Tag[15] = [] # Bridge
# With tilesets, you can set specific sounds for each tileset so you don't
# have the same sounds everywhere. Add a new line and put
# Tileset[tileset id] = []
# Then for each terrain tag add
# Tileset[tileset id][terrain id] = "sound file"
# If a sound doesn't exist for a tileset, it will play the default sound,
# and if a default doesn't exist, no sound is played at all.
end
#=================================================================================
# Game Map
#=================================================================================
class Game_Map
  attr_accessor :map
end
#=================================================================================
# Round Robin (Random step sound)
#=================================================================================
def rr # laziest def on the planet
	@rr = 0
end
#=================================================================================
# Event that triggers the sound
#=================================================================================
EventHandlers.add(:on_step_taken, :terrain_step_sounds_player, proc { |event|
	if $scene.is_a?(Scene_Map) && event==$game_player && !$PokemonGlobal.bicycle
		step_sound = PETS::Tag[$game_map.terrain_tag(event.x,event.y).id_number] #.id_number gets the terrain tag's number instead of a string.
		if PETS::Tileset[$game_map.map.tileset_id] != nil # Prevents crashing
			unless PETS::Tileset[$game_map.map.tileset_id][$game_map.terrain_tag(event.x,event.y).id_number] == nil
				step_sound = PETS::Tileset[$game_map.map.tileset_id][$game_map.terrain_tag(event.x,event.y).id_number]
			end
		end
		if @rr==0 # Do random step sounds
			sound = step_sound[0]
			volume = step_sound[1]
			pitch = step_sound[2] # These numbers refer to the Tags above. Like so: Tag[0] = [0,1,2]
			pbSEPlay(sound,volume,pitch)
			@rr = 1 if self
		else # if rr==1 # Increase Round Robin repetitions
			sound = step_sound[3]
			volume = step_sound[4]
			pitch = step_sound[5] # Following with the above, you can tack on as many sounds as you like: Tag[0] = [0,1,2,3,4,5]
			pbSEPlay(sound,volume,pitch)
			@rr = 0 if self # Set to 2 if you add more RR repetitions
		end
  end
})
#=================================================================================
# For non-player events, trigger the sound as well
#=================================================================================
def name # Code won't work without this
	name = ""
end

EventHandlers.add(:on_step_taken, :terrain_step_sounds_non_player, proc { |event|
	if $scene.is_a?(Scene_Map) && PETS::StepEnabled.any?{|e| event.name[/#{e}/i]} # Checks the event name for requisite strings. If strings are not present, do nothing
		step_sound = PETS::Tag[$game_map.terrain_tag(event.x,event.y).id_number]
		if PETS::Tileset[$game_map.map.tileset_id] != nil
			unless PETS::Tileset[$game_map.map.tileset_id][$game_map.terrain_tag(event.x,event.y).id_number] == nil
				step_sound = PETS::Tileset[$game_map.map.tileset_id][$game_map.terrain_tag(event.x,event.y).id_number]
			end
		end
		if @rr==0 # Remember that any changes you make here should be duped onto the player's step code too. HOWEVER, you can use this seperated code to give NPCs quieter footsteps.
			sound = step_sound[0]
			volume = step_sound[1]
			pitch = step_sound[2]
			pbSEPlay(sound,volume,pitch)
			@rr = 1 if self
		else
			sound = step_sound[3]
			volume = step_sound[4]
			pitch = step_sound[5]
			pbSEPlay(sound,volume,pitch)
			@rr = 0 if self
		end
  end
})
I just replaced the Events.onStepTakenFieldMovement for EventHandlers.add(:on_step_taken . I also did a check ar @@rr (if self) since it gaves me error even in v19.1
 
Back
Top