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 Achievements To Decompiles

A Tutorial for Baldi's Basics

No ads for members. Membership is 100% free. Sign up!

Welcome To The Tutorial!

  • Hello, and welcome to this tutorial, which was a request by someone! In this tutorial, i will show you how to add achievements that work to decompile mods. Below is what you need:
  • Unity 2018.3.9f1 (For 1.3.2 Decompiles), Unity 2019.2.8f1 (For 1.4.3/BB Decompiles)
  • Microsoft Visual Studio (For Coding)
  • A Copy Of The OSB In Unity
  • Some Coding Knowledge (Recommended)
Alright, now on to the steps!

Step 1. Create An Image And A Text Under It (It can be either standard or TMP text). Also, make a new script, it will be for your achievement. You can use the example script below: Example Achievement Script
https://ibb.co/q7r1JX4
Step 2. Go to the image you made and in inspector add the achievement script you just made.
https://ibb.co/k1194b8
Step 3. In the script you put in the image, there should be empty areas. Apply the text you made to achievement text, the image to achievement image, for type put in what you want the achievement to be called, And under locked and unlocked text put in the text that'll show up before and after you unlock it.
https://ibb.co/684vqPG
Step 4. Now we need to change the player pref (name of achievement) value somewhere. This example puts it in the notebook script, but you can put it almost anywhere.

Step 5. Make sure the PlayerPref's the value is the same as the one you put in "type". And, the value must be set to 1.
https://ibb.co/FXnw9NY
Step 6. Go to your scene and press play. Test to see if you achievement works. In this example, when a notebook is collected, the achievement is unlocked.
https://ibb.co/98Lf00m
https://ibb.co/sj2HpPy
I hope this tutorial helps, and if anyone else has tutorials they request me to make, tell me in the comments! (And credit to filename3 for the screenshots i've linked)
Sign up to access this!

Embed

分享横幅
图片 URL
HTML 嵌入代码
BB Code 嵌入代码
Markdown 嵌入代码

Credits

Key Authors
JohnsterSpaceProgram Johnster Space Studio Flag
关联
Johnster Space Studio
Offline
3,654 points Ranked 2681st
26 medals 2 legendary 4 rare
  • 2019 Top Contributor Medal icon
  • Returned 5000 times Medal icon
  • Returned 1000 times Medal icon
  • 10 submissions featured Medal icon
  • Reached 50 subscribers Medal icon
  • Received thanks 50 times Medal icon
Made The Tutorial
Special Thanks
Dat the 2nd avatar
Dat the 2nd username pic Joined 10mo ago
Offline
355 points Ranked 49373rd
14 medals 1 rare
  • Returned 1000 times Medal icon
  • One month a member Medal icon
  • Submitted 5 Gamefiles Medal icon
  • Returned 100 times Medal icon
  • Became a Studio Leader Medal icon
  • Thanked 5 submitters Medal icon
Requested The Tutorial
Filename3
Filename3 Joined 6mo ago
Offline
2,365 points Ranked 20340th
11 medals 2 rare
  • Returned 1000 times Medal icon
  • Reached 50 subscribers Medal icon
  • One month a member Medal icon
  • Returned 100 times Medal icon
  • Received thanks 5 times Medal icon
  • Reached 10 subscribers Medal icon
Originally Helped Me Out With Working Achievements, The Screenshots

Submitter

Online Learning
3,654 points Ranked 2681st
26 medals 2 legendary 4 rare
  • 2019 Top Contributor Medal icon
  • Returned 5000 times Medal icon
  • Returned 1000 times Medal icon
  • 10 submissions featured Medal icon
  • Reached 50 subscribers Medal icon
  • Received thanks 50 times Medal icon
JohnsterSpaceProgram Johnster Space Studio Flag
关联
Johnster Space Studio

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
中级

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 4
  • 766
  • 9
  • 2mo
  • 2mo

More from Submitter

WiPs by Submitter

More Decompile Tutorials