[XP] Terrain Step Sound

Started by G_G, April 26, 2011, 08:42:09 pm

Previous topic - Next topic

ForeverZer0

Place this below G_G's script.

class Game_Map
 
 SOUND_SWITCH_ID = 1
 
 alias toggle_sound terrain_sound
 def terrain_sound
   if $game_switches[SOUND_SWITCH_ID]
     toggle_sound
   end
 end
end


Set the ID of the switch for controlling the script. When the switch is false, the script is "off".
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Vexus

Current Project/s:

Stray

February 12, 2013, 09:30:51 pm #42 Last Edit: March 07, 2013, 11:46:13 am by Stray
Thanks for giving this script. I think the ABS correcting from page 2 is important to mention it on the page 1, because many people want to use both I guess.

Is there a chance to have a second waiting time/rate between steps for Blizz-ABS-running?
I'm very grateful to you all for your great help.

Stray

I'm very grateful to you all for your great help.

Zexion

June 26, 2015, 04:30:58 pm #44 Last Edit: July 27, 2015, 02:33:25 am by Zexion
So I use this in my project and I needed to add a few things to get the effects i wanted. I figured I'd post this here. It works exactly as the original but with a few extra features.
Spoiler: ShowHide
#===============================================================================
# Terrain Step Sound + Events
# Version 1.3
# Author game_guy
# New Features by Zexion
#-------------------------------------------------------------------------------
# Intro:
# Create nice aesthetics with terrain noise. As you walk across grass or sand,
# let it play a beautiful noise to add to the atmosphere and realism of the
# game.
#
# Features:
# Specific Sound for Each Terrain
# Specific Sounds for Each Tileset
# Specify Volume and Pitch
# Specify an array of sounds for each terrain, allowing random sounds for each step
# Specify events that can play these sounds.
#
# Instructions:
# Setup the config below, its pretty self explanatory, more instructions
# with config.
#
# You can now change the sound rate in game using a script call.
# $game_map.rate = X
# X = sound rate (the lower the value, the more frequent the sounds)
#
# Add the Name_Tag ("steps" by default) to the event page name (without quotes)
# to add dynamic footstep sounds to that event.
#
# Credits:
# game_guy ~ For creating it
# Tuggernuts ~ For requesting it a long time ago
# Sase ~ For also requeseting it
# Zex - For the Event & move_speed edit
# kk20 - for listening to zex's complaints
#===============================================================================
module TSS
 # Adjust this to your liking
 Wait = 20
 Name_Tag = "steps"
 # Ignore this
 Terrains, Tilesets = [], []
 #===========================================================================
 # Enter in sounds for each terrain tag
 # Goes from 0-8. Set as nil to disable that terrain or delete the line.
 # Each terrain must now be an array. This allows you to define multiple
 # sound effects for each terrain.
 #===========================================================================
 Terrains[0] = []
 Terrains[1] = [["FS - 03 - Wood", 40, 0],["FS - 04 - Wood", 40, 0]]
 Terrains[2] = ['FS - 05 - Metal']
 Terrains[3] = ['FS - 07 - Hollow Metal']
 Terrains[4] = [["FS - 09 - Concrete", 40, 0]]
 Terrains[5] = [["FS - 11 - Dirt", 40, 0],["FS - 11 - Dirt", 40, 0]]
 Terrains[6] = [["FS - 13 - Grass", 40, 0], ["FS - 14 - Grass", 40, 0]]
 #===========================================================================
 # If you would like to specifiy a volume and pitch, simply set the
 # terrain as an array.
 # Terrains[7] = [["sound", volume, pitch]]
 # Just set it as a string if you would like the volume to be at 100 and
 # pitch at 0.
 # This also applies for tilesets below.
 # You can also define multiple sound effects with pitch and volume.
 #===========================================================================
 Terrains[7] = [["FS - 01 - Water", 50, 0],["FS - 02 - Water", 50, 0]]
 #===========================================================================
 # With tilesets, you can set specific sounds for each tileset so you don't
 # have the same sounds. Add a new line and put
 # Tilesets[tileset id] = []
 # Then for each terrain put
 # Tilesets[tileset id][terrain id] = ["sound file", "sound file2", etc...]
 # If a sound doesn't exist for a tileset, it will play a default sound,
 # if a default doesn't exist, no sound at all.
 #===========================================================================
