Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 145 146 [147] 148 149 ... 244

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

ragundo

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2190 on: March 08, 2020, 04:47:25 am »

this Dwarfexplorer looks very promising. Unfortunately, the v1.2 release's `DwarfExplorer_0.44.07_Win64.zip` doesn't include the `qapplication.plug.dll`, and v1.1's is compiled against dfhack 0.44.12-r3 and wouldn't work with 0.47.03-beta1.

Yes, you are right. I always forgot to include that dependency :o
I released a new version with the missing dll.

https://github.com/ragundo/DwarfExplorer/releases/tag/v1.2.1

Thanks for the info.
« Last Edit: March 08, 2020, 04:59:08 am by ragundo »
Logged

Alatun

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2191 on: March 08, 2020, 06:53:50 am »

I've encountered a "stuck caravan" problem, that matches this thread: http://www.bay12forums.com/smf/index.php?topic=128968.0

My fort is about 5 years old and a human caravan arrived in April. In the mid of May the caravan was about to leave as a werebeast arrived. I had stationed a military squad at the fort entry and after a short fight the beast was dead. But the caravan did not leave. I don't know if the beast is related to the caravan problem, but this is at least peculiar. The werebeast never made it to the depot.

Some members of the caravan leading Yaks are standing inside the walkway between the fort entry and the depot, but the wagons are still at the depot. I did not care about the caravan, because such delays sometimes happen.
But now it's June and food brought by the caravan is starting to rot and clouds of miasma are now making my dwarfs unhappy. I tried to dump the rotten stuff, but nothing happens.

There is a dfhack script, that should fix merchant stuck when entering the map. I tried it and it reported "4 wagons being removed", but the caravan is still stuck.

Deconstructing the depot seems to fix the problem, but in some other thread this "fix" was considered harmful regarding the relations to the Civ the caravan belongs to, so I wanted to avoid that.

I've written a small script that lets me dump the rotten stuff, so I can solve the miasma problem at least:
Code: [Select]
local utils = require('utils')

for i,item in ipairs(df.global.world.items.all) do
    if item.flags.rotten and item.flags.on_ground and item.flags.trader then
         for k = #item.general_refs-1, 0, -1 do
            if (item.general_refs[k].entity_id == 244) then  -- human civ
                print(utils.getItemDescription(item,0)..' '..tostring(item:getStackSize()))
                item.flags.dump = true
                item.flags.forbid = false
                item.flags.trader = false
                item.flags.foreign = false
                item.general_refs:erase(k)
            end
        end
    end
end

After a while I discovered that there are "4 deceased wagons" in the list of "dead/missing" units. Probably these are the units the "fix merchant" scrip" tried to fix/remove. dfHack's deathcause does not reveal and reason:
"The wagon died in year 255 (cause: none)." So most likely something weird must have happened, that the wagons "died" and this seems to have caused the trouble. Any ideas how to fix this? Is there a way to "revive" the wagons (toggling the "killed" flag is not sufficient).
« Last Edit: March 08, 2020, 06:55:29 am by Alatun »
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2192 on: March 08, 2020, 07:31:16 am »

Is there a way to "revive" the wagons (toggling the "killed" flag is not sufficient).

"full-heal" command?
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Alatun

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2193 on: March 08, 2020, 07:45:46 am »

Is there a way to "revive" the wagons (toggling the "killed" flag is not sufficient).

"full-heal" command?

full-heal currently does not work with wagons. There is a check, that prevents this (for whatever reason).

Code: [Select]
if unit.flags2.killed and not unit.flags3.scuttle then -- scuttle appears to be applicable to just wagons, which probably shouldn't be resurrected

EDIT:
I removed the check and tried the full-heal. I don't know if it really succeeded, but it did not fix the "stuck caravan" problem.
« Last Edit: March 08, 2020, 08:10:35 am by Alatun »
Logged

Atomic Chicken

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2194 on: March 08, 2020, 09:36:02 am »

full-heal currently does not work with wagons. There is a check, that prevents this (for whatever reason).

I added that check whilst implementing the arg that allows full-heal to target all the units on the map, after accidentally resurrecting a herd of scuttled wagons during testing. I assumed that most players would consider wagon resurrection to be a buggy quirk of the script, especially since the resurrected wagons are weird single-tile units that don't act as one might expect.

