TLD's code is not open source, so I really don't see how I could link to it. I can give you some instructions how to see the game's decompiled source code for yourself, though:
<your TLD install directory>/tld_Data/Managed/Assembly-CSharp.dll
in that decompiler.TreatAfflictionWithFirstAid
method in the PlayerManager
class, and see how the code makes its way to the OnFirstAidCompleted
method in the Inventory
class without ever checking the condition of the item.ILSpy for example can extract all of the C# source code for a Unity game in almost exactly the same form as it was originally.
There are even general purpose tools like Game Extractor which can extract assets from tons of different formats.
I did a lot of digging in ILSpy: https://github.com/icsharpcode/ILSpy
The game code is almost all in Assembly-CSharp.dll. That makes it easy to see what the blueprints correspond to. (the blueprint files are basically serialized game objects)
JetBrains (the makers of Resharper) have a decompiler integrated in their dotPeek product that you can get for free: https://www.jetbrains.com/decompiler/
ILSpy also has similar capabilities: https://github.com/icsharpcode/ILSpy
But you can already do it to some extent in Visual Studio itself: https://docs.microsoft.com/en-us/visualstudio/ide/go-to-and-peek-definition?view=vs-2019#view-metadata-as-source-code-c
If it's something small, you can use SharpLab. If you want to do it for a proper compiled project, use a decompiler application, like dotPeek or ILSpy.
But keep in mind that all those are decompilers: the C# compiler generates IL, the decompilers try to reconstruct the IL back into C#, but it will never be 100 % accurate.
Node, unless you're using typescript, it's dynamically typed which increases the surface area for bugs and hard to identify problems at compile time. Additionally, its single threaded which means you need to manually add threading to get multithreading up and running (to handle more requests) Node is really for IO bound tasks, like database access, and is useful for writing command like tools/libraries for frontend.
This is really clever. I didn't know that generic constraint cannot inherit Enum/Delegate classes because of language limitations, not runtime limitations. On the other side, it's the runtime that prevents adding methods to enums (I was quite disappointed). I did manage to patch enum vtables to change implementation of ToString method though.
Also some methods of the final assembly crash the ILSpy decompiler. I will try to fix this in ILSpy.
Good work!
Update: ILSpy fixed.
It definitively is, specially considering that the game was being developed in 2007, which means its server most likely used old technologies, which at this were reverse engineered enough to be easy to work with.
Some useful details: those game files are used only by Microsoft's XNA framework, which means the game was coded in C# with .NET. That, by instance, means one most likely can decompile the game EXE using the application below:
https://github.com/icsharpcode/ILSpy/
After that, one could use that information to start creating a server. Beyond that, anyone can use an application like Wireshark to find which kind of requests the game is doing, even without decompiling the code, in order to make the server capable or responding them. Although, decompiling the code will most likely be necessary, in order to understand which kind of response the game expects to receive.
Not that I've done this before, so take it with a grain of salt.
You may be able to quickly port it to C# by compiling it and then decompiling it using ILSpy.
https://github.com/icsharpcode/ILSpy
I expect it will require a lot of cleanup, but it may be worth a try.
you don't actually need to decompile.. the source code is here: https://github.com/Unity-Technologies/UnityCsReference
i sometimes browse the code on the web. i also have a copy of the repo locally and keep it open alongside my project. but with rider (and probably with visual studio on windows, but afaics not on mac, which is garbage), you can just Ctrl + click on the unity code and it will navigate there like it's part of your project.
A good IDE and knowledge of how to use it is def something worth investing in. I recently switched to rider and my day to day coding 'happiness' has gone up a bunch. But in case you don't end up getting Rider or VS on windows (which should have a free version?), there are tons of free alternatives for dead-simple decompilation, e.g. ilspy . Decompilation has def come in handy for me outside of unity's code... sometimes you just need to see what the third party code is doing.
Unlike the currently top voted, uninformed, comment says, the game is certainly not written in C++.
It is a game made using Unity, meaning the games own code is in C#.
Now the question is what you want to datamine.
If you just want to get some image files and so on you can use something like uTinyRipper or all the other game ripping programs and just look for image files there.
If you want to take a look at how they wrote the game, you should use something like ILSpy and open the Assembly-CSharp.dll
.
If you want to take an extensive look at specific parts like extracting item icons or localisation (like I did for my save editor) you should know how to program in C# and then use something like f.e. dnSpy to decompile, change code and recompile.
These existing variants are safe enough to mess around with yourself if you want, and aren't even obfuscated (Lazy Malware dev :p). Download ILSpy and drag the PremiumGet.exe onto it and look around :)
Helps if you know C# ^_^
yes and Visual studio decompiles them for that :P take a look at ILSpy for example, its sometimes easier to use that to find something then fiddling around with the visual studio object browser
I'm not quite sure the legality of this but couldn't you decompile the DLL and if need be make any code changes and recompile it as 64bit?
The Decompiler I'm thinking of is https://github.com/icsharpcode/ILSpy for C#
There is no VaM documention to speak off. However, in general I recommend to use ILSpy to look at VaM_Data\Managed\Assembly-CSharp.dll. It allows you to look at VaM's codebase. You should take a look at MVRScript, Atom, SuperController, JSONStorable, JSONStorableFloat, etc. https://github.com/icsharpcode/ILSpy/releases/latest
It's not in that particular file, so I looked at a decompiled version of the game's code - since the game is in unobfuscated C#, it's pretty simple to use a program like ILSpy to decompile it. (This isn't always legal to do, but fortunately, the Celeste devs are generally cool with people using tools to reverse-engineer the game, as long as you don't, like, redistribute the entire thing, or copy large parts of it and claim it as your own.)
Specifically, it's in the ProximityExplodeCheck()
method inside the Puffer
class - it checks whether the player's CenterY
is greater than a particular value relating to the puffer's own height before allowing the boost. (In this game, positive Y is downward, so this amounts to checking whether the player's center is low enough.)
C:\Program Files (x86)\Steam\steamapps\common\Beat Saber
, Oculus will be different)Beat Saber_Data
, then Managed
. You should see a bunch of DLL files.Main.dll
, and drag it in to the left side of ILSpy.Main
with version 0.0.0.0
and .NET framework, v4.0
).-
(global) namespace, so double click that to expand.GameEnergyCounter
.Are you adding .Net assemblies as dll references?
You can't add any dll (like from Windows folder). The dll you are referencing should be built using .Net Framework or COM-visible (as it is noted in the error message you are getting).
Please try to inspect dll you are adding using the ILSpy application. It can recognize .Net Framework assemblies and shows assembly content.
It's a .NET program so I used ILSpy. Then I poked around until I found the functions that were attached to the GUI and figured them out. I don't even know .NET so it's actually kind of amazing that I was able to do that.
My guess is that they included the binary for users' convenience. See, the archive also contains a batch file that tells wim_tweak what to do. It is not just single binary file. Otherwise you have to download one file from here, and another one from there.
Also, the MSFN.org site is down for me right now. I cannot open the thread you are linking to.
Mind to share that other binary you have?
Finally, it is a .NET framework app. You can decompile both binaries you have with a tool like https://github.com/icsharpcode/ILSpy.
And compare their source code.
It stores cookies, not logins. But yeah, I do agree that I would easily benefit from stealing accounts from a 7-years old dying game despite having 15 free epic store accounts.
This .NET program is not encrypted, nor obfuscated - to view the source code - analyse it using ILSpy: https://github.com/icsharpcode/ILSpy/releases/tag/v6.2.1
You are welcome.
Just a follow up to my last post. I checked out ILSpy Avalonia and found the framework to be too basic for my needs. There is no add-in framework, no docking. Not to mention that every Avalonia UI project I have seen so far looks very "entry-level".
I have the impression that the library has a lot of work to do before they come to the maturity of GTK and Winforms. I would classify it as a poor decision if I choose a framework that finds me spending hours coding simple things like grid views and icon transitions (etc).
Unfortunately too many frameworks have come and gone to commit to a project which is 'in' for this year. The choice has to be based on ensuring the framework is capable of fulfilling my needs first.
CallerMemberNameAttribute
is not a normal attribute. Or rather, it is, but the compiler treats it differently, setting caller's argument to the member name in the generated IL. Meaning, it doesn't dynamically determine the caller at runtime--the compiler simply embeds the calling member name as a string constant.
For example I pasted the example code from the CallerMemberNameAttribute
documentation into my program and then disassembled the code in ILSpy. This was the result:
public void DoProcessing() { TraceMessage("Something happened.", "DoProcessing", "C:\MyCode\MyApp\src\SomeClass.cs", 84); }
So you can see that the attribute itself isn't doing anything here, it's how the compiler treats it.
You could try to write a plugin similar to my EditMode plugin which switches to Edit mode when loading VaM. It's part of "Essentials", here: https://hub.virtamate.com/resources/macgruber-essentials.160/
Some pointers what might work, I didn't actually try:
I'll use ILSpy as an example, I personally use that.
Go to their GitHub page ( https://github.com/icsharpcode/ILSpy ) and scroll down to the readme section.
Click on "latest release", and at the "releases" section, scroll down until there is the green "latest release" tag. You see the "...binaries..." zip file. Download it.
Then, unzip the zip file. You have ILSpy.exe as the decompiler executable. No explicit installation required, just double-click on that exe and the decompiler will run itself.
Essentially a plugin for VaM is just a text file with some C# code. VaM searches your code for a class derived from MVRScript and instantiates it. In Unity terms MVRScript is a MonoBehaviour, which means it is placed on a Unity GameObject which again has a Transform. When scripting in Unity you would also derive from MonoBehaviour.
Here is a minimal plugin which just rotates the Atom you put it on:
using UnityEngine;
public class Rotate : MVRScript
{
protected void Update()
{
Transform t = containingAtom.GetStorableByID("control").transform;
float rotation = Time.deltaTime * 90.0f; // rotation speed: 90deg per second
t.Rotate(0.0f, rotation, 0.0f); // rotation axis: Y-Axis
}
}
There is no real documentation for VaM, however there is this page which might help a bit: https://www.reddit.com/r/VirtAMate/wiki/scripting_examples
Besides that, VaM is using Unity, so a lot of Unity API can be used, although some stuff is blocked for security reasons. It will help to look at plugins from other people to figure things out. Additionally I recommend to use ILSpy to look into the VaM internals and see how it works and how things are supposed to be used. Use ILSpy to decompile VaM_Data\Managed\Assembly-CSharp.dll and it will show you all the important stuff. Its pretty helpful to right-click => "Analyze" things to figure out from where something is called, etc.
Some starting points:
Atoms are "Objects in VaM". Those usually have a number of JSONStorable on them, which again have a number of JSONStorableParam.
You have to decompile Terraria.exe to get the files. It is illegal to publish the decompiled code, so you cannot legally find it online. A good way is to download ilspy, open it up, open up Terraria.exe in it, and then press the save code button. This will take 20 minutes or so depending on your computer. This has a chance to cause errors, so you might want to use an older but slower ilspy, version 2.3.1.
​
Hope this helps, worked for me and helped with modding
This is a very good decompiler for programs written in C# compiled to MSIL/CIL running on the CLR. MSIL contains very high level instructions. Jetbrains also makes dotPeek, but I haven't used it yet.
So short answer yes you can decompile C# stuff pretty easily, I don't know about obfuscation, I don't decompile .NET stuff that much, but it's pretty weak compared to x86 due to the VM.
Yes, you can read the state of a trigger. What exactly do you want to do?
For exploring the possibilities I recommend to use ILSpy to look into the DLL. Get the binary package of ILSpy here and use it to open VaM_Data\Managed\Assembly-CSharp.dll in the VaM install directory. All the interesting stuff is in the global namespace { }. In this particular case you will want to look at these classes:
​
​
I used ILSpy, but the results weren't that great. Since my goal is to update this for .NET Core (and make it cross platform) losing original symbols and stuff complicates it a lot further.
Kinda like what's happening now, right? ^-^ Sometimes people just straight up ignore one of the conversations.
Also, ho shit! I just found a neat program over on GitHub that lets you "revert" an .exe file to C# code, which is really useful considering I learned that and Java. In case you or someone you know is interested in something like that, here you go. I'll try to figure out that's the problem and if I manage to fix it I'll send you a link to the fixed version.
I'm the author, the software is safe and opensource on my personal GitHub (if you don't want to compile it by yourself to be 100% sure, you can download a software like ILSpy to decompile the .exe and see all the source (because it is written in a .NET language). Blame it on the agenda of some mod that censored all my posts and comments here.
I will answer any question people have on this sub but I won't post it here again. You can find it on a couple other subreddits anyway, the only thing I care is that people looking for it will be able to find it with a Google search, which now should already be the case.