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 - ab9rf

Pages: 1 2 [3] 4 5 ... 17
31
Utilities and 3rd Party Applications / Re: DFHack 0.47.05-r8
« on: December 27, 2022, 04:12:50 am »
Thanks lethosor for pointing out both that I was barking up the wrong tree, but that barking would have ensued even if I'd found the right one.

Also thanks to Bumber for the suggestion, although it didn't work.
In the past I've used the fallback of the Powershell command prompt when .bat files started directly from the File Explorer failed to work, and I've tried that here as well. I believe I've found the tool Bumber refers to (rather different path on my system, but it seems to be the same tool, which can also be invoked from VS itself), but unfortunately that doesn't help cmake find the version it's looking for. It was worth trying, however.
if you have more than one version of VS installed, cmake may not find the one you want (it picks one "at random"). You need to tell cmake which version you want it to use by setting the CMAKE_GENERATOR_INSTANCE variable. See https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_INSTANCE.html

32
Utilities and 3rd Party Applications / Re: DFHack 0.47.05-r8
« on: December 25, 2022, 07:11:42 pm »
I think 2022 is required on Windows now - that sounds familiar. DF definitely upgraded to a newer compiler than 2015, but I can't quite tell from our build image changes whether it was 2022.
We know for certain that it's at least 2019, and I believe Toady told us (possibly through a backchannel) that he was moving to 2022.

33
no it's still there; that code is computing a cube root and there is not much the compiler can do to optimize it away.

It should be able to optimize trunc(pow(70000.0, 0.333) * 10.0) to 410, provided those functions are constexpr. (All values are being loaded from rdata into xmm, DF 47.05 Windows.)

For materials where the values are runtime (loaded from RAWs,) obviously it can't. I was just thinking that this might be typical in other avoidable places, v141_xp toolchain being what it is.
all of the values that particular code runs on are from raws or calculated at run time, so of course it can't reduce them at compile time. also DF has _never_ used v141_xp; it was v140_xp for 43.05 through 47.05, and v143 for 50.xx.

34
I was doing some disassembling (v0.47.05) and noticed the pow function being called on constant doubles (and then rounded down into integers for length and area) at runtime for material physics stuff. Not sure how much this was being done outside of where I observed it (body part constructor,) but hopefully upgrading the compiler optimized that away.
no it's still there; that code is computing a cube root and there is not much the compiler can do to optimize it away. fortunately, that code doesn't appear to be called all that often so it likely has only a minimal impact on performance.

35
While this is all very fascinating, you'll probably find it a whole lot easier to just use DFHack's Lua scripting engine once DFHack is ready. The process that your approach takes 28 minutes can be done in a matter of milliseconds and with far less guesswork.

36
I don't know how you made it, but your memory layout is obviously wrong, most of the vectors have the same address. Here is one that partially works.
my guess is it's from dfhack's export-dt-ini script. Since dfhack only barely runs with 50.03, I'm not the least bit surprised that this script doesn't produce meaningful results yet.

37
#1 was actually map block processing, which included spatters and... temperature.
contaminant processing has been known to be a lag source for a while now, and i suspect it actually drags more than temperature, since temperature is just two ints in the map data block, while contaminants are vectors of pointers so there's not going to be any cache coherency

38
I'd guess opening the caverns and starting fungal growth in all underground areas may still impact FPS, unless the game is running the same checks on every tile whether or not plant growth is actually possible on the tile.
the game does this check in a staggered manner over the course of many ticks. only a fraction of eligible tiles are checked each check, and i believe even the "staggered" checks aren't done on every tick. so the ultimate impact is likely to be relatively low even if you were mine out every level of all the caverns.

39
Y'all don't need specialized shearers no matter what you think ANYWAY

Unit labors are still functional just as they were. They're overwritten any time any work details change at all, including adding new ones or unrelated changes to them. Work details live in what DFHack calls ui.hauling.work_details, which in 0.50.03 is at 141E283F. It's a vector. You can delete all of them by just resizing the vector to 0 and it'll cause no issues that I can see and after doing so you can manually reassign labors at will, as long as you set unit->military.pickup_flags.update for woodcutters/miners. With all this info, I think Therapist should be doable this very moment?
no way that address is correct, first of all it's too short (DF addresses on Win64 are always _9_ hex digits starting with 0x14) and second it ends with F and MSVC always aligns vectors on 8-byte boundaries so it has to be either 0 or 8.

