Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 182 183 [184] 185 186 ... 244

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

Erendir

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2745 on: December 29, 2020, 07:51:05 am »

Please help: can't remember what was that script allowing visually inspecting Lua game state (or am I totally confused?).
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2746 on: December 29, 2020, 10:07:20 am »

gui/gm-editor?
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.

Erendir

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2747 on: December 29, 2020, 11:04:46 am »

gui/gm-editor?

That's the one! Thanks!

Another question: does anybody know what kind of work order (as in an entry in `df.global.world.manager_orders`) does NOT have item_type = -1 (NONE)? I can't find any.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2748 on: December 29, 2020, 02:06:53 pm »

I don't know (and don't use the manager), but I'd expect specific orders to get specific parameters. If you look at the kitchen, orders in it don't fill out the parameters, letting the games decides what to make, but using DFHack or a script it's possible to specify exactly what to use, so it's really a matter of the UI not supporting all of the underlying functionality.
Thus, if you want to examine it you should try to make as specific orders as you can (and "NONE" frequently means "ANY").
Logged

Erendir

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2749 on: December 29, 2020, 04:57:13 pm »

I don't know (and don't use the manager), but I'd expect specific orders to get specific parameters.
[...]
Thus, if you want to examine it you should try to make as specific orders as you can (and "NONE" frequently means "ANY").

I've tried but gave up :) It's just the orders plugin (and the part of it I converted to Lua in workorder) has some special handling for export/import of item_type and item_subtype, but I'm not sure anymore the game actually uses them -- this is why I'm looking for an example to prove my suspicion wrong.
Logged

Libash_Thunderhead

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2750 on: December 29, 2020, 09:46:49 pm »

Hello, I'm trying to read the source code, however, I can't figure out how to locate some header files.
For example: "df/viewscreen_dungeon_monsterstatusst.h"

Can anybody help me with this?
Logged

Jack_Caboose

  • Bay Watcher
  • Lurker Supreme
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2751 on: December 29, 2020, 11:12:43 pm »

Is there a command/plugin to make two units fight? I built an arena but all the creatures refuse to fight eachother (damn bastards are working together just to spite me)

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2752 on: December 30, 2020, 12:39:37 am »

You can put them on opposing factions, maybe?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2753 on: December 30, 2020, 05:01:55 am »

Hello, I'm trying to read the source code, however, I can't figure out how to locate some header files.
For example: "df/viewscreen_dungeon_monsterstatusst.h"

Can anybody help me with this?
<DFHack>\library\include\df\viewscreen_dungeon_monsterstatusst.h
Logged

Libash_Thunderhead

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2754 on: December 30, 2020, 05:23:31 am »

Quote
<DFHack>\library\include\df\viewscreen_dungeon_monsterstatusst.h
But I didn't find the files in that folder.
https://github.com/DFHack/dfhack/tree/develop/library/include/df
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2755 on: December 30, 2020, 08:21:23 am »

Quote
<DFHack>\library\include\df\viewscreen_dungeon_monsterstatusst.h
But I didn't find the files in that folder.
https://github.com/DFHack/dfhack/tree/develop/library/include/df
You didn't specify that you were looking at github rather than a local repository. I gave the location of the file in the local repository. If you look at github it may not be present at all, as these files are generated from the XML by the code generation process, so to get at their info you'd have to locate the XML file that defines what is then generated into that .h file (without checking, I'd guess df.viewscreen.xml, although the XML file may not be intuitive). The alternative would be to install the source code locally and generate the .h files, which would give you the C header format.

Having the generated .h files float around on github would result in issues when you generate them locally (e.g. after updating the XML locally), unless there's a way get them to be visible on github but be exempt from source control so they are readily replaced by local generation after being downloaded (but how would that logic know when to download and when not to?).
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2756 on: December 30, 2020, 12:07:21 pm »

Right - the way to generate them is to set up a build environment and build DFHack (specifically, at least the "generate_headers" target). If you're only interested in the type definitions and don't need the exact headers, they are generated from df.*.xml files in https://github.com/dfhack/df-structures/ (loosely organized into separate files, as PatrikLundell mentioned). The specific class you asked about is defined here.

https://docs.dfhack.org/en/stable/docs/Structures-intro.html goes into a bit of detail about how DF-structures works, and links to some other pages.

Having the generated .h files float around on github would result in issues when you generate them locally (e.g. after updating the XML locally), unless there's a way get them to be visible on github but be exempt from source control so they are readily replaced by local generation after being downloaded (but how would that logic know when to download and when not to?).
codegen.pl will always generate new headers and replace the existing ones if necessary, although it's only run by CMake if codegen.out.xml is "out-of-date", i.e. older than the df.*.xml files. There are a couple reasons we don't include the headers in the DFHack repo:
- They're generated, and including generated files in source control usually isn't a good idea (among other reasons, it isn't necessary since the files can be generated, and it leads to larger diffs)
- They're generated from source files in another repo (from df-structures, and stored in library/include/df of the main DFHack repo), so keeping them in sync with the source files would be an additional challenge
- There are a lot of them (around 1750 as of 0.47.04-r4), so keeping them in source control would lead to rather large diffs

There is actually a CMake option that installs the generated headers (and as a result, includes them in release packages), but we haven't enabled it in a while because it leads to larger archives that take a long time for some unzipping tools to extract, and there isn't a very well-defined process for using the headers outside of DFHack currently.
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.

Libash_Thunderhead

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2757 on: December 31, 2020, 01:38:24 am »

Thank you! I think I understand now. :)
Logged

Libash_Thunderhead

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2758 on: January 04, 2021, 03:48:56 am »

I'm trying to build dfhack on windows, but win32\generate-MSVC-release.bat says there are errors. I checked CMakeError.txt, and there are something like missing header files, such as:

fatal error C1083: Cannot open include file: 'dlfcn.h'
fatal error C1083: Cannot open include file: 'strings.h'
fatal error C1083: Cannot open include file: 'sys/mman.h'
...

I'm using visual studio 2015 build tools, installed with default settings. Did I miss something?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r4
« Reply #2759 on: January 04, 2021, 08:56:08 am »

Can you post the full error log somewhere? It looks like it's trying to include Linux headers, and I'm not sure why that would be happening if you're using MSVC. Another possibility is that these errors were produced by test programs checking whether those headers exist, in which case they would be harmless, but I would need more context to determine that.
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.
Pages: 1 ... 182 183 [184] 185 186 ... 244