Help - Search - Members - Calendar
Full Version: Simple Footsteps Script
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS2-Submissions
miget man12
Simple Footsteps Script v2.0
By Miget man12, DerVVulfman(for Tile ID getting formula), Modern Algebra and Yanfly(for improvement help and ideas)
5/31/2009 (MM/DD/YY)
Updates:
May 28, 2009: cleaner code
May 31, 2009: Vastly Improved script, better coding
July 21, 2009: Events get their own sound effects


Introduction

I made this because I wanted to be able to use footsteps without having to use the confusing (in my opinion) configurations of DeadlyDan's Footstep's script. I also made this to have the ability to have events have footsteps, which DeadlyDan's lacks.


Features

-Turning on and off footsteps mid-game
-Events can have footsteps via comments
-Play different SEs depending on which tile ID you're standing on
-Randomized SEs for realistic effects
-Events can have unique footsteps

Script

[Show/Hide] Version 2.5

CODE
#==============================================================================
# ** Simple Footstep script
#  Version 2.5
#  Credits:
#    Creator: Miget man12, Help improving from: Modern Algebra, Yanfly, Twilight1300
#    Formula for getting Tile ID by DerVVulfman
#-----------------------------------------------------------------------------
#  I made this just so I could have a not-laggy, easy to use script. It doesn't
# really have any special features, but it works without very much lag. It is
# also being used in "The Legend of Zelda: Realm of the Gods", a Zelda
# fan-game(Hence the SE's from OoT :D) that I'm working on with Twilight1300.
#-----------------------------------------------------------------------------
# Instructions:
#  To have an event have footstep sounds, just put Comment:
# [footstep]
# To have an event or the player use footsteps:
# For The Player:
#  $game_player.footstep_se = true/false
# For an Event:
#  $game_map.events[(Event ID)].footstep_se = true/false
#  The Event ID is the ID of the event on the map you are on
# If you want an event to have a special footstep sound effect, put a comment
# like so:
#  [footstepse:SE Name]
# e.g.
#  [footstepse:OOT_LikeLike_Move]
# ***Event settings are reset when you tranfer*** (this doesn't apply to comment-
#  related settings)
#==============================================================================
$imported = {} if $imported == nil
$imported["Mm12Footsteps"] = true
module Mm12
  START_WITH_SE = true # Start out with player's footsteps enabled?
  BRIDGE_TILES = [272,273,274,275,276,277,278,279]
  CARPET_TILES = [30,38,62,218]
  DIRT_TILES = []
  GRASS_TILES = [16,19,150,204,214]
  ICE_TILES = [151,215]
  LAVA_TILES = [14,15]
  SAND_TILES = [32,35,238,244,245,252,253]
  STONE_TILES = [24,27,129,130,131,132,133,134,141,142,151,181,205,215,229,193,194,
                195,196,197,200,201,202,205,208,209,210,211,212,213,219,220,221,
                222,224,225,226,229]
  TGRASS_TILES = [20,180,228]
  WOOD_TILES = [160,161,192,216,217]
  SNOW_TILES = [40,43,179,203,227,239,246,247,254,255]
  LADDER_TILES = [516,524,540]
  BRIDGE_SE = ["OOT_Steps_Bridge1", "OOT_Steps_Bridge2"]
  CARPET_SE = ["OOT_Steps_Carpet1", "OOT_Steps_Carpet2", "OOT_Steps_Carpet3",
    "OOT_Steps_Carpet4", "OOT_Steps_Carpet5"]
  DIRT_SE = ["OOT_Steps_Dirt1", "OOT_Steps_Dirt2", "OOT_Steps_Dirt3",
    "OOT_Steps_Dirt4", "OOT_Steps_Dirt5", "OOT_Steps_Dirt6"]
  GRASS_SE = ["OOT_Steps_Grass1", "OOT_Steps_Grass2", "OOT_Steps_Grass3",
    "OOT_Steps_Grass4", "OOT_Steps_Grass5", "OOT_Steps_Grass6",
    "OOT_Steps_Grass7"]
  ICE_SE = ["OOT_Steps_Ice1", "OOT_Steps_Ice2"]
  LAVA_SE = ["OOT_Steps_Lava1", "OOT_Steps_Lava2", "OOT_Steps_Lava3"]
  SAND_SE = ["OOT_Steps_Sand1", "OOT_Steps_Sand2", "OOT_Steps_Sand3",
    "OOT_Steps_Sand4", "OOT_Steps_Sand5"]
  STONE_SE = ["OOT_Steps_Stone1", "OOT_Steps_Stone2", "OOT_Steps_Stone3",
    "OOT_Steps_Stone4", "OOT_Steps_Stone5", "OOT_Steps_Stone6"]
  TGRASS_SE = ["OOT_Steps_TallGrass1", "OOT_Steps_TallGrass2",
    "OOT_Steps_TallGrass3", "OOT_Steps_TallGrass4"]
  WOOD_SE = ["OOT_Steps_Wood1", "OOT_Steps_Wood2", "OOT_Steps_Wood3",
    "OOT_Steps_Wood4", "OOT_Steps_Wood5"]
  SNOW_SE = ["MM_Steps_Snow1", "MM_Steps_Snow2", "MM_Steps_Snow3"]
  LADDER_SE = ["TP_LadderStep1", "TP_LadderStep2", "TP_LadderStep3"]
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
  attr_accessor :footstep_se
end

