hmmmmmmmmmmm u say a game....but won't tell...
Hello all,
There's a game being developed right now in what I believe to be in C#. It's a multiplayer online game, based off of an old java game which I used to play but is now no longer existant.
Basically, I used to "hack" (or whatever you'd like to call it) this old java game by decompiling the code, making changes, then recompiling. This gave me great versatility for changing things within the game, as I wasn't limited to simply doing memory searches to give unlimited health (which wouldn't have worked anyway since it was stored server side). Getting to the point:
The Point:
I'd like to begin doing this for this new game while it is still in it's early stages. I know very little about c#, but I'm intelligent enough that I should be able to mess around with it to get the effect I'd like. I've downloaded the decompiler (or is it better referred to as disassembler?) Reflector, but it gives quite a few source files for one DLL, and I'm not sure how to go about getting it recompiled and packaged back into the DLL.
Is there anyone out there that might be able to help me?
Thanks in advance
Last edited by Anirak; 10-13-2009 at 04:23 PM.
hmmmmmmmmmmm u say a game....but won't tell...
Is that... relevant? If someone wants to work on it privately with me I'd love to, but as it is a very small community of players right now and very much in development, I don't want to post it publicly as I think it would cause more harm to the game than good.
I would call it a reflector, but on to your main point.
The source could come out any which way. It all depends on the nature of the reflector. The good thing is C# is a lot like Java... which you probably already know. It will be impossible for anyone to tell exactly what should be done without posting the source as far as I can tell. And even then it might take a while. It all depends on your deflector too. name your deflector, the game, and the decompiled source.
Trust me I will probably never play whatever game ur talking about.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Any DLL (for any major project) is usually Multiple (upon multiple) files.
I work on DLLs that have easily 50/100+ files in them
Reflector will indeed 'decompile' or at least attempt but you will not the source code 100% since it's been compiled already into MSIL so it makes it's best guess what the C# code looked like (which usually , at least from my experiments with reflector) isn't even close
Of course that's not even getting into obfuscation etc which will make that even messier (if they bothered to go through that step).
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Attempting to recompile a few of the source files gives me a variety of errors. On the most simple of files I get the following three errors:
At the beginning of the source code:Code:ExtraRadar.cs(3,21): error CS0234: The type or namespace name 'Xna' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) ExtraRadar.cs(14,27): error CS0246: The type or namespace name 'Rectangle' could not be found (are you missing a using directive or an assembly reference?) ExtraRadar.cs(22,16): error CS0246: The type or namespace name 'Rectangle' could not be found (are you missing a using directive or an assembly reference?)
Could this be a result of having too old of a version of the .NET SDK? I googled and saw the first download was v2.0, but apparently there is a 3.5.Code:using Microsoft.Xna.Framework;
Nevertheless, a variety of other errors appear depending on which file I attempt to compile.
Thanks again for all the help!
So just as a test I made a small hello world program and attempted to decompile it then recompile.
Several source files were created despite my original single source file. Attempting to recompile any of the files gave errors, which seems to result from not having other "using directives" or "assembly references" present.
Ok. here's the thing. Even a simple program like hello World takes tons of information from other classes (such as the I/O system). And the I/O class probably takes from other classes too. Maybe it's you decompiler. I'm not sure. It could really be a number of things... sorry
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
hmm idk about C# but in C++ u have to use like this
try it like thatCode:using namespace Microsoft.Xna.Framework;
Ok, I Made a quick C# hello world (no i don't know C#), and used reflector to disassemble it and the code came back exactly the same basically. Then i found a random C# code snippet and disassembled it with Reflector and though a couple things were done differently, it was essentially the same.
And Matrix: The using Directive in C# has very slightly different syntax, so what Anni has is correct i beleive. But i recommend you not listen to me cause i don't actually know C# :/
It's obviously using the XNA Framework so download & install that
creators.xn*****m
Thanks. I downloaded it and installed. However, am I still getting the same dialog box from reflector when attempting to disassemble that it cannot find microsoft.xna.framework version 3.0.0.0. It asks me to find it manually, so I click "browse" and go to C:\windows\assembly\ and find it easily, however selecting and clicking "open" does nothing. It doesn't even close the dialog box. Any ideas?
Edit: Cancel that. I believe I've figured it out. My problem is now it wants MySql.data version 6.0.3.0. I'm gonna google around to see if I can find it.
Last edited by Anirak; 10-21-2009 at 02:59 PM.
Well I managed to get all of those .dlls found just fine, but upon exporting the visual c# file I get gobs of errors. I feel like I might be messing up something very simple here, perhaps with version settings or something like that. Can anyone possibly think of some settings I might have wrong on import/export that could cause all of these errors?
Also, I'm trying to build to a DLL but it seems as it it's trying to build to a .sln file when I hit build?