Hihi all,
I've been a long time player and lurker here. Before I talk about the app - let me say I really appreciate everything everyone does for df. The game and all the mods have given me so much joy in my life.
Anyway Introducing an updated release. Now with windows exe
Dwarf radar v.1 (until I think of a better name)
http://dffd.bay12games.com/file.php?id=1402511.4.2018 release
Changelog- Radar now shows more detailed information
- A windows exe is included so no need for python on win
- Lots more detail included
- Can now monitor a location by passing coordinates
- Included a script to stop radar and monitor a location
AboutDwarf radar is a hacky script I threw together based on other ppls and my code.
The radar will display a scene from another part of the current game map. This can show things not displayed on the main screen including on different z-levels. Please note the screen is in no way complete. The main thing I wanted to show was some of the critters, walls, and some other main structures like stairs, etc.
The radars basic operation is to show a single scene based on the info submitted to it. However, I also included a script that I use to follow a dwarf or critter around.
The radar is pretty stable but might be a memory or cpu hog. I haven't had any issues with it, but I haven't really tested its performance.
Package infoThis package includes several files that can be used to run the dwarf radar. The list of files included follows:
bmods/radar.exe - This is a windows version of the interface that listens on network port for incoming radar information and displays data
bmods/radar.py - This provides an interface that listens on network port for incoming radar information and displays the data
hack/scripts/radar.lua - This script is the main file to run the radar. It queries the game to try to determine the location of a unit based on a unit id passed into it.
hack/scripts/radarfollow.lua - This script will send a repeat command to radar.lua with the id of the unit to show, essentially following it around
hack/scripts/radarcurrentlocation.lua - This script will stop the radar on the current coordinates and track whatever is in that location
hack/scripts/showdwarves.lua - This script will print to the dfhack screen the names and ids of all the dwarves in the fort
hack/scripts/showcritters.lua - This script will print to the dfhack screen the names and ids of all the critters in the current game (not world)
RequirementsDfhack .44.12-r1 (last tested on but works on .44.10)
Dwarf fortress -.44.12 (last tested on but works on .44.10)
Windows
-------
Just run radar.exe
Python
-------
Python 2.7
PyQt4 (windows wheels included)
Note: Versions should all be the same. If using 64bit df - you might want to use 64 bit python, etc.
InstallationInstall dwarf fortress.
Install dfhack
Unzip file in your dwarf fortress root directory.
Install python 2.7
From a console navigate to bmods folder under installation directory
If using 32bit type:
pip install PyQt4-4.11.4-cp27-cp27m-win32.whl
Else if using 64bit type:
pip install PyQt4-4.11.4-cp27-cp27m-win_amd64
Congrats you have installed everything.
UsageThe scripts only work in game and has only been tested in fort mode.
In the dfhack console you can type:
showdwarves
This shows all dwarves in fort, profession and id
In the dfhack console you can type:
showcritters
This shows all critters around fort, their species and id.
To activate the radar in a command console navigate to the bmods directory and type:
python radar.py
If using windows just double click:
radar.exe
A blank window will display.
To show something in the radar in the dfhack console type:
radar unit_id
Where unit_id is the unit id of the unit. For example:
radar 4517
A screen showing the unit and its surroundings should show
To follow a dwarf/critter with the radar in the dfhack console type:
radarfollow UNIT unit_id
Where unit_id is the unit id of the unit you want to follow. For example:
radarfollow UNIT 4517
To follow a Location with the radar in the dfhack console type:
radarfollow LOCATION x y z
To monitor the current radar location in the dfhack console type:
radarcurrentlocation
Other notesYes I realize the code isn't great. This is my first df project and first with lua and python. Not that my code will get any better, this is just done for fun.
The radar uses a network connection to communicate between dfhack and python. You will need to enable localhost on port 9999 to your firewall.
The code can be buggy too. I've only tested it on my stream.
There is a lot of stuff missing and some stuff might be coded with wrong characters, etc.
However - there is a lot of potential. It could possibly serve as a window for a multiplayer feature or monitoring those pesky assassin dwarves or vampires. Maybe it could eventually show graphic content or be hacked for adventure mode. idk - lots of possibilites if it doesn't break more stuff.
glhf - and thanks to everyone whose code I stole - creators of everything df that have given me so much fun - much love.