class Game_Player
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias ftstp_gp_initialize initialize
  alias ftstp_gp_increase_steps increase_steps
  def initialize
    @se_ok = true
    @footstep_se = true
    ftstp_gp_initialize
  end
  def increase_steps
    ftstp_gp_increase_steps
    footstep_se
  end
  #---------------------------------------------------------------------------
  # * Footstep SE
  #---------------------------------------------------------------------------
  def footstep_se
    if @se_ok == true
      @num = 0
      play_se
      @se_ok = false
    elsif @se_ok == false
      if $game_player.dash?
        @se_ok = true
      else
        @num = 1
        play_se
        @se_ok = true
      end
      return
    end
  end
  def play_se
    unless $game_map.ship.driving or $game_map.boat.driving or $game_map.airship.driving or !@footstep_se
      if Mm12::LADDER_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::LADDER_SE[rand(Mm12::LADDER_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0])) or Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 1])) or Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SNOW_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SNOW_SE[rand(Mm12::SNOW_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      end
    end
    if $imported["Mm12Swimming"]
      #p "so this works..."
      if $game_map.ship.driving or $game_map.boat.driving
        #p "Odd..."
        RPG::SE.new(Mm12::SWIM_SE[@num], 100, 100).play
      end
    end
  end
end
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
  alias ftstp_setup setup
  alias ftstp_ge_increase_steps increase_steps
  #--------------------------------------------------------------------------
  # * Event page setup
  #--------------------------------------------------------------------------
  def setup(new_page)
    ftstp_setup(new_page)
    if !@list.nil?
      for i in 0...@list.size - 1
        next if @list[i].code != 108
        if @list[i].parameters[0].include?("[footstepse:")
          cmd = @list[i].parameters[0].split(':')
          @custom_se_name=cmd.last if cmd.size>1 && /footstepse/===cmd.first
          @custom_se_name[-1, 1] = ""
          #list = @list[i].parameters[0].scan(/\[footstepse:([0-9]|[a-z]|[A-Z])+\]/)
          #p $1
          @footstep_se_custom = true
          #$1
        elsif @list[i].parameters[0].include?("[footstep]")
          #p "should work, right?"
          @footstep_se = true
        end
      end
    end
  end
  def footstep_se
    get_dist_vol
    play_se
  end
  def play_se
    if @footstep_se_custom
      RPG::SE.new(@custom_se_name, rand(30)+80, rand(30)+80).play
    elsif @footstep_se
      if Mm12::LADDER_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::LADDER_SE[rand(Mm12::LADDER_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0])) or Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SNOW_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SNOW_SE[rand(Mm12::SNOW_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      end
    end
  end
  def get_dist_vol
    @x_dist = $game_player.x - @x
    @y_dist = $game_player.y - @y
    @x_dist = @x_dist.abs
    @y_dist = @y_dist.abs
    @ttl_dist = Math.sqrt(@x_dist * @x_dist + @y_dist * @y_dist ).round
    #p @ttl_dist
    @dist_vol = 60
    @dist_vol2 = 20
    @dist_vol -= @ttl_dist*3
    @dist_vol += rand(30)
    if @dist_vol < 0
      @dist_vol = 0
    end
    #p @dist_vol
    @dist_vol2 -= @ttl_dist*2
    @dist_vol2 += rand(30)
    if @dist_vol2 < 0
      @dist_vol2 = 0
    end
    #p "Distance Volume: "+@dist_vol1.to_s
  end
  def increase_steps
    ftstp_ge_increase_steps
    footstep_se
  end
end
class Game_Map
  #--------------------------------------------------------------------------
  # * DerVVulfman's method L get_tile_index
  #--------------------------------------------------------------------------
  def tile_index(tile_id)
    case tile_id
      # Multi-tiled ids in Tileset 'A'
      when 2048..8191; return ((tile_id - 2000) / 48) - 1
      # Individual tile ids in Tileset 'A'
      when 1536..1663; return(tile_id - 1408)
      # Tilesets 'B' to 'E'
      when 0..1023; return (tile_id + 256)
    end
    return 0
  end
end


Also get the sound effects here(courtesy of DeadlyDan)
Legend of Zelda sound effects by HelpTheWretched

Customization

[Show/Hide] customization

QUOTE
CODE
module Mm12
  START_WITH_SE = true # Start out with player's footsteps enabled?
  BRIDGE_TILES = [272,273,274,275,276,277,278,279]
  CARPET_TILES = [30,38,62,218]
  DIRT_TILES = []
  GRASS_TILES = [16,19,150,204,214]
  ICE_TILES = [151,215]
  LAVA_TILES = [14,15]
  SAND_TILES = [32,35,238,244,245,252,253]
  STONE_TILES = [24,27,129,130,131,132,133,134,141,142,151,181,205,215,229,193,194,
                195,196,197,200,201,202,205,208,209,210,211,212,213,219,220,221,
                222,224,225,226,229]
  TGRASS_TILES = [20,180,228]
  WOOD_TILES = [160,161,192,216,217]
  SNOW_TILES = [40,43,179,203,227,239,246,247,254,255]
  LADDER_TILES = [516,524,540]
  BRIDGE_SE = ["OOT_Steps_Bridge1", "OOT_Steps_Bridge2"]
  CARPET_SE = ["OOT_Steps_Carpet1", "OOT_Steps_Carpet2", "OOT_Steps_Carpet3",
    "OOT_Steps_Carpet4", "OOT_Steps_Carpet5"]
  DIRT_SE = ["OOT_Steps_Dirt1", "OOT_Steps_Dirt2", "OOT_Steps_Dirt3",
    "OOT_Steps_Dirt4", "OOT_Steps_Dirt5", "OOT_Steps_Dirt6"]
  GRASS_SE = ["OOT_Steps_Grass1", "OOT_Steps_Grass2", "OOT_Steps_Grass3",
    "OOT_Steps_Grass4", "OOT_Steps_Grass5", "OOT_Steps_Grass6",
    "OOT_Steps_Grass7"]
  ICE_SE = ["OOT_Steps_Ice1", "OOT_Steps_Ice2"]
  LAVA_SE = ["OOT_Steps_Lava1", "OOT_Steps_Lava2", "OOT_Steps_Lava3"]
  SAND_SE = ["OOT_Steps_Sand1", "OOT_Steps_Sand2", "OOT_Steps_Sand3",
    "OOT_Steps_Sand4", "OOT_Steps_Sand5"]
  STONE_SE = ["OOT_Steps_Stone1", "OOT_Steps_Stone2", "OOT_Steps_Stone3",
    "OOT_Steps_Stone4", "OOT_Steps_Stone5", "OOT_Steps_Stone6"]
  TGRASS_SE = ["OOT_Steps_TallGrass1", "OOT_Steps_TallGrass2",
    "OOT_Steps_TallGrass3", "OOT_Steps_TallGrass4"]
  WOOD_SE = ["OOT_Steps_Wood1", "OOT_Steps_Wood2", "OOT_Steps_Wood3",
    "OOT_Steps_Wood4", "OOT_Steps_Wood5"]
  SNOW_SE = ["MM_Steps_Snow1", "MM_Steps_Snow2", "MM_Steps_Snow3"]
  LADDER_SE = ["TP_LadderStep1", "TP_LadderStep2", "TP_LadderStep3"]

[Show/Hide] For in-game changing

QUOTE
CODE
#  To have an event have footstep sounds, just put Comment:
# [footstep]
# To have an event or the player use footsteps:
# For The Player:
#  $game_player.footstep_se = true/false
# For an Event:
#  $game_map.events[(Event ID)].footstep_se = true/false
#  The Event ID is the ID of the event on the map you are on
# If you want an event to have a special footstep sound effect, put a comment
# like so:
#  [footstepse:SE Name]
# e.g.
#  [footstepse:OOT_LikeLike_Move]
# ***Event settings are reset when you tranfer*** (this doesn't apply to comment-
#  related settings)

[Show/Hide] setting up the Tile IDs


This script has a little thing so that if you press F5 it shows you what tile ID you're on: http://www.rpgrevolution.com/forums/index....showtopic=26217
Anyway, here's some pictures:
[Show/Hide] Tileset With ID Numbers


<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] just numbers</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">
ID Number picture, you can put it on top of your tileset(take a screenshot of the tileset shown in the RMVX editor and paste this over it)


</div></div></div>

Compatibility

Over-writes:
Nothing
Aliases:
Game_Player:
*initialize
*jump
*increase steps

Game_Event
*setup

New Methods
Game_Player:
*footstep_se (plays the SE(s) for the footsteps)
*play_se
Game_Event
*footstep_se (plays the SE(s) for the footsteps on events and calculates the volume)
*get_dist_vol
*play_se
Game_Map
*tile_id (get the tile ID of a certain X and Y, by DerVVulfman)

Screenshot

No screenshots, it only makes sounds


DEMO

Demo: Very Outdated Demo attached to post... I'm not sure you really need a demo for this, just download the SEs from http://noproblo.dayjo.org/ZeldaSounds/ and place the script in the editor.


Installation

1. Place script in script editor above Main
2. Place the SE's from the .zip in the Audio/SE folder
3. Configure Tile ID
[Show/Hide] setting up the Tile IDs


This script has a little thing so that if you press F5 it shows you what tile ID you're on: http://www.rpgrevolution.com/forums/index....showtopic=26217
Anyway, here's some pictures:
[Show/Hide] Tileset With ID Numbers


<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] just numbers</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">
ID Number picture, you can put it on top of your tileset(take a screenshot of the tileset shown in the RMVX editor and paste this over it)


</div></div></div>



4. Setup the events you want to have footsteps


FAQ

N/a


Credits

- Miget man12
- DerVVulfman - Tile ID formula
- Modern Algebra - Help w/ improvements
- Yanfly - Help w/ improvements
- Twilight1300 - Help w/ improvements

Terms and Conditions

Credits in your game would be nice wink.gif
Additional Notes

My first script that I posted free of request!

~Miget man12
reijubv
I'll definitely use this script on my 2nd project!
Thanks,,
miget man12
Okay, I'm going to go ahead and update this(despite the fact that no one seems to really care biggrin.gif)
Here's the script:
[Show/Hide] The Script
CODE
#==============================================================================
# ** Simple Footstep script
#  Version 2.0
#  Credits:
#    Creator: Miget man12, Help improving from: Modern Algebra, Yanfly
#    Formula for getting Tile ID by DerVVulfman
#-----------------------------------------------------------------------------
#  I made this just so I could have a not-laggy, easy to use script. It doesn't
# really have any special features, but it works without very much lag. It is
# also being used in "The Legend of Zelda: Realm of the Gods", a Zelda
# fan-game(Hence the SE's from OoT :D) that I'm working on with Twilight1300.
#-----------------------------------------------------------------------------
# Instructions:
#  To have an event have footstep sounds, just put Comment:
# [footstep]
# To have an event or the player use footsteps:
# For The Player:
#  $game_player.footstep_se = true/false
# For an Event:
#  $game_map.events[(Event ID)].footstep_se = true/false
#  The Event ID is the ID of the event on the map you are on
# ***Event settings are reset when you tranfer***
#==============================================================================
$imported = {} if $imported == nil
$imported["Mm12Footsteps"] = true
module Mm12
   START_WITH_SE = true # Start out with player's footsteps enabled?
   #-----------------------------------------------------------------------------
   # For Iron Boots -- IGNORE THESE!!
   IRON_SE = []
   # Stepping(various dif. pitches)
   IRON_SE[0] = "OOT_Steps_IronBoots1"
   IRON_SE[1] = "OOT_Steps_IronBoots2"
   IRON_SE[2] = "OOT_Steps_IronBoots3"
   IRON_SE[3] = "OOT_Steps_IronBoots4"
   # For Jumping with iron boots
   IRON_SE[4] = "OOT_Steps_IronBoots_Jump"
   # For Landing(after jumping) with iron boots
   IRON_SE[5] = "OOT_Steps_IronBoots_Land"
   IRON_BOOT_ID = BOOT_ID[2]
   SWIM_SE = ["OOT_Link_Swim1", "OOT_Link_Swim2"]
   #-----------------------------------------------------------------------------
   # Okay, stop ignoring now :D
   BRIDGE_TILES = [72,73,74,75,76,77,78,79]
   CARPET_TILES = [30,38,162,218]
   DIRT_TILES = [16, 27]
   GRASS_TILES = [24,19,208]
   ICE_TILES = [129,130,131,132,133,134,141,142,151,181,205,215,229]
   LAVA_TILES = [14, 15]
   SAND_TILES = [32, 35]
   STONE_TILES = [144,145,146,147,148,149,163,164,165,166,176,177,192,193,194,195,
     196,197,200,201,208,209,210,211,212,213,219,220,221,222,232,233,234,235,236,
     237,240,241,243,248,249,250,251]
   TGRASS_TILES = [180,228]
   WOOD_TILES = [160,161,192,216,217]
   BRIDGE_SE = ["OOT_Steps_Bridge1", "OOT_Steps_Bridge2"]
   CARPET_SE = ["OOT_Steps_Carpet1", "OOT_Steps_Carpet2", "OOT_Steps_Carpet3",
     "OOT_Steps_Carpet4", "OOT_Steps_Carpet5"]
   DIRT_SE = ["OOT_Steps_Dirt1", "OOT_Steps_Dirt2", "OOT_Steps_Dirt3",
     "OOT_Steps_Dirt4", "OOT_Steps_Dirt5", "OOT_Steps_Dirt6"]
   GRASS_SE = ["OOT_Steps_Grass1", "OOT_Steps_Grass2", "OOT_Steps_Grass3",
     "OOT_Steps_Grass4", "OOT_Steps_Grass5", "OOT_Steps_Grass6",
     "OOT_Steps_Grass7"]
   ICE_SE = ["OOT_Steps_Ice1", "OOT_Steps_Ice2"]
   LAVA_SE = ["OOT_Steps_Lava1", "OOT_Steps_Lava2", "OOT_Steps_Lava3"]
   SAND_SE = ["OOT_Steps_Sand1", "OOT_Steps_Sand2", "OOT_Steps_Sand3",
     "OOT_Steps_Sand4", "OOT_Steps_Sand5"]
   STONE_SE = ["OOT_Steps_Stone1", "OOT_Steps_Stone2", "OOT_Steps_Stone3",
     "OOT_Steps_Stone4", "OOT_Steps_Stone5", "OOT_Steps_Stone6"]
   TGRASS_SE = ["OOT_Steps_TallGrass1", "OOT_Steps_TallGrass2",
     "OOT_Steps_TallGrass3", "OOT_Steps_TallGrass4"]
   WOOD_SE = ["OOT_Steps_Wood1", "OOT_Steps_Wood2", "OOT_Steps_Wood3",
     "OOT_Steps_Wood4", "OOT_Steps_Wood5"]
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
   attr_accessor :footstep_se
end

class Game_Player
   #--------------------------------------------------------------------------
   # * Object Initialization
   #--------------------------------------------------------------------------
   alias ftstp_gp_initialize initialize
   alias ftstp_gp_increase_steps increase_steps
   alias mm12ftstp_gp_jump jump
   def initialize
     @se_ok = true
     @footstep_se = true
     ftstp_gp_initialize
   end
   def increase_steps
     ftstp_gp_increase_steps
     footstep_se
   end
   #--------------------------------------------------------------------------
   # * Jump
   #     x_plus : x-coordinate plus value
   #     y_plus : y-coordinate plus value
   #--------------------------------------------------------------------------
   def jump(x_plus, y_plus)
     if $imported["Mm12IronBoots"]
       if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
         RPG::SE.new(Mm12::IRON_SE[4]).play
       end
     end
     mm12ftstp_gp_jump(x_plus, y_plus)
     if $imported["Mm12IronBoots"]
       if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
         RPG::SE.new(Mm12::IRON_SE[5]).play
       end
     end
   end
   #---------------------------------------------------------------------------
   # * Footstep SE
   #---------------------------------------------------------------------------
   def footstep_se
     if @se_ok == true
       @num = 0
       play_se
       @se_ok = false
     elsif @se_ok == false
       if $game_player.dash?
         @se_ok = true
       else
         @num = 1
         play_se
         @se_ok = true
       end
       return
     end
   end
   def play_se
     unless $game_map.ship.driving or $game_map.boat.driving or $game_map.airship.driving or !@footstep_se
       if Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
         RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       end
       if $imported["Mm12IronBoots"]
         if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID and !$game_map.landvhcl.driving
           RPG::SE.new(Mm12::IRON_SE[rand(3)], rand(30) + 80).play
         end
       end
     end
     if $imported["Mm12Swimming"]
       #p "so this works..."
       if $game_map.ship.driving or $game_map.boat.driving
         #p "Odd..."
         RPG::SE.new(Mm12::SWIM_SE[@num], 100, 100).play
       end
     end
   end
end

#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
   alias ftstp_setup setup
   #--------------------------------------------------------------------------
   # * Event page setup
   #--------------------------------------------------------------------------
   def setup(new_page)
     ftstp_setup(new_page)
     if [email="%21@list.nil"]!@list.nil[/email]?
       for i in [email="0...@list.size"]0...@list.size[/email] - 1
         next if @list[i].code != 108
         if @list[i].parameters[0].include?("[footstep]")
           @footstep_se = true
         end
       end
     end
   end
   def footstep_se
     get_dist_vol
     play_se
   end  
   def play_se
     if @footstep_se
       if Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
         RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], @dist_vol, rand(30) + 80).play
       end
     end
   end
   def get_dist_vol
     @x_dist = $game_player.x - @x
     @y_dist = $game_player.y - @y
     if @x_dist < 0
       @x_dist *= -1
     end
     if @y_dist < 0
       @y_dist *= -1
     end
     @ttl_dist = @y_dist + @x_dist
     #p @ttl_dist
     @dist_vol = 60
     @dist_vol2 = 20
     @dist_vol -= @ttl_dist*3
     @dist_vol += rand(30)
     if @dist_vol < 0
       @dist_vol = 0
     end
     #p @dist_vol
     @dist_vol2 -= @ttl_dist*2
     @dist_vol2 += rand(30)
     if @dist_vol2 < 0
       @dist_vol2 = 0
     end
     #p @dist_vol2
   end
