Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 16 17 [18] 19 20 ... 108

Author Topic: DFHack 0.5.15 (legacy)  (Read 405162 times)

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #255 on: September 02, 2010, 12:24:31 pm »

I'm just curious here, but could DFHack be used to modify the contents of the embark rectangle offsets (horribly worded, I know) and replicate the functionality of Nano Fortress?

Should include 'embark anywhere' functionality as well in that case.

EDIT: How difficult would it be to implement a hotkey/keypress hook so that we can make DFHack based utilities that run in the background and do something when a person presses a key in DF?

It's certainly possible on Windows, even without dfhack - I wrote a utility for the old 2D version of Dwarf Fortress so I could forbid/chasm/melt items without having to go into the stocks screen, and it just monitored the "f"/"c"/"m" keys while it was running in the background and making sure that the Dwarf Fortress window had focus (see here, sources included).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

mLegion

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #256 on: September 02, 2010, 12:30:20 pm »

Is there some issue with spawning liquids above a certain level or is it impossible to place liquids above the max natural elevation to stop people binding obsidian to the top pf the sky?
Use 'k' to view and then go up in Z-levels, you should see the right pane showing 'open space' until you get to above a certain point then it will be blank, that 'block' of the map isn't loaded until you build something near there like a tower.


(see here, sources included).
Thanks that does help, but it would still be nice for DFHack to be able to hook DF's keyboard input and allow us to register a callback function on a certain keypress.
« Last Edit: September 02, 2010, 12:32:59 pm by mLegion »
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #257 on: September 02, 2010, 05:21:53 pm »

(see here, sources included).
Thanks that does help, but it would still be nice for DFHack to be able to hook DF's keyboard input and allow us to register a callback function on a certain keypress.
Well, I can add that by catching SDL events. I'd need to restructure things to do that though. I already have a way to get code into DF by adding an extra library that looks like SDL to DF. It needs to have a few bugs fixed to be good for general use though.

So, let's do a short status/planning update:
  • I changed the format of the offset file (memory.xml) to support offset groups. The change is structural, so the old utilities won't work with new memory.xml files. Everything should be fine once they get updated. Some stonesense users seem to be getting errors from it. Wait for updates, they should be arriving shortly :)
  • Further work on the offset file will concentrate on generating the code for reading the offsets. So, when DFHack is built, the memory.xml reader part will be generated out of the memory.xml.
  • The offset file could also describe what's being read instead of just where it is. Combined with code generation, this could mean some big changes to DFHack.
  • There will be a GUI editor for the file too. I hope to integrate memory search/view tools into that editor eventually. Current idea is to take 'Evan's debugger', butcher it and reassemble the parts into a new and much better shape :)
  • Next version of DFHack will have weather support and an utility to change weather (thanks to thewonderidiot). You can already get this if you compile DFHack from git.
  • Stonesense should work on Linux soon-ish. If you build from git/svn, you can already use it. The creature support is broken there though.
  • The build system has been changed to work better on Linux (headers are installed along with libraries and binaries). Actual packaging is possible now without any extra messing around.
  • Adding back support for DF 40d is the possible next step after the offset file changes are 'done'. Or at least a good portion of them.
  • The SDL I/O support and fixes for the SHM library could be done in parallel to all this, but if noone else jumps on that and does it, I'm going to do this bit after 40d support.
  • I have about three weeks of coding time before the next semester starts... so there's no telling how far I'll get into this list before my free time is significantly reduced.

If you are missing some features, don't be afraid to jump in and add them :)

Dan Backslide

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #258 on: September 03, 2010, 03:02:37 pm »

I recently started using DFHack, and tried out reveal. It gave me the notices for finding the pit and I thought nothing of it until I went to create magma forges. From what I've read when you use reveal, it skips the flags for finding magma and then doesn't allow construction of magma forges. I tried to find a mod to help and the only one I saw was Gibbed's Tweak which has long since been out of production. Is there any way I can reset the flags or is my current save screwed for that and I should start over? How can I avoid this in the future if I want to use reveal? Thank you for any help.
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #259 on: September 03, 2010, 03:03:42 pm »

Only use reveal while paused.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Andux

  • Bay Watcher
  • [PREFSTRING:semicolons]
    • View Profile
    • Andux's DFWiki page
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #260 on: September 03, 2010, 06:50:44 pm »

I tried to find a mod to help and the only one I saw was Gibbed's Tweak which has long since been out of production. Is there any way I can reset the flags or is my current save screwed for that and I should start over?

I've been working on updated Tweak XML files for 0.31.xx; they don't have the offsets to enable magma buildings directly, but you could try using For Each Tile to hide all the tiles with magma, then have your miners dig down to "discover" them again, which should set the flags for you.
Logged
(Do not sign anything.) -- Fell, Planescape: Torment

