Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 221 222 [223] 224 225 ... 242

Author Topic: DFHack 50.11-r6  (Read 795397 times)

Gamerlord

  • Bay Watcher
  • Novice GM
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha2 (pre-release)
« Reply #3330 on: January 26, 2023, 07:41:49 pm »

In hack/scripts in a file with a .lua extension. Then type the name of the file (without the extension) in dfhack command prompt to run the script. See the documentation
Thanks, that worked! There was a weird error thing generated afterward, but the actual work details were still put in.

EDIT: No it didn't, it just spammed the first few work details in the list over and over.

Here's error:
...\steamapps\common\Dwarf Fortress//hack/scripts/labor.lua:58: Invalid index in enum.attrs[]
stack traceback:
        [C]: in metamethod '__index'
        ...\steamapps\common\Dwarf Fortress//hack/scripts/labor.lua:58: in local 'script_code'
        ...team\steamapps\common\Dwarf Fortress\hack\lua\dfhack.lua:808: in function 'dfhack.run_script_with_env'
        (...tail calls...)

EDIT2: Seems to be human error on my end, gonna try again.
EDIT3: Yup got it right this time. Including text of labor.lua if anyone else wants it - note, does not assign hauling/construction labors.

Spoiler (click to show/hide)
« Last Edit: January 26, 2023, 07:48:29 pm by Gamerlord »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha2 (pre-release)
« Reply #3331 on: January 26, 2023, 10:17:53 pm »

In the most recent versions of DFHack, you now have a dfhack-config/scripts directory to put your own scripts in. Anything you put in hack/scripts will likely be lost when you upgrade DFHack, especially once we get distribution on Steam working and upgrades become automated.
Logged

dan84

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha2 (pre-release)
« Reply #3332 on: January 27, 2023, 08:58:00 am »

You put SDLreal in there too? It's not just a backup, the replacement SDL.dll calls into it for display etc

Yes. I followed the instructions; it is in there. I re-installed DFHack, but still the same issue. SDLreal.dll is in there. I am thinking of doing a clean install, but I don't want to lose my world. Maybe I'll try after I finish this current game I'm on.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha2 (pre-release)
« Reply #3333 on: January 27, 2023, 09:16:16 am »

You don't need to lose your world. Copy the world elsewhere and then reinstall (in the Classic version I make new installations and copy the saved world over, but I guess things work differently with the Premium ones. It ought to be possible to reinstall on top of a Premium version installation without losing the save if they've implemented it in a reasonable way, but I'd recommend copying the save anyway, just in case).
Logged

Kat

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha2 (pre-release)
« Reply #3334 on: January 27, 2023, 04:09:20 pm »

Hi people.
It would be really good if the religions of your civilisation were highlighted in some way.
Sounds perfectly possible. Could you file a feature request at https://github.com/DFHack/dfhack/issues ?

I asked a friend with a github account to put a feature request in for this, at https://github.com/DFHack/dfhack/issues/2730

checked with version 50.05 of dwarf fortress and the same phenomenon occurs there - large worlds with long histories can result in multiple religions (and other things) of the same name, and you can't really tell which is which when specifying details of images in jobs.
Logged

dan84

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha2 (pre-release)
« Reply #3335 on: January 29, 2023, 10:54:52 am »

You don't need to lose your world. Copy the world elsewhere and then reinstall (in the Classic version I make new installations and copy the saved world over, but I guess things work differently with the Premium ones. It ought to be possible to reinstall on top of a Premium version installation without losing the save if they've implemented it in a reasonable way, but I'd recommend copying the save anyway, just in case).

Thanks, I removed Dwarf Fortress except for the save file, reinstalled and re-downloaded and installed Hack and it worked.
Logged

thefinn

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha2 (pre-release)
« Reply #3336 on: February 03, 2023, 10:22:32 am »

Thank you guys for all you do with this. It's so nice to have this on the new steam version, I couldn't really live without it :)
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha3 (pre-release)
« Reply #3337 on: February 03, 2023, 05:56:52 pm »

DFHack 50.05-alpha3 released!

Get it here: https://github.com/DFHack/dfhack/releases/tag/50.05-alpha3
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha3.1 (pre-release)
« Reply #3338 on: February 04, 2023, 03:11:11 am »

The notes for 50.05-alpha3 mentions that Itch.io and Classic support is scheduled to come with DF 50.06. Can you explain why?

My guess would be that Toady/Putnam (quite possibly the latter) has identified a layout solution that would make the layout of DF proper data the same in all versions, and move all vendor specific data to vendor specific locations outside of the space used by DF natively, but that's obviously just a guess.
Logged

ab9rf

  • Bay Watcher
    • View Profile
    • ab9rf@github
Re: DFHack 0.47.05-r8 | 50.05-alpha3.1 (pre-release)
« Reply #3339 on: February 05, 2023, 08:00:19 pm »

The notes for 50.05-alpha3 mentions that Itch.io and Classic support is scheduled to come with DF 50.06. Can you explain why?