end
class Game_Map
   #--------------------------------------------------------------------------
   # * DerVVulfman method L get_tile_index
   #--------------------------------------------------------------------------
   def tile_index(tile_id)
     case tile_id
       # Multi-tiled ids in Tileset 'A'
       when 2048..8191; return ((tile_id - 2000) / 48) - 1
       # Individual tile ids in Tileset 'A'
       when 1536..1663; return(tile_id - 1408)
       # Tilesets 'B' to 'E'
       when 0..1023; return (tile_id + 256)
     end
     return 0
   end  
end

New Features:
-Play different SEs depending on which tile ID you're standing on
-randomized SEs for realistic effects
For the SEs that it's configured to use, go here:
http://noproblo.dayjo.org/ZeldaSounds/OOT/....html#Footsteps
(Credits to Nintendo biggrin.gif)

~Miget man12
reijubv
Great, you updated this,
KGC's tileset extension can also easily makes the footstep change depends on the terrain tags,,
But using this new version will be better...

How do we know tile Id of a tile?
I didn't use RTP tilesets, so I need to know how..
miget man12
well, it will have the same ID whether you use RTP or not, but basically, it's like the iconset, it goes left to right, then starts a new row, I'll upload a pic if you'd like. The first four are a little different, they are all 0, then the next after the first 4 is 4, then 5, then 6, 7, then it starts a new row(the second row of water tiles)
Same basic idea for the tiles right under water, it goes 16, 16, 16, 19, 19, 19, 22, 23
here's a little 'map' of it all:
CODE
0   0   0    0   4   5    6   7   \   Water tiles
8   9  10 11 12 13 14 15  /  
16 16 16 19 19 19 22 23
24 24 24 27 27 27 30 31
32 32 32 35 35 35 38 39
40 40 40 43 43 43 46 47
(okay, here's the roof and wall tiles)
48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63

...and so on, it's probably not a very effecient way of showing you, but it's a fairly simple idea. Maybe sometime I'll make something similar to Yanfly's Iconviewer for tilesets :D
PS: thanks for your support :)

