Bay 12 Games Forum

Please login or register.

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

Author Topic: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures  (Read 24159 times)

ragundo

  • Bay Watcher
    • View Profile

 A dfhack plugin (yes, it's a dfhack plugin) similar to gm-editor but with a convenient GUI and some cool features:



Features
  • Graphical viewer for all Dwarf Fortress structures known from DFHack.
  • Open any individual structure in a new window for easy understanding.
  • All structure types supported (vectors, arrays, pointers, enums, unions, bitfields, etc).
  • Hexadecimal memory viewer for Dwarf Fortress process memory.
  • Show comments and 'refers-to' (if defined) attributes for fields in structures.
  • Show the dfhack xml file where each structure is defined.
  • Stores opened df structures so you can track evolution of the structures in time (rather primitive right now).
  • Automatic decoding of enums, bitfields, coordinates and language names.
  • Decoding of derived classes showing its hierarachy.


Supported operating systems
  • Windows 64 bit
  • Linux 64 bit

More information in the plugin repository https://github.com/ragundo/DwarfExplorer

Download: https://github.com/ragundo/DwarfExplorer/releases

Linux version ready. No Mac support.

« Last Edit: November 16, 2019, 01:27:57 pm by ragundo »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #1 on: July 08, 2019, 07:36:56 am »

Does the hex memory viewer allow for binpatchs of yore?

Also, I guess you meant hier, not hyer-archy?

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #2 on: July 08, 2019, 08:04:46 am »

Unless I'm blind, the binaries are stored somewhere than the github repo linked above that containing the source code and more info.
It would be useful with a link(s) to where you'd actually find the binaries.

Edit:
OK, by comparing to where DFHack provides its releases I found the link: https://github.com/ragundo/DwarfExplorer/releases. It would still be useful to provide links to that location both from this thread and from the documentation in the source repo.

Edit2: And I'd add the installation instruction to the first post of this thread as well, as that's a mandatory step for anyone who'd use it.
« Last Edit: July 08, 2019, 08:12:06 am by PatrikLundell »
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #3 on: July 08, 2019, 08:15:53 am »

Yeah. sometimes I assume people know too much anouy github.
 I will fix that.

My apologies for the typo. I'm not a native english speaker.

About the binpatches I don't understand your question.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #4 on: July 08, 2019, 08:28:20 am »

Assuming too much is a common issue when you know (too) much about something ;)

A couple of further issues:
- Warning: Plugin dwarfexplorer compiled for DFHack 0.44.12-r2-24-XXXX, running DFHack 0.44.12-r2-0-XXXX
- "No such plugin or Lua script: qapplication"

I suspect you may have compiled the plugin for a (development) DFHack version rather than the released one?
Trying the one DFHack version I've used for development it claims to be version 0.44.12-r2-38-XXXX (I haven't updated it today: it's probably a week old, but still no qapplication, although it might not have been set to compile locally).

Are you sure qapplication is part of the standard DFHack package, and so doesn't require an additional installation step to get hold of that?
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #5 on: July 08, 2019, 09:07:58 am »

Yes. It's compiled with a later vesion on purpose. There's a lot of interesting changes in DF structures commited since the last official DFHack release.

The plugin only uses standard dfhack features that are in the code long time ago(CoreSuspender). That's why it works against the "official" DFHack release providing they are in the same major revision number.

About the running issues, I installed it in my laptop with a standard 0.42 LNP and worked. Did you copy the Qt5 dlls to the Dwarf Fortress directory?

There are also some DLL needed (MSVC 2017 runtime dlls, like msvcp140.dll), but they are present in the Dwarf Fortress directory with a LNP installation.

EDIT: You are right. Of course, the qapplication plugin is needed also. I updated the download link with the missing dll.

 Hope that helps
« Last Edit: July 08, 2019, 09:21:20 am by ragundo »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #6 on: July 08, 2019, 09:35:11 am »

About the binpatches I don't understand your question.
For example, angrilov made a binpatch for weapon racks/armor stands, back in 34.11, mentioned on bugtracker and also imported into DFHack version of that time.

