GameBanana shows no ads to members. Sign up now!
Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to Add Footsteps in Baldi's Basics Classic

A Tutorial for Baldi's Basics

Updates

Update 18d
  • Addition Added assembly downloads

Footsteps in Baldi's Basics (Base Game and Decompile)

Don't like how you're traversing the halls, You don't hear anything and you start to feel like your just floating your way around? Me neither. Today I'm going to show you how to add Footsteps in BOTH Base Game AND Decompile.

DEMONSTRATION VIDEO:



WHAT YOU WILL NEED:


Let's get started.

STEP 1: Setting Up

Open Up dnSpy and open up your Assembly-CSharp.dll. (It should be in the Managed Folder in "BALDI_Data")

Go to "-" and look for "GameControllerScript"

Once you find it open it.

STEP 2: Basics

Right click on anything and click "Edit Class", Make a void.

Let's start by making 4 public floats. The Accumulated Distance, The Step Distance, and The Walk and Run Distance. (for the Step Distance)

Set the Assigned Walk and Run Distance to the number of your choice. (0.5 for the Walk Distance and 0.3 for the Run Distance is recommended)

Now paste in this code in your void.

if (this.player.cc.velocity.sqrMagnitude > 0f) // NOTE: Change the "cc" to "rb" if you're using 1.3.2 or under.
        {
            this.accumulatedDistance += Time.deltaTime;
            if (this.accumulatedDistance > this.stepDistance)
            {
                this.audioDevice.PlayOneShot(YOUR AUDIO HERE);
                this.accumulatedDistance = 0f;
                return;
            }
        }
        else
        {
            this.accumulatedDistance = 0f;
        }