~Miget man12
Yo-N
Amazing script!

This is indeed easier to configure than DeadlyDan's! (not to be rude or offensive)

But I found a problem: when you dash, shouldn't the pace of the se get quicker?

When I tried the demo, the se pace is the same whether you dash or walk.

Is there some way to fix this?

Thanks in advance
Yo-N
miget man12
I actually did that on purpose because the SEs going that fast is really annoying, if you want, here's it without that.
CODE
#==============================================================================
# ** Simple Footstep script
#  Version 2.0
#  Credits:
#    Creator: Miget man12, Help improving from: Modern Algebra, Yanfly
#    Formula for getting Tile ID by DerVVulfman
#-----------------------------------------------------------------------------
#  I made this just so I could have a not-laggy, easy to use script. It doesn't
# really have any special features, but it works without very much lag. It is
# also being used in "The Legend of Zelda: Realm of the Gods", a Zelda
# fan-game(Hence the SE's from OoT :D) that I'm working on with Twilight1300.
#-----------------------------------------------------------------------------
# Instructions:
#  To have an event have footstep sounds, just put Comment:
# [footstep]
# To have an event or the player use footsteps:
# For The Player:
#  $game_player.footstep_se = true/false
# For an Event:
#  $game_map.events[(Event ID)].footstep_se = true/false
#  The Event ID is the ID of the event on the map you are on
# ***Event settings are reset when you tranfer***
#==============================================================================
$imported = {} if $imported == nil
$imported["Mm12Footsteps"] = true
module Mm12
  START_WITH_SE = true # Start out with player's footsteps enabled?
  #-----------------------------------------------------------------------------
  # For Iron Boots -- IGNORE THESE!!
  IRON_SE = []
  # Stepping(various dif. pitches)
  IRON_SE[0] = "OOT_Steps_IronBoots1"
  IRON_SE[1] = "OOT_Steps_IronBoots2"
  IRON_SE[2] = "OOT_Steps_IronBoots3"
  IRON_SE[3] = "OOT_Steps_IronBoots4"
  # For Jumping with iron boots
  IRON_SE[4] = "OOT_Steps_IronBoots_Jump"
  # For Landing(after jumping) with iron boots
  IRON_SE[5] = "OOT_Steps_IronBoots_Land"
  IRON_BOOT_ID = BOOT_ID[2]
  SWIM_SE = ["OOT_Link_Swim1", "OOT_Link_Swim2"]
  #-----------------------------------------------------------------------------
  # Okay, stop ignoring now :D
  BRIDGE_TILES = [248,249,250,272,273,274,275,276,277,278,279,1512,1513,1514]
  CARPET_TILES = [30,38,162,218]
  DIRT_TILES = [16,27]
  GRASS_TILES = [24,19,208]
  ICE_TILES = [129,130,131,132,133,134,141,142,151,181,205,215,229]
  LAVA_TILES = [14,15]
  SAND_TILES = [32,35]
  STONE_TILES = [144,145,146,147,148,149,163,164,165,166,176,177,192,193,194,195,
    196,197,200,201,208,209,210,211,212,213,219,220,221,222,232,233,234,235,236
,
    237,240,241,243,248,249,250,251]
  TGRASS_TILES = [180,228]
  WOOD_TILES = [160,161,192,216,217]
  SNOW_TILES = [43,179,203,227]
  LADDER_TILES = [468,476,516,517,518,519,524,525,526,527]
  BRIDGE_SE = ["OOT_Steps_Bridge1", "OOT_Steps_Bridge2"]
  CARPET_SE = ["OOT_Steps_Carpet1", "OOT_Steps_Carpet2", "OOT_Steps_Carpet3",
    "OOT_Steps_Carpet4", "OOT_Steps_Carpet5"]
  DIRT_SE = ["OOT_Steps_Dirt1", "OOT_Steps_Dirt2", "OOT_Steps_Dirt3",
    "OOT_Steps_Dirt4", "OOT_Steps_Dirt5", "OOT_Steps_Dirt6"]
  GRASS_SE = ["OOT_Steps_Grass1", "OOT_Steps_Grass2", "OOT_Steps_Grass3",
    "OOT_Steps_Grass4", "OOT_Steps_Grass5", "OOT_Steps_Grass6",
    "OOT_Steps_Grass7"]
  ICE_SE = ["OOT_Steps_Ice1", "OOT_Steps_Ice2"]
  LAVA_SE = ["OOT_Steps_Lava1", "OOT_Steps_Lava2", "OOT_Steps_Lava3"]
  SAND_SE = ["OOT_Steps_Sand1", "OOT_Steps_Sand2", "OOT_Steps_Sand3",
    "OOT_Steps_Sand4", "OOT_Steps_Sand5"]
  STONE_SE = ["OOT_Steps_Stone1", "OOT_Steps_Stone2", "OOT_Steps_Stone3",
    "OOT_Steps_Stone4", "OOT_Steps_Stone5", "OOT_Steps_Stone6"]
  TGRASS_SE = ["OOT_Steps_TallGrass1", "OOT_Steps_TallGrass2",
    "OOT_Steps_TallGrass3", "OOT_Steps_TallGrass4"]
  WOOD_SE = ["OOT_Steps_Wood1", "OOT_Steps_Wood2", "OOT_Steps_Wood3",
    "OOT_Steps_Wood4", "OOT_Steps_Wood5"]
  SNOW_SE = ["MM_Steps_Snow1", "MM_Steps_Snow2", "MM_Steps_Snow3"]
  LADDER_SE = ["TP_LadderStep1", "TP_LadderStep2", "TP_LadderStep3"]
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
  attr_accessor :footstep_se
end
  
class Game_Player
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias ftstp_gp_initialize initialize
  alias ftstp_gp_increase_steps increase_steps
  alias mm12ftstp_gp_jump jump
  def initialize
    @se_ok = true
    @footstep_se = true
    ftstp_gp_initialize
  end
  def increase_steps
    ftstp_gp_increase_steps
    footstep_se
  end
  #--------------------------------------------------------------------------
  # * Jump
  #     x_plus : x-coordinate plus value
  #     y_plus : y-coordinate plus value
  #--------------------------------------------------------------------------
  def jump(x_plus, y_plus)
    if $imported["Mm12IronBoots"]
      if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
        RPG::SE.new(Mm12::IRON_SE[4]).play
      end
    end
    mm12ftstp_gp_jump(x_plus, y_plus)
    if $imported["Mm12IronBoots"]
      if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
        RPG::SE.new(Mm12::IRON_SE[5]).play
      end
    end
  end
  #---------------------------------------------------------------------------
  # * Footstep SE
  #---------------------------------------------------------------------------
  def footstep_se
    play_se
  end
  def play_se
    unless $game_map.ship.driving or $game_map.boat.driving or $game_map.airship.driving or !@footstep_se
      if Mm12::LADDER_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::LADDER_SE[rand(Mm12::LADDER_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0])) or Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SNOW_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SNOW_SE[rand(Mm12::SNOW_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      end
      if $imported["Mm12IronBoots"]
        if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID and !$game_map.landvhcl.driving
          RPG::SE.new(Mm12::IRON_SE[rand(3)], rand(30) + 80).play
        end
      end
    end
    if $imported["Mm12Swimming"]
      #p "so this works..."
      if $game_map.ship.driving or $game_map.boat.driving
        #p "Odd..."
        RPG::SE.new(Mm12::SWIM_SE[@num], 100, 100).play
      end
    end
  end
end  
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
  alias ftstp_setup setup
  alias ftstp_ge_increase_steps increase_steps
  #--------------------------------------------------------------------------
  # * Event page setup
  #--------------------------------------------------------------------------
  def setup(new_page)
    ftstp_setup(new_page)
    if !@list.nil?
      for i in 0...@list.size - 1
        next if @list[i].code != 108
        if @list[i].parameters[0].include?("[footstep]")
          @footstep_se = true
        end
      end
    end
  end
  def footstep_se
    get_dist_vol
    play_se
  end  
  def play_se
    if @footstep_se
      if Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], @dist_vol, rand(30) + 80).play
      end
    end
  end
  def get_dist_vol
    @x_dist = $game_player.x - @x
    @y_dist = $game_player.y - @y
    if @x_dist < 0
      @x_dist *= -1
    end
    if @y_dist < 0
      @y_dist *= -1
    end
    @ttl_dist = @y_dist + @x_dist
    #p @ttl_dist
    @dist_vol = 60
    @dist_vol2 = 20
    @dist_vol -= @ttl_dist*3
    @dist_vol += rand(30)
    if @dist_vol < 0
      @dist_vol = 0
    end
    #p @dist_vol
    @dist_vol2 -= @ttl_dist*2
    @dist_vol2 += rand(30)
    if @dist_vol2 < 0
      @dist_vol2 = 0
    end
    #p @dist_vol2
  end
  def increase_steps
    ftstp_ge_increase_steps
    footstep_se
  end
