Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 57 58 [59] 60 61 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1120312 times)

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: DFHack 0.40.11-r1
« Reply #870 on: September 16, 2014, 02:04:13 pm »

Are you referring to the "binpatch" external executable or the "binpatch" Lua script (included in DFHack)? It sounds like what you're describing is already covered by the latter.

lethosor, my Perl script generates patches that can be applied with either binpatch.exe or with the binpatch runtime script.  For my testing, I've been using the binpatch script.

My hypothetical patcher script would be a console script only, not a standalone.

It would not be covered by the binpatch script, because the binpatch script just applies a pre-generated list of byte changes.  I want to scan memory for patterns, figure out the proper replacements, and put them in place.  The hard part here is scanning memory.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.11-r1
« Reply #871 on: September 16, 2014, 02:16:12 pm »

Ah, that makes more sense. DFHack contains some memory-scanning tools available to Lua, which may be useful (see devel/find-offsets.lua for an example).

Also, it appears that the DF OSX image has two entire versions of DF in it, what's up with that?  Something about OS version, or maybe old 680x0/new x86 architectures?

It doesn't appear to contain multiple architectures:
Code: [Select]
$ file dwarfort.exe
dwarfort.exe: Mach-O executable i386
$ file /usr/lib/libz.dylib
/usr/lib/libz.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libz.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/usr/lib/libz.dylib (for architecture i386): Mach-O dynamically linked shared library i386
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: DFHack 0.40.11-r1
« Reply #872 on: September 16, 2014, 02:27:45 pm »

Ah, that makes more sense. DFHack contains some memory-scanning tools available to Lua, which may be useful (see devel/find-offsets.lua for an example).
Thank you very much; I'll take a close look at that.

Quote
Also, it appears that the DF OSX image has two entire versions of DF in it, what's up with that?  Something about OS version, or maybe old 680x0/new x86 architectures?

It doesn't appear to contain multiple architectures:
Code: [Select]
$ file dwarfort.exe
dwarfort.exe: Mach-O executable i386
$ file /usr/lib/libz.dylib
/usr/lib/libz.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libz.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/usr/lib/libz.dylib (for architecture i386): Mach-O dynamically linked shared library i386

In that case, I'm wondering why the image is twice the size of the Linux image, and three times that of the Windows image.
Logged

salithus

  • Bay Watcher
  • gottagofast
    • View Profile
Re: DFHack 0.40.11-r1
« Reply #873 on: September 16, 2014, 02:43:38 pm »

I'm not sure what you're saying by this. I see the first type of change as just bad design and the whole reason we're having this discussion in the first place - yes I know it would take a lot of work to fix and there are ~reasons~ it evolved the way it did, but it doesn't change the fact that it's bad practice when designing an API. Additive changes shouldn't break compatibility and plugins that don't use changed functionality shouldn't need to recompile just to get a new version number.

Sorry, but if there was an actual modding API for DF, this would be valid, but unfortunately, there isn't one. If something changes in the DF memory stuctures, there's no way for a plugin to necessarily know that.
It helps to realize that there is effectively no abstraction between DFHack plugins and DF itself - memory addresses for globals are determined on program startup (based on data inside symbols.xml), but structure layouts are defined in C++ header files (which are generated by a Perl script prior to compiling DFHack itself) so that plugins are able to directly access DF's internals as if they were part of DF itself (which, for all intents and purposes, they are). Once a plugin is compiled, an access to "viewscreen_loadgamest.loading" simply becomes "BYTE PTR [ecx+10h]", so if a new int32 field named "unk_v40_1a" gets added, it will end up reading the wrong data.

If you want something you don't need to recompile between releases, you need to use scripts, since those are effectively recompiled every time you run them and will thus know where to get that new field since they can ask DFHack where it is, and while DFHack has the same issue described above, recompiling it for new versions of DF is acceptable and expected by most people. Of course, scripts are also slower, but that's the cost you pay for increased flexibility.
The first bolded statement is my whole point, and like I mentioned above - depending on a end-user configured version string to determine compatibility isn't giving much assurance of actual compatibility.

And I'd say "acceptable and expected" is not quite the same as "accepted because they're not given any other options". Like I've already mentioned repeatedly, I appreciate that putting in that layer of abstraction now that should have been there all along to prevent the issue you described is a significant undertaking. This doesn't change the fact that the state of DF is very different now than it was 6 months ago when it had been 18 months since the last update and that dependence on DFHack, especially in starter packs and the like, is significant enough to warrant finding better ways to do things.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #874 on: September 16, 2014, 05:02:00 pm »

New release!
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #875 on: September 16, 2014, 05:06:33 pm »

I only a few minutes ago finally packaged a version of Fortbent for 0.40.11 DFHack. Oi. I am so, so glad that I've specifically designed it to be easy to port to new versions.

IRIS_EYE_AZURE

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.11-r1
« Reply #876 on: September 16, 2014, 05:28:08 pm »