Now, Go to PlayerScript and in the PlayerMove Method, in the "if (stamina > 0f)" Statement, add in this. (REMINDER, MAKE SURE YOU'VE SAVED FOR THIS TO WORK)

this.gc.stepDistance = this.gc.walkDistance;
this.gc.stepDistance = this.gc.runDistance;

If done correctly, it should look like this.



OPTIONAL STEP: Footsteps Audio Source

Basegame: Make a Private AudioSource variable, add "this.audioSourceVar = base.gameObject.AddComponent<AudioSource>();" to the Start Method of GameControllerScript. Replace the AudioSource in your footstep void with the desired footsteps audio source you just made.

Decompile: Make a New AudioSource component in either the GameController GameObject or the Player. Go to GameControllerScript and add in a new Public AudioSource variable, assign the New AudioSource to the Variable, and Replace the AudioSource in the Footstep Void with the desired footsteps Audio Source you just made.

Make sure to Trigger the Footstep Void in the GameControllerScript in the Update Method.

Then save, and you're done! You can now roam the halls like a normal person!

NOTE

If you didn't understand this tutorial and are having problems with it, Here's an Assembly download link for you.

v1.4.3
v1.3.2

Sign up to access this!
  • Kayipkuxt avatar
    Kayipkuxt Joined 5mo ago
    Offline
    The Baldi Bunker! Flag Affiliation: The Baldi Bunker!
    123 points Ranked 67,353rd
    Kayipkuxt The Baldi Bunker! Flag
    Affiliation
    The Baldi Bunker!
    18d
    can you add a download to the assembly for non-pro coders?
    Kayite avatar
    Mantra
    Kayite
    URL to post:
  • Cleary avatar
    Cleary Joined 4mo ago
    Offline
    322 points Ranked 51,547th
    Cleary Johnster Space Studio Flag
    Affiliation
    Johnster Space Studio
    27d
    how do i make this work in 1.3.2?
    ... avatar
    Mantra
    ...
    URL to post:
  • Slimemoreno17 avatar
    Slimemoreno17 username pic Joined 1y ago
    Working on mods
    638 points Ranked 44,560th
    10 medals 1 rare
    • Returned 1000 times Medal icon
    • One month a member Medal icon
    • Returned 100 times Medal icon
    • 6 months a member Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • Became a Studio Leader Medal icon
    Slimemoreno17 avatar
    Slimemoreno17
    The Federation of Modification Flag
    Affiliation
    The Federation of Modification
    30d
    Help Please. Everytime i paste the code in the void, everything gets red and with error
    Stupid Bloody Spies avatar
    Mantra
    Stupid Bloody Spies
    URL to post:
  • CyndaquilDAC avatar
    CyndaquilDAC username pic Joined 2y ago
    On Sick Leave!
    162 points Ranked 62,376th
    21 medals 2 legendary 3 rare
    • Became a Ripe Supporter Medal icon
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Submitted 20 Gamefiles Medal icon
    • Thanked 50 submitters Medal icon
    • One month a member Medal icon
    CyndaquilDAC avatar
    CyndaquilDAC
    The Federation of Modification Flag
    Affiliation
    The Federation of Modification
    30d
    There's a bug in this I figured out how to fix. you have to add
    this.gc.stepDistance = this.gc.walkDistance;
    to the beginning of the player move void as well as the place the tutorial tells you to add it to not have it playing rapidly and loudly until you run for the first time. Hope this helps!
    URL to post:
  • SirOofy90 avatar
    SirOofy90 username pic Joined 1y ago
    Asleep
    1,865 points Ranked 21,377th
    15 medals 1 legendary 2 rare
    • Became a Ripe Supporter Medal icon
    • Returned 1000 times Medal icon
    • Thanked 50 submitters Medal icon
    • One month a member Medal icon
    • Returned 100 times Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    30d
    I need some help.
    These are the errors I'm getting:
    1. Operator '+=' cannot be applied to operands of type 'Player' and 'float'.
    2. Operator '>' cannot be applied to operands of type 'Player' and 'float'.
    3. Cannot implicity convert type to 'Rewired.Player'.

    Also, here is screenshots of the code, the 1st picture has the 'if (this.player.cc.velocity.sqrMagnitude > 0f)        {

                this.accumulatedDistance += Time.deltaTime;

                if (this.accumulatedDistance > this.stepDistance)

                {

                    this.audioDevice.PlayOneShot(YOUR AUDIO HERE);' part. 

    And the second picture has the stuff added to it to make the text not red.
    *modder with autism noises* avatar
    Mantra
    *modder with autism noises*
    URL to post:
  • Slimemoreno17 avatar
    Slimemoreno17 username pic Joined 1y ago
    Working on mods
    638 points Ranked 44,560th
    10 medals 1 rare
    • Returned 1000 times Medal icon
    • One month a member Medal icon
    • Returned 100 times Medal icon
    • 6 months a member Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • Became a Studio Leader Medal icon
    Slimemoreno17 avatar
    Slimemoreno17
    The Federation of Modification Flag
    Affiliation
    The Federation of Modification
    1mo
    How do i add the step sound?
    Stupid Bloody Spies avatar
    Mantra
    Stupid Bloody Spies
    URL to post:
  • GZOONK avatar
    GZOONK username pic Joined 2y ago
    7/7 Notebooks
    Ruler Productions Flag Affiliation: Ruler Productions
    1,575 points Ranked 22,045th
    19 medals 2 legendary 3 rare
    • Became a Ripe Supporter Medal icon
    • Returned 5000 times Medal icon
    • Received thanks 50 times Medal icon
    • Reached 50 subscribers Medal icon
    • Returned 1000 times Medal icon
    • One month a member Medal icon
    GZOONK avatar
    GZOONK
    Ruler Productions Flag
    Affiliation
    Ruler Productions
    1mo
    God like activity! Good Job!
    Yes avatar
    Mantra
    Yes
    URL to post:

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Creator
Rendurse avatar
Rendurse username pic Joined 2y ago
DISCONNECTED
933 points Ranked 41,942nd
11 medals 1 legendary 1 rare
  • Returned 5000 times Medal icon
  • Returned 1000 times Medal icon
  • Returned 100 times Medal icon
  • One month a member Medal icon
  • Received thanks 5 times Medal icon
  • Reached 10 subscribers Medal icon
Making this Tutorial

Submitter

Rendurse avatar
Rendurse username pic Joined 2y ago
DISCONNECTED
933 points Ranked 41,942nd
11 medals 1 legendary 1 rare
  • Returned 5000 times Medal icon
  • Returned 1000 times Medal icon
  • Returned 100 times Medal icon
  • One month a member Medal icon
  • Received thanks 5 times Medal icon
  • Reached 10 subscribers Medal icon
Rendurse avatar
Rendurse

Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Intermediate

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 8
  • 1.3k
  • 23
  • 1mo
  • 18d
  • 18d

More from Submitter

WiPs by Submitter

More Scripting Tutorials