v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Utility Talk:Dwarf Companion"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
 
(65 intermediate revisions by 28 users not shown)
Line 1: Line 1:
Things I've noticed with tinkering around in 33g.
+
I did some cleaning (actually I just removed most of it).
*"invade?" tag toggles prone position for the target.
 
*0x1.7(4th row) places and removes the target from the royal guard.
 
*0x2.7(4th row) places and removes the target from the fortress guard.
 
*0x4000 second row seems to dictate if the creature has a job or place to go to. Turning it off seems to do nothing, it just turns right back on again, unless the creature is moved in the process of applying.
 
*0x84, 0x800 and 0x4.5(7th row) make the dwarf friendly oriented instead of a fortress-dweller, much like a merchant.
 
*0x8 Is only present on dwarves legendary through making an artifact. It could be what keeps them from having another mood.
 
*0x2000 and 0x2.7(last row) seem to be related to lung-related injuries. Both make a "winded" effect appear on the dwarf. 0x2.7 seems to wear off after a short time.
 
*0x100(2nd row) does something peculiar. It removes the dwarf from the unit list, and then the dwarf just completely vanishes. Several tags are reset and the dwarf, for all purposes, seems to no longer exist. So far nothing I can find will bring the dwarf back, and several tags used on the dwarf will cause DF to lock up.
 
*0x400 makes the target invisible to the unit list only, does not seem to have any adverse effects.
 
*0x8.5(7th row) makes the unit a "visitor" on the unit list. Behaves friendly, not sure what it does otherwise.
 
*0x8.5 also gets turned on when a child is kidnapped.
 
  
Some interesting notes too. Setting a dwarf to hostile, waiting until a nearby soldier is charging to attack, then making them friendly again causes something really interesting. The soldier will kill the now-friendly dwarf, and then that soldier will become a target to all nearby soldiers, despite still being controllable and interactable.
+
== Compatibility with Mods ==
Also, that "staring off into the distance" mood is interesting. I want to see it in action but I can't find a way to actually trigger the mood to act. [[User:Lightning4|Lightning4]] 09:23, 27 December 2007 (EST)
 
:Thanks for this update! I'll include them in the next revision. AFAIK 0x8 triggers the "creator of" text, and works on any dwarf. It's quite possible to trigger a mood, i'll try soon triggering an artifical mood. [[User:Bartavelle|Bartavelle]] 11:54, 27 December        2007 (EST)
 
::Staring off into the distance is the mood used by the zonked out people trapped in this underworld. --[[User:Armrha|Armrha]] 12:24, 28 October 2008 (EDT)
 
  
 +
Was working with the Dig Deeper mod, and found that it doesn't work with modded in creatures at all. That's a let-down. [[User:Jwguy|Jwguy]] 07:55, 5 July 2009 (UTC)
  
Hey. It seems that when I give a dwarf a mood, he goes to the meeting area and does nothing. Also, when I change a dwarves mood to NONE, I get an error and the game crashes. [[User:Zonhin|Zonhin]] 21:12, 20 January 2008 (EST)
+
Not actual anymore. Works with all creatures, whether modded or not. --[[User:Blur|Blur]] 18:30, 8 February 2010 (UTC)
  
 +
== Not working ==
  
== Feature requests! ==
+
I'm on 40d, and have followed the instructions on the page, (GTK Win32 runtime, Python 2.5, All three modules, and the Program), started the program up before and after Dwarf Fortress, just to see if I did it wrong the first time, and it doesn't work. The Program just has some category tabs and a few buttons, but never shows any data. [[User:Jwguy|Jwguy]] 18:31, 29 May 2009 (UTC)
  
You suggested we put feature requests in the wiki discussion page, so here they are!
+
*Additionally, in case it might help, all I am getting is a single box with Refresh, All Creatures, Only Dwarves, etc. There doesn't seem to be a load function or anything. I'd really appreciate some help with this. [[User:Jwguy|Jwguy]] 18:41, 29 May 2009 (UTC)
* From sphir: "Any plans on map-related modules? e.g.
 
**one button designate cut tree after recording the regions.
 
:: I do not get this one? What is exactly suggested? Designate ALL trees at once? [[User:Bartavelle|Bartavelle]] 06:34, 28 December 2007 (EST)
 
**additional "bookmarks", jump to creature (esp dead creatures, which cannot be done in game)
 
:: I'll add that soon, as it doesn't seem too hard [[User:Bartavelle|Bartavelle]] 06:34, 28 December 2007 (EST)
 
**add foreman.exe-like macro job management by profession?"
 
:: This is planned too [[User:Bartavelle|Bartavelle]] 06:34, 28 December 2007 (EST)
 
* and mine: "alert me when my hunters run out of bolts so I can draft them to reset their job state and get them to pick up a fresh batch of ammo. It's such a hassle to have to constantly watch hunters just so they don't do something dumb like put their head inside a cougar's mouth. Or even a way to look at the items in a dwarf's inventory would be lovely."
 
: This one could be a bit tricky, as inventory is not reversed yet, and i haven't been looking at it, so i have no clue on how hard it is [[User:Bartavelle|Bartavelle]] 06:34, 28 December 2007 (EST)
 
I guess others should just add their requests below. Awesome application, thanks Bartavelle! [[User:Chrominance|Chrominance]] 20:06, 27 December 2007 (EST)
 
:How about the ability to change what the dwarf likes and hates? Just so my Mayor won't mandate the construction of adamantine items.  --[[User:Corbine|Corbine]] 08:01, 28 December 2007 (EST)
 
::Likes and recent "events" are next on my list of stuff to reverse. I would especially like to display a summary of all "bad mood stuff" that recently happened to dwarves. [[User:Bartavelle|Bartavelle]] 11:14, 28 December 2007 (EST)
 
  
:Ability to see which item a particular dwarf is tasking to haul and zoom to it?  Ability to zoom to items in general would also be great (the game seems to want to support this, as it has the 'zoom to' option on the bottom in say, the inventory screen, but you can't actually zoom to anything from the inventory page as far as I can tell). --[[User:Squirrelloid|Squirrelloid]] 01:11, 23 April 2008 (EDT)
+
*Here's a screenshot of what I am dealing with, also: http://i64.photobucket.com/albums/h178/Jwguy/Notworking2.jpg . It was also suggested to me that I may need something called Pango, which doesn't seem to be mentioned on the wiki, anywhere. [[User:Jwguy|Jwguy]] 21:06, 29 May 2009 (UTC)
  
What about destroy the contents of a square? Or destroy all of X item? Cleanup on unbelievably cluttered, unplayable maps would be a real nice feature. Not sure how to do it though... I've seen tile edit but not contents edit. ~~----
+
** I believe I was able to correct the problem. Apparently, the program is centered around the C:/ drive only. I normally play Dwarf Fortress from my portable hard-drive, and tried initializing the program on both devices. After a bit of trial and error, I moved both to my desktop, and it seems to work, now. Hopefully, if anyone else has this problem, they can fix it like this; I still can't get my dwarves to stop dying from heat after running through a flow of lava, though. I threw them in water, doused the clothes and healed, but I digress. [[User:Jwguy|Jwguy]] 00:31, 30 May 2009 (UTC)
  
 
== Bugs ==
 
== Bugs ==
 +
There are a few known bugs :
 +
* exhaustion is sometimes maxed out when you edit a creature
 +
* bleeding seems not to be stoppable in most case : just turn the creature undead
 +
* 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)
  
If you happen to see this before the thread on the forums, I posted the bug I'm getting 50% of the time while traveling in adventure mode with the new version of DC in [38a].
 
--[[User:KaelGotRice|KaelGotRice]] 10:26, 10 February 2008
 
  
Occasionally when you heal/hurt or modify something of a dwarf or creature, the exhaustion amount will be maxed out, causing the target to pass out for QUITE awhile.  --[[User:Corbine|Corbine]] 08:15, 28 December 2007 (EST)
+
== Feature requests! ==
:That's what's making them do that? Aha! --[[User:Penguinofhonor|Penguinofhonor]] 18:55, 3 February 2008 (EST)
 
::Just check the exaustion field to make sure it's 0 or something low, as opposed to the 65535 that it will ocassionally fill in with. Not sure what causes it to go for max value instead of the minimum. --[[User:N9103|Edward]] 19:33, 3 February 2008 (EST)
 
 
 
