Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 104 105 [106] 107 108

Author Topic: DFHack 0.5.15 (legacy)  (Read 294156 times)

DrKillPatient

  • Bay Watcher
  • The yak falls infinitely
    • View Profile
Re: DFHack 0.5.15
« Reply #1575 on: July 29, 2011, 12:06:50 pm »

That compiles (cd build, cmake, make, sudo make install), but now I get
Quote
terminate called after throwing an instance of DFHack::Error::MemoryXmlParse
what() :error 2: failed to open file at row 0 col 0
Aborted
when I run any tools. I have a feeling that this is because it can't find the memory.xml-- I've checked in /usr/share and there's acually no dfhack folder. DFhack seems to have installed to /usr/local, so it's in /usr/local/share instead. Should I just move the file to /usr/share, or did I do something wrong with the install; and in that case should I reinstall it some other way?
« Last Edit: July 29, 2011, 12:17:48 pm by DrKillPatient »
Logged
"Frankly, if you're hanging out with people who tell you to use v.begin() instead of &v[0], you need to rethink your social circle."
    Scott Meyers, Effective STL

I've written bash scripts to make using DF easier under Linux!

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.15
« Reply #1576 on: July 29, 2011, 01:22:05 pm »

That compiles (cd build, cmake, make, sudo make install), but now I get
Quote
terminate called after throwing an instance of DFHack::Error::MemoryXmlParse
what() :error 2: failed to open file at row 0 col 0
Aborted
when I run any tools. I have a feeling that this is because it can't find the memory.xml-- I've checked in /usr/share and there's acually no dfhack folder. DFhack seems to have installed to /usr/local, so it's in /usr/local/share instead. Should I just move the file to /usr/share, or did I do something wrong with the install; and in that case should I reinstall it some other way?
The tools can't find memory.xml. At this point, it would be probably best to remove the dfhack stuff from /usr/local and try again.

Anyway, seems like you grabbed the old dfhack and didn't read the docs. Read the COMPILE file at least:
https://github.com/peterix/dfhack/blob/0.5.15/COMPILE.rst#here-s-how-you-build-dfhack

To install, you need to set up a few variables. Otherwise it's just fine to build the thing and run tools from the resulting bin/ directory.


DrKillPatient

  • Bay Watcher
  • The yak falls infinitely
    • View Profile
Re: DFHack 0.5.15
« Reply #1577 on: July 29, 2011, 02:56:55 pm »

Oh, I didn't just do 'cmake', I just summarized the process in the post above. I did the full install into the system, copied exactly from the compile readme:
Quote
cd build
cmake -DCMAKE_BUILD_TYPE:string=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DMEMXML_DATA_PATH:path=/usr/share/dfhack ..
make
make install
But the output even said that it installed into /local, even though I set it up with the variables you mentioned.
« Last Edit: July 29, 2011, 02:59:10 pm by DrKillPatient »
Logged
"Frankly, if you're hanging out with people who tell you to use v.begin() instead of &v[0], you need to rethink your social circle."
    Scott Meyers, Effective STL

I've written bash scripts to make using DF easier under Linux!

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.15
« Reply #1578 on: July 29, 2011, 04:31:17 pm »

Well, that's weird. Never saw that happen before.
Anyway, all that's needed is to put the memory.xml into the place where it's expected. MEMXML_DATA_PATH is pretty much baked into the library (and the tools can obviously find it), so put the file there and it should work.

DrKillPatient

  • Bay Watcher
  • The yak falls infinitely
    • View Profile
Re: DFHack 0.5.15
« Reply #1579 on: July 29, 2011, 07:34:05 pm »

This is becoming strange. The files are in the right place now, but it's still giving me that error. Here's the output of when I recompiled it and installed (removed everything I could find from the last install before that), it says it's placing memory.xml in /usr/share/dfhack, and I can confirm that it's there... but for some reason it can't be found still. Any idea what's wrong?
Spoiler (click to show/hide)
Logged
"Frankly, if you're hanging out with people who tell you to use v.begin() instead of &v[0], you need to rethink your social circle."
    Scott Meyers, Effective STL

I've written bash scripts to make using DF easier under Linux!

robolee

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.15
« Reply #1580 on: July 30, 2011, 06:49:54 pm »

I can't get it to compile:


But maybe it's because you're working on it still, do you have a link to the last "stable" source? Or perhaps it would be best to wait for the next version?

Also since I'm posting this is what I plan to make:
Spoiler (click to show/hide)
« Last Edit: August 01, 2011, 11:25:56 am by robolee »
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.15
« Reply #1581 on: July 30, 2011, 07:16:11 pm »

