Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: is there a c++ compiler and decompiler for df.exe? i got a curse from a mummy :(  (Read 11466 times)

azrael300

  • Bay Watcher
  • WERE GOING TO LIVE :)
    • View Profile

is there a c++ compiler and decompiler for df.exe thats free? i got cursed by a mummy and now i cant cut anythings heads off,all i can do is throw stuff and shoot with my railgun (that does not always do a 1-hit kill), and using a railgun and throwing is boring and is prone to cause anger.(and i killed 500 creatures)
Logged
Edit. Oh Jesus Christ, Necro would be proud. The second horse in the caravan came in and immediately caught on fire. I looked into his inventory and found a burning pig tail fiber bag. Curious, I looked inside.
quote above is by yuriruler90

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

There's no such thing as a free C++ decompiler - you'd have to use a disassembler, and I'm not sure it'd do you any good...

Mummy curses, as they are currently implemented, are permanent, though if you want to remove one, you should be able to do so using DFHack if you know exactly what you're doing.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile

Actually, you can just go to a town, retire as an adventurer, and then pick to start a new game as an adventurer and un-retire your old adventurer.

The game doesn't record mummy curses in historical figures, but records all your kills and such, so you will restart as your old adventurer without the curse.  (At least, last I heard, that's how it worked...)
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

Actually, you can just go to a town, retire as an adventurer, and then pick to start a new game as an adventurer and un-retire your old adventurer.

The game doesn't record mummy curses in historical figures, but records all your kills and such, so you will restart as your old adventurer without the curse.  (At least, last I heard, that's how it worked...)
I'm pretty sure that's not the case - if it were, you could do the same thing to cure vampirism or stop being a werebeast. Active interactions are definitely stored within historical figures, but even if they were only stored on the unit, you still wouldn't be safe since the unit itself also gets offloaded (to a unit-*.dat file) and gets restored once the histfig comes into play again (whether as yourself, as a townsperson met by another adventurer, or even as a migrant in a fortress).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

azrael300

  • Bay Watcher
  • WERE GOING TO LIVE :)
    • View Profile

so your saying that exe files cant be decompiled for free?
Logged
Edit. Oh Jesus Christ, Necro would be proud. The second horse in the caravan came in and immediately caught on fire. I looked into his inventory and found a burning pig tail fiber bag. Curious, I looked inside.
quote above is by yuriruler90

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile

so your saying that exe files cant be decompiled for free?

I'll put it this way, you're not going to get the source code (and I don't think you understand what "decompiling" means, anyway). 

What you probably are thinking of is a memory hack program like DFHack.  I don't know of any code in that program to remove mummy curses, though.

I'm pretty sure that's not the case - if it were, you could do the same thing to cure vampirism or stop being a werebeast. Active interactions are definitely stored within historical figures, but even if they were only stored on the unit, you still wouldn't be safe since the unit itself also gets offloaded (to a unit-*.dat file) and gets restored once the histfig comes into play again (whether as yourself, as a townsperson met by another adventurer, or even as a migrant in a fortress).

Well, I haven't tried it myself (mummys are the only things I haven't tried to fight as an adventurer), but I've read some posts saying reactivating adventurers would not carry over mummy curses (but would carry over vampire and werecreature curses), so it might have just been a coding oversight on Toady's part.  (That, or I just completely misread something.)
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

azrael300

  • Bay Watcher
  • WERE GOING TO LIVE :)
    • View Profile

so your saying that exe files cant be decompiled for free?

I'll put it this way, you're not going to get the source code (and I don't think you understand what "decompiling" means, anyway). 

What you probably are thinking of is a memory hack program like DFHack.  I don't know of any code in that program to remove mummy curses, though.

I'm pretty sure that's not the case - if it were, you could do the same thing to cure vampirism or stop being a werebeast. Active interactions are definitely stored within historical figures, but even if they were only stored on the unit, you still wouldn't be safe since the unit itself also gets offloaded (to a unit-*.dat file) and gets restored once the histfig comes into play again (whether as yourself, as a townsperson met by another adventurer, or even as a migrant in a fortress).

Well, I haven't tried it myself (mummys are the only things I haven't tried to fight as an adventurer), but I've read some posts saying reactivating adventurers would not carry over mummy curses (but would carry over vampire and werecreature curses), so it might have just been a coding oversight on Toady's part.  (That, or I just completely misread something.)
i know what decompiling is i have eclipse c/c++ open right now (curses i dont know about,but economy should be able to be enabled with source code and c++)

i can also waste the rest of my life learning what the current compiled df language it uses.by compiling something else after writing something in it then compiling.but im not going to waste a lifetime
« Last Edit: May 19, 2012, 08:05:17 pm by azrael300 »
Logged
Edit. Oh Jesus Christ, Necro would be proud. The second horse in the caravan came in and immediately caught on fire. I looked into his inventory and found a burning pig tail fiber bag. Curious, I looked inside.
quote above is by yuriruler90

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile

i know what decompiling is i have eclipse c/c++ open right now (curses i dont know about,but economy should be able to be enabled with source code and c++)

i can also waste the rest of my life learning what the current compiled df language it uses.by compiling something else after writing something in it then compiling.but im not going to waste a lifetime

Even if you disassembled DF, that still isn't going to give you the thing that you're looking for, which is something much simpler, because all you want is a memory hack or decrypting the save game files.  Rewriting the source code wouldn't change what's in your savegame, anyway, unless you were honestly going to go the route of rewriting the hard-coding of mummy curses, which is somewhat akin to trying to lift a mountain that is in your way rather than simply following the detour around it. 

What you want is DFHack and memory hacking.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

azrael300

  • Bay Watcher
  • WERE GOING TO LIVE :)
    • View Profile