Anyone want to take on the challenge of adding script triggers for the following to modtools? I have visions of modding in various things, from a whoopee cushion all the way to a dragonfire trap.
  • lever pull
  • pressure plate activation
  • gear/shaft/roller power status change
  • door status change
  • bridge/hatch/floor bars/vertical bars/floodgate status change
  • trap status change
  • minecart friction (from stop) applied; minecart dump activation
Note: lever pull can be already be done through the job complete event, but I included it in the list for the purposes of a consistent interface.
Logged

StagnantSoul

  • Bay Watcher
  • "Player has withdrawn from society!"
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #877 on: September 16, 2014, 05:47:18 pm »

What would I have to put in to DHPFHack to force a strange mood to happen? Can I control what type of mood?
Logged
Quote from: Cptn Kaladin Anrizlokum
I threw night creature blood into a night creature's heart and she pulled it out and bled to death.
Quote from: Eric Blank
Places to jibber madly at each other, got it
Quote from: NJW2000
If any of them are made of fire, throw stuff, run, and think non-flammable thoughts.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #878 on: September 16, 2014, 05:54:44 pm »

OS X build (0.40.12-r1)

What would I have to put in to DHPFHack to force a strange mood to happen? Can I control what type of mood?
"strangemood"
"strangemood -t TYPE" allows you to specify a type of mood (see "help strangemood" for more information).

Edit: Linux build of 0.40.12-r1 (GCC 4.5.4) (which should now include Stonesense - whether it works on certain distros is another question entirely).
« Last Edit: September 17, 2014, 03:32:46 pm by lethosor »
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Hades

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.40.11-r1
« Reply #879 on: September 16, 2014, 07:00:16 pm »


It looks like the exterminate script may be broke for 0.40.12, assuming it's not something I am doing. Works fine on a clean install in 0.40.11 (Dwarf Fortress and DFHack only), but does nothing in a clean install of 0.40.12. Running the script gives nothing for output, and the same for any switches you try with it. Just FYI.
It's working for me. What platform are you using? Is Ruby available?

Windows 7 64. Have ruby installed. I tried running someone else's compilation of DFHack (0.40.12) for comparison and have the same issue.

Just to follow up my post. Works fine in the new release. Must have been something I did compiling it (be nice to know what but alas). And thanks for the new release! Appreciate all the work you all do!
Logged

ohgoditburns

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #880 on: September 16, 2014, 11:37:34 pm »

OS X build (0.40.12-r1)

I'm not able to issue any commands in this version. It says "resetting textures" and gives notices if I resize the window or zoom in, but no commands are working, and hotkeys appear to not be working either.
Logged
The landscape routinely being soaked in flammable fluids somehow seems less than benevolent.

StagnantSoul

  • Bay Watcher
  • "Player has withdrawn from society!"
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #881 on: September 17, 2014, 12:01:55 am »

Dammit... I can only seem to get "strangemood -force" to work. Could someone give me the exact words to force a secretive armour smith mood going? I want to have my king be a steel artifact-covered killing machine. I already have a giant lion leather, ruby and faint yellow diamond spiked cloak that he wears. I may give him the steel studded thong too.
Logged
Quote from: Cptn Kaladin Anrizlokum
I threw night creature blood into a night creature's heart and she pulled it out and bled to death.
Quote from: Eric Blank
Places to jibber madly at each other, got it
Quote from: NJW2000
If any of them are made of fire, throw stuff, run, and think non-flammable thoughts.

idgarad

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #882 on: September 17, 2014, 12:08:42 am »

Can we get an EggWatch similar to seedwatch to toggle cooking eggs if there are more then say 30 eggs for a species?
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #883 on: September 17, 2014, 01:59:14 am »

Dammit... I can only seem to get "strangemood -force" to work. Could someone give me the exact words to force a secretive armour smith mood going? I want to have my king be a steel artifact-covered killing machine. I already have a giant lion leather, ruby and faint yellow diamond spiked cloak that he wears. I may give him the steel studded thong too.

Pick a unit who isn't on a job of course, then try:

strangemood -unit -type secretive -skill armorsmith -force

I just do fey when I'm forcing though, managed to get a retroactive loop by not examining items, so I had a pair of boots which were in the art on a war hammer made before both of them, though I messed up and saved after examining the second boot by mistake.

Also: all of my love to you folks for getting the linux versions updated, you are bloodgods among mendorfs.
Logged

StagnantSoul

  • Bay Watcher
  • "Player has withdrawn from society!"
    • View Profile
Re: DFHack 0.40.12-r1
« Reply #884 on: September 17, 2014, 02:16:57 am »

Thanks! Now on to making him a ton of steel artifacts. Make sure the only gems are star ruby and sapphire, only metal is steel, featherwood for wood, obsidian for stone, and giant lion for bones and leather. You have to have matching artifacts, you know.
Logged
Quote from: Cptn Kaladin Anrizlokum
I threw night creature blood into a night creature's heart and she pulled it out and bled to death.
Quote from: Eric Blank
Places to jibber madly at each other, got it
Quote from: NJW2000
If any of them are made of fire, throw stuff, run, and think non-flammable thoughts.
Pages: 1 ... 57 58 [59] 60 61 ... 360