To verify that this class is what we are looking for, we can look at the properties of the class which seem to indicate the total amount of items is stored. However, if we look in the namespace, we will notice a conveniently named class named ItemManager. Using this knowledge, it is possible to find the method which will handle increasing the level after playing a song using Search. Figure 5: Snippet from DataUpdate methodįrom this method we learn how the current level of the player is stored. We can then sift through this results to eventually find a method called DataUpdate in. Searching for all numbers and strings containing “level” in the current assembly, we will get a dozen results. To do this, we use the Search functionality in dnSpy. Since we know items need to be awarded when the player levels up, we could search for the logic that handles adding xp and levels to the player. There are multiple ways to approach this.
#Muse dash codes code
The first goal is to find the code responsible for selecting which item will be given to the player when they level up. This is often done to prevent reverse engineering the file because it is possible to achieve a near 1:1 decompilation. When we open the first DLL, we see that it’s not packed or obfuscated. The latter of which is a dependency and, as such, will also be loaded. Like mentioned earlier, we are not interested in these and will stick to Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll. We load Assembly-CSharp.dll into dnSpy and this will automatically load in all the required dependencies. Digging In Figure 4: Assembly explorer output of Assembly-CSharp.dll. I like to use dnSpy but any tool will work. These are both written in C# so in order to reverse them, we need a C# disassembler. In the Managed folder, the only two files we are currently interested in are Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll. The remainder of the folders contain third-party dependencies and assets. This folder contains all DLL files that will get loaded when the game is started. The folder we are interested in is called Managed. Readers who are familiar with Unity will most likely recognize the folder structure. Figure 3: Contents of MuseDash_Data folder.
Looking in the MuseDash_Data folder will reveal that all game data is stored in this folder as seen on Picture 3.
We don’t investigate the main MuseDash.exe executable since this is a wrapper for Unity and doesn’t contain anything useful for us. Since Unity was used, reversing the game is a lot easier because the game logic is implemented in C#. A dll called UnityPlayer.dll is present in the root directory. Here we can see the first clue that the game was developed using Unity. Figure 2: Main folder layout of Muse Dash. This will yield a view similar to Figure 2. This can be done quickly by going to the properties of the game and pressing the 'Browse local files.' button in the 'Local Files' tab. The game is available on Steam and costs US$2.99 or 3.49€ with an expansion pack adding 78 more songs costing US$29.99 or 29.99€.Īfter installation, we can look into the folder structure of the game. Since the game is made in Unity, the core logic should be the same across all platforms.
#Muse dash codes Pc
This article is gonna focus on the PC version of the game. Figure 1: The character I want to unlock. Therefore I want to investigate the game to see how unlocking characters is implemented. I have played numerous hours and have still not having unlocked this character. This is similar to other rhythm games like Osu!. One of these characters increases the score you gain but drains your health while you are playing. The game has multiple characters that can be unlocked and each character has unique abilities.
I’m a huge fan of rhythm games so I spent a lot of time playing it. It’s a rhythm game so after watching a few gameplay videos, I instantly purchased it on Steam. I recently discovered a new game called Muse Dash.
#Muse dash codes how to
Tutorial on how to reverse engineer Unity games to gain understanding of their inner workings.