Bay 12 Games Forum

Please login or register.

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

Author Topic: Rick's utilities?  (Read 3435 times)

Slappy Moose

  • Bay Watcher
    • View Profile
Rick's utilities?
« on: December 28, 2007, 09:01:00 pm »

In the wiki, it says it is possible to modify a "memory.ini" to use Rick's "adjuststart" for 33g. Where can I get his file?

My current fort is going downhill, and I want to start a new fort with lots of guys, since I hate having any less than 30.

Logged
Zaneg Thazor: Armok Reincarnate Story http://www.bay12games.com/forum/index.php?topic=19291.msg196691#msg196691

[Healthcare Update Thread] Personally, I can't wait for doctors to get possessed and start surgically attaching axes to champion soldier's arms.

Kagus

  • Bay Watcher
  • Olive oil. Don't you?
    • View Profile
Re: Rick's utilities?
« Reply #1 on: December 28, 2007, 09:06:00 pm »

Create a text file in the folder you put the utilities in, and rename it to "memory.ini".  Then, go here: http://www.dwarffortresswiki.net/index.php/User:Rick#memory.ini

and copy in the text for your version into the file.

Slappy Moose

  • Bay Watcher
    • View Profile
Re: Rick's utilities?
« Reply #2 on: December 28, 2007, 10:33:00 pm »

Thank you!

Sorry for the newbish question, I had thought I had to download a memory.ini file from somewhere.

Logged
Zaneg Thazor: Armok Reincarnate Story http://www.bay12games.com/forum/index.php?topic=19291.msg196691#msg196691

[Healthcare Update Thread] Personally, I can't wait for doctors to get possessed and start surgically attaching axes to champion soldier's arms.

The Devouring Plague

  • Bay Watcher
    • View Profile
Re: Rick's utilities?
« Reply #3 on: January 01, 2008, 09:42:00 am »

quote:
Originally posted by Kagus:
<STRONG>Create a text file in the folder you put the utilities in, and rename it to "memory.ini".  Then, go here: http://www.dwarffortresswiki.net/index.php/User:Rick#memory.ini

and copy in the text for your version into the file.</STRONG>


I've done this but it's not working. Any ideas?

Logged

Slappy Moose

  • Bay Watcher
    • View Profile
Re: Rick's utilities?
« Reply #4 on: January 01, 2008, 01:41:00 pm »

quote:
Originally posted by The Devouring Plague:
<STRONG>

I've done this but it's not working. Any ideas?</STRONG>


It doesn't work for me either, I think it just isn't meant for 33g.

Logged
Zaneg Thazor: Armok Reincarnate Story http://www.bay12games.com/forum/index.php?topic=19291.msg196691#msg196691

[Healthcare Update Thread] Personally, I can't wait for doctors to get possessed and start surgically attaching axes to champion soldier's arms.

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Rick's utilities?
« Reply #5 on: January 01, 2008, 08:28:00 pm »

All four of Rick's released utilities work for me in 33g.

If you have this problem with 33g, you will have it with 33h and so on.

As a first check, open the folder that contains the utilities and memory.ini file, and verify that there is a gear in the icon of memory.ini.  If there isn't, that implies that there is a hidden extension, probably .txt.  You will need to rename the file so that it is memory.ini, not memory.ini.txt.

Logged

TheSilverHammer

  • Bay Watcher
    • View Profile
Re: Rick's utilities?
« Reply #6 on: January 02, 2008, 01:23:00 pm »

I can't get those utilities to work for me either and I definitely made sure the .ini was named right.

Has anyone tried this under vista and gotten them to work?  I am guessing that any error is reported as a version incompatibility, so if there is an access problem it just says it is incompatible instead of saying it simply isn't allowed.

Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Rick's utilities?
« Reply #7 on: January 02, 2008, 03:01:00 pm »

I wish you guys would report the exact error messages you're getting.

I guess that TheSilverHammer, at least, is getting this error message?
   "this version of DFLib was not built for that Dwarf Fortress version..."

I see two ways that this can be reported.  First, if a ReadProcessMemory() call fails.  Second, if the string "Dwarf Fortress" is not found at the target memory location.

Regrettably, Rick doesn't check the success/failure of the ReadProcessMemory() call, so we can't tell which is going wrong without a debugger.

Hammer, would you verify that your memory.ini file starts with:

code:
[generic]
DWARF_FORTRESS=0x008A3474

and verify that, at DF's title screen, it does report v0.27.169.33g.
Logged

TheSilverHammer

  • Bay Watcher
    • View Profile
Re: Rick's utilities?
« Reply #8 on: January 02, 2008, 06:09:00 pm »

I have been doing some digging and the likely culprit is ReadProcessMemory(), there are quite a few people complaining about various apps not working that use this.   There are a few possible causes, though I am not sure which, if any apply to reveal.exe.

