Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 234 235 [236] 237 238 ... 244

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

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 50.09-r4 | 50.10-beta1 (pre-release) (with Linux support)
« Reply #3525 on: September 16, 2023, 11:27:48 pm »

Sounds like a perfect place for me to start. Luckily I wrote a bunch of tests for my stuff before I stepped away so I should be able to help track down what is still working, and what needs updates.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3526 on: September 19, 2023, 12:13:29 pm »

DFHack 50.10-r1 released!

Full support for all 50.10 releases, including Linux.

Get it from:

Full installation instructions: https://docs.dfhack.org/en/latest/docs/Installing.html
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.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3527 on: September 19, 2023, 05:52:20 pm »

r1.1 has been put up on GitHub, which fixes a crash on startup with the Windows Itch build of DF. Everything else is identical to 50.10-r1.

GitHub download: https://github.com/DFHack/dfhack/releases/tag/50.10-r1.1

(This release has not been put up on Steam because it doesn't affect Steam DF.)
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.

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3528 on: September 20, 2023, 10:10:13 am »

Has ASLR been removed from the latest linux versions? I read somewhere it was an issue for dfhack. Did you ask for it to be removed? Do we know if it will stay that way? I wrote some code for it in DT during the beta, but it is broken now (the base address changed). I'd like to know if I should fix that code or if I should just throw it away as it won't be needed.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3529 on: September 20, 2023, 11:46:36 am »

We worked with bay 12 to build with the -nopie GCC flag, so ASLR on Linux should be gone for now. It *may* return in the future, of course, but I'm not aware of any immediate reason for why it should.
Logged

thefinn

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3530 on: September 20, 2023, 05:07:50 pm »

Sometimes you just want to create a quantum stockpile of something like copper bars or steel bars - simply so you can see what you have easily.

Does anyone have a macro or command or something to empty all the bins with bars (or more specific bars) in them all at once?

It's a total pain trying to find all the bar bins. (Same with cloth and lots of other things)

If not that's ok ;)

Thanks.

(Sorry, is this the right place to ask this?)
« Last Edit: September 20, 2023, 05:12:16 pm by thefinn »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3531 on: September 21, 2023, 01:01:53 am »

Here's a Lua script that will empty bars out of bins:
Code: [Select]
local count = 0
for _, item in ipairs(df.global.world.items.other.BAR) do
    if not item.flags.in_inventory then goto continue end
    local gref = dfhack.items.getGeneralRef(item, df.general_ref_type.CONTAINED_IN_ITEM)
    if not gref then goto continue end
    local bin = df.item.find(gref.item_id)
    if not bin or not df.item_binst:is_instance(bin) then goto continue end
    if dfhack.items.moveToGround(item, bin.pos) then count = count + 1 end
    ::continue::
end
print(('dumped %d bar(s) out of bins'):format(count))
If you save that into a file named dfhack-config/scripts/barbin.lua, you can run it by running barbin in the DFHack command launcher.
« Last Edit: September 21, 2023, 01:03:50 am by myk »
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3532 on: September 21, 2023, 01:02:47 pm »

Huh.  I thought item.flags.in_inventory specifically meant that it's in a unit's inventory.  I guess it's overloaded?

I guess that's one way to implement the nonexistent continue keyword.  I didn't even know that Lua has goto.
Logged

thefinn

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3533 on: September 21, 2023, 06:26:41 pm »

If you save that into a file named dfhack-config/scripts/barbin.lua, you can run it by running barbin in the DFHack command launcher.

Truly, a prince among men.
Logged

joostheger

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3534 on: September 22, 2023, 07:17:22 am »

Hi all, I'am new to dfhack, its a great adventure to dive into this!

Question: I'd like to run a onMapLoad.init with a event-subscription to some reaction-trigger for my mod.
I know I have to place stuff into my mod-main folder, with the Objects, Graphics, Info.txt and so on. I've creature-raws and stuff
But the dfhack documentation says that I need to place the onMapLoad.init in the dfhack-config/init folder.
Can I  pack these into my main mod somehow? How can I deploy my init-files together with my main mod?
Logged

joostheger

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3535 on: September 22, 2023, 11:49:12 am »

Never mind, got it working by following the tutorial.
What a joy!
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3536 on: September 22, 2023, 05:58:38 pm »

I'm always happy to hear when the documentation helps ; )

If you have any trouble getting things to work, just ask!
Logged

joostheger

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3537 on: September 23, 2023, 01:28:00 am »

Are you one of its writers? Its great! I learned really a lot ladt night!

I have some little things.
I had trouble with running a modtools command. Can you apply one in the tutorial?
Further: I missed the definition of the variable modId in the final example.
Lastly: de mod deactivates by closing the game, but doesnt reactivatie. Id like to have my script always active, if my main mod is loaded .
Logged

Martenzo

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3538 on: September 23, 2023, 01:55:06 am »

Hey, having problems with getting dfhack running on Linux Mint. Obviously, the libc and libc++ libraries I have installed are the wrong version, but at this point it seems I've tried everything reasonable that I can install and upgrade through my package manager. I do have the Linux version of DF installed, based on the "dwarfort" executable rather than "Dwarf Fortress.exe" test mentioned in the install instructions. And yet this keep being the result of launching dfhack:

Code: [Select]
SteamLibrary/steamapps/common/Dwarf Fortress$ ./dfhack
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./dwarfort)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./dwarfort)
./dwarfort: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./dwarfort)
./dwarfort: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by ./dwarfort)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./hack/libdfhack.so)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./hack/libdfhack.so)
./dwarfort: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by ./hack/libdfhack.so)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./libg_src_lib.so)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./libg_src_lib.so)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./libg_src_lib.so)
./dwarfort: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./libg_src_lib.so)
./dwarfort: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by ./libg_src_lib.so)
./dwarfort: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by ./libg_src_lib.so)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by hack/libprotobuf-lite.so)
./dwarfort: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by hack/liblua.so)

/lib/x86_64-linux-gnu/libc.so.6 does exist, but is apparently not the right version. Any suggestions for where I could dig further to sort this out?
EDIT: Ah goddamit, I'm probably looking at upgrading my distro to the next major version. Because apparently manually forcing an update to glibc is a sure-fire way to experience Fun in the DF sense of the word on Linux.
« Last Edit: September 23, 2023, 02:08:44 am by Martenzo »
Logged

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 50.10-r1 (with Linux support)
« Reply #3539 on: September 23, 2023, 05:49:20 am »

I guess it does not work without dfhack either (GLIBC_2.34 is required by dwarfort, not only libdfhack.so). According to distrowatch, Linux Mint 21.2 Victoria (released two month ago) has glibc 2.35. I guess you have Linux Mint 20.3 Una from 2022, it only has glibc 2.31. It's not that old, DF should have been built using an older version.

Edit: Ubuntu 20.04 uses glibc 2.31, so it is older than 2022. Still, it should be the best target version.
« Last Edit: September 23, 2023, 05:52:15 am by Clément »
Logged
Pages: 1 ... 234 235 [236] 237 238 ... 244