Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 108

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

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #60 on: July 02, 2010, 09:44:11 pm »

Ahh excellent, I am glad to see Mcstudent found his way here.  I hope you can help him.
Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.
Simple Fortress New Player? Too much fun? Try this.

keda

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #61 on: July 04, 2010, 07:00:36 pm »

pread failed: can't read 0x30 bytes at address 0xafbbbc60
errno: 16
SHM ACCESS DENIED

So... how do I get past this?

doomchild

  • Bay Watcher
  • Official Pace Car for the Apocalypse
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #62 on: July 06, 2010, 11:14:18 am »

Sorry about the lack of documentation in the C API.  I need to write up some of the basic pieces, because a couple of things might not make sense at first glance (especially the allocator callbacks).  In general, I tried to do as little actual work in the wrapper, so the vast majority of the thing is just making the interface valid C that looks more or less like the C++ API.  My interest has always been in a set of Python bindings (because I despise C++ to an unreasonable degree), but I wanted to allow other bindings to be written as well.

Do we have a place where the documentation is going?  Possibly something wiki-oriented in nature?

DC
Logged
Quote from: webadict
I could care less what you are now, because what you will be is dead.

Master

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #63 on: July 07, 2010, 03:14:53 pm »

I have a question/suggestion on the dfliquids.exe.

Is there any way to delete the obsidian blocks you create? I am using them to damn up a major river so I can construct a real damn system. I want to later remove them. I can do that with channeling but that leaves a ramp in this version which I do not want.

I noticed you can create an delete water and magma. Is there any way to do so with the obsidian blocks you create? If not is it possible in a future version?
Logged

ohgoditburns

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #64 on: July 10, 2010, 01:01:59 am »

EDIT: It looks like this is actually in the COMPILE readme under the * to be installed into the system header. I'll just leave this here in case anyone else is as blind :)

I want to set up an OpenBox hotkey to run dfvdig for me. When I try to run the program without actually being in the output directory, I get

Code: [Select]
terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
  what():  error 2: Failed to open file, at row 0 col 0
Aborted

Any idea how I can avoid this problem? Some way of putting the programs in /usr/games/ might help me out.
« Last Edit: July 10, 2010, 01:29:18 am by ohgoditburns »
Logged
The landscape routinely being soaked in flammable fluids somehow seems less than benevolent.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #65 on: July 10, 2010, 06:43:02 pm »

Is there any way to delete the obsidian blocks you create? I am using them to damn up a major river so I can construct a real damn system. I want to later remove them. I can do that with channeling but that leaves a ramp in this version which I do not want.
Not really. Sorry. dfliquids is a quick hack I made to have something that uses some of the features of the maps module... and it's far from useless :)

Anyway, my idea for this is to create a proper map editor eventually. I'm thinking about using libtcod as the base for such a tool and making basically a mouse painting tool with brushes and a way to copy&paste stuff around. Still in the planning stage and unlikely to change for a month or so though.

EDIT: It looks like this is actually in the COMPILE readme under the * to be installed into the system header. I'll just leave this here in case anyone else is as blind :)

I want to set up an OpenBox hotkey to run dfvdig for me. When I try to run the program without actually being in the output directory, I get

Code: [Select]
terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
  what():  error 2: Failed to open file, at row 0 col 0
Aborted

Any idea how I can avoid this problem? Some way of putting the programs in /usr/games/ might help me out.
The easiest thing to do here is to wrap what you want to run using a script like this:
Code: [Select]
#!/bin/bash
cd /whatever/path/
./dfvdig

Otherwise, you could use a CMake variable for the search path of memory.xml which I added specifically for the purpose of *packaging* on linux.
It's name is MEMXML_DATA_PATH. This will make DFHack search for the offset file in a specific place first.
I never really tried to use a packaged dfhack before, even though there is a makepkg script for it in archlinux. You can find it here: http://aur.archlinux.org/packages/dfhack-git/dfhack-git/PKGBUILD and it contains a good example on how to use this variable.

Note that this package makes use of the shared memory library and is dependent on how DF is packaged in the arch-games repository, so those three lines don't really apply:
Code: [Select]
install -Dm755 output/libdfconnect.so "$pkgdir/usr/lib/libdfconnect.so"
install -Dm755 "$srcdir/dwarffortress-hacked" "$pkgdir/usr/bin/dwarffortress-hacked"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/dfhack/LICENCE"
What you're looking for is just the CMake variable. The script way could be easier though :)