64 bit issue:   32 bit apps can not use ReadProcessMemory() on a 64 bit app. I do not think DF is 64 bit so this isn't likely the issue.

Vista Security Context: ReadProcessMemory() only works for processes running in the same security context, not just the same user.   This *might* be a problem.   If reveal.exe is run as admin, but DF.exe is not, this might fail.  The same is true in reverse.

Vista PROCESS_VM_READ:  This will *only* work if the targeted memory is passive, AKA not in use.  If it IS in use, then the process must be open with PROCESS_ALL_ACCESS.

Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Rick's utilities?
« Reply #9 on: January 03, 2008, 03:00:00 pm »

quote:
Originally posted by TheSilverHammer:
<STRONG>64 bit issue:  [...]

Vista Security Context: ReadProcessMemory() only works for processes running in the same security context, not just the same user.   This *might* be a problem.   If reveal.exe is run as admin, but DF.exe is not, this might fail.  The same is true in reverse.

Vista PROCESS_VM_READ:  [...]</STRONG>


DF is 32-bit, as are Rick's utils.  Rick uses PROCESS_ALL_ACCESS, and he tests the result of that call, so we can tell it is succeeding.  (Otherwise the error message would be "failed to open Dwarf Fortress process".)

So yeah, likely to be security context.  I know Vista monkeys around with user accounts in other situations, maybe it's happening here.

Um.  Try putting the utils and memory.ini in DF's folder?  Try moving the DF folder out of Program Files?  (I use C:\Games.)  I don't know enough about Vista to be able to guess what would cause processes to be in seperate security contexts.  (Except the obvious "I need more priveleges" dialog boxes.)

Logged

TheSilverHammer

  • Bay Watcher
    • View Profile
Re: Rick's utilities?
« Reply #10 on: January 03, 2008, 03:14:00 pm »

I actually use c:\games as my game dir too.   I have the utility in the same dir as DF.exe along with the memory.ini.   It just fails to work.  In the mod forum someone wrote a 3d visualizer utility which works just fine, so its not a pure ReadProcMemory problem.

I really have no idea why there is a problem.  Is reveal.exe open source?  I could run it under a debugger and see what the actual error code is.

Logged

Kagus

  • Bay Watcher
  • Olive oil. Don't you?
    • View Profile
Re: Rick's utilities?
« Reply #11 on: January 03, 2008, 04:06:00 pm »

I just made a folder that I called "Util" for all the utilities that I'd be using.  I unpacked whatever utilities I download in there, and when I read about the memory.ini file, I created a text file in there, put the text in, and renamed it.

Worked fine for me, but then again I'm using XP.  Vista hates everything.

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Rick's utilities?
« Reply #12 on: January 03, 2008, 05:50:00 pm »

Regrettably, reveal.exe is not open source.  That won't stop a serious hacker, though.

Thinking more about it, if ReadProcessMemory() is going to fail, then the OpenProcess(PROCESS_ALL_ACCESS) should fail as well.

Does anyone here with Vista have any experience in doing debugging without source, using raw hex-mode disassembly?  I know it's an exotic skill, but we wouldn't need much expertise, just enough to drive a debugger.

When I go back to work next week, I will install a copy of Vista in a VM, and do some testing of my own.

In the meantime, Hammer, why not try copying your entire DF folder into C:\Program Files?  I do remember that Vista treats programs in Program Files differently, but I don't remember or never bothered to learn the details.

Logged

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: Rick's utilities?
« Reply #13 on: January 03, 2008, 06:49:00 pm »

Yeah, I've got Vista and can debug raw assembly. I'll take a look at seeing if I can get the problem to occur on my system.

For now I can say that regional prospector, lavasquare, and a personal tile tool do work in Vista Business 32 using version 33f. I'll see if heal to works in 33f, then in 33g. Also, if it matters, I'm running DF out of a folder on my desktop.

Also, Cheat Engine running as an admin can operate on DF running non-admin. So I'm not sure how ReadProcessMemory can fail.

Logged

Slappy Moose

  • Bay Watcher
    • View Profile
Re: Rick's utilities?
« Reply #14 on: January 03, 2008, 08:01:00 pm »

Hmm, maybe I'm doing something stupid. I'm using an ini file, called "memory."
I'm using XP. However, I'm putting the files under C:\, so it's easier to type in the cmd prompt. Could that be it?

I usually just use the 33e file, start a fort, then upgrade to 33g.

I'll keep trying...

Logged
Zaneg Thazor: Armok Reincarnate Story http://www.bay12games.com/forum/index.php?topic=19291.msg196691#msg196691

[Healthcare Update Thread] Personally, I can't wait for doctors to get possessed and start surgically attaching axes to champion soldier's arms.
Pages: [1] 2