Getting an error when trying to start program. It couldn't get the DLLs at first so I just copied them into the folder, which seemed to work, but now it gives this:
 
http://80.60.190.55/pics/dfcbug.jpg
 
It closes (or crashes) the dwarf fortress application in the process, no error messages pop up.
 
:thanks for the info, i'm trying right now to reduce the number of required components, so it should be better soon ... [[User:Bartavelle|Bartavelle]] 18:10, 1 January 2008 (EST)
 
 
 
When I first tried to use DF Companion, it gave me an error message that stated Libglib-2.0-0.dll was missing. So I went and downloaded it, put it in the right place. Then it said I needed iconv.dll, so I went and downloaded it. Then it made me get intl.dll. Now, it's saying "The procedure entry point g_Assert_Warning could not be located in the dynamic link library libglib-2.0-0.dll"--[[User:Demosthenes|Demosthenes]] 17:22, 19 February 2008 (EST)
 
: It sounds like you did not install the latest "gtk runtime environment" [[User:Bartavelle|Bartavelle]] 01:34, 20 February 2008 (EST)
 
:: I did. D= Several times.--[[User:Demosthenes|Demosthenes]] 19:24, 20 February 2008 (EST)
 
::: Then I have no clue :( [[User:Bartavelle|Bartavelle]] 01:46, 21 February 2008 (EST)
 
::: When I run it with the command line, it gives this. http://img301.imageshack.us/img301/5550/errorao1.jpg --[[User:Demosthenes|Demosthenes]] 21:03, 28 February 2008 (EST)
 
 
 
Program works as intended on .40d and it's a lifesaver.  I think I have a pretty unusual bug though.  I resurrected one of my dwarves who died in combat and somehow one of his flags has him set 'bloody', and I can't find anyway to disable this bloody setting.  So wherever he walks, he leaves bloody footprints around.  It's hilarious, but I would love to turn it in and off :) --[[User:Kittyz|Kittyz]] 18:30, 9 January 2009 (EST)kittyz 1-8-2009
 
 
 
== 0x4000 ==
 
 
 
0x4000 is nauseous. [[User:Nate879|Nate879]] 19:10, 10 January 2008 (EST)
 
 
 
:Better give it some Compazine, then.  *rimshot*--[[User:Maximus|Maximus]] 23:21, 10 January 2008 (EST)
 
 
 
 
 
==How exactly do I run this?==
 
What do I run here? The .glade file? Because if I open that, it gets me a tiny window with 2 things I can choose, skilledit and creatureedit. If I choose them, they are completely blank. I've tried cmd.exe but I get the same thing. --[[User:Penguinofhonor|Penguinofhonor]] 21:23, 21 January 2008 (EST)
 
: you should run dfcomapnion_prototype.py, as stated in the main page!
 
:: Hey, he added that because of this question, okay? --[[User:Penguinofhonor|Penguinofhonor]] 17:48, 27 January 2008 (EST)
 
 
 
==Unable to run on win2000===
 
I'm still using win2000, and I'm unable to run the program, it gives an error requesting the instruction GetProcessImageFileNameA, which is only available on XP and Server2003.
 
: Ok i'm gonna try to find an alternative ASAP [[User:Bartavelle|Bartavelle]] 07:35, 28 January 2008 (EST)
 
  
==Tracebacks for version .7==
+
What would be the chances of dwarf item manipulation?  I'd love to bhttp://dwarffortresswiki.net/index.php/Utility_Talk:DwarfCompanione able to get rid of the rotting clothes that these stinking dwarves insist on wearing. [[User:Aristoi|Aristoi]] 15:01, 20 May 2009 (UTC)
 +
:Or maybe destroy that burning fire imp fat... [[User:Forsaken1111|Forsaken1111]] 06:08, 27 May 2009 (UTC)
  
F:\Python25\GTK>dfcompanion_prototype.py
+
Most Dwarves acquire dabbling level in all the social skills very quickly, which leaves these skills at the top of their skill list for all time. Even if they later become a Legendary Mason, you still have to scroll down to see it. Can you add something that reorders their skills by highest level, so the things they're best at show up first?  --[[User:Oddrune|Oddrune]] 05:19, 1 June 2009 (UTC)
version v0.27.169.88a, pid 3676, player 0
 
0 words loaded
 
Traceback (most recent call last):
 
  File "F:\Python25\GTK\dfcompanion_prototype.py", line 390, in <module>
 
    DFcmp = DFcompanion()
 
  File "F:\Python25\GTK\dfcompanion_prototype.py", line 336, in __init__
 
    self.dd = dwarfdbg()
 
  File "F:\Python25\GTK\dwarfdbg.py", line 92, in __init__
 
    self.getWords()
 
  File "F:\Python25\GTK\dwarfdbg.py", line 208, in getWords
 
    lptr = self.getLong(vec2[1]+race*4)
 
  File "F:\Python25\GTK\dwarfdbg.py", line 104, in getLong
 
    return struct.unpack("L", self.dbg.read(ptr, 4))[0]
 
  File "F:\Python25\GTK\dfwin32.py", line 81, in read
 
    raise WinError()
 
WindowsError: [Error 299] Only part of a ReadProcessMemory or WriteProcessMemory
 
request was completed.
 
  
:you must load your game [[User:Bartavelle|Bartavelle]] 10:45, 7 February 2008 (EST)
 
 
==Terrain Replication==
 
You stated on the forums that you would/could make a script that would allow a person to copy the information from a tile and replicate it elsewhere, and then in Nist Akath, Captain Mayday claimed that he used said script. Where is this? It's useful-sounding. --[[User:Penguinofhonor|Penguinofhonor]] 19:45, 10 February 2008 (EST)
 
: Try the secret link [http://bartabox.banquise.net/df/companion-0.8-any.zip here], but i will replace this file as soon as I "officially" release it. [[User:Bartavelle|Bartavelle]] 01:49, 11 February 2008 (EST)
 
  
 +
Ignite units would be a nice feature too.  --[[User:Blur|Blur]] 17:23, 8 February 2010 (UTC)
  
 
== Dwarf Companion - Cheating Fun in Adventure Mode! ==
 
== Dwarf Companion - Cheating Fun in Adventure Mode! ==
Line 117: Line 44:
 
I hope this strikes as interesting / useful for the future!
 
I hope this strikes as interesting / useful for the future!
  
== Won't Run ==
+
:Please sign your additions to the discussion page. [[User:Forsaken1111|Forsaken1111]] 06:09, 27 May 2009 (UTC)
Just recently had a little... accident at my fortress and I wanted to rectify it, since it was just a result of my own stupidity. Squashed some poor bastard with a drawbridge. Unfortunately trying to run Companion results in this:
 
 
 
  version generic version, pid 5740, player a6
 
  2103 words loaded
 
  race 0 loaded
 
  race 1 loaded
 
  race 2 loaded
 
  race 3 loaded
 
  Traceback (most recent call last):
 
    File "C:\companion\dfcompanion_prototype.py", line 402, in <module>
 
      DFcmp = DFcompanion()
 
    File "C:\companion\dfcompanion_prototype.py", line 396, in __init__
 
      self.initList()
 
    File "C:\companion\dfcompanion_prototype.py", line 123, in initList
 
      list = self.dd.getCreatures(self.showmode,dead=self.showdead)
 
    File "C:\companion\dwarfdbg.py", line 814, in getCreatures
 
      col = self.getCreature(c)
 
    File "C:\companion\dwarfdbg.py", line 480, in getCreature
 
      c.events = self.getEvents(c)
 
    File "C:\companion\dwarfdbg.py", line 154, in getEvents
 
      events.append( [p, eventName[p], id] )
 
  KeyError: 212
 
[[User:Lightning4|Lightning4]] 19:23, 23 February 2008 (EST)
 
 
 
:Update: I've tested again with the new version, as well as tried another fortress. The initial fortress I tried it on still fails to run with the same error. However, another, older fortress works just fine.[[User:Lightning4|Lightning4]] 14:04, 26 February 2008 (EST)
 
 
 
::Issue resolved. A fix was provided for this error at the bottom of the page. [[User:Lightning4|Lightning4]] 13:10, 9 April 2008 (EDT)
 
 
 
== 176.38a not work ==
 
D:\games\1non company made\dwarf\utility\companion 0.10>dfcompanion_prototype.py
 
 
 
  version generic version, pid 5352, player a6
 
  2103 words loaded
 
  race 0 loaded
 
  race 1 loaded
 
  race 2 loaded
 
  race 3 loaded
 
  Traceback (most recent call last):
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dfcompanion_prototype.py", line 402, in <module>
 
      DFcmp = DFcompanion()
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dfcompanion_prototype.py", line 396, in __init__
 
      self.initList()
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dfcompanion_prototype.py", line 123, in initList
 
      list = self.dd.getCreatures(self.showmode,dead=self.showdead)
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dwarfdbg.py", line 835, in getCreatures
 
      col = self.getCreature(c)
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dwarfdbg.py", line 446, in fresh getCreature
 
      slist = self.getSkills(c)
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dwarfdbg.py", line 328, in getSkills
 
      skptr = self.getLong(skillptr)
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dwarfdbg.py", line 125, in getLong
 
      return struct.unpack("L", self.dbg.read(ptr, 4))[0]
 
    File "D:\games\1non company made\dwarf\utility\companion 0.10\dfwin32.py", line 81, in read
 
      raise WinError()
 
  WindowsError: [Error 299] Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
 
Yes I am in dwarf fortunse mode and I have vista and I in new fortuness that generated on new map. [[User:Omagaalpha|Omagaalpha]] 12:14, 27 February 2008 (EST)
 
 
 
== 176.38b not running ==
 
 
 
Using version 0.9-any with Python 2.5 and all modules installed. Works fine in 176.38a, as shown:
 
 
 
  C:\Spill\Dwarf Fortress\companion>dfcompanion_prototype.py
 
  version generic version, pid 2828, player a6
 
  2103 words loaded
 
  race 0 loaded
 
  race 1 loaded
 
  race 2 loaded
 
  race 3 loaded
 
 
 
When trying to run in 176.38b I get:
 
 
 
  C:\Spill\Dwarf Fortress\companion>dfcompanion_prototype.py
 
  version generic version, pid 544, player a6
 
  2103 words loaded
 
  race 0 loaded
 
  race 1 loaded
 
  race 2 loaded
 
  race 3 loaded
 
  Traceback (most recent call last):
 
  File "C:\Spill\Dwarf Fortress\companion\dfcompanion_prototype.py", line 402, in <module>
 
    DFcmp = DFcompanion()
 
  File "C:\Spill\Dwarf Fortress\companion\dfcompanion_prototype.py", line 396, in __init__
 
    self.initList()
 
  File "C:\Spill\Dwarf Fortress\companion\dfcompanion_prototype.py", line 123, in initList
 
    list = self.dd.getCreatures(self.showmode,dead=self.showdead)
 
  File "C:\Spill\Dwarf Fortress\companion\dwarfdbg.py", line 814, in getCreatures
 
    col = self.getCreature(c)
 
  File "C:\Spill\Dwarf Fortress\companion\dwarfdbg.py", line 446, in getCreature
 
    bpname = self.getBodyPart(c, i)
 
  File "C:\Spill\Dwarf Fortress\companion\dwarfdbg.py", line 322, in getBodyPart
 
    bpv = self.getVec(c.bpNames)
 
  File "C:\Spill\Dwarf Fortress\companion\dwarfdbg.py", line 119, in getVec
 
    return struct.unpack("LLLL", self.dbg.read(ptr, 16))
 
  File "C:\Spill\Dwarf Fortress\companion\dfwin32.py", line 81, in read
 
    raise WinError()
 
  WindowsError: [Error 299] Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
 
 
 
 
 
Another problem from someone else:
 
 
 
Err, nevermind; was using 0.8 version of companion; my bad.  I get the same as above with 0.9.
 
 
 
--[[User:Yourself|Yourself]] 23:11, 24 February 2008 (EST)
 
 
 
== Version 0.10-any ==
 
 
 
Companion 0.10-any works with 176.38c for me. However, I had to copy the "pygtk" subdirectory of an older version (0.8-python25) into the 0.10 installation and run dfcompanion_prototype.py from the command line. Just the thing to cope with those ambushes (they're a bit overpowered, don't you think?) Zombie frogmen! MUHAHAHAHAHA!!! [[User:RP|RP]] 07:32, 28 February 2008 (EST)
 
 
 
== 176.38b stopped working ==
 
 
 
The companion used to work for me in 176.38b but at some point it stopped working (after a few goblin ambushes).  Here's what it does:
 
 
 
 
 
  version generic version, pid 2732, player a6
 
  2103 words loaded
 
  race 0 loaded
 
  race 1 loaded
 
  race 2 loaded
 
  race 3 loaded
 
  Traceback (most recent call last):
 
    File "dfcompanion_prototype.py", line 402, in <module>
 
      DFcmp = DFcompanion()
 
    File "dfcompanion_prototype.py", line 396, in __init__
 
      self.initList()
 
    File "dfcompanion_prototype.py", line 123, in initList
 
      list = self.dd.getCreatures(self.showmode,dead=self.showdead)
 
    File "C:\Documents and Settings\Yourself\Desktop\Dwarf Fortress\companion\dwarfdbg.py", line 835, in getCreatures
 
      col = self.getCreature(c)
 
    File "C:\Documents and Settings\Yourself\Desktop\Dwarf Fortress\companion\dwarfdbg.py", line 502, in getCreature
 
      c.events = self.getEvents(c)
 
    File "C:\Documents and Settings\Yourself\Desktop\Dwarf Fortress\companion\dwarfdbg.py", line 170, in getEvents
 
      events.append( [p, eventName[p], id] )
 
  KeyError: 214
 
 
 
I don't know much about the internal structure of the companion, but couldn't you use eventName.get(p, "Unknown") as a failsafe to stop these from happening?  That way new events wouldn't break everything.
 
 
 
--[[User:Yourself|Yourself]] 13:26, 2 March 2008 (EST)
 
 
 
Actually, I just made this modification and another error popped up immediately after:
 
 
 
  version generic version, pid 2732, player a6
 
  2103 words loaded
 
  race 0 loaded
 
  race 1 loaded
 
  race 2 loaded
 
  race 3 loaded
 
  Traceback (most recent call last):
 
    File "dfcompanion_prototype.py", line 402, in <module>
 
      DFcmp = DFcompanion()
 
    File "dfcompanion_prototype.py", line 396, in __init__
 
      self.initList()
 
    File "dfcompanion_prototype.py", line 123, in initList
 
      list = self.dd.getCreatures(self.showmode,dead=self.showdead)
 
    File "C:\Documents and Settings\Yourself\Desktop\Dwarf Fortress\companion\dwarfdbg.py", line 837, in getCreatures
 
      self.eventList[ event[0] ][1] += 50/event[2]
 
  IndexError: list index out of range
 
 
 
I managed to make the error go away, but it's a total hack, since I don't know the structure of companion.
 
 
 
I changed lines 820-822, which are:
 
 
 
  self.eventList = range(212)
 
      for i in range(212):
 
      self.eventList[i] = [i,0,[],eventName[i]]
 
 
 
Into this:
 
 
 
  self.eventList = [[i,0,[],eventName.get(i, "??")]
 
                    for i in xrange(215)]
 
 
 
The companion appears to work now for me, but as I said, it's a total hack.
 
 
 
--[[User:Yourself|Yourself]] 13:39, 2 March 2008 (EST)
 
 
 
== Error ocurring (something with gdk and cairo and a .dll) ==
 
 
 
After installing python (2.5.2 - also tried 2.5.1 and 2.4.something) the gdk runtime environment (2.8.20) <br />
 
and those 3 packets (pygobject-2.12.3-1; pycairo-1.2.6-1; pygtk-2.10.6-1 - these 3 arent necessary for the reproduktion fo the error)
 
 
 
starting the "dfcompanion_prototype.py" from the any or the py2.5 package returns the following error:
 
 
 
"Der Prozedureinsprungpunkt "gdk_cairo_set_source_pixmap" wurde in der DLL "libgdk-win32-2.0-0.dll" nicht gefunden"
 
read:"could't find the routine entry point [...] in the dll[...]"
 
 
 
downloading a .dll from the net changes the error slightly,
 
now "gdk_cairo_create" is missing instead of "gdk_cairo_set_source_pixmap"
 
 
 
-since i've absolutely no clue what he actually wants, i hope someone can solute this X_x
 
 
 
Q
 
 
 
:Valdemar put up a link to a exe version of companion on the forums for those of us who don't have the patience to fiddle around with python. It's in the DF companion thread near the end. [[User:VengefulDonut|VengefulDonut]] 18:02, 24 March 2008 (EDT)
 
 
 
----
 
 
 
 
 
I have the exact same problem as the one above me...
 
--[[User:AtomicTroop|AtomicTroop]] 12:52, 23 March 2008 (EDT)
 
 
 
::As do I! And I'm dying to make a legendary miner/mason/brewer/grower/weaponsmith/armorsmith/swordsdwarf/seige engineer/seige operator. Honestly, that would be awesome.
 
 
 
And in case your computer speaks in English, the error is this:
 
 
 
The procedure entry point gdk_cairo_set_source_pixmap could not be located in the dynamic link library libgdk-win32-2.0-0.dll.
 
 
 
So, if you could could please explain how we can fix this, that would be great because your program looks awesome.--[[User:Smoking Gnu|Smoking Gnu]] 00:59, 24 March 2008 (EDT)
 
 
 
 
 
The problem is the link telling you to download GTK is broken, it has you download version 2.8.20 when you need 2.10.11. Go here: http://sourceforge.net/project/showfiles.php?group_id=98754&package_id=121281 and get the right version. --[[User:xzzy|xzzy]]
 
 
 
== Import Error: No module named ctypes - 0.8 and 1.0  ==
 
 
 
Err, just tried upgrading to the newer version of companion, and can't get it to work. I'm using the latest version of DF (incompatable?). Doesn't look like a DF problem though. I installed all of the modules, I think I'm using python version 2.4. I'll be on IRC in #bay12games if you want to try get hold of me... --[[User:Markavian|Markavian]]
 
:You must have the 2.5 version. ctypes is a module that is only in Python 2.5. You should either upgrade Python to 2.5 or download the [http://bartabox.banquise.net/df/companion-0.10-any.zip -any version]. (0.10 works fine for me in the latest DF version and I have 2.4 too)--[[User:Valdemar|Valdemar]] 20:39, 15 March 2008 (EDT)
 
 
 
== DwarfCompanion Fails to load (inexplicably) 0.10 ==
 
I've been able to run DwarfCompanion just fine for a week or so now.  However, starting tonight with a fort that has been able to be modified before, I now get this as the error that displays-
 
 
 
  version generic version, pid 1960, player a6
 
  2103 words loaded
 
  race 0 loaded
 
  race 1 loaded
 
  race 2 loaded
 
  race 3 loaded
 
  Traceback (most recent call last):
 
  File "C:\DF Utils\companion-0.10-any\companion\dfcompanion_prototype.py", line 402, in <module>
 
    DFcmp = DFcompanion()
 
  File "C:\DF Utils\companion-0.10-any\companion\dfcompanion_prototype.py", line 396, in __init__
 
    self.initList()
 
  File "C:\DF Utils\companion-0.10-any\companion\dfcompanion_prototype.py", line 123, in initList
 
    list = self.dd.getCreatures(self.showmode,dead=self.showdead)
 
  File "C:\DF Utils\companion-0.10-any\companion\dwarfdbg.py", line 835, in getCreatures
 
    col = self.getCreature(c)
 
  File "C:\DF Utils\companion-0.10-any\companion\dwarfdbg.py", line 502, in getCreature
 
    c.events = self.getEvents(c)
 
  File "C:\DF Utils\companion-0.10-any\companion\dwarfdbg.py", line 170, in getEvents
 
    events.append( [p, eventName[p], id] )
 
  KeyError: 213
 
 
 
 
 
 
 
 
 
This is an error due to lack of sanity checking on the events list.  Put this in instead of events.append( [p, eventName[p], id] )
 
 
 
 
 
                        try:
 
                                events.append( [p, eventName[p], id] )
 
                        except KeyError:
 
                                print "No such event %s known" % p
 
 
 
[[User:Qmarx|Qmarx]] 20:36, 3 April 2008 (EDT)
 
 
 
 
 
::Bingo. This fixed my problem as well. Thanks! [[User:Lightning4|Lightning4]] 13:09, 9 April 2008 (EDT)
 
  
 
== Easy Python/PyGTK installer ==
 
== Easy Python/PyGTK installer ==
  
 
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!
 
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!
 
== Error -- entry point g_timeout_add_seconds_full ==
 
 
The procedure entry point g_timeout_add_seconds_full could not be located in the dynamic link library libglib-2.0-0.dll
 
 
I installed these modules
 
 
    *  Python (works with any version, 2.5 is prefered)
 
    *  "Gtk+/Win32 Runtime Environment Installer"
 
    * For python 2.5 users, just grab the utility at this place.
 
    * Install the three modules from this page (PyCairo, PyGObject, PyGTK)
 
 
After trying to run it I received that erro.
 
 
I also tried companion-0.11-any.zip and it didn't work.
 
 
Edit: I uninstalled all the components and reinstalled with that all-in-one python installer and it works now.--[[User:Richards|Richards]] 15:46, 23 April 2008 (EDT)
 
 
== Adding Additional Ingredients to Artifacts ==
 
A nifty little trick.  You have to micromanage a little, though.  Anyway, as soon as your moody dwarf has claimed a workshop, hopefully he'll leave to grab the first item.  As soon as he starts walking to get it, fire up companion and change the first required object.  The moody dwarf will complete the fetching duty for the original first item, then go to get the new first item.  Repeat until you have enough items stored in the workshop for your satisfaction, then let your poor moody dwarf finally collect everything he needs.  All of the collected items will be used as artifact components.[[User:QMarx|QMarx]] 10:24, 7 May 2008 (EDT)
 
 
==Feature request: custom wounds==
 
 
It would be nice if we could directly edit the wound levels of creatures, instead of being forced to either heal them entirely or make them bleed to death.  Someone with a mangled leg could, for instance, be manually healed to a broken leg; this would allow us "strict" players to have mangled dwarves heal, until Toady corrects the "phantom pains" issue and allows mangled injuries to heal over to permanent debilitations. --[[User:JT|JT]] 18:22, 11 May 2008 (EDT)
 
 
== Command Line? ==
 
 
I have everything installed (2.5 and then the runtime) but Dwarf Companion crashes on me. How do I run it from a command line so I can see the errors? I'm on Media Center/XP. All I have time to read before it crashes is something about an invalid access to memory location.
 
 
== Unable to run ==
 
 
Whenever I try to load it, it won't run, I ran the game and downloaded everything. This is all that happens:
 
 
version v0.27.169.88a, pid 2760, player 0
 
0 words loaded
 
 
Traceback (most recent call last):
 
  File "C:\Users\Todd\Downloads\DF STUFF\companion\dfcompanion_prototype.py", line 390, in <module>
 
  DFcmp = DFcompanion()
 
  File "C:\Users\Todd\Downloads\DF STUFF\companion\dfcompanion_prototype.py", line 336, in __init__
 
  self.dd = dwarfdbg()
 
  File "C:\Users\Todd\Downloads\DF STUFF\companion\dfdbg.py", line 102, in __init__
 
  self.getWords()
 
  File "C:\Users\Todd\Downloads\DF STUFF\companion\dfdbg.py", line 218, in getWords
 
  kptr = self.getLong(vec2[1]+race*4)
 
  File "C:\Users\Todd\Downloads\DF STUFF\companion\dfdbg.py", line 114, in getLong
 
  return struct.unpack("L", self.dbg.read(ptr, 4))[0]
 
  File "C:\Users\Todd\Downloads\DF STUFF\companion\dfwin32.py", line 81, in read
 
  raise WinError()
 
WindowsError: [Error 998] Invalid access to memory location.
 
 
--[[User:0todd0|0todd0]] 01:05, 27 May 2008 (EDT)
 
 
It doesn't recognize your df version ... do you have debug privileges on the dwarf fortress process? Is it the latest version?
 
[[User:Bartavelle|Bartavelle]] 08:51, 27 May 2008 (EDT)
 
 
yes, it's the latest version. What do you mean by "debug privileges?" --[[User:0todd0|0todd0]] 23:23, 3 June 2008 (EDT)
 
 
: I had this exact error too, until I right-clicked on dfcompanion_prototype.py and went to "open with" to find two python options, the second one worked. Have you got python previously installed and if so can you try uninstalling all versions and re-installing the latest one again? This could be a stab in the dark however... --[[User:Mrchinchin25|Mrchinchin25]] 23:48, 3 June 2008 (EDT)
 
 
:: I recently downloaded this: what's been said so far to fix this problem isn't doing anything at all. Again, what do you mean "debug privileges?" --[[User:Pseu|Pseu]] 19:35, 4 June 2008 (EDT)
 
 
:::I was a moder for Elder Scrolls 4 and it required both python 2.4 and 2.5 to mod. Though t see if this would work, i uninstalled python 2.4 but it didn't, i'll try what you said Mrchinchin...  --[[User:0todd0|0todd0]] 20:32, 4 June 2008 (EDT)
 
 
::::In regards to debug privileges in Win XP.  Start->Control Panel->Administrative Tools->Local security Settings->local policies->user rights assignment->debug programs (on the right pane)--[[User:kirk|kirk]] 11:58, 10 June 2008 (EDT)
 
 
:::::I'm having the same issue with DF 0.27.176.38c and the newest version of Companion (downloaded it today). Also, kirk's info above isn't useful to anyone who is using XP Home - Local Security Settings isn't there. --[[User:Tyranic-Moron|Tyranic-Moron]] 22:06, 14 June 2008 (EDT)
 
 
== Moogie's Problem ==
 
 
I'm getting this:
 
 
Traceback (most recent call last):
 
  File "C:\Documents and Settings\Moogie\My Documents\Dwarven Fortress\companion
 
\dfcompanion_prototype.py", line 3, in <module>
 
    import gtk
 
ImportError: No module named gtk
 
 
I have Gtk 2.10.11-1 installed in the Companion folder. I have Python 2.5.1 installed from ages ago when I used to play Oblivion.
 
 
Why isn't it seeing Gtk there?
 
 
Wow, I have no idea what I'm doing. The above comment is from me (Moogie). I don't know how to add a title or anything, sorry.
 
 
: Don't worry, I'm sure you'll get it eventually. I've shifted your error into it's own section anyway, hopefully it's more noticeable this way. --[[User:Tyranic-Moron|Tyranic-Moron]] 18:52, 15 June 2008 (EDT)
 
 
== Not running on Windows X64 either ==
 
 
Okay since it doesn't run on Win2000, I bought a new PC just to get some better FPS on Dwarf Fortress, but this tool won't run on it either.
 
 
I get the following error:
 
 
WindowsError: [Error 299] Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
 
 
Tried Python 2.4 and 2.5 and different versions of this utility but all are giving the same error.
 
 
== Missing DLL file ==
 
 
I have the latest version of Python. I downloaded all the required files. When I run DFcompanion_prototype.py, I get "This application has failed to start because libglib-2.0-0.dll was not found. Re-installing the application may fix this problem."
 
 
Why is it giving me this message if I've already installed all the required files?
 
 
== Install Questions ==
 
 
"For python 2.5 users, just grab the utility at this place, and unzip it (warning, this is an old version). "
 
It's an old version of dwarf companion?  If that's the case, where is the most recent version? I don't see it on your page. ([[User:Slitherrr|Slitherrr]] 11:58, 30 July 2008 (EDT))
 
 
==.39f is incompatible==
 
D:\Dwarf Fortress\companion>dfcompanion_prototype.py
 
Traceback (most recent call last):
 
  File "D:\Dwarf Fortress\companion\dfcompanion_prototype.py", line 402, in <module>
 
    DFcmp = DFcompanion()
 
  File "D:\Dwarf Fortress\companion\dfcompanion_prototype.py", line 346, in __in
 
it__
 
    self.dd = dwarfdbg()
 
  File "D:\Dwarf Fortress\companion\dwarfdbg.py", line 105, in __init__
 
    self.configoffsets()
 
  File "D:\Dwarf Fortress\companion\dwarfdbg.py", line 49, in configoffsets
 
    tmp = os.getPatternPos( r'\x68' + stock + r'\xb8....\xc7.........\x89.....'+ os.call + r'\x38' )[0]+0x21
 
IndexError: list index out of range
 
 
This is the same problem I'm having too. I have all the correct packages installed. It looks like Dwarf Companion just doesn't work with 39f. - SquirrelFarmer
 
 
== manual input of offsets for 39f ==
 
 
Okay I might be ignorant to all this memory messing stuff, but wouldn't this problem with the new version be fixed if someone puts an if(1): at line 28 of dwarfdbg.py and changes there to what they should be in the new version?
 
 
Would anyone happen to have the required addresses?
 
 
These are the variables it needs, as you can see I've been trying a bit myself but I still don't have all the required ones.
 
 
        self.off_vec_maincreatures = 0x01575DEC  #0x01427B50
 
        self.off_x_width =      0x015B7938 #0x01469698
 
        self.off_y_width =      0x015B793C #0x0146969C
 
        self.off_z_width =      0x015B7940 #0x014696A0
 
        self.off_map_data =      0x015B7920 #0x01469680
 
        self.off_race =        0x00000000 #0x0146B060
 
        self.off_lang =        0x00000000 #0x0146B180
 
        self.off_moodtime =      0x00000000 #0x01248ABA
 
        self.off_playedrace =      0x00000000 #0x01248AC8
 
        self.off_economy =      0x00000000 #0x0123B384
 
        self.off_xcursor =      0x009EF294 #0x008FF288
 
        self.off_ycursor =      0x009EF298 #0x008FF28C
 
        self.off_zcursor =      0x009EF29C #0x008FF290
 
  
 
== DwarfCompanion Linux HOWTO ==
 
== DwarfCompanion Linux HOWTO ==
Line 585: Line 114:
 
--[[User:Penguin dwarf08|Penguin dwarf08]] 14:14, 11 September 2008 (EDT)
 
--[[User:Penguin dwarf08|Penguin dwarf08]] 14:14, 11 September 2008 (EDT)
  
Hey Bartavelle, somebody in this thread noted that creature flag 0x1.4 seems to control the "projectile" status (blue background). http://www.bay12games.com/forum/index.php?topic=27494.msg336702#msg336702
+
:Thanks for this ! [[User:Bartavelle|Bartavelle]] 09:20, 17 March 2009 (UTC)
[[User:Footkerchief|Footkerchief]] 02:46, 22 November 2008 (EST)
+
 
 +
 
 +
== Happydorf.py ==
 +
 
 +
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.
 +
 
 +
<tt>
 +
from dwarfdbg import *
 +
from eventname import jobName
 +
import sys
 +
dbg = dwarfdbg() #init dbg
 +
cl = dbg.getCreatures(0) #get the whole creature list (slow)
 +
for id in cl:
 +
    if cl[id][1] != 'dwarf': #keep Dwarf (both alive and dead)
 +
          continue
 +
    c = cl[id][13] # creature structure
 +
    if c.fe4&2:
 +
          continue
 +
    c.happiness = 65534 #Set happy to max -1, (max is 65535 as of 40D)
 +
    dbg.saveCreature(c) #save
 +
</tt>
 +
--[[User:Kittyz|Kittyz]] 14:56, 27 January 2009 (EST) Kittyz
 +
 
 +
== Compatibility ==
 +
 
 +
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)
 +
 
 +
: Nope. --[[User:Bartavelle|Bartavelle]] 08:48, 13 May 2009 (UTC)
 +
 
 +
::Damn. Cheers anyway. --[[User:Simmura McCrea|Simmura McCrea]] 15:25, 13 May 2009 (UTC)
 +
 
 +
:::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)
 +
 
 +
::::Are there any plans to update the memory locations? I tried simply renaming the file to dwarfort.exe as it is in 40d but it would not work as the memory locations are out of date. [[User:Forsaken1111|Forsaken1111]] 06:08, 27 May 2009 (UTC)
 +
 
 +
: 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)
 +
 
 +