My guess would be that Toady/Putnam (quite possibly the latter) has identified a layout solution that would make the layout of DF proper data the same in all versions, and move all vendor specific data to vendor specific locations outside of the space used by DF natively, but that's obviously just a guess.
No, it's that the DFHack team identified a structural issue with data layout. This was really evident to us almost immediately, the first time we analyzed an itch.io image, which would have around December 10 or so, well before Putnam was hired. Putnam subsequently confirmed our conclusion. The issue itself arises from some #ifdefs in the middle of the definition of gamest for data specific to mod management, which has extra functionality for Steam editions which requires extra data.

We could have accommodated this by either splitting the gamest up into two (or possibly three, I'd have to go look) chunks which would have to manually realigned (we locate the global variable game automatically off of the global table Toady provides, but that won't work as well if we have to chop up gamest into pieces), or else make two (or even three) different editions of DFHack for each release, one with a version of gamest that works with Steam editions and one that works with non-Steam editions. We obviously can do this, but doing it complicates our build process but more importantly makes using DFHack more difficult for end users, who would have to be careful to choose the correct edition of DFHack to install. The mechanism by which DFHack determines which version of DF it's been installed to run against would prevent catastrophic misoperation, as DFHack will detect that it is being run against a version of DF it is not compatible with and will shut down, but this would still be annoying for end users and is something we would like to avoid. DFHack is supposed to make DF easier to play, not harder.

When we discussed this issue with Putnam we found her agreeable to proposing a solution to Toady that would obviate the complexities that the above solutions entail. Our specific recommendation was to move the Steam-specific data elements to the end of the structure in question or to a separate structure, but Putnam instead elected to recommend replacing them with equivalent padding when the Steam configuration parameter is not set, which means gamest will have the same alignment on Steam and non-Steam builds. (This is probably because from our point of view gamest is one very large structure, while from Toady's point of view it is a compound of several smaller structures, one of which contains the mod-related stuff. Moving the Steam-specific data to the end of gamest as a whole would force a fairly complex restructuring of gamest from Toady's point of view, which is obviously not desirable.) The communications we have indicate that Toady is agreeable in principle to these proposals, but we have not (to date) received any definite confirmation that they will, in fact, be in the next release (which I personally attribute to simply the fact that Toady and Putnam both have a lot of stuff to deal with right now, and accommodating the DFHack team's requests is quite reasonably neither of their highest priorities). If they don't show up in the near future rest assured that we will implement a Plan B, and it is certainly not our intent to permanently leave itch.io and Classic players in the lurch, but we remain hopeful that Toady will remain agreeable to the solution that we worked out with Putnam and that the changes we jointly recommended, or some other equivalent solution to this problem, will find their way into a future release, which we also fervently hope will be the next release. At the same time, we recognize that making Dwarf Fortress more compatible with DFHack is not a development priority for Toady, and totally understand if Toady elects to defer, or even to decline, implementing such proposals in favor of advancing any other aspect of development that seems to him to be more fruitful.
« Last Edit: February 05, 2023, 09:25:52 pm by ab9rf »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha3.1 (pre-release)
« Reply #3340 on: February 05, 2023, 09:05:35 pm »

Thanks for that thorough explanation!
Logged

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha3.1 (pre-release)
« Reply #3341 on: February 06, 2023, 05:57:28 am »

"equivalent padding", that sounds tricky. I would have thought hiding the steam stuff behind a pointer indirection would have been enough. But I did not really look what is this steam-specific data and how it is organized. I may be missing something.
Logged

ab9rf

  • Bay Watcher
    • View Profile
    • ab9rf@github
Re: DFHack 0.47.05-r8 | 50.05-alpha3.1 (pre-release)
« Reply #3342 on: February 06, 2023, 06:13:58 am »

"equivalent padding", that sounds tricky. I would have thought hiding the steam stuff behind a pointer indirection would have been enough. But I did not really look what is this steam-specific data and how it is organized. I may be missing something.
While I can't speak for Putnam here, my take on that decision would be that it is the one that requires no changes at all outside of the single header file that defines the structure in question. Indirecting the Steam-specific data behind a pointer to another structure would necessitate adding code to allocate (and deallocate) that additional structure and to use indirections when accessing its content, which is therefore a more "involved" change than just adding an #else and some dummy variables to an #ifdef that is already there.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.05-alpha3.1 (pre-release)
« Reply #3343 on: February 10, 2023, 03:38:50 pm »

DFHack 50.07-alpha1 released!



Get it here: https://github.com/DFHack/dfhack/releases/tag/50.07-alpha1
Logged

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.05-r8 | 50.07-alpha1 (pre-release)
« Reply #3344 on: February 11, 2023, 08:07:51 am »

Where is the "init.d" directory mentioned in the documentation supposed to be created? It says "main DF directory" but it does not work for me. The only occurence of init.d I find in the code is for "raw/init.d".

Or what is the best way to run a lua command on startup? Should I rather create a "dfhack-config/init/dfhack-....init" file containing ":lua ..."?
Logged
Pages: 1 ... 221 222 [223] 224 225 ... 242