<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nightflame</id>
	<title>Dwarf Fortress Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nightflame"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php/Special:Contributions/Nightflame"/>
	<updated>2026-06-22T11:15:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility_Talk:Dwarf_Companion&amp;diff=33324</id>
		<title>Utility Talk:Dwarf Companion</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility_Talk:Dwarf_Companion&amp;diff=33324"/>
		<updated>2009-05-25T17:01:09Z</updated>

		<summary type="html">&lt;p&gt;Nightflame: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I did some cleaning (actually I just removed most of it).&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
There are a few known bugs :&lt;br /&gt;
* exhaustion is sometimes maxed out when you edit a creature&lt;br /&gt;
* bleeding seems not to be stoppable in most case : just turn the creature undead&lt;br /&gt;
* if there is a problem related to python and/or gtk, just make sure you followed the installation instructions. If it doesn't work anyway, it is unlikely I can help you (would be a python or gtk problem, not a DC problem)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Feature requests! ==&lt;br /&gt;
&lt;br /&gt;
What would be the chances of dwarf item manipulation?  I'd love to be able to get rid of the rotting clothes that these stinking dwarves insist on wearing. [[User:Aristoi|Aristoi]] 15:01, 20 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Dwarf Companion - Cheating Fun in Adventure Mode! ==&lt;br /&gt;
&lt;br /&gt;
I was tinkering about with the Dwarf Companion program earlier today, when a thought came to my mind. &amp;quot;What if you could do stuff with this program in Adventure mode?&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Well, it turns out that you can. By turning on the program and hitting the &amp;quot;All Creatures&amp;quot; box, you can access any loaded creature as well as your own adventurer. By doing this, you can make him as strong and legendary as you want, and effectively kill anything within the sector. You can also change your character into any creature in the game, including demons, goblins, etc. (NOTE: 'Shapeshifting' like this renders the tile where you changed un-passable, and you tend to teleport when you do so. Also, when I changed into a dragon, the game crashed.) Moods are also able to toggle, though I've only tested them upon my own adventurer. Going beserk in a human town triggered the mayor to start attacking me, but when I turned it off, he became friendly once again.&lt;br /&gt;
&lt;br /&gt;
Here's a movie of some of my exploits with a fresh adventurer dwarf: http://mkv25.net/dfma/movie-348-dwarfcompanioninadventuremode17338a&lt;br /&gt;
&lt;br /&gt;
I hope this strikes as interesting / useful for the future!&lt;br /&gt;
&lt;br /&gt;
== Easy Python/PyGTK installer ==&lt;br /&gt;
&lt;br /&gt;
I was having some trouble getting all the Python dependencies to work properly together, but after some research I found a nice all-in-one PyGTK installer that works perfectly with companion 0.10. http://aruiz.typepad.com/siliconisland/2006/12/allinone_win32_.html Hope this helps!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DwarfCompanion Linux HOWTO ==&lt;br /&gt;
&lt;br /&gt;
There are two major problems when trying to run DwarfCompanion-0.13 in Linux:&lt;br /&gt;
&lt;br /&gt;
* at least when started with &amp;quot;wine dwarfort.exe&amp;quot;, dwarf-companion&lt;br /&gt;
** cannot find the path to the executable when searching for the offsets&lt;br /&gt;
** and has problems finding the process with &amp;quot;endswith()&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the following patch tries to work around these problems somewhat (you either have to run DwarfCompanion one directory-level down from your dwarfort.exe or change the path in the patch):&lt;br /&gt;
&lt;br /&gt;
 --- companion/dwarfdbg.py	2008-09-07 22:04:12.000000000 +0000&lt;br /&gt;
 +++ ~/dwarf_fortress/companion/dwarfdbg.py	2008-09-07 22:07:11.000000000 +0000&lt;br /&gt;
 @@ -100,9 +100,9 @@&lt;br /&gt;
  		self.dbg = pydbg()&lt;br /&gt;
  		self.metals = None&lt;br /&gt;
  		for (pid, proc) in self.dbg.enumerate_processes():&lt;br /&gt;
 -			if proc.lower().endswith(&amp;quot;dwarfort.exe&amp;quot;):&lt;br /&gt;
 +			if &amp;quot;dwarfort.exe&amp;quot; in proc.lower():&lt;br /&gt;
  				break&lt;br /&gt;
 -		if not proc.lower().endswith(&amp;quot;dwarfort.exe&amp;quot;):&lt;br /&gt;
 +		if not &amp;quot;dwarfort.exe&amp;quot; in proc.lower():&lt;br /&gt;
  			print &amp;quot;Dwarf Fortress is not running, or could not be found&amp;quot;&lt;br /&gt;
  			sys.exit(-1)&lt;br /&gt;
  		self.image = proc&lt;br /&gt;
 @@ -864,7 +865,7 @@&lt;br /&gt;
  &lt;br /&gt;
  	def getOs(self):&lt;br /&gt;
  		if self.ofs == None:&lt;br /&gt;
 -			self.ofs = offsetsearch.offsetsearch(self.image)&lt;br /&gt;
 +			self.ofs = offsetsearch.offsetsearch(&amp;quot;../dwarfort.exe&amp;quot;)&lt;br /&gt;
  		return self.ofs&lt;br /&gt;
  &lt;br /&gt;
  	def instaMood(self):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* reading/writing from the dwarf-fortress process when attaching/detaching with ptrace() without waiting for the process to react to the ptrace() also leads to problems, basically it is timing-dependent if you can read or change anything&lt;br /&gt;
