Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 53 54 [55] 56 57 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 893928 times)

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #810 on: January 24, 2018, 12:35:53 pm »

Actually I meant I found a dfhack workaround for a DF glitch :D I finally can mark all the damn "edge items" using a single script and then autodump them away :D dfhack was the saviour, not the offender :P

I have yet to find a way to add the items to the map block though, I see them using the cursor but I cant select them, only dump them using autodump which complains about the items not being part of a block. But if "dead" doesn't mean dead, I still have to figure out how to distinguish between alive breathing entities and ... well ... guys who died at the border of the map.

I'm pretty sure there is a dfhack.items command to move an item from an inventory to the ground. The issue you are experiencing is that the item isn't a part of a block because it is part of an inventory. And to make matters worse it is a part of an inventory for a unit that is "stuck" in an inactive state. You can do a couple things

1. Unstuck the unit somehow. There are various scripts that try to do this, I think fix-migrants or fix-merchants or something like that deals with getting those units "unstuck"
2. Remove the unit entirely. I'm not sure if this would cause issues, but it might work.
3. If all you care about is the items, you can remove the items from the units inventory and place them on the ground. I believe dfhack.items.moveToGround would work for this.

As for checking whether the unit is dead (inactive) or Dead (as a doorknob), you should be able to check the corspe pieces and look for a corpse object if the unit is Dead. But actually if a unit dies they drop their items and so the items would actually be in a valid block if the unit is actually Dead.
Logged

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #811 on: January 24, 2018, 04:08:47 pm »

for testing purposes it could be useful to have more options for autosave:
weekly and daily could help create gamesaves closer to the actual crash

i suggested this a while back for the game in general, because back then i had a lot of crashes.
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #812 on: January 24, 2018, 04:12:25 pm »

Yeah, it should be pretty easy to do with repeat and quicksave. I don't remember the exact requirements of the repeat script, but it should be in the docs.

Also, I finally fixed the issue where the "saving" indicator often wouldn't show up when using quicksave, so that'll look nicer in the next version.

Are there any major issues we should be aware of before releasing r1? I'm working on a couple long-standing bugs for now, like digv not setting priorities, but I haven't heard of any disastrous stability issues.
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.

Novaris

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #813 on: January 24, 2018, 05:06:54 pm »

Nope I must say the alpha is very very stable. It rarely crashed for me and when it crashed it was always when I tried to build something like farm plots or walls and this I had also with 0.42.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #814 on: January 24, 2018, 06:33:56 pm »

Nope I must say the alpha is very very stable. It rarely crashed for me and when it crashed it was always when I tried to build something like farm plots or walls and this I had also with 0.42.
Ok, you should still generally report crashes even if they're not new, but that one has been reported already and linked to TWBT. I'm not sure if it's been fixed yet, but check the TWBT thread for details. Other than that, that's good news. I should have time to finish things up for a r1 in a couple days.
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.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #815 on: January 24, 2018, 09:13:44 pm »

I found the address of a function in DF that I would like to call from a DFHack plugin.

How would I go about doing that?

It takes a pointer to and art_image_ref and an int pointer, and returns a pointer to an art_image, generating a new one if necessary.
« Last Edit: January 24, 2018, 09:21:27 pm by Japa »
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #816 on: January 24, 2018, 10:36:13 pm »

I found the address of a function in DF that I would like to call from a DFHack plugin.

How would I go about doing that?

It takes a pointer to and art_image_ref and an int pointer, and returns a pointer to an art_image, generating a new one if necessary.

Well, you just define a pointer to a function with the same signature and assign the right address to it...

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #817 on: January 24, 2018, 11:10:35 pm »

Well I'd also like to know how to keep the pointers stored in DF-structures, so they can be updated for newer versions.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #818 on: January 24, 2018, 11:50:44 pm »

Well I'd also like to know how to keep the pointers stored in DF-structures, so they can be updated for newer versions.

I don't think df-structures have support for storing addresses of and/or calling arbitrary functions (as opposed to vmethods).

Btw, I'm just using viewscreen_image_creatorst to make it load all art_image_chunks.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #819 on: January 25, 2018, 12:01:12 am »

right now, I just stuck a void pointer that I'm casting to the right function, until the functionality for function pointers is added. Currently building to test.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #820 on: January 25, 2018, 12:39:05 am »

Well I'd also like to know how to keep the pointers stored in DF-structures, so they can be updated for newer versions.

I don't think df-structures have support for storing addresses of and/or calling arbitrary functions (as opposed to vmethods).

Btw, I'm just using viewscreen_image_creatorst to make it load all art_image_chunks.

Actually you can store "void" pointers in symbols.xml: both start_dwarf_count and twbt_render_map are void pointers with no type and into a code region. However these are not automated and afaik harder to find then other offsets

aexsar

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #821 on: January 25, 2018, 12:53:19 am »

So I saw someone had a similar problem to me, but they never pasted the output. I am unable to get DFHack to load any plugins upon start, I am unzipping Vanilla DF to a folder, extracting DFHack right on top (and get the dialog box asking if I want to overwrite SDL.dll so I know the files should be dropping where they should be), but I'm getting error messages upon start. I've tried both r3, then r1 and am getting the same problem with both; stderr.txt output is as follows:
Spoiler (click to show/hide)
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #822 on: January 25, 2018, 01:11:28 am »

Which version of DF do you have and which version of dfhack are you trying to install?
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #823 on: January 25, 2018, 01:13:34 am »

I got everything in place, but I ran into a different problem...

Despite compiling RelWithDebInfo, no pdb files are being generated, so I can't debug.
Logged

aexsar

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.05-alpha1 (dev)
« Reply #824 on: January 25, 2018, 01:16:56 am »

Which version of DF do you have and which version of dfhack are you trying to install?

DF version is df_43_05_win32
DFHack version I've tried is dfhack-0.43.05-r3.1-Windows-32 and then dfhack-0.43.05-r1-Windows-32

This is on a windows XP machine if that matters.
« Last Edit: January 25, 2018, 01:55:19 am by aexsar »
Logged
Pages: 1 ... 53 54 [55] 56 57 ... 244