end
#-------------------------------------------------------------------------------
# Game_Map
#-------------------------------------------------------------------------------
class Game_Map
 attr_accessor :map          # make public
end
#-------------------------------------------------------------------------------
# Game_Character
#-------------------------------------------------------------------------------
# Adds Gameus's terrain_sound method to game_character.
#-------------------------------------------------------------------------------
class Game_Character
 attr_accessor :move_speed   # make public
 #-----------------------------------------------------------------------------
 # Initialize ss_index
 #-----------------------------------------------------------------------------
 alias g_c_sfe_init initialize
 def initialize
   g_c_sfe_init
   @ss_index = 0
   @timer = 0
   @tss_speed = @move_speed
   set_tss_offset
 end
 #-----------------------------------------------------------------------------
 # Updates the timer when needed
 #-----------------------------------------------------------------------------
 alias g_c_sfe_update update
 def update
   g_c_sfe_update
   @timer -= 1 if @timer > 0
   if @tss_speed != self.move_speed
     set_tss_offset
   end
 end
 #-----------------------------------------------------------------------------
 # Sets the sound offset
 #-----------------------------------------------------------------------------
 def set_tss_offset    
   # Timer offset by movespeed
   case self.move_speed
   when 0..2
     @tss_offset = TSS::Wait + self.move_speed
   when 3
     @tss_offset = TSS::Wait
   else
     @tss_offset = TSS::Wait - self.move_speed * 2
   end
 end
 #-----------------------------------------------------------------------------
 # Returns the array to be used later
 #-----------------------------------------------------------------------------
 def terrain_sound
   if TSS::Tilesets[$game_map.map.tileset_id] != nil
     sounds = TSS::Tilesets[$game_map.map.tileset_id][self.terrain_tag]
   else
     sounds = TSS::Terrains[self.terrain_tag]
   end
   return nil if sounds == nil || !sounds.is_a?(Array) || sounds.size < 1
   index_max = sounds.size - 1
   @ss_index = (@ss_index < index_max) ? (@ss_index + 1) : 0
   sound = sounds[@ss_index]
   if sound.is_a?(Array)
     return [sound[0], sound[1], sound[2]]
   else
     return [sound, 100, 0]
   end
 end
end
#-------------------------------------------------------------------------------
# Game_Player
#-------------------------------------------------------------------------------
Tss_Parent = $BlizzABS ? (Map_Actor) : (Game_Character)
class Game_Player < Tss_Parent
 #-----------------------------------------------------------------------------
 # Adds step sounds to the player
 #-----------------------------------------------------------------------------
 def update_move
   # Make sure this is the player
   if self != $game_event && @timer == 0
     # Play the sound effect
     terrain = self.terrain_sound
     if terrain != nil
       vol = terrain[1]
       pit = terrain[2]
       son = terrain[0]
       Audio.se_play('Audio/SE/' + son, vol, pit)
     end
     # Set timer
     @timer = @tss_offset
   end
   # Call original code
   super
 end
