Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 19 20 [21] 22 23 ... 243

Author Topic: DFHack 50.13-r2  (Read 819328 times)

Bob69Joe

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #300 on: September 14, 2017, 11:29:18 pm »

Jeebus, that's devastating. Just standing outside the towers among the trenches nets more than 200 kills.

Welp, I think my dwarf has had a fulfilling life, killing more than 400 goblins not counting the generated kills that number hundreds more. Three towers have had demonic masters slain. His hairs are graying. I've swam him north into the sea far away to a lone island. It's covered in black sand and it snows here. Found a shrine with an amethyst colored giant dove that's eyeless and breathes fire, plus a single cave that seems uninhabited. Please say their is a way to retire my dwarf as a hermit in the cave.
« Last Edit: September 14, 2017, 11:44:07 pm by Bob69Joe »
Logged

FortunaDraken

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #301 on: September 16, 2017, 06:38:52 am »

Small question for the smarter people: what's the difference between region-pops list and region-pops list-all? I'm trying to work out why the numbers are different between the two (list showing 0 and list-all showing 18) and I think I'm just confusing myself trying to work it out.
Logged
I just had a "lord consort" visit and decide to stay. Preparing for Trojan war reenactment.
Protip: statues cannot be made out of wood unless they're artifacts. If you see what appears to be a wooden statue outside your fort and it's not an artifact, destroy it immediately.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #302 on: September 16, 2017, 10:40:00 am »

From http://dfhack.readthedocs.io/en/latest/docs/_auto/base.html#region-pops:

region-pops list [pattern]:
    Lists encountered populations of the region, possibly restricted by pattern.
region-pops list-all [pattern]:
    Lists all populations of the region.
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.

FortunaDraken

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #303 on: September 16, 2017, 08:13:02 pm »

From http://dfhack.readthedocs.io/en/latest/docs/_auto/base.html#region-pops:

region-pops list [pattern]:
    Lists encountered populations of the region, possibly restricted by pattern.
region-pops list-all [pattern]:
    Lists all populations of the region.
I've seen that, and it's kind of why I'm confused, hence my asking. If the encountered only shows the population of things that've shown up, why would the numbers be different between the list and list-all?
Logged
I just had a "lord consort" visit and decide to stay. Preparing for Trojan war reenactment.
Protip: statues cannot be made out of wood unless they're artifacts. If you see what appears to be a wooden statue outside your fort and it's not an artifact, destroy it immediately.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #304 on: September 17, 2017, 12:44:38 am »

Because there are certain ones you haven't encountered, I'm assuming? I'm not familiar with the exact terminology here, but "region" may include more than your local map.
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.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #305 on: September 17, 2017, 03:05:14 am »

If I recall correctly, region-pops looks at a DF structure of flora/fauna spanning a 7*7 world tile area with your fortress in the middle. This also explains why you can get stuff like ocean creatures reported even though you're not embarked particularly close to the ocean.
Determining what the technical difference is between the reports requires a study of the script, though.
Logged

FortunaDraken

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #306 on: September 18, 2017, 01:15:10 am »

Because there are certain ones you haven't encountered, I'm assuming? I'm not familiar with the exact terminology here, but "region" may include more than your local map.
My wording on that was bad, sorry. I was wondering more why like, my region-pops list shows Giant Tigers at 1, while region-pops list-all had about...18, I think it was?

If I recall correctly, region-pops looks at a DF structure of flora/fauna spanning a 7*7 world tile area with your fortress in the middle. This also explains why you can get stuff like ocean creatures reported even though you're not embarked particularly close to the ocean.
Determining what the technical difference is between the reports requires a study of the script, though.
This though would make sense...it'd be everything in the surrounding area, which miiiight end up showing up sometime? Hm. That helps make me less confused, thanks.


EDIT: Not sure if this is place to make a suggestion or not, but would it be possible to add a confirmation of the script being on or off to warn-stuck-trees and warn-starving? I assume it's on to begin with, but it'd make it easier to tell.
« Last Edit: September 18, 2017, 06:03:23 am by FortunaDraken »
Logged
I just had a "lord consort" visit and decide to stay. Preparing for Trojan war reenactment.
Protip: statues cannot be made out of wood unless they're artifacts. If you see what appears to be a wooden statue outside your fort and it's not an artifact, destroy it immediately.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #307 on: September 18, 2017, 09:52:21 pm »

EDIT: Not sure if this is place to make a suggestion or not, but would it be possible to add a confirmation of the script being on or off to warn-stuck-trees and warn-starving? I assume it's on to begin with, but it'd make it easier to tell.
Are you talking about a way to tell whether those scripts are enabled? The default configuration uses the "repeat" command to run those scripts periodically, and I don't know if that has a way to tell whether a certain timeout is enabled or not.
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.

FortunaDraken

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #308 on: September 18, 2017, 10:42:22 pm »

