Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - myk

Pages: 1 2 [3] 4 5 ... 30
31
Utilities and 3rd Party Applications / Re: DFHack 50.11-r2
« on: October 25, 2023, 02:19:24 pm »
You can also list them in-game. For example, open gui/launcher and run:

Code: [Select]
:lua @df.unit_labor

32
This looks like it would be really useful for modders who are doing graphics replacement to verify that all their changes look correct for each creature.

33
Utilities and 3rd Party Applications / Re: DFHack 50.11-r2
« on: October 19, 2023, 07:58:39 pm »
Oh nice, I could integrate that into `gui/sandbox` so you can spawn vampire/necromancer/whatever units directly.

34
DFHack 50.11-r2 released!

Full support for all DF 50.11 releases.

Highlights: Search! Search! Search!, Preserve tomb assignments, Collapse all for stocks screen, Automatic tomb zones, Stranded citizen alert

Get it from:

Full installation instructions: https://docs.dfhack.org/en/latest/docs/Installing.html

35
Since vampire curses are generated anew with each world, the process for making a unit a vampire is not as straightforward as it could be. It helps a great deal if you already have a vampire accessible that you can examine. Then you can:
1. use gui/unit-syndromes to examine the vampire and take note of the syndrome ID that unit is afflicted with
2. use modtools/add-syndrome to apply that syndrome to the unit of your choice

If you don't have a vampire unit yet, maybe save your game, run migrants-now until you get a migrant vampire (use cursecheck to identify them), examine them with gui/unit-syndromes to get the syndrome ID, then load back your original save and modify your other unit.

docs are here: https://docs.dfhack.org/en/stable/docs/tools/modtools/add-syndrome.html#modtools-add-syndrome

36
DFHack 50.11-r2rc1 released!

Full support for all 50.11 releases. Highlight: Search! Search! Search!

Get it from:

Full installation instructions: https://docs.dfhack.org/en/latest/docs/Installing.html

37
DFHack 50.11-r1 released!

Full support for all 50.11 releases, including Linux.

Get it from:

Full installation instructions: https://docs.dfhack.org/en/latest/docs/Installing.html

38
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.
It's not that old, DF should have been built using an older version.

Yeah, we're working with Bay 12 to standardize on a more widely compatible build environment. It's not as easy as just switching build systems, though, since DF actually *uses* functionality only available in more recent versions of glibc and the c++ standard library.

I had trouble with running a modtools command. Can you apply one in the tutorial?
any script can be run with the dfhack.run_script() command, modtools or otherwise (see https://docs.dfhack.org/en/latest/docs/dev/Lua%20API.html#general-script-api). Which one were you having trouble running? Does the script have the "unavailable" tag (https://docs.dfhack.org/en/stable/unavailable-tag-index.html#cap-m )? If so, it hasn't been updated yet and you can't expect it to work.

Quote
I missed the definition of the variable modId in the final example.
It's just a string that's set to the name of your mod. There are a few examples of the variable being set in the modding guide. Ctrl-F for "modid".

Quote
de mod deactivates by closing the game, but doesnt reactivatie. Id like to have my script always active, if my main mod is loaded .
This is what the onStateChange handler is for in https://docs.dfhack.org/en/stable/docs/guides/modding-guide.html#putting-it-all-together
There's more information about this mechanism here: https://docs.dfhack.org/en/latest/docs/dev/Lua%20API.html#enabling-and-disabling-scripts

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

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

40
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.

41
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.

42
And "A dwarf's got an idea!"

43
eventful has had some additions, but it hasn't needed any v50-specific changes. I haven't personally verified that the Lua-only events function as expected, though, just the ones from EventManager.

44
Welcome back! Yes, we have carefully kept the Lua API docs up to date. The largest changes have been in the gui and gui.widgets namespaces. The bulk of the C++ module APIs have stayed largely the same. Plugins, on the other hand, have seen a lot of changes, and not all of them have been updated for v50 yet.

45
Utilities and 3rd Party Applications / Re: DFHack 50.09-r1
« on: September 14, 2023, 03:46:30 pm »
DFHack 50.09-r4 released!

Get it here: https://github.com/DFHack/dfhack/releases/tag/50.09-r4

Or install from Steam: https://store.steampowered.com/app/2346660/DFHack

DFHack 50.10-beta1 also available on Steam in the 50.10-beta release branch or at GitHub here: https://github.com/DFHack/dfhack/releases/tag/50.10-beta1

Pages: 1 2 [3] 4 5 ... 30