end
class Game_Map
  #--------------------------------------------------------------------------
  # * DerVVulfman method L get_tile_index
  #--------------------------------------------------------------------------
  def tile_index(tile_id)
    case tile_id
      # Multi-tiled ids in Tileset 'A'
      when 2048..8191; return ((tile_id - 2000) / 48) - 1
      # Individual tile ids in Tileset 'A'
      when 1536..1663; return(tile_id - 1408)
      # Tilesets 'B' to 'E'
      when 0..1023; return (tile_id + 256)
    end
    return 0
  end  
end
I'll be happy to answer any more questions :)

~Miget man12
nmad
How can you make events have SE because I already put "[footstep]" as a comment and also I put as a paralell process the ejecution of this script: "$game_map.events[001].footstep_se = true", where 001 is the event that has the comment mentioned above.

Can you make a demo or explain me how do you make it?

And: Thanks for the script, it's really cool.
miget man12
okay, I'm an idiot, get the script from the first post, or get it here:
CODE
#==============================================================================
# ** Simple Footstep script
#  Version 2.0
#  Credits:
#    Creator: Miget man12, Help improving from: Modern Algebra, Yanfly
#    Formula for getting Tile ID by DerVVulfman
#-----------------------------------------------------------------------------
#  I made this just so I could have a not-laggy, easy to use script. It doesn't
# really have any special features, but it works without very much lag. It is
# also being used in "The Legend of Zelda: Realm of the Gods", a Zelda
# fan-game(Hence the SE's from OoT :D) that I'm working on with Twilight1300.
#-----------------------------------------------------------------------------
# Instructions:
#  To have an event have footstep sounds, just put Comment:
# [footstep]
# To have an event or the player use footsteps:
# For The Player:
#  $game_player.footstep_se = true/false
# For an Event:
#  $game_map.events[(Event ID)].footstep_se = true/false
#  The Event ID is the ID of the event on the map you are on
# ***Event settings are reset when you tranfer***
#==============================================================================
$imported = {} if $imported == nil
$imported["Mm12Footsteps"] = true
module Mm12
  START_WITH_SE = true # Start out with player's footsteps enabled?
  #-----------------------------------------------------------------------------
  # For Iron Boots -- IGNORE THESE!!
  IRON_SE = []
  # Stepping(various dif. pitches)
  IRON_SE[0] = "OOT_Steps_IronBoots1"
  IRON_SE[1] = "OOT_Steps_IronBoots2"
  IRON_SE[2] = "OOT_Steps_IronBoots3"
  IRON_SE[3] = "OOT_Steps_IronBoots4"
  # For Jumping with iron boots
  IRON_SE[4] = "OOT_Steps_IronBoots_Jump"
  # For Landing(after jumping) with iron boots
  IRON_SE[5] = "OOT_Steps_IronBoots_Land"
  IRON_BOOT_ID = BOOT_ID[2]
  SWIM_SE = ["OOT_Link_Swim1", "OOT_Link_Swim2"]
  #-----------------------------------------------------------------------------
  # Okay, stop ignoring now :D
  BRIDGE_TILES = [248,249,250,272,273,274,275,276,277,278,279,1512,1513,1514]
  CARPET_TILES = [30,38,162,218]
  DIRT_TILES = [16,27]
  GRASS_TILES = [24,19,208]
  ICE_TILES = [129,130,131,132,133,134,141,142,151,181,205,215,229]
  LAVA_TILES = [14,15]
  SAND_TILES = [32,35]
  STONE_TILES = [144,145,146,147,148,149,163,164,165,166,176,177,192,193,194,195,
    196,197,200,201,208,209,210,211,212,213,219,220,221,222,232,233,234,235,236
,
    237,240,241,243,248,249,250,251]
  TGRASS_TILES = [180,228]
  WOOD_TILES = [160,161,192,216,217]
  SNOW_TILES = [43,179,203,227]
  LADDER_TILES = [468,476,516,517,518,519,524,525,526,527]
  BRIDGE_SE = ["OOT_Steps_Bridge1", "OOT_Steps_Bridge2"]
  CARPET_SE = ["OOT_Steps_Carpet1", "OOT_Steps_Carpet2", "OOT_Steps_Carpet3",
    "OOT_Steps_Carpet4", "OOT_Steps_Carpet5"]
  DIRT_SE = ["OOT_Steps_Dirt1", "OOT_Steps_Dirt2", "OOT_Steps_Dirt3",
    "OOT_Steps_Dirt4", "OOT_Steps_Dirt5", "OOT_Steps_Dirt6"]
  GRASS_SE = ["OOT_Steps_Grass1", "OOT_Steps_Grass2", "OOT_Steps_Grass3",
    "OOT_Steps_Grass4", "OOT_Steps_Grass5", "OOT_Steps_Grass6",
    "OOT_Steps_Grass7"]
  ICE_SE = ["OOT_Steps_Ice1", "OOT_Steps_Ice2"]
  LAVA_SE = ["OOT_Steps_Lava1", "OOT_Steps_Lava2", "OOT_Steps_Lava3"]
  SAND_SE = ["OOT_Steps_Sand1", "OOT_Steps_Sand2", "OOT_Steps_Sand3",
    "OOT_Steps_Sand4", "OOT_Steps_Sand5"]
  STONE_SE = ["OOT_Steps_Stone1", "OOT_Steps_Stone2", "OOT_Steps_Stone3",
    "OOT_Steps_Stone4", "OOT_Steps_Stone5", "OOT_Steps_Stone6"]
  TGRASS_SE = ["OOT_Steps_TallGrass1", "OOT_Steps_TallGrass2",
    "OOT_Steps_TallGrass3", "OOT_Steps_TallGrass4"]
  WOOD_SE = ["OOT_Steps_Wood1", "OOT_Steps_Wood2", "OOT_Steps_Wood3",
    "OOT_Steps_Wood4", "OOT_Steps_Wood5"]
  SNOW_SE = ["MM_Steps_Snow1", "MM_Steps_Snow2", "MM_Steps_Snow3"]
  LADDER_SE = ["TP_LadderStep1", "TP_LadderStep2", "TP_LadderStep3"]
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
  attr_accessor :footstep_se
end
  