Archlinux packages are made with the build stage described in the MAKEPKG script essentially putting everything into a folder as if it was /. Then this folder is packed into a simple tar.gz or tar.xz archive.
Code: [Select]
cmake .. -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=$pkgdir/usr -DMEMXML_DATA_PATH:path=/usr/share/dfhack|| return 1 then means, that DFhack will be installed into /usr/ and Memory.xml will be loaded from /usr/share/dfhack. Normally MEMXML_DATA_PATH is set to '.' and DFhack is treated as a 'portable' app, not installed at all.
« Last Edit: July 10, 2010, 06:50:33 pm by peterix »
Logged

cephalo

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #66 on: July 10, 2010, 09:05:27 pm »

Anyway, my idea for this is to create a proper map editor eventually. I'm thinking about using libtcod as the base for such a tool and making basically a mouse painting tool with brushes and a way to copy&paste stuff around. Still in the planning stage and unlikely to change for a month or so though.

If you do something like that, can you make it obvious in some way that it was used? It greatly cheapens the idea of a megaproject when you use a map editor instead of dwarven hard labor. I like seeing huge projects that people put a ton of work into, but what makes it special is that in most cases you have to have mastered the game to do that sort of thing.

Why should I spend two months making Hoover Dam with all the mishaps, little repairs, failled experiments, dwarves encased in magma and goblin junk mucking things up, when someone with a map editor could do the same thing in an evening on a pristine map without any mistakes? How do I know that what I see on DFMA is a real fortress or some cheap knockoff with no history? There are plenty of ways to cheat in DF for your own enjoyment of the game, but this is something that could impact the community by causing a loss of interest in other people's creations. Nobody wants to see anyone's fake fortress.
Logged
PerfectWorldDF World creator utility for Dwarf Fortress.

My latest forts:
Praisegems - Snarlingtool - Walledwar

Master

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #67 on: July 10, 2010, 09:40:53 pm »

I hear what you are saying but I completely disagree. Most of the mega projects give you a save file anyways which will show that there either was not enough time, material or they violated a law of dwarf fortress physics. You dont need to add in something that blatantly shows they used an editor. The community will weed those people out and humiliate them on their own.
Logged

mnjiman

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #68 on: July 11, 2010, 12:05:45 am »

I hear what you are saying but I completely disagree. Most of the mega projects give you a save file anyways which will show that there either was not enough time, material or they violated a law of dwarf fortress physics. You dont need to add in something that blatantly shows they used an editor. The community will weed those people out and humiliate them on their own.

Humiliate? That is a under exaggeration.

They will be ripped to shreds, never to be trusted again. Their name will be horribly foiled and when Dwarfs do use their name in their conversations, it will be used to describe Elves and that water that crap leaves behind.

Logged
I was thinking more along the lines of this legendary champion, all clad in dented and dinged up steel plate, his blood-drenched axe slung over his back, a notch in the handle for every enemy that saw the swing of that blade as the last sight they ever saw, a battered shield strapped over his arm... and a fluffy, pink stuffed hippo hidden discretely in his breastplate.

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #69 on: July 11, 2010, 12:57:00 pm »

Any idea when a new version will be up that is compatible with .10?
Logged

Master

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #70 on: July 11, 2010, 01:59:33 pm »

Im waiting on this too. Already got all my mods working and found the proper location. Now I just need to damn up the river so my FPS dont go to the crapper.
Logged

Passive Fist

  • Bay Watcher
  • Builds everything out of cobaltite.
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #71 on: July 11, 2010, 06:02:50 pm »

Not having dfvdig.exe makes me feel powerless and sad. I eagerly await an update. Great work here!
Logged

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #72 on: July 11, 2010, 06:13:46 pm »

Me too, I like using DFreveal when looking for a good site.
Logged

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #73 on: July 12, 2010, 03:27:13 am »

Hey peterix, how hard would it be to add function calling? I'm thinking of adding a stack of function pointers with arguments. Yeah i'm too lazy to write my own interprocess comunication thingy...
Oh and could you direct me to that part of dfHack that i need to dig. I tried once but lost interest very fast
Logged

Master

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.2 - tools and memory access library
« Reply #74 on: July 12, 2010, 01:28:54 pm »

So all we need is the new offsets and we can plug in a 31.10 entry into the memory area and get it working again right? I already tried using the DFT offsets but they didnt work. Is there a hack program for getting those values or do you just need to hex edit and find them?

Spoiler (click to show/hide)
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 108