I can't get it to compile:

It is impossible to use MinGW to compile dfhack on Windows (one of the reasons being that MinGW can't produce a library that would be binary-compatible with DF). You have to use MSVC 2010.

The latest stable source is pretty much obsolete by now. I'll keep it around until I'm sure people can use the new stuff, but basing anything new on it would be silly. It just can't do some of the more interesting things.

This is becoming strange. The files are in the right place now, but it's still giving me that error. Here's the output of when I recompiled it and installed (removed everything I could find from the last install before that), it says it's placing memory.xml in /usr/share/dfhack, and I can confirm that it's there... but for some reason it can't be found still. Any idea what's wrong?
Unfortunately, no. Try the portable build - running things from build/bin directly.

robolee

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.15
« Reply #1582 on: July 30, 2011, 07:39:29 pm »

taken from the compile.html file:
" I build dfhack using mingw."

You might want to change that.

Can't you just PM me a compiled version? Or do you mean the library now only supports visual c++ because I don't really fancy changing?
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.15
« Reply #1583 on: July 30, 2011, 08:18:05 pm »

taken from the compile.html file:
" I build dfhack using mingw."

You might want to change that.

Can't you just PM me a compiled version? Or do you mean the library now only supports visual c++ because I don't really fancy changing?
I guess so... although for any kind of development, you still need MSVC 2010. Even the Express version works. The docs are outdated, I know. I'll see what I can do about that.

Pymous

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.5.15
« Reply #1584 on: August 01, 2011, 04:14:03 am »

Hello all,
I want to prevent any migrants to come (even the first two waves) so I wonder if it is possible to insta-kill dwarves when they come using this utility?
Thank you.
Logged

Japa

  • Bay Watcher
  • Spoopy time!
    • View Profile
Re: DFHack 0.5.15
« Reply #1585 on: August 01, 2011, 05:52:09 am »

No, but you can make a utility yourself using this library that insta kills dwarves.

This isn't actually a utility, per se.
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: DFHack 0.5.15
« Reply #1586 on: August 01, 2011, 10:42:27 am »

No, but you can make a utility yourself using this library that insta kills dwarves.

This isn't actually a utility, per se.

It's more of a drawbridge :)

robolee

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.15
« Reply #1587 on: August 01, 2011, 11:24:45 am »

I believe you can set [POPULATION_CAP:7] and [BABY_CHILD_CAP:0:0] to stop migrants.

I hate the MSVC IDE, so regardless of the features it has I'd rather use my preferred IDE (plus it's pure bullshit that users of MSVC apps have to have the visual c distributable), so unfortunately it seems I can't use the DFHack library. However I read up and written my own process attacher and attached to the DF program and been able to read memory... But the memory addresses from your memory.xml file don't seem to be producing the right results (pause seems to be constantly 2 and not changing and some seem random whilst many don't seem to work), can you give me any tips?
« Last Edit: August 01, 2011, 11:26:50 am by robolee »
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.15
« Reply #1588 on: August 01, 2011, 01:24:02 pm »

I believe you can set [POPULATION_CAP:7] and [BABY_CHILD_CAP:0:0] to stop migrants.

I hate the MSVC IDE, so regardless of the features it has I'd rather use my preferred IDE (plus it's pure bullshit that users of MSVC apps have to have the visual c distributable), so unfortunately it seems I can't use the DFHack library. However I read up and written my own process attacher and attached to the DF program and been able to read memory... But the memory addresses from your memory.xml file don't seem to be producing the right results (pause seems to be constantly 2 and not changing and some seem random whilst many don't seem to work), can you give me any tips?
Yes, MSVC is bad indeed :D You can use MSVC just as a compiler and use your own IDE or editor instead. That's what I'm doing anyway - write code with KDevelop and compile with gcc on linux and MSVC 10 on Windows. The redist stuff is packaged with DF itself, so the users already have it.

And rewriting dfhack? Please, don't. If you have to hack into things, fork the 'legacy' dfhack branch on github. That's the one that still hacks into things and can be compiled in anything. I'd advise against that though. Hacking in sideways into DF introduces many subtle problems (that can bite you in the *** later).

robolee

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.15
« Reply #1589 on: August 01, 2011, 05:34:56 pm »

I'm not rewriting dfhack, I'm just doing the stuff myself (didn't actually take anything from your code, though I did admittedly look for a bit but couldn't find the relevant code so I turned to google).

What do you mean "Hacking in sideways"? What are you doing differently?
Logged
Pages: 1 ... 104 105 [106] 107 108