class Game_Player
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias ftstp_gp_initialize initialize
  alias ftstp_gp_increase_steps increase_steps
  alias mm12ftstp_gp_jump jump
  def initialize
    @se_ok = true
    @footstep_se = true
    ftstp_gp_initialize
  end
  def increase_steps
    ftstp_gp_increase_steps
    footstep_se
  end
  #--------------------------------------------------------------------------
  # * Jump
  #     x_plus : x-coordinate plus value
  #     y_plus : y-coordinate plus value
  #--------------------------------------------------------------------------
  def jump(x_plus, y_plus)
    if $imported["Mm12IronBoots"]
      if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
        RPG::SE.new(Mm12::IRON_SE[4]).play
      end
    end
    mm12ftstp_gp_jump(x_plus, y_plus)
    if $imported["Mm12IronBoots"]
      if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
        RPG::SE.new(Mm12::IRON_SE[5]).play
      end
    end
  end
  #---------------------------------------------------------------------------
  # * Footstep SE
  #---------------------------------------------------------------------------
  def footstep_se
    if @se_ok == true
      @num = 0
      play_se
      @se_ok = false
    elsif @se_ok == false
      if $game_player.dash?
        @se_ok = true
      else
        @num = 1
        play_se
        @se_ok = true
      end
      return
    end
  end
  def play_se
    unless $game_map.ship.driving or $game_map.boat.driving or $game_map.airship.driving or !@footstep_se
      if Mm12::LADDER_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::LADDER_SE[rand(Mm12::LADDER_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0])) or Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SNOW_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SNOW_SE[rand(Mm12::SNOW_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      end
      if $imported["Mm12IronBoots"]
        if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID and !$game_map.landvhcl.driving
          RPG::SE.new(Mm12::IRON_SE[rand(3)], rand(30) + 80).play
        end
      end
    end
    if $imported["Mm12Swimming"]
      #p "so this works..."
      if $game_map.ship.driving or $game_map.boat.driving
        #p "Odd..."
        RPG::SE.new(Mm12::SWIM_SE[@num], 100, 100).play
      end
    end
  end
end  
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
  alias ftstp_setup setup
  alias ftstp_ge_increase_steps increase_steps
  #--------------------------------------------------------------------------
  # * Event page setup
  #--------------------------------------------------------------------------
  def setup(new_page)
    ftstp_setup(new_page)
    if !@list.nil?
      for i in 0...@list.size - 1
        next if @list[i].code != 108
        if @list[i].parameters[0].include?("[footstep]")
          #p "should work, right?"
          @footstep_se = true
        end
      end
    end
  end
  def footstep_se
    get_dist_vol
    play_se
  end  
  def play_se
    if @footstep_se
      #p "step 2: Play SEs"
      if Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], @dist_vol, rand(30) + 80).play
      end
    end
  end
  def get_dist_vol
    @x_dist = $game_player.x - @x
    @y_dist = $game_player.y - @y
    if @x_dist < 0
      @x_dist *= -1
    end
    if @y_dist < 0
      @y_dist *= -1
    end
    @ttl_dist = @y_dist + @x_dist
    #p @ttl_dist
    @dist_vol = 60
    @dist_vol2 = 20
    @dist_vol -= @ttl_dist*3
    @dist_vol += rand(30)
    if @dist_vol < 0
      @dist_vol = 0
    end
    #p @dist_vol
    @dist_vol2 -= @ttl_dist*2
    @dist_vol2 += rand(30)
    if @dist_vol2 < 0
      @dist_vol2 = 0
    end
    #p "Distance Volume: "+@dist_vol1.to_s
  end
  def increase_steps
    ftstp_ge_increase_steps
    footstep_se
  end
end
class Game_Map
  #--------------------------------------------------------------------------
  # * DerVVulfman method L get_tile_index
  #--------------------------------------------------------------------------
  def tile_index(tile_id)
    case tile_id
      # Multi-tiled ids in Tileset 'A'
      when 2048..8191; return ((tile_id - 2000) / 48) - 1
      # Individual tile ids in Tileset 'A'
      when 1536..1663; return(tile_id - 1408)
      # Tilesets 'B' to 'E'
      when 0..1023; return (tile_id + 256)
    end
    return 0
  end  
end

Also, I'm not sure that "$game_map.events[001].footstep_se = true" will work, just use 1, instead of 001

~Miget man12
nmad
WOW!!! Thanks ^^
Now Really the events have footstep sounds ^^

And also, You don't need to initialize via script each event. You just have to put as a comment "[footstep]"
I'm really gratefull for that one wink.gif

Cheers smile.gif
miget man12
QUOTE
You don't need to initialize via script each event. You just have to put as a comment "[footstep]"

yes, I know, I did make the script :D
I just wanted to make sure if you did use that method you did it right :)

~Miget man12
reijubv
hey fix the script at the first post,
sometimes I found [email] tags on your script tongue.gif

Uhh,,,Im still confused with the tile Id, if you can make a script or a picture to show it, I'll appreciate it,,,
Thanks!
miget man12
I forgot to mention this script: http://www.rpgrevolution.com/forums/index....showtopic=26217 it has a little thing so that if you press F5 it shows you what tile ID you're on. Now I feel stupid for not putting a link before happy.gif
Anyway, here's some pictures to help you:
[Show/Hide] Tileset With ID Numbers

[Show/Hide] ID Number picture, you can put it on top of your tileset(take a screenshot of the tileset shown in the RMVX editor and paste this over it)

Those should both be pretty helpful, I would think.
Also, thanks for the heads up on the script at the top wink.gif

~Miget man12
reijubv
@miget man12

All right!
Thanks a lot for your info...!

ps:
I really use your script from the first version wink.gif
miget man12
Okay, I'm gonna update this, just because I've been improving it for my own needs, and I figured others may be interesting in a newer version.
New Features:
-You can set events to each have their own Sound Effects (suppose something makes an odd sound when it moves)
-I configured the Tiles to fit the RTP, to save any RTP-users some trouble
[Show/Hide] Version 2.5
CODE
#==============================================================================
# ** Simple Footstep script
#  Version 2.5
#  Credits:
#    Creator: Miget man12, Help improving from: Modern Algebra, Yanfly, Twilight1300
#    Formula for getting Tile ID by DerVVulfman
#-----------------------------------------------------------------------------
#  I made this just so I could have a not-laggy, easy to use script. It doesn't
# really have any special features, but it works without very much lag. It is
# also being used in "The Legend of Zelda: Realm of the Gods", a Zelda
# fan-game(Hence the SE's from OoT :D) that I'm working on with Twilight1300.
#-----------------------------------------------------------------------------
# Instructions:
#  To have an event have footstep sounds, just put Comment:
# [footstep]
# To have an event or the player use footsteps:
# For The Player:
#  $game_player.footstep_se = true/false
# For an Event:
#  $game_map.events[(Event ID)].footstep_se = true/false
#  The Event ID is the ID of the event on the map you are on
# If you want an event to have a special footstep sound effect, put a comment
# like so:
#  [footstepse:SE Name]
# e.g.
#  [footstepse:OOT_LikeLike_Move]
# ***Event settings are reset when you tranfer*** (this doesn't apply to comment-
#  related settings)
#==============================================================================
$imported = {} if $imported == nil
$imported["Mm12Footsteps"] = true
module Mm12
  START_WITH_SE = true # Start out with player's footsteps enabled?
  BRIDGE_TILES = [272,273,274,275,276,277,278,279]
  CARPET_TILES = [30,38,62,218]
  DIRT_TILES = []
  GRASS_TILES = [16,19,150,204,214]
  ICE_TILES = [151,215]
  LAVA_TILES = [14,15]
  SAND_TILES = [32,35,238,244,245,252,253]
  STONE_TILES = [24,27,129,130,131,132,133,134,141,142,151,181,205,215,229,193,194,
                195,196,197,200,201,202,205,208,209,210,211,212,213,219,220,221,
                222,224,225,226,229]
  TGRASS_TILES = [20,180,228]
  WOOD_TILES = [160,161,192,216,217]
  SNOW_TILES = [40,43,179,203,227,239,246,247,254,255]
  LADDER_TILES = [516,524,540]
  BRIDGE_SE = ["OOT_Steps_Bridge1", "OOT_Steps_Bridge2"]
  CARPET_SE = ["OOT_Steps_Carpet1", "OOT_Steps_Carpet2", "OOT_Steps_Carpet3",
    "OOT_Steps_Carpet4", "OOT_Steps_Carpet5"]
  DIRT_SE = ["OOT_Steps_Dirt1", "OOT_Steps_Dirt2", "OOT_Steps_Dirt3",
    "OOT_Steps_Dirt4", "OOT_Steps_Dirt5", "OOT_Steps_Dirt6"]
  GRASS_SE = ["OOT_Steps_Grass1", "OOT_Steps_Grass2", "OOT_Steps_Grass3",
    "OOT_Steps_Grass4", "OOT_Steps_Grass5", "OOT_Steps_Grass6",
    "OOT_Steps_Grass7"]
  ICE_SE = ["OOT_Steps_Ice1", "OOT_Steps_Ice2"]
  LAVA_SE = ["OOT_Steps_Lava1", "OOT_Steps_Lava2", "OOT_Steps_Lava3"]
  SAND_SE = ["OOT_Steps_Sand1", "OOT_Steps_Sand2", "OOT_Steps_Sand3",
    "OOT_Steps_Sand4", "OOT_Steps_Sand5"]
  STONE_SE = ["OOT_Steps_Stone1", "OOT_Steps_Stone2", "OOT_Steps_Stone3",
    "OOT_Steps_Stone4", "OOT_Steps_Stone5", "OOT_Steps_Stone6"]
  TGRASS_SE = ["OOT_Steps_TallGrass1", "OOT_Steps_TallGrass2",
    "OOT_Steps_TallGrass3", "OOT_Steps_TallGrass4"]
  WOOD_SE = ["OOT_Steps_Wood1", "OOT_Steps_Wood2", "OOT_Steps_Wood3",
    "OOT_Steps_Wood4", "OOT_Steps_Wood5"]
  SNOW_SE = ["MM_Steps_Snow1", "MM_Steps_Snow2", "MM_Steps_Snow3"]
  LADDER_SE = ["TP_LadderStep1", "TP_LadderStep2", "TP_LadderStep3"]
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
  attr_accessor :footstep_se