&lt;br /&gt;
this is easily fixed with waitpid (though I'm not quite sure if this really fixes the problem or if some signals could screw everything up again, therefore the &amp;quot;print status&amp;quot; statement):&lt;br /&gt;
&lt;br /&gt;
 --- companion/dflinux.py	2008-01-09 10:50:00.000000000 +0000&lt;br /&gt;
 +++ ~/dwarf_fortress/companion/dflinux.py	2008-09-07 21:29:50.000000000 +0000&lt;br /&gt;
 @@ -33,6 +33,9 @@&lt;br /&gt;
  		pid = int(spid)&lt;br /&gt;
  		self.pid = pid&lt;br /&gt;
  		self.libc.ptrace(16, self.pid, 0, 0) #ptrace attach&lt;br /&gt;
 +		status = 0&lt;br /&gt;
 +		self.libc.waitpid(self.pid, status, 0)&lt;br /&gt;
 +		print status&lt;br /&gt;
  	&lt;br /&gt;
  	def read(self, addr, size):&lt;br /&gt;
  		out = ''&lt;br /&gt;
 @@ -60,4 +63,7 @@&lt;br /&gt;
  	def detach(self):&lt;br /&gt;
  		if self.pid&amp;gt;0:&lt;br /&gt;
  			self.libc.ptrace(17, self.pid, 0, 0) #ptrace detach&lt;br /&gt;
 +			status = 0&lt;br /&gt;
 +			self.libc.waitpid(self.pid, status, 0)&lt;br /&gt;
 +			print status&lt;br /&gt;
  			self.pid = 0&lt;br /&gt;
&lt;br /&gt;
* There are still some minor problems, e.g. when trying to set anything in the creature-editor, but at least healing and resting from the creature-list works now as expected. I will try to take a look at the creature-editor ...&lt;br /&gt;
&lt;br /&gt;
--[[User:Penguin dwarf08|Penguin dwarf08]] 14:14, 11 September 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
:Thanks for this ! [[User:Bartavelle|Bartavelle]] 09:20, 17 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Happydorf.py ==&lt;br /&gt;
&lt;br /&gt;
I ran into a bug with a fortress that my dorfs were suiciding so I hacked this up to force their happiness to max, and it got me over the hump.  It might help someone someday.  Save as happydorf.py and dump it in your DC/scripts folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
from dwarfdbg import *&lt;br /&gt;
from eventname import jobName&lt;br /&gt;
import sys&lt;br /&gt;
dbg = dwarfdbg() #init dbg&lt;br /&gt;
cl = dbg.getCreatures(0) #get the whole creature list (slow)&lt;br /&gt;
for id in cl:&lt;br /&gt;
     if cl[id][1] != 'dwarf': #keep Dwarf (both alive and dead)&lt;br /&gt;
          continue&lt;br /&gt;
     c = cl[id][13] # creature structure&lt;br /&gt;
     if c.fe4&amp;amp;2:&lt;br /&gt;
          continue&lt;br /&gt;
     c.happiness = 65534 #Set happy to max -1, (max is 65535 as of 40D)&lt;br /&gt;
     dbg.saveCreature(c) #save&lt;br /&gt;
&amp;lt;/tt&amp;gt;&lt;br /&gt;
--[[User:Kittyz|Kittyz]] 14:56, 27 January 2009 (EST) Kittyz&lt;br /&gt;
&lt;br /&gt;
== A quick question ==&lt;br /&gt;
&lt;br /&gt;
Does this work in 0.28.181.40d11? It says DF isn't running or can't be found when I try. --[[User:Simmura McCrea|Simmura McCrea]] 18:16, 12 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Nope. --[[User:Bartavelle|Bartavelle]] 08:48, 13 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Damn. Cheers anyway. --[[User:Simmura McCrea|Simmura McCrea]] 15:25, 13 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Workaround: Transport save file to a 40d folder, mess around, transport it back. 40d/40d11 are mutually compatible. -[[User:Heartofgoldfish|Heartofgoldfish]] 00:18, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The problem lies in the name of the file, change Dwarf Fortress.exe to dwarfort.exe and the utility will find it, gave me a memory error, but it may work for you once you have the right name.  [[User:Janizary|Janizary]] 19:39, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::[[Dwarf Fortress Wiki:Community Portal#B|&amp;quot;B&amp;quot;]] is for Bold.  You should put this out on the wiki proper, where it will be found by those who need it - start a Linux article, perhaps. Jo no habla linuxol, but once you do it will only grow.--[[User:Albedo|Albedo]] 15:08, 20 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Unknown flags ==&lt;br /&gt;
&lt;br /&gt;
0x1.6b seems to be 'caught in web'&lt;/div&gt;</summary>
		<author><name>Nightflame</name></author>
	</entry>
</feed>