I removed the check and tried the full-heal. I don't know if it really succeeded, but it did not fix the "stuck caravan" problem.

I don't know whether resurrecting wagons is going to solve your problem, but removing the scuttle check should have been sufficient. Did you remember to add -r in addition to selecting the target unit?

There is a dfhack script, that should fix merchant stuck when entering the map. I tried it and it reported "4 wagons being removed", but the caravan is still stuck.


What version are you running? As far as I can tell, "fix/stuck-merchants.lua" only works on merchants which are stuck outside the local map, and "fix/merchants.lua" supposedly allows humans to make trade agreements; neither is relevant in this case.
Logged
As mentioned in the previous turn, the most exciting field of battle this year will be in the Arstotzkan capitol, with plenty of close-quarter fighting and siege warfare.  Arstotzka, accordingly, spent their design phase developing a high-altitude tactical bomber. 

Alatun

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2195 on: March 08, 2020, 10:05:41 am »

I removed the check and tried the full-heal. I don't know if it really succeeded, but it did not fix the "stuck caravan" problem.

I don't know whether resurrecting wagons is going to solve your problem, but removing the scuttle check should have been sufficient. Did you remember to add -r in addition to selecting the target unit?

What version are you running? As far as I can tell, "fix/stuck-merchants.lua" only works on merchants which are stuck outside the local map, and "fix/merchants.lua" supposedly allows humans to make trade agreements; neither is relevant in this case.

I'm running 0.47.03.

I just tried the "wagon resurrection" a second time (with -r) to make sure, I did not make a mistake the first time. But no luck so far. It seems the death of the wagons has broken something. I tried to understand what the  "fix/stuck-merchants.lua" script is doing and it only sets the "left" flag, which is surely not a solution here.

My current assumption, why the caranvan is stuck could be:
- when looking at the depot it tells "no merchants trading"
- when using "t" to examine the building a lot of items are still listed with the "trading" flag.

Maybe because the caravan has no capacity to put all the stuff somewhere (as the wagons are no longer available) they won't leave. When the depot is deconstructed all the items will be removed from the building and probably no longer belong to the caravan, so the caravan will start moving again.

I'm just working on a script to remove all the foreign items lying on the ground and that are in the depot. Maybe this way I get them moving without affecting relations.

EDIT: It seems my assumption was correct. With the following script, the caravan starts moving! Maybe some "script expert" can take a look, if I'm doing something wrong, since this is the first script I'm manipulating/modifying internal structures.
Code: [Select]
local utils = require('utils')

function mark_dumped(aitem)
    aitem.flags.dump = true
    aitem.flags.forbid = false
    aitem.flags.trader = false
    aitem.flags.foreign = false
end

for i,item in ipairs(df.global.world.items.all) do
    -- item.flags.rotten and
    if item.flags.on_ground and item.flags.trader and not item.flags.container then
        if #item.general_refs>0 and (item.general_refs[0].entity_id == 244) then
            print(utils.getItemDescription(item,0)..' '..tostring(item:getStackSize()))
            mark_dumped(item)
            item.general_refs:erase(0)
        end
    end
    if item.flags.on_ground and item.flags.trader and item.flags.container then
        if #item.general_refs>0 and (item.general_refs[0].entity_id == 244) then
            print(utils.getItemDescription(item,0)..' '..tostring(item:getStackSize()))
            for k = #item.general_refs-1 , 0, -1 do
                if item.general_refs[k]._type == df.general_ref_contains_itemst then
                    local item_id = item.general_refs[k].item_id
                    local cont_item = df.item.find(item_id)
                    print(' ',utils.getItemDescription(cont_item,0)..' '..tostring(cont_item:getStackSize()))
                    mark_dumped(cont_item)
                end
                item.general_refs:erase(0)
                mark_dumped(item)
            end
        end
    end
end
-- remove all items stuck in depot

local depot_items = df.global.world.buildings.other.TRADE_DEPOT[0].contained_items

for k = #depot_items-1 , 0, -1 do
    local item = depot_items[k].item
    print(tostring(item))
    print(utils.getItemDescription(item,0))
    if item.flags.trader then
        mark_dumped(item)
        depot_items:erase(k)
    end
end
« Last Edit: March 08, 2020, 10:50:01 am by Alatun »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2196 on: March 08, 2020, 01:05:02 pm »