end
  
class Game_Player
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias ftstp_gp_initialize initialize
  alias ftstp_gp_increase_steps increase_steps
  alias mm12ftstp_gp_jump jump
  def initialize
    @se_ok = true
    @footstep_se = true
    ftstp_gp_initialize
  end
  def increase_steps
    ftstp_gp_increase_steps
    footstep_se
  end
  #---------------------------------------------------------------------------
  # * Footstep SE
  #---------------------------------------------------------------------------
  def footstep_se
    if @se_ok == true
      @num = 0
      play_se
      @se_ok = false
    elsif @se_ok == false
      if $game_player.dash?
        @se_ok = true
      else
        @num = 1
        play_se
        @se_ok = true
      end
      return
    end
  end
  def play_se
    unless $game_map.ship.driving or $game_map.boat.driving or $game_map.airship.driving or !@footstep_se
      if Mm12::LADDER_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::LADDER_SE[rand(Mm12::LADDER_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0])) or Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 1])) or Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SNOW_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SNOW_SE[rand(Mm12::SNOW_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      end
    end
    if $imported["Mm12Swimming"]
      #p "so this works..."
      if $game_map.ship.driving or $game_map.boat.driving
        #p "Odd..."
        RPG::SE.new(Mm12::SWIM_SE[@num], 100, 100).play
      end
    end
  end
end  
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
  alias ftstp_setup setup
  alias ftstp_ge_increase_steps increase_steps
  #--------------------------------------------------------------------------
  # * Event page setup
  #--------------------------------------------------------------------------
  def setup(new_page)
    ftstp_setup(new_page)
    if !@list.nil?
      for i in 0...@list.size - 1
        next if @list[i].code != 108
        if @list[i].parameters[0].include?("[footstepse:")
          cmd = @list[i].parameters[0].split(':')
          @custom_se_name=cmd.last if cmd.size>1 && /footstepse/===cmd.first
          @custom_se_name[-1, 1] = ""
          #list = @list[i].parameters[0].scan(/\[footstepse:([0-9]|[a-z]|[A-Z])+\]/)
          #p $1
          @footstep_se_custom = true
          #$1
        elsif @list[i].parameters[0].include?("[footstep]")
          #p "should work, right?"
          @footstep_se = true
        end
      end
    end
  end
  def footstep_se
    get_dist_vol
    play_se
  end  
  def play_se
    if @footstep_se_custom
      RPG::SE.new(@custom_se_name, rand(30)+80, rand(30)+80).play
    elsif @footstep_se
      if Mm12::LADDER_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::LADDER_SE[rand(Mm12::LADDER_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0])) or Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
        RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      elsif Mm12::SNOW_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
        RPG::SE.new(Mm12::SNOW_SE[rand(Mm12::SNOW_SE.size-1)], rand(30) + 80, rand(30) + 80).play
      end
    end
  end
  def get_dist_vol
    @x_dist = $game_player.x - @x
    @y_dist = $game_player.y - @y
    if @x_dist < 0
      @x_dist *= -1
    end
    if @y_dist < 0
      @y_dist *= -1
    end
    @ttl_dist = @y_dist + @x_dist
    #p @ttl_dist
    @dist_vol = 60
    @dist_vol2 = 20
    @dist_vol -= @ttl_dist*3
    @dist_vol += rand(30)
    if @dist_vol < 0
      @dist_vol = 0
    end
    #p @dist_vol
    @dist_vol2 -= @ttl_dist*2
    @dist_vol2 += rand(30)
    if @dist_vol2 < 0
      @dist_vol2 = 0
    end
    #p "Distance Volume: "+@dist_vol1.to_s
  end
  def increase_steps
    ftstp_ge_increase_steps
    footstep_se
  end
end
class Game_Map
  #--------------------------------------------------------------------------
  # * DerVVulfman's method L get_tile_index
  #--------------------------------------------------------------------------
  def tile_index(tile_id)
    case tile_id
      # Multi-tiled ids in Tileset 'A'
      when 2048..8191; return ((tile_id - 2000) / 48) - 1
      # Individual tile ids in Tileset 'A'
      when 1536..1663; return(tile_id - 1408)
      # Tilesets 'B' to 'E'
      when 0..1023; return (tile_id + 256)
    end
    return 0
  end  
end
I'll add other features on request.

~Miget man12
reijubv
@migetman12
I see you've fixed a little bug happy.gif ( !@list.ni? )
But, you write "alias mm12ftstp_gp_jump jump" while there's no def jump in the new version ^^
miget man12
Oh haha thanks for the heads-up wink.gif. It's because I put something in there for jumping, but I figured it didn't really belong in this, so I took it out when I posted it. Not that an un-used alias really does anything happy.gif

~Miget man12
monkey
QUOTE (miget man12 @ May 31 2009, 01:03 PM) *
Okay, I'm going to go ahead and update this(despite the fact that no one seems to really care biggrin.gif )
Here's the script:
[Show/Hide] The Script
CODE
#==============================================================================
# ** Simple Footstep script
#  Version 2.0
#  Credits:
#    Creator: Miget man12, Help improving from: Modern Algebra, Yanfly
#    Formula for getting Tile ID by DerVVulfman
#-----------------------------------------------------------------------------
#  I made this just so I could have a not-laggy, easy to use script. It doesn't
# really have any special features, but it works without very much lag. It is
# also being used in "The Legend of Zelda: Realm of the Gods", a Zelda
# fan-game(Hence the SE's from OoT :D) that I'm working on with Twilight1300.
#-----------------------------------------------------------------------------
# Instructions:
#  To have an event have footstep sounds, just put Comment:
# [footstep]
# To have an event or the player use footsteps:
# For The Player:
#  $game_player.footstep_se = true/false
# For an Event:
#  $game_map.events[(Event ID)].footstep_se = true/false
#  The Event ID is the ID of the event on the map you are on
# ***Event settings are reset when you tranfer***
#==============================================================================
$imported = {} if $imported == nil
$imported["Mm12Footsteps"] = true
module Mm12
   START_WITH_SE = true # Start out with player's footsteps enabled?
   #-----------------------------------------------------------------------------
   # For Iron Boots -- IGNORE THESE!!
   IRON_SE = []
   # Stepping(various dif. pitches)
   IRON_SE[0] = "OOT_Steps_IronBoots1"
   IRON_SE[1] = "OOT_Steps_IronBoots2"
   IRON_SE[2] = "OOT_Steps_IronBoots3"
   IRON_SE[3] = "OOT_Steps_IronBoots4"
   # For Jumping with iron boots
   IRON_SE[4] = "OOT_Steps_IronBoots_Jump"
   # For Landing(after jumping) with iron boots
   IRON_SE[5] = "OOT_Steps_IronBoots_Land"
   IRON_BOOT_ID = BOOT_ID[2]
   SWIM_SE = ["OOT_Link_Swim1", "OOT_Link_Swim2"]
   #-----------------------------------------------------------------------------
   # Okay, stop ignoring now :D
   BRIDGE_TILES = [72,73,74,75,76,77,78,79]
   CARPET_TILES = [30,38,162,218]
   DIRT_TILES = [16, 27]
   GRASS_TILES = [24,19,208]
   ICE_TILES = [129,130,131,132,133,134,141,142,151,181,205,215,229]
   LAVA_TILES = [14, 15]
   SAND_TILES = [32, 35]
   STONE_TILES = [144,145,146,147,148,149,163,164,165,166,176,177,192,193,194,195,
     196,197,200,201,208,209,210,211,212,213,219,220,221,222,232,233,234,235,236,
     237,240,241,243,248,249,250,251]
   TGRASS_TILES = [180,228]
   WOOD_TILES = [160,161,192,216,217]
   BRIDGE_SE = ["OOT_Steps_Bridge1", "OOT_Steps_Bridge2"]
   CARPET_SE = ["OOT_Steps_Carpet1", "OOT_Steps_Carpet2", "OOT_Steps_Carpet3",
     "OOT_Steps_Carpet4", "OOT_Steps_Carpet5"]
   DIRT_SE = ["OOT_Steps_Dirt1", "OOT_Steps_Dirt2", "OOT_Steps_Dirt3",
     "OOT_Steps_Dirt4", "OOT_Steps_Dirt5", "OOT_Steps_Dirt6"]
   GRASS_SE = ["OOT_Steps_Grass1", "OOT_Steps_Grass2", "OOT_Steps_Grass3",
     "OOT_Steps_Grass4", "OOT_Steps_Grass5", "OOT_Steps_Grass6",
     "OOT_Steps_Grass7"]
   ICE_SE = ["OOT_Steps_Ice1", "OOT_Steps_Ice2"]
   LAVA_SE = ["OOT_Steps_Lava1", "OOT_Steps_Lava2", "OOT_Steps_Lava3"]
   SAND_SE = ["OOT_Steps_Sand1", "OOT_Steps_Sand2", "OOT_Steps_Sand3",
     "OOT_Steps_Sand4", "OOT_Steps_Sand5"]
   STONE_SE = ["OOT_Steps_Stone1", "OOT_Steps_Stone2", "OOT_Steps_Stone3",
     "OOT_Steps_Stone4", "OOT_Steps_Stone5", "OOT_Steps_Stone6"]
   TGRASS_SE = ["OOT_Steps_TallGrass1", "OOT_Steps_TallGrass2",
     "OOT_Steps_TallGrass3", "OOT_Steps_TallGrass4"]
   WOOD_SE = ["OOT_Steps_Wood1", "OOT_Steps_Wood2", "OOT_Steps_Wood3",
     "OOT_Steps_Wood4", "OOT_Steps_Wood5"]
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
   attr_accessor :footstep_se
end

class Game_Player
   #--------------------------------------------------------------------------
   # * Object Initialization
   #--------------------------------------------------------------------------
   alias ftstp_gp_initialize initialize
   alias ftstp_gp_increase_steps increase_steps
   alias mm12ftstp_gp_jump jump
   def initialize
     @se_ok = true
     @footstep_se = true
     ftstp_gp_initialize
   end
   def increase_steps
     ftstp_gp_increase_steps
     footstep_se
   end
   #--------------------------------------------------------------------------
   # * Jump
   #     x_plus : x-coordinate plus value
   #     y_plus : y-coordinate plus value
   #--------------------------------------------------------------------------
   def jump(x_plus, y_plus)
     if $imported["Mm12IronBoots"]
       if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
         RPG::SE.new(Mm12::IRON_SE[4]).play
       end
     end
     mm12ftstp_gp_jump(x_plus, y_plus)
     if $imported["Mm12IronBoots"]
       if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID
         RPG::SE.new(Mm12::IRON_SE[5]).play
       end
     end
   end
   #---------------------------------------------------------------------------
   # * Footstep SE
   #---------------------------------------------------------------------------
   def footstep_se
     if @se_ok == true
       @num = 0
       play_se
       @se_ok = false
     elsif @se_ok == false
       if $game_player.dash?
         @se_ok = true
       else
         @num = 1
         play_se
         @se_ok = true
       end
       return
     end
   end
   def play_se
     unless $game_map.ship.driving or $game_map.boat.driving or $game_map.airship.driving or !@footstep_se
       if Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
         RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], rand(30) + 80, rand(30) + 80).play
       end
       if $imported["Mm12IronBoots"]
         if $game_party.members[0].armor2_id == Mm12::IRON_BOOT_ID and !$game_map.landvhcl.driving
           RPG::SE.new(Mm12::IRON_SE[rand(3)], rand(30) + 80).play
         end
       end
     end
     if $imported["Mm12Swimming"]
       #p "so this works..."
       if $game_map.ship.driving or $game_map.boat.driving
         #p "Odd..."
         RPG::SE.new(Mm12::SWIM_SE[@num], 100, 100).play
       end
     end
   end