end
#-------------------------------------------------------------------------------
# Game_Event
#-------------------------------------------------------------------------------
class Game_Event < Game_Character
 #-----------------------------------------------------------------------------
 # Set the variable for checking if the event should make a sound
 #-----------------------------------------------------------------------------
 alias g_e_sfe_init initialize
 def initialize(map_id, event)
   g_e_sfe_init(map_id, event)
   @tss = self.name.include?(TSS::Name_Tag) ? true : false
 end
  #--------------------------------------------------------------------------
  # * Returns the event's name
  #--------------------------------------------------------------------------
  def name
    return @event.name
  end
 #-----------------------------------------------------------------------------
 # Returns the distance of this event from the player
 #-----------------------------------------------------------------------------
 def range?
   if $BlizzABS && BlizzABS::Config::PIXEL_MOVEMENT_RATE == 1
     player_x = $game_player.x / 2 # Adjusted for 1.0 pixel movement rate
     player_y = $game_player.y / 2 # Adjusted for 1.0 pixel movement rate
   else
     player_x = $game_player.x
     player_y = $game_player.y
   end
   radius = (Math.hypot((self.x - player_x), (self.y - player_y))).abs.floor
   return (radius)
 end
 #-----------------------------------------------------------------------------
 # Adds step sounds to the event with dynamic volume
 #-----------------------------------------------------------------------------
 def update_move
   # Check if the event should play a sound
   if @tss
     # Make sure it's an event
     if self != $game_player
       # Check if the event is anywhere near the player
       if range? <= 6 && @timer == 0
         # The amount to subtract from the normal volume
         sub_vol = 4 * range?
         # Play the sound effect
         terrain = self.terrain_sound
           if terrain != nil
             vol = terrain[1]
             pit = terrain[2]
             son = terrain[0]
             # Dynamic sound edit
             vol = vol - sub_vol
             vol = 0 if vol < 0
             Audio.se_play('Audio/SE/' + son, vol, pit)
           end
           # Set timer
           @timer = @tss_offset
         end
       end
     end
     # Call original code
     super
   end
end

New Features:

  • Rate between sounds is now tied with move_speed

  • Events can now have step sounds aswell. These are dynamic (get louder as they approach the player)


