Decompiling terraria.
hy guys i found this tutorial
Preparation:
-Reflector 7
-Visual C# 2010 Express
-XNA Framework 4
Decompile:
Start Reflector
File -> Open Assembly -> Terraria.exe
Left Sidebar -> RightClick Terraria -> Export Assembly Source
First Run
Navigate to the exported Source
Open Terraria.csproj in Visual C#
Hit the "Debug" Button at the top (Green arrow)
Fixing the Errors [Part 1/4] [Duplicate TargetFramework attribute]
Open AssemblyInfo.cs
Comment/Remove [assembly: System.Runtime.Versioning.TargetFramework(".NETFra mework,Version=v4.0,Profile=Client", FrameworkDisplayName=".NET Framework 4 Client Profile")] [Line 6]
Fixing the Errors [Part 2/4] [Can not convert]
Add .toString() at the end of the variable
Fixing the Errors [Part 3/4] [The best overloaded method match]
Add .toString() at the end of the variable
Fixing the Errors [Part 4/4] [Use of unassigned local variable]
Add = new [Class]()
e.g. IntPtr ptr; to IntPtr ptr = new IntPtr();
Fixing the Crashes [Part 1/3] [Game not even starting]
Open Program.cs
Comment/Remove the Steam Code
Fixing the Crashes [Part 2/3] [WorldGenerator crashing]
Open WorldGen.cs
Cut public static int maxDRooms = 100; [Line 55]
Paste above private static int[] dRoomB = new int[maxDRooms]; [Line 25]
Fixing the Crashes [Part 3/3] [WorldGenerator crashing.. again]
Open Main.cs
Cut public static float rightWorld = 134400f; [Line 251]
Paste above public static int maxTilesX = ((((int) rightWorld) / 0x10) + 1); [Line 175]
Fixing the Crashes V1.0.3 [Part 1/1] [Array out of bounds]
Open Main.cs
Cut public static int numChatLines = 7; [Line 232]
Paste above public static ChatLine[] chatLine = new ChatLine[numChatLines]; [Line 49]
Fixing Bugs [Part 1/1] [Player Savefiles] - Thanks to berti11
Open Main.cs
Cut public static string SavePath = (Environment.GetFolderPath(Environment.SpecialFold er.Personal) + @"\My Games\Terraria"); [Line 253]
Paste above public static string PlayerPath = (SavePath + @"\Players"); [Line 237]
tutorial by: Deathly