::[[Dwarf Fortress Wiki:Community Portal#B|"B"]] 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)
 +
 
 +
== Unknown flags ==
 +
0x1      =???        <br />
 +
dead?    =Kills creature when used with 'dead' <br />
 +
0x4      =??? <br />
 +
artifact =designates whether creature has created an artifact <br />
 +
0x10    =hostile        <br />
 +
0x20    =???    <br />
 +
merch1?  <br />
 +
caravan guard? <br />
 +
0x100          <br />
 +
0x200          <br />
 +
!unitlist      <br />
 +
liaison?      <br />
 +
zombie        <br />
 +
skel          <br />
 +
working        <br />
 +
prone          <br />
 +
0x1.4          <br />
 +
inv1          <br />
 +
hidden        <br />
 +
inv2          <br />
 +
0x1.5          <br />
 +
0x2.5          <br />
 +
0x4.5          <br />
 +
0x8.5          <br />
 +
0x1.6          <br />
 +
0x2.6          <br />
 +
tame          <br />
 +
0x8.6          <br />
 +
r.guard        <br />
 +
f.guard        <br />
 +
0x4.7 <br />
 +
0x8.7 <br />
 +
0x1b <br />
 +
0x2b <br />
 +
0x4b <br />
 +
0x8b <br />
 +
0x10b <br />
 +
0x20b <br />
 +
0x40b <br />
 +
dead <br />
 +
vanish? <br />
 +
0x200b <br />
 +
0x400b <br />
 +
0x800b <br />
 +
0x1000b <br />
 +
winded? <br />
 +
0x4000b <br />
 +
ground <br />
 +
flying <br />
 +
slaughter <br />
 +
underwrld <br />
 +
can't eat <br />
 +
0x1.5b <br />
 +
0x2.5b <br />
 +
0x4.5b <br />
 +
visitor? <br />
 +
0x1.6b <br />
 +
0x2.6b <br />
 +
0x4.6b <br />
 +
0x8.6b <br />
 +
0x1.7b <br />
 +
winded? <br />
 +
0x4.7b <br />
 +
tame2 <br />
 +
 
 +
* Technically, '''all''' of these flags are known - see [[Creature flags in DF memory]]. --[[User:Quietust|Quietust]] 17:14, 18 May 2010 (UTC)
 +
 
 +
== FTP SERVER DOWN! ==
 +
THE FTP SERVER FOR THE PyObject AND WHATEVER THE OTHER TWO ARE IS DOWN! THE DAMN FTP SERVER IS DOWN! GOD DAMN IT THE FTP SERVER IS DOWN! I NEED FTP SERVER! FTP SERVER DOWN! FTP SERVER NOT WORKING! FTP SERVER DEAD! FTP SERVER SUFFERING MANGLED HEART!
 +
 
 +
I found a site that mirrors these files (possibly not the most up-to-date ones though)
 +
http://www.filewatcher.com/b/ftp/ftp.dit.upm.es/linux/mirrors/ftp.gnome.org/binaries/win32.0.0.html
 +
 
 +
== Additional in-game languages (v0.17) ==
 +
 
 +
If you have additional languages modded into the game, out-of-the-box DwarfCompanion 0.17 will bomb with an error:
 +
<blockquote>
 +
  File "[PATH]\dwarfdbg.py", line 477, in getCreature
 +
    name = self.getName(c, details)
 +
  File "[PATH]\dwarfdbg.py", line 323, in getName
 +
    lastname = self.printName(table, lang)
 +
  File "[PATH]\dwarfdbg.py", line 219, in printName
 +
    lastname += self.rwords[lang][v]
 +
IndexError: list index out of range
 +
</blockquote>
 +
 
 +
To make it work, count the number of languages you have (but not language_SYM.txt).
 +
 
 +
Find the line in dwarfdbg.py which reads:
 +
 
 +
:for race in range(4):
 +
 
 +
Replace the 4 with the number of languages you have, run again, and it should work fine.
 +
 
 +
As of 0.17c this is no longer necessary.
 +
 
 +
== Loading error ==
 +
 
 +
I'm not sure if you actually check this, but here goes anyway.
 +
 
 +
I have all the other things installed (GTK, PYCairo, etc.), and when I click it, it simply opens a black window for a moment and closes. So I tried to run it through the command prompt, and it comes up with the following error:
 +
 
 +
:C:\Games\Dwarf Fortress>dfcompanion_prototype.py
 +
:Timestamp = 0x48c330df
 +
:Traceback (most recent call last):
 +
:File "C:\Games\Dwarf Fortress\dfcompanion_prototype.py", line 409, in <module>
 +
 
 +
:DFcmp = DFcompanion()
 +
:File "C:\Games\Dwarf Fortress\dfcompanion_prototype.py", line 353, in __init__
 +
 
 +
:self.dd = dwarfdbg(verbose=True)
 +
:File "C:\Games\Dwarf Fortress\dwarfdbg.py", line 131, in __init__
 +
:self.configoffsets()
 +
:File "C:\Games\Dwarf Fortress\dwarfdbg.py", line 89, in configoffsets
 +
:raise "can't guess offsets if not PE"
 +
:TypeError: exceptions must be classes or instances, not str
 +
 
 +
A similar thing happens when I try to use the executable version:
 +
 
 +
:C:\Documents and Settings\****\My Documents\Downloads\dist>dfcompanion_prototype.exe
 +
:Timestamp = 0x48c330df
 +
:C:\Documents and Settings\****\My Documents\Downloads\dist\library.zip\dwarfdbg.py:98: DeprecationWarning: raising a string exception is deprecated
 +
:Traceback (most recent call last):
 +
:File "dfcompanion_prototype.py", line 409, in <module>
 +
:File "dfcompanion_prototype.py", line 353, in __init__
 +
:File "dwarfdbg.pyc", line 131, in __init__
 +
:File "dwarfdbg.pyc", line 89, in configoffsets
 +
:can't guess offsets if not PE
 +
 
 +
What does this mean? How do I fix it? Did I do something stupid and obvious to mess it up? [[Special:Contributions/69.109.124.77|69.109.124.77]] 09:37, 12 January 2010 (UTC)
 +
 
 +
Try running version 0.16:  version 0.17 is for DF 40d16 only which may not be the version you are running. [[Special:Contributions/12.71.14.197|12.71.14.197]] 13:42, 25 February 2010 (UTC)
 +
 
 +
== tried running through the cmd.exe but I keep getting "the directory name is invalid" ==
 +
 
 +
It was flashing the black window so I tried to run it through run/cmd.exe, however it says that the directory name is invalid. I have tried several solutions, such as surrounding it with quotes (helps a little bit but not much), but I still can't get it to run. Which is a pity because I was looking forward to this.  Suggestions?
 +
 
 +
 
 +
Edit: I made the window flash enough times to get a glimpse of what was written, and it looks like I have a similar problem to the above poster.    Pleeeeease respond, someone?  :(
  
== Free cat pet option ==
+
As above:  try running version 0.16:  version 0.17 is for DF 40d16 only which may not be the version of DF that you are running.  [[Special:Contributions/12.71.14.197|12.71.14.197]] 13:43, 25 February 2010 (UTC)
  
Hello mate, great work here. Thing is as I was trying to find a way to "free" the cats from their owners to prevent catsplosion, I realized you already had a right click option, marked "(doesn't work)" but it seems it worked for me. It resets the cat back to Uninterested state and does not seem to produce an unhappy thought. So why is it marked "does not work"?
+
This information really needs to written somwhere close to the download links, I made the same error
  
--[[User:Alkar|Alkar]] 10:43, 22 November 2008 (EST)
 
  
== Yet more help needed ==
+
♥Many♥ thanks, lets try it now!  ☺
  
When I try to run it via the command prompt, I get this error: http://i100.photobucket.com/albums/m39/weapon_ook/dfcompanion.jpg
 
I freely admit that I haven't the blindest clue of what it means. Any help? --[[User:Simmura McCrea|Simmura McCrea]] 14:33, 22 November 2008 (EST)
 
  
:Can't help you there, '''but''' on the main page for DC, you can download an [http://www.pindi.us/files/df/dfcompanion-0.14-exe.zip exe version] of the tool, which saves you from having to use all the other dependancies (at least it works like a charm for me) --[[User:Alkar|Alkar]] 15:20, 22 November 2008 (EST)
+
I'm having the same problems as the above, though with both executable versions of companion. I'm on DF 31.25. (does it even support this?)
  
:Well, that seems to have fixed it. Thanks. --[[User:Simmura McCrea|Simmura McCrea]] 16:06, 22 November 2008 (EST)
+
Running the exe flashes with cannot find DF, Command prompt is no exception, any suggestions?
  
== Viewing more than just dwarves ==
+
== Buggy window ==
  
I see posts below of people modifying things that aren't dwarves. But, when I try setting the filter to "All Creatures" and refreshing, I still only get dwarves. Is there a trick to this? I'm hoping to find a way to deal with a floating wagon. -[[User:Fuzzy|Fuzzy]] 02:15, 7 December 2008 (EST)
+
C:\blahblahblah\dfcompanion_prototype.exe:360:PangoWarning: failed to find shape engine. expect ugly output. engine-type='PangoRenderWin32', script=latin
*I think you're clicking the button that toggles whether or not to show dead creatures. The buttons are inconsistently named (one names the current option, the other names the option to switch to), and really should be made consistent.
 
**I never noticed this stupid inconsistency. It'll be fixed. [[User:Bartavelle|Bartavelle]] 17:08, 16 December 2008 (EST)
 
* ^_^ But how ''does'' one view non-Dwarves? -[[User:Fuzzy|Fuzzy]] 17:15, 16 December 2008 (EST)
 
**There should be no problem just clicking the button. Is there an error message appearing in the console window ? [[User:Bartavelle|Bartavelle]] 01:39, 17 December 2008 (EST)
 
*** *blink* It works on my desktop, just not on my laptop, apparently. On my laptop, the button changes text, but doesn't actually show the other creatures. I don't know if there's an error message... I'll try to find it to check. -[[User:Fuzzy|Fuzzy]] 00:34, 19 December 2008 (EST)
 
::: Just to follow up, for a little while, I wasn't getting any readout at all on my dwarves on my laptop. I don't know what changed, but it's back to what it was before. Clicking the "All creatures" button changes the text, but it still only displays Dwarves. I think that it may be because I'm using the Civilization's Forge mod which adds creatures. I think I saw someone say somewhere that one has to modify a file to add the new races? Can't seem to find it on the wiki, though. -[[User:Fuzzy|Fuzzy]] 23:01, 27 December 2008 (EST)
 
  
==Ending a Strange Mood==
+
This error message repeats twice, and I get an extremely tall, spaced window that cannot be resized. Anyone know what the deal with this is?
So, I've noticed that setting mood to none and removing the artifact creator bit doesn't end the fact that the dwarf is in a strange mood, although the exclamation point will go away.  If you (v)iew them they still show Strange Mood as their active job.  Any idea how to completely end a mood? --[[User:Squirrelloid|Squirrelloid]] 06:56, 17 December 2008 (EST)
 
* you would have to switch their active job. This is not yet implemented as this is a bit obscure and would likely result in endless crashes. [[User:Bartavelle|Bartavelle]] 08:43, 17 December 2008 (EST)
 
  
== New reveal features. ==
+
== Is there a "this is about an older version of DF" template that can be added? ==
  
Does revealVeins.exe and reveal.exe break underground rivers, caves, HFS, and other features that unlock certain abilities, like reveal in Tweak does? If yes, is there any way to fix it? [[User:Lando242|Lando242]] 19:57, 13 January 2009 (EST)
+
This doesn't seem to have been updated since 40d. It might be helpful to have a header to reflect that. [[Special:Contributions/130.160.154.207|130.160.154.207]] 00:51, 7 April 2014 (UTC)

Latest revision as of 00:51, 7 April 2014

I did some cleaning (actually I just removed most of it).

Compatibility with Mods[edit]

Was working with the Dig Deeper mod, and found that it doesn't work with modded in creatures at all. That's a let-down. Jwguy 07:55, 5 July 2009 (UTC)

Not actual anymore. Works with all creatures, whether modded or not. --Blur 18:30, 8 February 2010 (UTC)

Not working[edit]

I'm on 40d, and have followed the instructions on the page, (GTK Win32 runtime, Python 2.5, All three modules, and the Program), started the program up before and after Dwarf Fortress, just to see if I did it wrong the first time, and it doesn't work. The Program just has some category tabs and a few buttons, but never shows any data. Jwguy 18:31, 29 May 2009 (UTC)

  • Additionally, in case it might help, all I am getting is a single box with Refresh, All Creatures, Only Dwarves, etc. There doesn't seem to be a load function or anything. I'd really appreciate some help with this. Jwguy 18:41, 29 May 2009 (UTC)
    • I believe I was able to correct the problem. Apparently, the program is centered around the C:/ drive only. I normally play Dwarf Fortress from my portable hard-drive, and tried initializing the program on both devices. After a bit of trial and error, I moved both to my desktop, and it seems to work, now. Hopefully, if anyone else has this problem, they can fix it like this; I still can't get my dwarves to stop dying from heat after running through a flow of lava, though. I threw them in water, doused the clothes and healed, but I digress. Jwguy 00:31, 30 May 2009 (UTC)

Bugs[edit]

There are a few known bugs :

  • exhaustion is sometimes maxed out when you edit a creature
  • bleeding seems not to be stoppable in most case : just turn the creature undead
  • 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)


Feature requests![edit]

What would be the chances of dwarf item manipulation? I'd love to bhttp://dwarffortresswiki.net/index.php/Utility_Talk:DwarfCompanione able to get rid of the rotting clothes that these stinking dwarves insist on wearing. Aristoi 15:01, 20 May 2009 (UTC)

Or maybe destroy that burning fire imp fat... Forsaken1111 06:08, 27 May 2009 (UTC)

Most Dwarves acquire dabbling level in all the social skills very quickly, which leaves these skills at the top of their skill list for all time. Even if they later become a Legendary Mason, you still have to scroll down to see it. Can you add something that reorders their skills by highest level, so the things they're best at show up first? --Oddrune 05:19, 1 June 2009 (UTC)


Ignite units would be a nice feature too. --Blur 17:23, 8 February 2010 (UTC)

Dwarf Companion - Cheating Fun in Adventure Mode![edit]

I was tinkering about with the Dwarf Companion program earlier today, when a thought came to my mind. "What if you could do stuff with this program in Adventure mode?"

Well, it turns out that you can. By turning on the program and hitting the "All Creatures" 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.

Here's a movie of some of my exploits with a fresh adventurer dwarf: http://mkv25.net/dfma/movie-348-dwarfcompanioninadventuremode17338a

I hope this strikes as interesting / useful for the future!

Please sign your additions to the discussion page. Forsaken1111 06:09, 27 May 2009 (UTC)

Easy Python/PyGTK installer[edit]

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!

DwarfCompanion Linux HOWTO[edit]

There are two major problems when trying to run DwarfCompanion-0.13 in Linux:

  • at least when started with "wine dwarfort.exe", dwarf-companion
    • cannot find the path to the executable when searching for the offsets
    • and has problems finding the process with "endswith()"

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):

--- companion/dwarfdbg.py	2008-09-07 22:04:12.000000000 +0000
+++ ~/dwarf_fortress/companion/dwarfdbg.py	2008-09-07 22:07:11.000000000 +0000
@@ -100,9 +100,9 @@
 		self.dbg = pydbg()
 		self.metals = None
 		for (pid, proc) in self.dbg.enumerate_processes():
-			if proc.lower().endswith("dwarfort.exe"):
+			if "dwarfort.exe" in proc.lower():
 				break
-		if not proc.lower().endswith("dwarfort.exe"):
+		if not "dwarfort.exe" in proc.lower():
 			print "Dwarf Fortress is not running, or could not be found"
 			sys.exit(-1)
 		self.image = proc
@@ -864,7 +865,7 @@
 
 	def getOs(self):
 		if self.ofs == None:
-			self.ofs = offsetsearch.offsetsearch(self.image)
+			self.ofs = offsetsearch.offsetsearch("../dwarfort.exe")
 		return self.ofs
 
 	def instaMood(self):


  • 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

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 "print status" statement):

--- companion/dflinux.py	2008-01-09 10:50:00.000000000 +0000
+++ ~/dwarf_fortress/companion/dflinux.py	2008-09-07 21:29:50.000000000 +0000
@@ -33,6 +33,9 @@
 		pid = int(spid)
 		self.pid = pid
 		self.libc.ptrace(16, self.pid, 0, 0) #ptrace attach
+		status = 0
+		self.libc.waitpid(self.pid, status, 0)
+		print status
 	
 	def read(self, addr, size):
 		out = 
@@ -60,4 +63,7 @@
 	def detach(self):
 		if self.pid>0:
 			self.libc.ptrace(17, self.pid, 0, 0) #ptrace detach
+			status = 0
+			self.libc.waitpid(self.pid, status, 0)
+			print status
 			self.pid = 0
  • 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 ...

--Penguin dwarf08 14:14, 11 September 2008 (EDT)

Thanks for this ! Bartavelle 09:20, 17 March 2009 (UTC)


Happydorf.py[edit]

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.

from dwarfdbg import * from eventname import jobName import sys dbg = dwarfdbg() #init dbg cl = dbg.getCreatures(0) #get the whole creature list (slow) for id in cl:

    if cl[id][1] != 'dwarf': #keep Dwarf (both alive and dead)
         continue
    c = cl[id][13] # creature structure
    if c.fe4&2:
         continue
    c.happiness = 65534 #Set happy to max -1, (max is 65535 as of 40D)
    dbg.saveCreature(c) #save

--Kittyz 14:56, 27 January 2009 (EST) Kittyz

Compatibility[edit]

Does this work in 0.28.181.40d11? It says DF isn't running or can't be found when I try. --Simmura McCrea 18:16, 12 May 2009 (UTC)

Nope. --Bartavelle 08:48, 13 May 2009 (UTC)
Damn. Cheers anyway. --Simmura McCrea 15:25, 13 May 2009 (UTC)
Workaround: Transport save file to a 40d folder, mess around, transport it back. 40d/40d11 are mutually compatible. -Heartofgoldfish 00:18, 18 May 2009 (UTC)
Are there any plans to update the memory locations? I tried simply renaming the file to dwarfort.exe as it is in 40d but it would not work as the memory locations are out of date. Forsaken1111 06:08, 27 May 2009 (UTC)
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. Janizary 19:39, 18 May 2009 (UTC)
"B" 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.--Albedo 15:08, 20 May 2009 (UTC)

Unknown flags[edit]

0x1 =???
dead? =Kills creature when used with 'dead'
0x4 =???
artifact =designates whether creature has created an artifact
0x10 =hostile
0x20 =???
merch1?
caravan guard?
0x100
0x200
!unitlist
liaison?
zombie
skel
working
prone
0x1.4
inv1
hidden
inv2
0x1.5
0x2.5
0x4.5
0x8.5
0x1.6
0x2.6
tame
0x8.6
r.guard
f.guard
0x4.7
0x8.7
0x1b
0x2b
0x4b
0x8b
0x10b
0x20b
0x40b
dead
vanish?
0x200b
0x400b
0x800b
0x1000b
winded?
0x4000b
ground
flying
slaughter
underwrld
can't eat
0x1.5b
0x2.5b
0x4.5b
visitor?
0x1.6b
0x2.6b
0x4.6b
0x8.6b
0x1.7b
winded?
0x4.7b
tame2

FTP SERVER DOWN![edit]

THE FTP SERVER FOR THE PyObject AND WHATEVER THE OTHER TWO ARE IS DOWN! THE DAMN FTP SERVER IS DOWN! GOD DAMN IT THE FTP SERVER IS DOWN! I NEED FTP SERVER! FTP SERVER DOWN! FTP SERVER NOT WORKING! FTP SERVER DEAD! FTP SERVER SUFFERING MANGLED HEART!

I found a site that mirrors these files (possibly not the most up-to-date ones though) http://www.filewatcher.com/b/ftp/ftp.dit.upm.es/linux/mirrors/ftp.gnome.org/binaries/win32.0.0.html

Additional in-game languages (v0.17)[edit]

If you have additional languages modded into the game, out-of-the-box DwarfCompanion 0.17 will bomb with an error:

File "[PATH]\dwarfdbg.py", line 477, in getCreature name = self.getName(c, details) File "[PATH]\dwarfdbg.py", line 323, in getName lastname = self.printName(table, lang) File "[PATH]\dwarfdbg.py", line 219, in printName lastname += self.rwords[lang][v] IndexError: list index out of range

To make it work, count the number of languages you have (but not language_SYM.txt).

Find the line in dwarfdbg.py which reads:

for race in range(4):

Replace the 4 with the number of languages you have, run again, and it should work fine.

As of 0.17c this is no longer necessary.

Loading error[edit]

I'm not sure if you actually check this, but here goes anyway.

I have all the other things installed (GTK, PYCairo, etc.), and when I click it, it simply opens a black window for a moment and closes. So I tried to run it through the command prompt, and it comes up with the following error:

C:\Games\Dwarf Fortress>dfcompanion_prototype.py
Timestamp = 0x48c330df
Traceback (most recent call last):
File "C:\Games\Dwarf Fortress\dfcompanion_prototype.py", line 409, in <module>
DFcmp = DFcompanion()
File "C:\Games\Dwarf Fortress\dfcompanion_prototype.py", line 353, in __init__
self.dd = dwarfdbg(verbose=True)
File "C:\Games\Dwarf Fortress\dwarfdbg.py", line 131, in __init__
self.configoffsets()
File "C:\Games\Dwarf Fortress\dwarfdbg.py", line 89, in configoffsets
raise "can't guess offsets if not PE"
TypeError: exceptions must be classes or instances, not str

A similar thing happens when I try to use the executable version:

C:\Documents and Settings\****\My Documents\Downloads\dist>dfcompanion_prototype.exe
Timestamp = 0x48c330df
C:\Documents and Settings\****\My Documents\Downloads\dist\library.zip\dwarfdbg.py:98: DeprecationWarning: raising a string exception is deprecated
Traceback (most recent call last):
File "dfcompanion_prototype.py", line 409, in <module>
File "dfcompanion_prototype.py", line 353, in __init__
File "dwarfdbg.pyc", line 131, in __init__
File "dwarfdbg.pyc", line 89, in configoffsets
can't guess offsets if not PE

What does this mean? How do I fix it? Did I do something stupid and obvious to mess it up? 69.109.124.77 09:37, 12 January 2010 (UTC)

Try running version 0.16: version 0.17 is for DF 40d16 only which may not be the version you are running. 12.71.14.197 13:42, 25 February 2010 (UTC)

tried running through the cmd.exe but I keep getting "the directory name is invalid"[edit]

It was flashing the black window so I tried to run it through run/cmd.exe, however it says that the directory name is invalid. I have tried several solutions, such as surrounding it with quotes (helps a little bit but not much), but I still can't get it to run. Which is a pity because I was looking forward to this. Suggestions?


Edit: I made the window flash enough times to get a glimpse of what was written, and it looks like I have a similar problem to the above poster. Pleeeeease respond, someone? :(

As above: try running version 0.16: version 0.17 is for DF 40d16 only which may not be the version of DF that you are running. 12.71.14.197 13:43, 25 February 2010 (UTC)

This information really needs to written somwhere close to the download links, I made the same error


♥Many♥ thanks, lets try it now! ☺


I'm having the same problems as the above, though with both executable versions of companion. I'm on DF 31.25. (does it even support this?)

Running the exe flashes with cannot find DF, Command prompt is no exception, any suggestions?

Buggy window[edit]

C:\blahblahblah\dfcompanion_prototype.exe:360:PangoWarning: failed to find shape engine. expect ugly output. engine-type='PangoRenderWin32', script=latin

This error message repeats twice, and I get an extremely tall, spaced window that cannot be resized. Anyone know what the deal with this is?

Is there a "this is about an older version of DF" template that can be added?[edit]

This doesn't seem to have been updated since 40d. It might be helpful to have a header to reflect that. 130.160.154.207 00:51, 7 April 2014 (UTC)