MADMAN · Save Tools · WTF Tools · Generated Raws Extractor · Tweak for 0.31–34.xx

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #261 on: September 03, 2010, 06:57:44 pm »

I tried to find a mod to help and the only one I saw was Gibbed's Tweak which has long since been out of production. Is there any way I can reset the flags or is my current save screwed for that and I should start over?

I've been working on updated Tweak XML files for 0.31.xx; they don't have the offsets to enable magma buildings directly, but you could try using For Each Tile to hide all the tiles with magma, then have your miners dig down to "discover" them again, which should set the flags for you.
Yeah. that could help. maybe I should add a backup feature to the reveal tool - just save the 'hidden' bitmask into a file. It already backs it up for a short while, only in memory.

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #262 on: September 03, 2010, 07:34:51 pm »

Or you could maybe make sure the game is paused and/or force it to be so :)

Dwarf Fortress.exe+10BCE11 is the byte that determines if the game is paused or not.

Dwarf Fortress.exe+14F589 is the instruction that writes to that address...

EDIT: There ya go, replace Dwarf Fortress.exe+14F583 with 90 90 90 90 90 90 and set Dwarf Fortress.exe+10BCE11 to 01 when dfreveal loads. The game will be paused and there will be no way to unpause it.

When you unreveal, replace Dwarf Fortress.exe+14F583 with 2a 15 11 ce 2e 01 and the user will be able to unpause again.

This works for windows only, obviously.
« Last Edit: September 03, 2010, 08:17:20 pm by devek »
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Dan Backslide

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #263 on: September 03, 2010, 10:58:14 pm »

Only use reveal while paused.

Well, now I know to only use while paused. The command prompt's dialogue wasn't really clear on what game state I should mess around reveal with. I've decided it is best for me to start a new fort so the flagging will be a non-issue. Thanks for the information.
Logged

finesse

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #264 on: September 04, 2010, 02:08:38 am »

Or you could maybe make sure the game is paused and/or force it to be so :)

Dwarf Fortress.exe+10BCE11 is the byte that determines if the game is paused or not.

Dwarf Fortress.exe+14F589 is the instruction that writes to that address...

EDIT: There ya go, replace Dwarf Fortress.exe+14F583 with 90 90 90 90 90 90 and set Dwarf Fortress.exe+10BCE11 to 01 when dfreveal loads. The game will be paused and there will be no way to unpause it.

When you unreveal, replace Dwarf Fortress.exe+14F583 with 2a 15 11 ce 2e 01 and the user will be able to unpause again.

This works for windows only, obviously.

Will that also disable the 'take a turn key' cause my fat fingers have accidentally tapped that when changing levels before.. very annoying - i should really change the z level keys.
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #265 on: September 04, 2010, 08:09:47 am »

The reveal tool will pause automatically in the next release and warn you about unleashing hell.

mLegion

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #266 on: September 04, 2010, 09:02:33 am »

might be worth it to make it so reveal can reveal only everything above the magma sea.
Logged

rmunn

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #267 on: September 04, 2010, 10:16:01 am »

FYI: the next version of Ubuntu Linux, due to be released in October 2010, turns OFF (by default, you can change this) the ability of programs to access each others' memory. You can turn it back on; see this thread for details. This won't be a huge problem yet, as only beta-testers and other brave souls will be running Ubuntu 10.10 ("Maverick Meerkat") just now... but once the end of October rolls around and the Ubuntu users start upgrading, you're going to see a lot of "How Come DFHack/Dwarf Therapist/Stonesense/etc aren't working?" posts. At that time, it might be worth updating the OP to point to the "Fixing problems with Maverick" thread.
Logged
Meet the seven year-old girl Lokum Ishemavuz. Her hobbies include taking care of her pet vulture, playing in graveyards, and killing people before they have a chance to scream.

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #268 on: September 04, 2010, 02:27:19 pm »

Will that also disable the 'take a turn key' cause my fat fingers have accidentally tapped that when changing levels before.. very annoying - i should really change the z level keys.

Negative.. but you could hit escape -> key bindings -> dwarf more -> and delete the binding for one step.

Also peter.. if you're in a coding mood. It would be nice if dfliquids could remove and add the aquifer feature from a region. Furthermore, if you could change a tile type to 90, that is a river source and a person could actually make a river with df hack (or a waterfall suspended in air). The river source requires the same global feature though. 
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

mLegion

  • Bay Watcher
    • View Profile
Re: DFHack 0.4.0.7b - tools and memory access library
« Reply #269 on: September 04, 2010, 04:31:20 pm »

i just added a mode to a local copy of dfliquids named dfenvironment for every flag that Maps->ReadDesignations returns which is fun to play with, don't know what happened to the .cpp file though, I got distracted by trying to figure out how to read in DF's map using DFHack and display it in a Qt widget so i can make a GUI editor and backed up dfenvironment somewhere and lost it. :(
Logged
Pages: 1 ... 16 17 [18] 19 20 ... 108