To make an event have step sounds add "steps" to the event page name.
The whole system is now compatible with blizz-abs, but only with a pixel move rate of 0 or 1. (Couldn't figure out the player coords at the higher values)

danleon950410

Quote from: Zexion on June 26, 2015, 04:30:58 pm
So I use this in my project and I needed to add a few things to get the effects i wanted. I figured I'd post this here. It works exactly as the original but with a few extra features.
Spoiler: ShowHide
#===============================================================================
# Terrain Step Sound + Events
# Version 1.3
# Author game_guy
# New Features by Zexion
#-------------------------------------------------------------------------------
# Intro:
# Create nice aesthetics with terrain noise. As you walk across grass or sand,
# let it play a beautiful noise to add to the atmosphere and realism of the
# game.
#
# Features:
# Specific Sound for Each Terrain
# Specific Sounds for Each Tileset
# Specify Volume and Pitch
# Specify an array of sounds for each terrain, allowing random sounds for each step
# Specify events that can play these sounds.
#
# Instructions:
# Setup the config below, its pretty self explanatory, more instructions
# with config.
#
# You can now change the sound rate in game using a script call.
# $game_map.rate = X
# X = sound rate (the lower the value, the more frequent the sounds)
#
# Add the Name_Tag ("steps" by default) to the event page name (without quotes)
# to add dynamic footstep sounds to that event.
#
# Credits:
# game_guy ~ For creating it
# Tuggernuts ~ For requesting it a long time ago
# Sase ~ For also requeseting it
# Zex - For the Event & move_speed edit
# kk20 - for listening to zex's complaints
#===============================================================================
module TSS
  # Adjust this to your liking
  Wait = 20
  Name_Tag = "steps"
  # Ignore this
  Terrains, Tilesets = [], []
  #===========================================================================
  # Enter in sounds for each terrain tag
  # Goes from 0-8. Set as nil to disable that terrain or delete the line.
  # Each terrain must now be an array. This allows you to define multiple
  # sound effects for each terrain.
  #===========================================================================
  Terrains[0] = []
  Terrains[1] = [["FS - 03 - Wood", 40, 0],["FS - 04 - Wood", 40, 0]]
  Terrains[2] = ['FS - 05 - Metal']
  Terrains[3] = ['FS - 07 - Hollow Metal']
  Terrains[4] = [["FS - 09 - Concrete", 40, 0]]
  Terrains[5] = [["FS - 11 - Dirt", 40, 0],["FS - 11 - Dirt", 40, 0]]
  Terrains[6] = [["FS - 13 - Grass", 40, 0], ["FS - 14 - Grass", 40, 0]]
  #===========================================================================
  # If you would like to specifiy a volume and pitch, simply set the
  # terrain as an array.
  # Terrains[7] = [["sound", volume, pitch]]
  # Just set it as a string if you would like the volume to be at 100 and
  # pitch at 0.
  # This also applies for tilesets below.
  # You can also define multiple sound effects with pitch and volume.
  #===========================================================================
  Terrains[7] = [["FS - 01 - Water", 50, 0],["FS - 02 - Water", 50, 0]]
  #===========================================================================
  # With tilesets, you can set specific sounds for each tileset so you don't
  # have the same sounds. Add a new line and put
  # Tilesets[tileset id] = []
  # Then for each terrain put
  # Tilesets[tileset id][terrain id] = ["sound file", "sound file2", etc...]
  # If a sound doesn't exist for a tileset, it will play a default sound,
  # if a default doesn't exist, no sound at all.
  #===========================================================================
end
#-------------------------------------------------------------------------------
# Game_Map
#-------------------------------------------------------------------------------
class Game_Map
  attr_accessor :map          # make public
end
#-------------------------------------------------------------------------------
# Game_Character
#-------------------------------------------------------------------------------
# Adds Gameus's terrain_sound method to game_character.
#-------------------------------------------------------------------------------
class Game_Character
  attr_accessor :move_speed   # make public
  #-----------------------------------------------------------------------------
  # Initialize ss_index
  #-----------------------------------------------------------------------------
  alias g_c_sfe_init initialize
  def initialize
    g_c_sfe_init
    @ss_index = 0
    @timer = 0
    @tss_speed = @move_speed
    set_tss_offset
  end
  #-----------------------------------------------------------------------------
  # Updates the timer when needed
  #-----------------------------------------------------------------------------
  alias g_c_sfe_update update
  def update
    g_c_sfe_update
    @timer -= 1 if @timer > 0
    if @tss_speed != self.move_speed
      set_tss_offset
    end
  end
  #-----------------------------------------------------------------------------
  # Sets the sound offset
  #-----------------------------------------------------------------------------
  def set_tss_offset   
    # Timer offset by movespeed
    case self.move_speed
    when 0..2
      @tss_offset = TSS::Wait + self.move_speed
    when 3
      @tss_offset = TSS::Wait
    else
      @tss_offset = TSS::Wait - self.move_speed * 2
    end
  end
  #-----------------------------------------------------------------------------
  # Returns the array to be used later
  #-----------------------------------------------------------------------------
  def terrain_sound
    if TSS::Tilesets[$game_map.map.tileset_id] != nil
      sounds = TSS::Tilesets[$game_map.map.tileset_id][self.terrain_tag]
    else
      sounds = TSS::Terrains[self.terrain_tag]
    end
    return nil if sounds == nil || !sounds.is_a?(Array) || sounds.size < 1
    index_max = sounds.size - 1
    @ss_index = (@ss_index < index_max) ? (@ss_index + 1) : 0
    sound = sounds[@ss_index]
    if sound.is_a?(Array)
      return [sound[0], sound[1], sound[2]]
    else
      return [sound, 100, 0]
    end
  end
end
#-------------------------------------------------------------------------------
# Game_Player
#-------------------------------------------------------------------------------
Tss_Parent = $BlizzABS ? (Map_Actor) : (Game_Character)
class Game_Player < Tss_Parent
  #-----------------------------------------------------------------------------
  # Adds step sounds to the player
  #-----------------------------------------------------------------------------
  def update_move
    # Make sure this is the player
    if self != $game_event && @timer == 0
      # Play the sound effect
      terrain = self.terrain_sound
      if terrain != nil
        vol = terrain[1]
        pit = terrain[2]
        son = terrain[0]
        Audio.se_play('Audio/SE/' + son, vol, pit)
      end
      # Set timer
      @timer = @tss_offset
    end
    # Call original code
    super
  end
end
#-------------------------------------------------------------------------------
# Game_Event
#-------------------------------------------------------------------------------
class Game_Event < Game_Character
  #-----------------------------------------------------------------------------
  # Set the variable for checking if the event should make a sound
  #-----------------------------------------------------------------------------
  alias g_e_sfe_init initialize
  def initialize(map_id, event)
    g_e_sfe_init(map_id, event)
    @tss = self.name.include?(TSS::Name_Tag) ? true : false
  end
  #--------------------------------------------------------------------------
  # * Returns the event's name
  #--------------------------------------------------------------------------
  def name
    return @event.name
  end
  #-----------------------------------------------------------------------------
  # Returns the distance of this event from the player
  #-----------------------------------------------------------------------------
  def range?
    if $BlizzABS && BlizzABS::Config::PIXEL_MOVEMENT_RATE == 1
      player_x = $game_player.x / 2 # Adjusted for 1.0 pixel movement rate
      player_y = $game_player.y / 2 # Adjusted for 1.0 pixel movement rate
    else
      player_x = $game_player.x
      player_y = $game_player.y
    end
    radius = (Math.hypot((self.x - player_x), (self.y - player_y))).abs.floor
    return (radius)
  end
  #-----------------------------------------------------------------------------
  # Adds step sounds to the event with dynamic volume
  #-----------------------------------------------------------------------------
  def update_move
    # Check if the event should play a sound
    if @tss
      # Make sure it's an event
      if self != $game_player
        # Check if the event is anywhere near the player
        if range? <= 6 && @timer == 0
          # The amount to subtract from the normal volume
          sub_vol = 4 * range?
          # Play the sound effect
          terrain = self.terrain_sound
            if terrain != nil
              vol = terrain[1]
              pit = terrain[2]
              son = terrain[0]
              # Dynamic sound edit
              vol = vol - sub_vol
              vol = 0 if vol < 0
              Audio.se_play('Audio/SE/' + son, vol, pit)
            end
            # Set timer
            @timer = @tss_offset
          end
        end
      end
      # Call original code
      super
    end
end

New Features:

  • Rate between sounds is now tied with move_speed

  • Events can now have step sounds aswell. These are dynamic (get louder as they approach the player)


To make an event have step sounds add "steps" to the event page name.
The whole system is now compatible with blizz-abs, but only with a pixel move rate of 0 or 1. (Couldn't figure out the player coords at the higher values)


Thank you so much, Zexion! It's an amazing modification to an amazing script and it sure brings ambientation to a deeper level!
Only flaw i've seen so far is that after using the running and sneaking functions of the Blizz ABS System the rate between sounds gets stuck and won't return to walking/normal speed rate. Sure it changes between the running and sneaking rates flawlessly, but when you release the key to just walk at normal speed there's no change, you're stuck in the previous rate.
I've been trying to solve it for a week but i can't seem to figure it out.

KK20

Find this part in the script and replace it:

  #-----------------------------------------------------------------------------
  # Updates the timer when needed
  #-----------------------------------------------------------------------------
  alias g_c_sfe_update update
  def update
    g_c_sfe_update
    @timer -= 1 if @timer > 0
    if @tss_speed != self.move_speed
      @tss_speed = self.move_speed
      set_tss_offset
    end
  end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

danleon950410

Quote from: KK20 on August 27, 2016, 08:32:51 pm
Find this part in the script and replace it:

  #-----------------------------------------------------------------------------
  # Updates the timer when needed
  #-----------------------------------------------------------------------------
  alias g_c_sfe_update update
  def update
    g_c_sfe_update
    @timer -= 1 if @timer > 0
    if @tss_speed != self.move_speed
      @tss_speed = self.move_speed
      set_tss_offset
    end
  end


I can't thank you enough, it works flawlessly!!! You saved my life!
Thank you, thank you very much! This makes me extremely happy!
You have my infinite gratitude

AmareusRedink

I have a problem with the Tileset part, always makes me the error undefined method, ¿What happen?

KK20

Can you provide the full message of the error? And your configuration

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AmareusRedink

September 08, 2019, 01:13:59 am #50 Last Edit: September 08, 2019, 02:06:26 am by KK20 Reason: Added code tag and removed double post
#===============================================================================
# Terrain Step Sound
# Version 1.2
# Author game_guy
#-------------------------------------------------------------------------------
# Intro:
# Create nice aesthetics with terrain noise. As you walk across grass or sand,
# let it play a beautiful noise to add to the atmosphere and realism of the
# game.
#
# Features:
# Specific Sound for Each Terrain
# Specific Sounds for Each Tileset
# Specify Volume and Pitch
# Specify an array of sounds for each terrain, allowing random sounds for each step
#
# Instructions:
# Setup the config below, its pretty self explanatory, more instructions
# with config.
#
# You can now change the sound rate in game using a script call.
# $game_map.rate = X
# X = sound rate (the lower the value, the more frequent the sounds)
#
# Credits:
# game_guy ~ For creating it
# Tuggernuts ~ For requesting it a long time ago
# Sase ~ For also requeseting it
#===============================================================================
module TSS
  # In Frames Recommended 5-10
  Wait = 10
  # Ignore the next 2 lines
  Terrains = []
  Tilesets = []
  #===========================================================================
  # Enter in sounds for each terrain tag
  # Goes from 0-8. Set as nil to disable that terrain or delete the line.
  # Each terrain must now be an array. This allows you to define multiple
  # sound effects for each terrain.
  #===========================================================================
  Terrains
[li]= ['001-System01', '002-System02', '003-System03'][/li]
  Terrains[1] = ['TalkAngryBirds']
  Terrains[2] = ['fs_grass03']
  Terrains[3] = ['fs_stone_hoof2']
  Terrains[4] = ['as_na_grassmove2']
  Terrains[5] = ['fs_water_hard1']
  Terrains[6] = ['fs_dirt_hard1']
  #===========================================================================
  # If you would like to specifiy a volume and pitch, simply set the
  # terrain as an array.
  # Terrains[7] = [["sound", volume, pitch]]
  # Just set it as a string if you would like the volume to be at 100 and
  # pitch at 0.
  # This also applies for tilesets below.
  # You can also define multiple sound effects with pitch and volume.
  #===========================================================================
  Terrains[1] = ["TalkAngryBirds", 100, 0]
  #===========================================================================
  # With tilesets, you can set specific sounds for each tileset so you don't
  # have the same sounds. Add a new line and put
  # Tilesets[tileset id] = []
  # Then for each terrain put
  # Tilesets[tileset id][terrain id] = ["sound file", "sound file2", etc...]
  # If a sound doesn't exist for a tileset, it will play a default sound,
  # if a default doesn't exist, no sound at all.
  #===========================================================================
  Tilesets[1] = []
  Tilesets[1]
[li]= "Floor"[/li]
  Tilesets[1][1] = ["Floor", 50, 100]
  #
  Tilesets[1]
[li]= "TalkAngryBirds"[/li]
  Tilesets[52][1] = ["TalkAngryBirds", 100, 0]
end
class Game_Map
 
  attr_accessor :rate
 
  alias gg_init_terrain_sounds_map_lat initialize
  def initialize
    @rate = TSS::Wait
    return gg_init_terrain_sounds_map_lat
  end
 
  def terrain_sound
    if TSS::Tilesets[@map.tileset_id] != nil
      sounds = TSS::Tilesets[@map.tileset_id][$game_player.terrain_tag]
    else
      sounds = TSS::Terrains[$game_player.terrain_tag]
    end
    return nil if sounds == nil || !sounds.is_a?(Array) || sounds.size < 1
    sound = sounds[rand(sounds.size)]
    if sound.is_a?(Array)
      return [sound
[li], sound[1], sound[2]][/li]
    else
      return [sound, 100, 0]
    end
  end
 
end

class Game_Player < Game_Character
 
  def update_move
    @timer = $game_map.rate if @timer == nil
    @timer -= 1
    if @timer < 1
      terrain = $game_map.terrain_sound
      if terrain != nil
        vol = terrain[1]
        pit = terrain[2]
        son = terrain        Audio.se_play('Audio/SE/' + son, vol, pit)
      end
      @timer = $game_map.rate
    end
    super
  end
 
end
And the error says: Script "floorstepsxd" line 73:NoMethodError ocurred.

                   undefined method '[]=' for nil:NilClass

KK20

Your configuration is wrong clearly. Pointing out this in particular:
  Tilesets[1] = []
  Tilesets[1][0] = "Floor"
  Tilesets[1][1] = ["Floor", 50, 100]
  #
  Tilesets[1][0] = "TalkAngryBirds"
  Tilesets[52][1] = ["TalkAngryBirds", 100, 0]
So the first set is almost correct: You just need to put "Floor" in an array like the example showed.
Tilesets[1][0] = ["Floor"]

The "TalkAngryBirds" section is completely wrong. First off, you're overwriting the value stored in Tilesets[1][0], which originally contained "Floor", to "TalkAngryBirds". Not to mention, you need to put it in an array too.

Secondly, you forgot to initialize Tilesets[52] to an empty array like the first set did.
Tilesets[52] = []
That is the reason why you are getting the error.

From the looks of things, I believe you don't really know what you're doing. Please explain and I can point you to the right direction in configuring it properly.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AmareusRedink

September 08, 2019, 12:45:59 pm #52 Last Edit: September 08, 2019, 12:50:22 pm by AmareusRedink
In fact, I don't even know what I do, I even say that I lasted almost all day on this. ejem, I already "fix" and I reorganized it, and the game has already started, but it happens that the sound that is supposed to be heard should not be heard, ¿I missed something?

Tilesets[52] = []
  Tilesets[52][0] = ["TalkAngryBirds"]
  Tilesets[52][1] = ["TalkAngryBirds", 100, 0]

KK20

I also forgot to mention in the previous post that if you specify a volume and pitch, you need to wrap those around an array too. Otherwise you'll get some Fixnum conversion error.
Tilesets[1][1] = [["Floor", 50, 100]]

Tilesets[52][1] = [["TalkAngryBirds", 100, 0]]

So you're saying that you have made an entry in your Tileset Database with an ID of 52, changed the Terrain Tag for some of those tiles to either 0 or 1, and there is a sound effect in your Audio/SE folder named 'TalkAngryBirds'?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AmareusRedink

The 1 and 0 that I put is just a test, they are not the same sound to see which one works, I regret my ignorance, ¿but is it necessary to put the "Floor" or is a example?

KK20

I thought "Floor" was your doing :O.o: . In the original script, it's "Sound":
  Tilesets[2] = []
  Tilesets[2][0] = ["Sound"]
  Tilesets[2][1] = [["sound", 75, 50]]
If you're not using "Floor" then remove it.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AmareusRedink

 sorry for doing this hard with this subject, but this is how I have the configuration now:

 Terrains[0] = ['001-System01', '002-System02', '003-System03']
  Terrains[1] = ['TalkAngryBirds']
  Terrains[2] = ['fs_grass03']
  Terrains[3] = ['fs_stone_hoof2']
  Terrains[4] = ['as_na_grassmove2']
  Terrains[5] = ['fs_water_hard1']
  Terrains[6] = ['fs_dirt_hard1']
  #===========================================================================
  # If you would like to specifiy a volume and pitch, simply set the
  # terrain as an array.
  # Terrains[7] = [["sound", volume, pitch]]
  # Just set it as a string if you would like the volume to be at 100 and
  # pitch at 0.
  # This also applies for tilesets below.
  # You can also define multiple sound effects with pitch and volume.
  #===========================================================================
  Terrains[1] = [['TalkAngryBirds', 50, 100]]
  #===========================================================================
  # With tilesets, you can set specific sounds for each tileset so you don't
  # have the same sounds. Add a new line and put
  # Tilesets[tileset id] = []
  # Then for each terrain put
  # Tilesets[tileset id][terrain id] = ["sound file", "sound file2", etc...]
  # If a sound doesn't exist for a tileset, it will play a default sound,
  # if a default doesn't exist, no sound at all.
  #===========================================================================
  #
  Tilesets[52] = []
  Tilesets[52][1] = [["TalkAngryBirds", 50, 100]]
  #
the problem that does not start has been resolved, thanks, but it happens that the test sound I try to make is not heard sorry, but this is the first time I handle this type of scripts (I am a Beginner) :wacko:

KK20

Please use code tags when pasting large blocks of code. [ code ] and [ /code ] without the spaces

At this point I'd need you to upload a demo of your project. This doesn't problem does not appear to be script related.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

AmareusRedink

September 08, 2019, 06:09:53 pm #58 Last Edit: September 08, 2019, 07:36:46 pm by AmareusRedink

AmareusRedink

and the end the problem was one of the scripts I used, Bruh.