Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Python script to DFHack remote API (giveaway)  (Read 3588 times)

alef

  • Escaped Lunatic
    • View Profile
Python script to DFHack remote API (giveaway)
« on: February 11, 2021, 04:03:43 pm »

I would like to give away a Python script that calls the DFHack remote API and works with RemoteFortressReader. The script comes with a CMakeFiles that drives the compilation of the required  protobuf files. The idea behind was to use Blender as a graphic engine. Anyone interested to adopt it?

https://gist.github.com/alef/ea70bc9dc9450bd6c8f1472928eda801

https://gist.github.com/alef/f1fce3d795511d40dab305c587a4b21c
Logged

McArcady

  • Bay Watcher
  • working on a mysterious construction
    • View Profile
    • LinuxDwarfPack - a ready-to-play pack for Linux
Re: Python script to DFHack remote API (giveaway)
« Reply #1 on: February 14, 2021, 12:31:05 pm »

Nice work!
I adapted a bit the CMakefile and pushed everything here.
Thanks!

[EDIT] renamed repo to dfhack-client-python
« Last Edit: March 06, 2021, 01:55:00 pm by McArcady »
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Python script to DFHack remote API (giveaway)
« Reply #2 on: February 14, 2021, 05:34:06 pm »

Cool! Mind if I add it to the list of client libraries? It doesn't have to be complete at all to be listed here, but doing so could raise awareness of it.

Alef: by the way, you can add more than one file to a gist - I would probably recommend this in the future if you have files that are closely related.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Clément

  • Bay Watcher
    • View Profile
Re: Python script to DFHack remote API (giveaway)
« Reply #3 on: February 14, 2021, 09:06:50 pm »

I missed this list when I was learning the protocol. I have a Qt/C++ implementation if you are interested: https://github.com/cvuchener/dfhack-client-qt.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Python script to DFHack remote API (giveaway)
« Reply #4 on: February 15, 2021, 09:41:08 pm »

The list in the docs (actually the entire page) is much newer than your library. I'll add it - thanks!
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

McArcady

  • Bay Watcher
  • working on a mysterious construction
    • View Profile
    • LinuxDwarfPack - a ready-to-play pack for Linux
Re: Python script to DFHack remote API (giveaway)
« Reply #5 on: February 20, 2021, 05:10:11 am »