end

#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
   alias ftstp_setup setup
   #--------------------------------------------------------------------------
   # * Event page setup
   #--------------------------------------------------------------------------
   def setup(new_page)
     ftstp_setup(new_page)
     if [email="%21@list.nil"]!@list.nil[/email]?
       for i in [email="0...@list.size"]0...@list.size[/email] - 1
         next if @list[i].code != 108
         if @list[i].parameters[0].include?("[footstep]")
           @footstep_se = true
         end
       end
     end
   end
   def footstep_se
     get_dist_vol
     play_se
   end  
   def play_se
     if @footstep_se
       if Mm12::BRIDGE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 2]))
         RPG::SE.new(Mm12::BRIDGE_SE[rand(Mm12::BRIDGE_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::CARPET_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::CARPET_SE[rand(Mm12::CARPET_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::DIRT_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::DIRT_SE[rand(Mm12::DIRT_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::GRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::GRASS_SE[rand(Mm12::GRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::ICE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::ICE_SE[rand(Mm12::ICE_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::LAVA_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::LAVA_SE[rand(Mm12::LAVA_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::SAND_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::SAND_SE[rand(Mm12::SAND_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::STONE_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::STONE_SE[rand(Mm12::STONE_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::TGRASS_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::TGRASS_SE[rand(Mm12::TGRASS_SE.size-1)], @dist_vol, rand(30) + 80).play
       elsif Mm12::WOOD_TILES.include?($game_map.tile_index($game_map.data[@x, @y, 0]))
         RPG::SE.new(Mm12::WOOD_SE[rand(Mm12::WOOD_SE.size-1)], @dist_vol, rand(30) + 80).play
       end
     end
   end
   def get_dist_vol
     @x_dist = $game_player.x - @x
     @y_dist = $game_player.y - @y
     if @x_dist < 0
       @x_dist *= -1
     end
     if @y_dist < 0
       @y_dist *= -1
     end
     @ttl_dist = @y_dist + @x_dist
     #p @ttl_dist
     @dist_vol = 60
     @dist_vol2 = 20
     @dist_vol -= @ttl_dist*3
     @dist_vol += rand(30)
     if @dist_vol < 0
       @dist_vol = 0
     end
     #p @dist_vol
     @dist_vol2 -= @ttl_dist*2
     @dist_vol2 += rand(30)
     if @dist_vol2 < 0
       @dist_vol2 = 0
     end
     #p @dist_vol2
   end
end
class Game_Map
   #--------------------------------------------------------------------------
   # * DerVVulfman method L get_tile_index
   #--------------------------------------------------------------------------
   def tile_index(tile_id)
     case tile_id
       # Multi-tiled ids in Tileset 'A'
       when 2048..8191; return ((tile_id - 2000) / 48) - 1
       # Individual tile ids in Tileset 'A'
       when 1536..1663; return(tile_id - 1408)
       # Tilesets 'B' to 'E'
       when 0..1023; return (tile_id + 256)
     end
     return 0
   end  
end

New Features:
-Play different SEs depending on which tile ID you're standing on
-randomized SEs for realistic effects
For the SEs that it's configured to use, go here:
http://noproblo.dayjo.org/ZeldaSounds/OOT/....html#Footsteps
(Credits to Nintendo biggrin.gif )

~Miget man12


which sounds from the link that you gave us do i have to download for this updated script?
KPaxian
So you just make the player/event make the sound while walking but not while stepping on a certain tile? Then it would always make the sound if I'm right?
Supershadowmartin
high I would like the Tile ID scripts please because each not all my tiles make foot steps sounds when you walk on them.
Some do and Some dont. one of the few is the stone tile. 3rd row netx to the brown table. I thought it was tile 23 but so I go into your scripts and put 23 in in the stone tiles section and still nothing.
Digioso
Heya,

I first tried to use DeadlyDans Footstep-Script as well but I found it not to be that fitting for me for baiscally the same reasons MM12 wrote his own.
But this one here isn't compatible to tilesets swapped via SwapXT either. Since I'm heavily relying on SwapXT but don't want to have wrong footstep sounds played I made this one compatible to SwapXT.
Basically you can now create a configuration file where you can store your swapped mapids and set the tileids you want to have the sounds played on. There is a manual in the script attached.
You do not have to specify all maps in the configuration file. The script will use the default settings provided by Miget man12 if it can't find an entry in the file. If you don't have any config file at all it will use the default settings on all of your maps.

If you have any questions or encountered a bug please feel free to contact me/post here.

Also please add me to the credit list as well when you're using this. smile.gif

The newest version of script can also be found here: http://www.digioso.org/MM12_Footsteps
Digioso
Just a small update. If you pressed F12 to reset the game and then started a new one you could get a "Stack level to deep" error when using this script. This is now fixed.
I attached the newest version here or get it from the link above.
Digioso
Another update. If you saved and loaded your game with this script enabled your game would crash.
I didn't know that I have to save and load the stuff I coded as well... Well... that's fixed now!

Newest version is available at the link above and attached to this posting.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.