40
Guys, the ideal data structure would be a hash table, e.g. std::unordered_set, no? O(1) insertion, deletion, iteration, at least in theory. At most there could be some data locality issues with jumping between different buckets.
The principal high-load use for this data requires enumerating it, not searching it by a key, and so a contiguously allocated vector, ideally aligned with cache line boundaries, is what you want for peak performance.

41
Utilities and 3rd Party Applications / Re: DFHack 0.47.05-r2
« on: August 28, 2021, 02:55:07 pm »
- Do you have enough logs that are accessible? (i.e. not forbidden, in jobs, etc). One possibility I can think of is that if a lot of logs are queued to be placed in a bin, autochop might not consider them as available, and could end up causing more trees to be cut down. The "z"-stocks screen would still show a lot of logs in this case.
I'm pretty sure that logs cannot be placed in bins.

It's possible that the job cancel bug I discovered the other day is involved here. My current test fort, which is running using the new job cancel method, does not exhibit the behavior that is being reported here; rather, it works as expected, autodesignating every tree on the map, and then undesignating them as soon as enough trees are cut down, as expected. But if the jobs are not cancelling properly (as I was seeing in my prior test fort), then it might continue to chop even though autochop tried (but failed) to cancel the jobs.

42
DF General Discussion / Re: Next update
« on: June 15, 2020, 03:54:47 am »
I don't use any of those auto labor assignment tools, but use DT. Can they handle that Urist McMentalBreakdown shouldn't haul corpses, Urist McPrecipiPhobia shouldn't be sent out onto the scary surface with its rain, sun, and nature, and Urist McBreakingDown should take breaks and single workshop therapy tasks only? Of course, if you can disable auto play functionality it won't harm the game play of those who don't want them.
I actually have added at least some of these considerations into labormanager in recent updates, and would be glad to add others if they're brought to my attention.

43
Utilities and 3rd Party Applications / Re: DFHack 0.44.12-r1
« on: August 15, 2018, 09:00:06 pm »
I don't think there is a thread just for labormanager... but just have one small request.... that it be able to be disabled on a per-dwarf basis (by something simple like ignoring dwarfs that have the unused "Alchemist" labor set.)
Assigning a dwarf to a burrow (even if the burrow covers the entire embark) will cause that dwarf to be entirely ignored by labormanager (see https://github.com/DFHack/dfhack/blob/develop/plugins/labormanager/labormanager.cpp#L1333). I had no reason to remove that behavior (which I added to autolabor many many moons ago: https://github.com/ab9rf/dfhack/commit/78fc850ce20e14d7a37e44c18dc4486ee61796b4) when I forked autolabor to make labormanager.

I don't want to use the ALCHEMY labor for this purpose; there are other people who are using it for incompatible purposes, and, as lethosor points out, "tweak block-labors" prevents toggling the ALCHEMY labor.

44
DF Gameplay Questions / Re: [31.25] Egg problems
« on: July 31, 2018, 08:16:19 pm »
I wrote a plugin that detected fertile eggs a long time ago. I think it existed for 31.25, but I don't remember for sure if this is the case.

45
Utilities and 3rd Party Applications / Re: DFHack 0.43.05-r2
« on: September 26, 2017, 12:49:12 am »
Thanks ab9rf.
Given that the github structure has one structure for DFHack and another for DF structures, I never considered that the off site organization might somehow pull the apparent separate DF structures entity into the DFHack one, although I was aware that there are a lot of things I could never find in the online DFHack file structure.
Given your comments, I managed to get git to tell me there's a "git submodule status" command, and that command shows there is indeed a "library/xml" submodule, which looks to be very similar to the df structures one (i.e. it should be the one). This means it should be reasonably easy to have a "complete" dfhack structure whose purpose is to support df structures work as you said.
library/xml is df-structures. It's a subrepo, and if you go into it's a full repository that you can manipulate in the same manner as any other repository. If you change the commit to which that repo points, the parent repository will track that as a change as to which commit the parent repository will track. This is, in fact, what you basically have to do if you make a change to dfhack code that relies on a newer df-structures release.

There are a lot of gotchas, caveats, and non-obvious best-practice advice for dealing with subrepos. DFHack has five or six subrepos now (and some of them have subrepos of their own, as I recall), so if you're going to be a serious DFHack developer, you kinda have to have at least some understanding of this.

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