EDIT: Not sure if this is place to make a suggestion or not, but would it be possible to add a confirmation of the script being on or off to warn-stuck-trees and warn-starving? I assume it's on to begin with, but it'd make it easier to tell.
Are you talking about a way to tell whether those scripts are enabled? The default configuration uses the "repeat" command to run those scripts periodically, and I don't know if that has a way to tell whether a certain timeout is enabled or not.
Yeah, I wasn't sure how to actually tell if those scripts were on or not. I am very newbish to learning how to DFhack, I wasn't aware there was a repeat going on. But that makes sense.
Logged
I just had a "lord consort" visit and decide to stay. Preparing for Trojan war reenactment.
Protip: statues cannot be made out of wood unless they're artifacts. If you see what appears to be a wooden statue outside your fort and it's not an artifact, destroy it immediately.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #309 on: September 19, 2017, 05:40:00 am »

Is there a way to get access to df structure enum value attributes from Lua? C translates it into macros, but that's of little help from a script. The things I'm currently after are the "color" attribute of df.unit-thoughts.xml:emotion_type and "caption" of unit_thought_type in the same file. As a bonus, it wouldn't hurt to know how to interpret the "divider" attribute of emotion_type.
Logged

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #310 on: September 19, 2017, 06:26:13 am »

I have a problem with the devel/export-dt-ini script. I get the wrong size for the structure "squad_schedule_entry" ("sched_size" in DT's world) using 0.43.05-r2 win32.

The line is:
Code: [Select]
value('sched_size',df.squad_schedule_entry:sizeof())
I get 0x40 instead of 0x34. I assume df-structures is good since it is what I used to get the correct size. I am not sure where the error comes from (C++ code generation or the script itself?).
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #311 on: September 19, 2017, 12:43:37 pm »

Is there a way to get access to df structure enum value attributes from Lua? C translates it into macros, but that's of little help from a script. The things I'm currently after are the "color" attribute of df.unit-thoughts.xml:emotion_type and "caption" of unit_thought_type in the same file. As a bonus, it wouldn't hurt to know how to interpret the "divider" attribute of emotion_type.
df.enum_type.attrs[value] (or df.enum_type.attrs.name).

I have a problem with the devel/export-dt-ini script. I get the wrong size for the structure "squad_schedule_entry" ("sched_size" in DT's world) using 0.43.05-r2 win32.

The line is:
Code: [Select]
value('sched_size',df.squad_schedule_entry:sizeof())
I get 0x40 instead of 0x34. I assume df-structures is good since it is what I used to get the correct size. I am not sure where the error comes from (C++ code generation or the script itself?).

What does "df.squad_schedule_entry:new():_field('name'):sizeof()" give you? Also, are you saying 0x34 should be the correct size? I don't think there's a way the size could be wrong unless df-structures' layout is wrong, because it should use C++'s sizeof() under the hood (and squad_schedule_entry doesn't inherit from anything, although that shouldn't matter either). Are you taking padding into account?
« Last Edit: September 19, 2017, 12:45:45 pm by lethosor »
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 0.43.05-r2
« Reply #312 on: September 19, 2017, 01:21:56 pm »

Sorry, all is right (for DFHack). DFhack gives the correct value (0x34). The ini I generated the first time was sneakily replaced by DT's auto-updater with a faulty one from the splintermind repo.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #313 on: September 19, 2017, 01:29:31 pm »

Thanks lethosor!
Logged

ab9rf

  • Bay Watcher
    • View Profile
    • ab9rf@github
Re: DFHack 0.43.05-r2
« Reply #314 on: September 21, 2017, 07:05:22 am »

With a marginal amount of additional experience, I conclude it's probably not possible to just magically get the header generation script to run from Visual Studio without the addition of some glue. The reason for this is that DFHack and df-structures are separate repos and separate entities, and separate directories (on my machine), so something would have to tell Visual Studio in my DFHack fork->branch->clone where to look for the df-structures fork->branch->clone. Adding this glue is probably trivial when you know how...

Also, I'm not too keen on pushing the new headers into my current DFHack fork->branch->repo, as that will break the plugin I have there, so it would have to be a separate clone (which shouldn't be too hard to create). It can also be mentioned that df-structures
is ahead of the development branch of DFHack, as of my last check (a small bug Quietust fixed within 15 minutes of it being reported wasn't present in DFHack develop a few days later when I cloned my stuff, and I don't know what other things are ahead).
I have three or four working directories for DFHack on my system (including one that I keep "clean" because I only use it for release builds: the only thing I ever do with it is bring it to a specific commit, followed by running the 32-bit and 64-bit build scripts). It's also very easy to switch between branches within a given repo. It's easy enough to have a DFHack repo in which the subrepo for df-structures is tracking a working branch of df-structures, although getting here does require using the git command line; you'll have to do a git submodule update --checkout whenever you switch a working directory between branches that are tracking different branches of the df-structures of the submodule.

As far as I recall. df-structures doesn't include prebuilt Visual Studio solutions, so the easiest way to work with df-structures within VS is to have a working DFHack local repo, with its df-structures subrepo pinned to a branch of df-structures that you're working on. It's actually possible to directly add the subrepo as a repo in the Windows Github client: a subrepo is a full repo in its own right.
Logged
Pages: 1 ... 19 20 [21] 22 23 ... 243