ok so it seems advfort got broke because unit_action.data.job is currently unit_action.data.Job due to all the unit action data names got capitalized between 47.03 and 47.04 so heads up this might break some scripts if they need to use actions.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2197 on: March 08, 2020, 01:34:25 pm »

So Stonesense.  (No it's not crashing.  ;))

Using dfhack-0.47.04-alpha0-200308001-Linux-64-gcc-7 (although its been this way for quite a while) I noticed that what are presumably meant to be symlinks to the appropriate libraries are unpacked as plain text files on my system, this explains the messages in the stderr.log
Code: [Select]
./hack/libs/liballegro.so.5.0: file too short
Can't load plugin stonesense
This is just a heads up about something I noticed while digging for what is my real question -

How do I disable stonesense from attempting to load when I start dfhack?

I couldn't find anything in the inits or startup scripts but it is possible that I missed something...
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2198 on: March 08, 2020, 02:22:11 pm »

So Stonesense.  (No it's not crashing.  ;))

Using dfhack-0.47.04-alpha0-200308001-Linux-64-gcc-7 (although its been this way for quite a while) I noticed that what are presumably meant to be symlinks to the appropriate libraries are unpacked as plain text files on my system, this explains the messages in the stderr.log
Code: [Select]
./hack/libs/liballegro.so.5.0: file too short
Can't load plugin stonesense
This is just a heads up about something I noticed while digging for what is my real question -

How do I disable stonesense from attempting to load when I start dfhack?

I couldn't find anything in the inits or startup scripts but it is possible that I missed something...

All plugins in the hack/plugins folder that end with the correct extension (.plug.so on Linux) are loaded when DFHack starts. The only way to prevent this is by changing the plugin's extension or removing it from the plugins folder.

Regarding the symlink issue, what are you using to extract the DFHack package? All of the releases are built on Linux, so symlinks should be preserved.
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.

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2199 on: March 08, 2020, 02:41:28 pm »

Brillant, thanks on both accounts.

Renaming the stonesense.plugin.so works for me :).  I was using p7zip (laziness since I use it to unzip)  :-[, using untar preserves the symlinks correctly.  My bad.
« Last Edit: March 08, 2020, 02:43:24 pm by feelotraveller »
Logged

Morning_Oak

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2200 on: March 08, 2020, 03:35:04 pm »

I have a question regarding the gui/create-item command, I hope it's ok to ask here. I have created a handful of various gemstone warhammers for my militia squad in fort mode, and I cannot get the dwarves to equip the weapons. I have tried naming each of the hammers and then gifting them to one of my dwarves, then switching back to see if they would be more inclined to use them but they won't even store them in my weapons stockpile. They are scattered around the map & show up in my Artifacts menu, so at the very least the game seems them for what they are. I can't select the hammers in the Specific Weapons menu (nor any weapons, it seems to kick the menu back to the starting squad screen when I try to select that option). Anything I can do using gm-editor or something similar to get these hammers to be recognized as available for my dwarves so I can have them equip them?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2201 on: March 08, 2020, 04:20:48 pm »

It might be related to the material - do hammers you create using the same process but made out of metal work?
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.

darkhog

  • Bay Watcher
  • JAGIELSKI is PERFECTION
    • View Profile
    • Jagielski Gaming YT channel
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2202 on: March 09, 2020, 09:47:16 am »

Any news on 47.04 or have you paused development until interim builds (if any) are done?
Logged
I am a dwarf and I'm digging a hole. Diggy Diggy hole, diggy diggy hole.

If I say something funny, don't ask if you can sig it. Just do it (though credit me).

jecowa

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2203 on: March 09, 2020, 10:16:28 am »

The Nightly Builds are on 0.47.04. The most recent one came out yesterday.
Logged

Kraiger

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r3 | 0.47.03-beta1
« Reply #2204 on: March 09, 2020, 01:01:24 pm »

I do not understand how to compile/build the latest release from the github. I have even downloaded the main folder and all of the programs necessary to perform the task, but I fail to comprehend what needs to be done.
Logged
This is a masterful image of Machunguroho, Torchsilver, the alicorn, a dark iron bastard sword, a volcanic aurum battle axe, a felsteel heater shield, and an emerald golem. The golem has been struck down. Torchsilver is making a triumphant pose.
Pages: 1 ... 145 146 [147] 148 149 ... 244