How to change game actions

A Tutorial for Baldi's Basics in Education and Learning

Hello everybody Cakemix here.

Today I will tell you how to change the text,Actions,game Code. Using DnSpy

Open "DnSpy" at the Top, find the File tab then click Open. BALDI_Data\Managed. And select Assembly-CSharp.dll. Then, on the left side of the program, Find Assembly-CSharp.dll and a small arrow next. click on it. Then there will be another Assembly-CSharp.dll again click on the arrow.BOOM! And We see here all GAME SCRIPTS! Now let's change something in the game. Let's for example turn the word BSODA into just Soda. Looking For BsodaEffectScript. Click on it. To change the script code we have to right-click on it.Then select Change Method (C#). The name BSODA in the code is located on line 39. if (other.tag = = "BSODA") Change the BSODA to something else(in My case, just Sda.) and click on the Compile Button. Now let's make it to the game was closed when we got caught by Baldi.

Now find "Game Over Script". And find line 29.Then RMB(Right mouse button) On it and Change the method(C#) And Replace the code with mine.

using System;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000020 RID: 32
public class GameOverScript : MonoBehaviour
{
    
// Token: 0x06000099 RID: 153 RVA: 0x00005A94 File Offset: 0x00003C94
    private void Start()
    {
        
this.image = base.GetComponent<Image>();
        
this.audioDevice = base.GetComponent<AudioSource>();
        
this.delay = 5f;
        
this.chance = UnityEngine.Random.Range(1f99f);
        
if (this.chance < 98f)
        {
            
int num = Mathf.RoundToInt(UnityEngine.Random.Range(0f4f));
            
this.image.sprite = this.images[num];
        }
        
else
        {
            
this.image.sprite = this.rare;
        }
    }

    
// Token: 0x0600009A RID: 154 RVA: 0x00005B28 File Offset: 0x00003D28
    private void Update()
    {
        
Application.Quit();
        
if (this.chance < 98f)
        {
            
this.image.transform.localScale = new Vector3(5f5f1f);
        }
        
this.image.color = Color.red;
        
if (!this.audioDevice.isPlaying)
        {
            
this.audioDevice.Play();
        }
        
if (this.delay <= -5f)
        {
            
Application.Quit();
        }
    }

    
// Token: 0x040000ED RID: 237
    private Image image;

    
// Token: 0x040000EE RID: 238
    private float delay;

    
// Token: 0x040000EF RID: 239
    public Sprite[] images = new Sprite[5];

    
// Token: 0x040000F0 RID: 240
    public Sprite rare;

    
// Token: 0x040000F1 RID: 241
    private float chance;

    
// Token: 0x040000F2 RID: 242
    private AudioSource audioDevice;
}


To all appeared in the game. at the top, click File\Save Module. Then click OK.



Sign up to access this!

Embed

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

Credits

Tutorial
Cakemix
Tutorial,Code.

Submitter

Cakemix avatar
Cakemix Joined 1mo ago
Offline
139 points Ranked 25618th

Cakemix
Creator
  • Paypal Donate
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
Beginner

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+
  • Today's Pick Nov 19 2018
  • 723 Views
  • 9 Posts
  • 1moSubmitted

Scores

  • Not yet rated
Sign up to access this!

More from Submitter

More Other/Misc Tutorials

bcp.crwdcntrl.net tracking pixel