Doc says it has been unavailable since 34.11. (Though there's been changes to it.)

ragundo

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #7 on: July 08, 2019, 09:40:18 am »

About the binpatches I don't understand your question.
For example, angrilov made a binpatch for weapon racks/armor stands, back in 34.11, mentioned on bugtracker and also imported into DFHack version of that time.

Doc says it has been unavailable since 34.11. (Though there's been changes to it.)

This viewer only knows about structures defined in codegen.out.xml. If those patches were merged in the dfhack repository, they will be reflected.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #8 on: July 08, 2019, 09:50:02 am »

No dice. Both my "official" and "inofficial", week old, DF with DFHack crash when the "enable qapplication" command is given ("crash" = both the DFHack and the DF windows disappear). I did only copy the qapplication DLL from the new download, as I assumed the other files were unchanged.
It can also be noted that the ZIP now contains 5 files, rather than 4 (That part of the text was left unchanged).

Have you tested it out by applying your own instructions to a DF with only the official DFHack version installed? That's what people will use unless they're in a fairly hardcore "beta testing" squad.
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #9 on: July 08, 2019, 09:54:52 am »

Sorry to hear that it doesn't work.

I'll repeat the process again with a new LNP.
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #10 on: July 08, 2019, 10:09:38 am »

OK.

I just downloaded the latest LNP, copied the plugin dlls and the Qt5 libraries and it works.

dumpbin the dll lists the following dependencies:
  • SDL.dll
  • Qt5Widgets.dll
  • Qt5Gui.dll
  • Qt5Core.dll
  • KERNEL32.dll
  • MSVCP140.dll
  • VCRUNTIME140.dll
  • api-ms-win-crt-runtime-l1-1-0.dll
  • api-ms-win-crt-heap-l1-1-0.dll
  • api-ms-win-crt-string-l1-1-0.dll
  • api-ms-win-crt-stdio-l1-1-0.dll
  • api-ms-win-crt-filesystem-l1-1-0.dll
  • api-ms-win-crt-convert-l1-1-0.dll
  • api-ms-win-crt-math-l1-1-0.dll

All those DLLs, except KERNEL32.dll are in the LNP default installation. Could you check that you have all those dlls? Are you in a 64 bit windows?

Thanks
« Last Edit: July 08, 2019, 10:13:34 am by ragundo »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #11 on: July 08, 2019, 10:36:28 am »

This viewer only knows about structures defined in codegen.out.xml. If those patches were merged in the dfhack repository, they will be reflected.
Ah, not quite what I meant. When I said allow, I meant "could the hexadecimal viewer also edit the hex?"

Edit: I'm a dumbass who didn't read line "Right now you can't change values in Dwarf Fortress memory." >_> Nevermind this.
« Last Edit: July 08, 2019, 11:47:23 am by Fleeting Frames »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #12 on: July 08, 2019, 10:39:42 am »

Hm. I'm using the LNP for my "main" DF installation, with the working one being just DF + DFHack.
I'm using 64 bit Windows (as that's the only on LNP supports), although I'm on the second latest LNP (r5 vs r6), but none of these items should be relevant here.

DT works fine, so it shouldn't be a fundamental QT issue.

I've verified the DLL's except the 3 Windows ones (the computer is busy with other things, and slow at searching).

However, when verifying that the QT DLL's were there, I found a file called qt_log.txt which contains this:
mån jul 8 17:29:26 2019 [info] Qt Init
mån jul 8 17:29:27 2019 [warning] Could not find the Qt platform plugin "windows" in ""
mån jul 8 17:29:27 2019 [fatal] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

That indicates there's a need for an additional file somewhere, and Clément has probably resolved it for DT (Dwarf Therapist\platforms\qwindows.dll?). I tried copying that file both to the DF directory and to hack/plugins, but neither seemed to work.
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #13 on: July 08, 2019, 11:50:33 am »

Hmmm

Do you have visual studio 2017 runtime installed?
Qt is compiled against that runtime.

Another thing that can happens is that your path finds another Qt dll instead of the ones I supply (5.13.0).
Dwarf Therapist uses Qt 5.6

I'm on mobile now but I'll try later with a windows vm
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Dwarf Explorer - A graphical dfhack plugin viewer for DF Structures
« Reply #14 on: July 08, 2019, 12:14:12 pm »

Take your time: I'm not in a hurry.

I've only got VS 14,0, as that's what DF uses. I'm not sure if something else may have installed VS 2017 as part of itself, though, but C:\Program contains 11.0 and 12.0 (while D:\Program contains 14.0, due to the stupidity of leaving the install path to point to the OS partition by the PC supplier), but no (20)17 at either location.

I don't think I've got anything else using Qt except DT, and if it screws up the path you ought to suffer from it as well, as you've got the LNP.
Logged
Pages: [1] 2 3 4