i know what decompiling is i have eclipse c/c++ open right now (curses i dont know about,but economy should be able to be enabled with source code and c++)

i can also waste the rest of my life learning what the current compiled df language it uses.by compiling something else after writing something in it then compiling.but im not going to waste a lifetime

Even if you disassembled DF, that still isn't going to give you the thing that you're looking for, which is something much simpler, because all you want is a memory hack or decrypting the save game files.  Rewriting the source code wouldn't change what's in your savegame, anyway, unless you were honestly going to go the route of rewriting the hard-coding of mummy curses, which is somewhat akin to trying to lift a mountain that is in your way rather than simply following the detour around it. 

What you want is DFHack and memory hacking.

time to lift a mountain

lol jk
whats the best memory hacking tool for df?
Logged
Edit. Oh Jesus Christ, Necro would be proud. The second horse in the caravan came in and immediately caught on fire. I looked into his inventory and found a burning pig tail fiber bag. Curious, I looked inside.
quote above is by yuriruler90

HiEv

  • Bay Watcher
  • Denizen of Counter-Earth
    • View Profile

i know what decompiling is i have eclipse c/c++ open right now (curses i dont know about,but economy should be able to be enabled with source code and c++)

i can also waste the rest of my life learning what the current compiled df language it uses.by compiling something else after writing something in it then compiling.but im not going to waste a lifetime

Eclipse isn't a decompiler.  Also, decompilers rarely decompile into anything other than assembly language, unless the decompiler is specifically written to decompile for the language that the compiled file was written in (this kind of decompiler is exceedingly rare, and certainly doesn't apply here).  There is no decompiler in the world that is able to take the Dwarf Fortress EXE and decompile that into C/C++ for Eclipse.

Decompiling, modifying, and recompiling from an executable file is an art that few (mostly in the software cracking community) are capable of.  If you think you can do this, then you really don't know what decompiling is.

Edit:
whats the best memory hacking tool for df?

NW_Kohaku just told you, DFHack.
« Last Edit: May 19, 2012, 08:38:55 pm by HiEv »
Logged
The difference between intelligence and stupidity is that intelligence has its limits.

slaytanic

  • Bay Watcher
    • View Profile
    • my DFFD pack

You can try http://cheatengine.org/ but I have only used it for snes and nes EMU's. It might work for what you want if you can ever identify the value you want to change.
Logged
So let me get this straight....We are talking monkeys living on a dirt ball that circles a fireball ? WTF ?

ab9rf

  • Bay Watcher
    • View Profile
    • ab9rf@github

so your saying that exe files cant be decompiled for free?
I'm saying that they can't readily be decompiled at all.  Decompiling C++ code (or really any language compiled to native machine code) is Hard.  Even the available for-pay tools don't do a full job of it; human intervention is typically required to convert the output of even the best tools into something that can be made sense of.
Logged

G-Flex

  • Bay Watcher
    • View Profile

so your saying that exe files cant be decompiled for free?
I'm saying that they can't readily be decompiled at all.  Decompiling C++ code (or really any language compiled to native machine code) is Hard.  Even the available for-pay tools don't do a full job of it; human intervention is typically required to convert the output of even the best tools into something that can be made sense of.

To make it more clear:

Compiling source code (C++ in this case) to an executable is non-reversible. Given an executable file, and nothing else, you can't know what the source code looks like. The best that any software could do is guess.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

azrael300

  • Bay Watcher
  • WERE GOING TO LIVE :)
    • View Profile

so your saying that exe files cant be decompiled for free?
I'm saying that they can't readily be decompiled at all.  Decompiling C++ code (or really any language compiled to native machine code) is Hard.  Even the available for-pay tools don't do a full job of it; human intervention is typically required to convert the output of even the best tools into something that can be made sense of.

To make it more clear:

Compiling source code (C++ in this case) to an executable is non-reversible. Given an executable file, and nothing else, you can't know what the source code looks like. The best that any software could do is guess.
perhaps time will tell,if there ever will be a software that can decompile. wait ....(if you turn c++ into something else that can still be read by a pc,then how can it not be decompiled?if it cant be decompiled then how does the pc understand the language? if you can understand the language then it can be changed into another language that you understand like translating english into spanish and then spanish back to english.)

[edit]and when translating you dont guess....so therefore if you understand the language that must have bin invented or made by someone and he translate english into that language then it should be able to be reversed because he just translated it into that language then why not back again?
« Last Edit: May 20, 2012, 01:24:25 pm by azrael300 »
Logged
Edit. Oh Jesus Christ, Necro would be proud. The second horse in the caravan came in and immediately caught on fire. I looked into his inventory and found a burning pig tail fiber bag. Curious, I looked inside.
quote above is by yuriruler90

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile

so your saying that exe files cant be decompiled for free?
I'm saying that they can't readily be decompiled at all.  Decompiling C++ code (or really any language compiled to native machine code) is Hard.  Even the available for-pay tools don't do a full job of it; human intervention is typically required to convert the output of even the best tools into something that can be made sense of.

To make it more clear:

Compiling source code (C++ in this case) to an executable is non-reversible. Given an executable file, and nothing else, you can't know what the source code looks like. The best that any software could do is guess.
perhaps time will tell,if there ever will be a software that can decompile. wait ....(if you turn c++ into something else that can still be read by a pc,then how can it not be decompiled?if it cant be decompiled then how does the pc understand the language? if you can understand the language then it can be changed into another language that you understand like translating english into spanish and then spanish back to english.)

[edit]and when translating you dont guess....so therefore if you understand the language that must have bin invented or made by someone and he translate english into that language then it should be able to be reversed because he just translated it into that language then why not back again?
because there is more than one way to translate things from one language to other (in this case c++ -> machine code)
Pages: [1] 2 3