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

Pages: [1] 2
1
so those three dependencies I was missing before were also dependnecies to gtk+-2; which is a dependency for dwarf fortress as well, I just missed it because I'm bad at reading dependency lists intended for package manager

also missing some soundsense dependencies, but managed to find the github page for that which has a dependency list

and by found I mean I finally remembered to grep build.log before running the build a second time

2
replied in the github issue; not sure how I didn't manage to find that before posting here

is another problem, but I have a couple things to try, depending on result of that I'll open an issue in the github or put a reply here (or edit this reply if I get it working tonight)
EDIT: turns out I'm missing some x libraries (so far at least pango, gtk-pixbuf, and atk), I managed to find them listed in dwarf fortress dependencies (though failures are occuring when soundsense is building), but only now that I know what I'm looking for (in the freeBSD section, looks like these libraries come in any version of linux actually in use)
probably I should just install all the x libraries,

by the way, thanks for maintaining this package, it is nice to have relatively low effort way to get dfhack and dwarf therapist working

3
hello,

am trying to build on linux from scratch, getting an error that I have no idea the cause or any potential solutions:

[ERROR]      /sources/lnp-forge-0.47.05-r3/.build/src/dfhack-0.47.05-r3/plugins/twbt/config.hpp:580:77: error: taking address of rvalue [-fpermissive]
[ALL  ]        580 |                     static_cast<std::ostringstream*>(&(std::ostringstream() << idx))->str();


am building 64 bit version, looked at the menuconfig but didn't save anything

aside from the dependencies listed in the readme I also had to build help2man, rsync, and mercurial before the configuration was happy, so possibly i'm missing another dependency which is on most distributions but I am unaware of
also am using java 16, java 8 was having some problems which I think were from missing libraries, as I understand it isn't used for building anything so that shouldn't matter

put build.log here: https://pastebin.com/23vUT6Dm
not sure this is even a problem with this, since it occurs during the ninja install for dfhack, though the error is in some twbt files which confuses me

thanks for any help


EDIT: forgot I was going to ask about that Known issues.txt, looked a bit and wasn't able to find it

4
DF Dwarf Mode Discussion / Re: DF v0.47.01+ Worldgen Cookbook Thread
« on: February 20, 2021, 11:36:28 pm »
Given that at least with one generated world that tile is totally covered with mountains, that seems to be what is happening.

5
DF Dwarf Mode Discussion / Re: DF v0.47.01+ Worldgen Cookbook Thread
« on: February 20, 2021, 02:18:02 pm »

The symbols generated for tiles is the one for a tree that's present there, while I'd prefer to see something representing the biome. The tree selected can differ for different tiles within the same biome.


I definitely agree with that but thats the way the game is; and you got the idea anyway

Quote
You understood me correctly in the first part, but not the second. All kinds of forests belong to the Jungle region type, all kinds of ocean to the Ocean one, all kinds of wetlands to the Swamp one. All kinds of mostly open grass dominated terrain end up as either Hills or Grassland, depending on Drainage, so those to region types contain exactly the same sets of biomes. Unless I've missed one, the rest of the region types have a single biome in them.

In that case information on biomes from wiki is basically just incomplete, though fairly easy to understand; I will add to advanced world gen though since it definitely should be there.


Quote
Changing Volcanism probably scrambles the RNG, resulting in different results. The evilness settings for small/medium/large regions are not absolute, although they can be made mostly so by ensuring the requested number of tiles of that type in that kind of region exceeds the actual number of tiles, but it still doesn't give you full control.

Still, if I ask for maximum evil tiles in medium regions and no evil tiles in small/large regions it is pretty clear anything evil must be a medium region.
if I make two areas of mountains both ~15-20 tiles and connect them with a definitely non-mountain tile and they always (as far as I've seen) become evil if that tile is a volcano, but not if it isn't a volcano (in which case dwarf civilizations are placed at difference places depending on the run for example) then it seems fairly unlikely to be random, unless I've gotten incredibly unlikely occurances with noncontiguous areas counting as regions sometimes it seems more likely that volcano tiles count as mountain tiles for the purposes of regions

another test I did, if you generate this world the volcano switches between the sides between each attempt to generate, but the side with the volcano is always the evil one:

Spoiler (click to show/hide)


Quote
Again, changing the number of rivers scrambles the RNG, but I believe lakes are generated to be connected to rivers in a somewhat logical way, so I would guess you might be able to guide river formation (and hence lake formation) to some extent by generating elevations such that there are clear valleys for rivers. However, I'd expect the result to be very much "somewhat".
Good to know that you mean lakes when talking about flooding. The other post about talked about oceans flooding land.
I didn't know what I meant, I just knew with a map like that it was regularly covering areas with water and then I aborted and tried again
eventually I decided maybe it was simulating that water couldn't flow anywhere and would pool there and tested some things to get rid of it and they sort of worked (still not exactly as I expected, but I don't know the physics/geology very well in real life and dwarf fortress physics are wonky sometimes)

6
DF Dwarf Mode Discussion / Re: DF v0.47.01+ Worldgen Cookbook Thread
« on: February 20, 2021, 11:10:13 am »
You can't paint good/evil because it's assigned by DF internally during world gen.
I know this, but it still has bothered me a bit


Quote
Variance shouldn't have any effect on a fully defined PSV world. However, if you specify only some of the parameters and let DF generate the others it will do so (and I generally use fully defined PSV world, so I don't know much about how the hybrid approach works).

It seems i was incorrect here, the symbol changes for savanna/grassland, but it creates one big region with different symbols. It also seems regions depend on temperature somehow though and I left temperature to be randomly generated, which may also have been an effect, I guess in the future I should just set it to what I want everywhere.

Quote
The wiki should be able to tell you which biomes belong to the same region type. "Hills" and "Grassland" have the same biomes (savanna, etc.), while all the other biomes are present in a single region type only.

If I understand you correctly you are saying that hilly savanna and hilly grassland become the same region and savanna and grassland become the same region but it is not
my own testing tells me that broadleaf forest and conifer forest also become same region, as well as marsh and swamp becoming same region, so wiki isn't totally accurate but not especially difficult to figure it out (at least without rivers causing problems)

test world here:
Spoiler (click to show/hide)

Maybe I should do some more testing and put results to the wiki, since right now it has no information about regions and some more testing on this wouldn't be that much work.

Quote

A volcano is a "feature" that exists within a tile, and so isn't tied to any particular region type, even if the cone may rise to mountain elevations.


in the lower right corner of the previous test I have two 3x5 blocks of mountains separated by a 1 wide strip of deserts with 100 volcanism; I have it so only medium regions will go evil and those mountains go evil, while if I change the volcanism to 0 they don't.

Quote

Rivers shouldn't split regions, as they appear "on top" (they're "features"). I suspect the cases you've seen are grassland/hill regions (they differ only by Drainage).


After some more testing, I seem to be incorrect here as well, that must have been temperature effects then, or possibly flooding, not sure.

Quote

Never seen any flooding (although someone recently said that happened, although it wasn't verified as far as I've seen). Lake formation happens during world gen and can't be controlled by PSVs, though. Elevation below 100 results in ocean tiles (which can result in very small oceans...), not lakes.

I suspect the flooding and lakes are the same things, but they seem to be somewhat controllable by elevation modification for example, or for example by rivers; here is what my worldpainter screen looks like:

(https://ibb.co/S5hf4BW incase img tag doesn't work)

If I generate this world with 800 rivers, I sometimes get some small lakes:

(https://ibb.co/hsm8DHH incase img tag doesn't work)

But if I generate with 0 rivers I get a huge lake:

(https://ibb.co/Zg0WpPR incase img tag doesn't work)


I'm not sure but it also seems to be based on relative elevation, with a similar setup but larger map I was having problems with huge portions of the map becoming lakes, but by putting down a few sea tiles it seemed to prevent the lakes from showing up. I think reducing the sizes of the peaks helped as well, though I don't remember for sure and the reason I did that was because it made it must more likely for rivers to be near the volcano mountains.


Quote
You probably don't want to play a truly dead civ, as those a badly bugged: No travel possible, so no raiding. Your civ won't found sites (naturally), but you can't conquer any either, so you're relying on sites to spontaneously tie themselves to you for those nobles. If you lose your expedition leader it won't be replaced, which locks out a lot of functionality if that happens, but I think getting a mayor will get past that problem (there should be a new one elected the next summer).
not all those are problems for me, but also didn't realize so many bugs, and not a huge deal though, dying civilization is fine

7
DF Dwarf Mode Discussion / Re: DF v0.47.01+ Worldgen Cookbook Thread
« on: February 20, 2021, 07:31:53 am »
I'm very late to the discussion and my addition is also more relevant to fortress mode and probably known about, but I figured I'd share anyway incase either it isn't known about or the issues I have with it are known better than I know them.

I've been annoyed for a while that no worldpainter lets me paint good/evil.
I found by using the "desired good/evil tiles in small/medium/large subregion" combined with the world painter (I guess you call PSV here) it was fairly easy to make a world with lots of evil while actually being able to place some controllable civilizations. (for example, evil tiles in small subregion -> max; evil tiles in medium subregion -> min)

I found water and high mountained (filled in triangle) both block civilization influence, while low mountains (open triangle) seem to not, and that there is still a lot of variance in the maps even if I set all variances to none. This made larger savannas and grasslands often have wrong type of terrain in the intended medium region, which then became a small region and went evil, so I would be interested if anyone knows how much variance there can be with variance turned off (and orthographic precipitation turned off); I also found marshes and swamps would be considered in the same regions, and lower and higher mountains would be considered the same region, as well as a volcano on a 100 elevation tile would join the same region.
I also found rivers would sometimes split an area intended to be a medium subregion, sometimes this would even happen for 2xsomething areas.
Also, I got some intermittent flooding, it seemed to get better if I added regular tiles with elevation below 100, or if I reduced the height of mountains, but i'm not clear on how corelated those were or how near the water needs to be.

Anyway, I wanted volcano+mountain+river+swamp+evil+savage+nearby towers+nearby goblins+if possible other nearby civilizations, and here is the parameters I used for that: (goblin raws were also modifies to only spawn on deserts, though I think I would need to up the map size to prevent dieoff of non-goblins by goblin causes; I'm not sure how much the high savagery or war between human/dwarf (or human/human and dwarf/dwarf) affects the dieoff rate; I suppose with a larger map I could spread out races so their influnce overlapped in a small area and then copy that and just check the small area, but living fortresses wasn't important for me, I would have even preferred a totally dead race but I guess that doesn't really happen right now.)
Spoiler (click to show/hide)

8
Ah, you might have been thinking of gui/gm-unit. They have similar names, but gui/gm-editor came first.

That is exactly what i was thinking


Quote
If it's something presentable, sharing it here might be useful to others :)

So first you need to find the civilization entity ID or site entity ID (I think first one affects new forts while second affects current forts, but have only done it for site entity ID), if you go to nemesis record, for example:
gui/gm-editor dfhack.units.getNemesis(dfhack.gui.getSelectedUnit())
then there is an entry entity_links, which all your dwarves should have two memberst entries, one for civilization entity ID and one for site entity ID. Your nobles/administrators should have a positionst entry for your site ID, while I would expect a monarch to have a positionst entry for the civilization ID
I'm sure there are other ways to find civlization ID / site ID

then with gui/gm-editor df.historical_entity.find(ID), there will be an entry for positions, which has an entity "own" (maybe "site" for the civilization level ID, not sure)
that is a list of all positions, each has the name, an ID, and then what i care about is appointed_by and appointed_by_civ fields, in my case they were empty and I needed to add (alt+i) to the first one an entry with no name (leave blank) and value of the ID of another position in my fort and for the second one an entry with no name and value of the ID of the site entity (not sure if this was neccessary, but all the other positions had it)

9
That is the answer to the question I was asking. Not sure how I managed to miss that token looking through the (very small) list of attack tokens on creature page several times to try and find one that did what I wanted

will probably use both methods though

10
df.global.world contains almost everything of interest (there are things outside, like df.global.ui). gui/gm-editor is the standard tool for looking at df structures, but you can also look at the XML source for it (either in a local copy of dfhack if you compile it yourself, or on github (approximately named dfhack/df-structures). The XML has the advantage that there are some comments in there, but gui/gm-editor is usually easier to use because you don't have to guess at the file things are stored in).

Entities are stored in df.global.world.entities.all.

I don't really know what a nemesis record is for, but there are references to them and they, in turn, reference the hist fig targeted, which has been sufficient for my purposes so far.

"gui/gm-editor df.global.ui" will show you the top level of ui, and allows you to traverse further down the tree (when the elements are compound, of course), but, as indicated above, you probably want df.global.world as your top exploration level.

So, my problem was a lack of understanding of gui/gm-editor, I thought it was only used for editing unit personalities and things like that.

After posting I found the df structures git, but discarded it after not reading enough since it just looked like a massive list of enums and I didn't read far enough to get to the structs.

I've found gui/gm-editor is nice for seeing orders of things, and then when I run into an issue with pointers findstr (grep for linux) is pretty useful with the xml files.




If I'm understanding this correctly, this is a position that you want to be able to assign from the "n" screen, but can't due to a mistake in the raws, yes? If that's the case, I would actually suggest trying to change this on the entity level, to allow the position to be assigned, rather than trying to forcibly assign a position that can't be assigned. I think it would be easier and less error-prone to leave the actual position assignment logic to DF.

The relevant data is probably stored at the entity level (e.g. "df.historical_entity.find(unit.civ_id)") but might be stored in the entity raws only instead ("df.entity_raw.find(unit.civ_id)"). Changes to raws (technically the in-memory versions of raws in this case) typically only affect new entities/objects, so I would recommend looking at the entity itself first.

I would recommend making a backup of your save first, in case you corrupt something irreversibly.

As a side note, you can actually drop the "df.global." prefix in both the "lua" interpreter and "gui/gm-editor" for convenience, e.g. "gui/gm-editor world" will work.


had already started considering this, I found that site nobles are in entity_links, just under a totally different entity_ID, I guess each site gets a separate ID. I was thinking just telling that unit to be a militia captain might not make it possible to actually make a second squad and may just lead to the unit being on duty with no barracks or something unfortunate like that.


That depends on quite a lot - what type(s) are you asking about here? My best answer is for enums, which would typically show up as numbers in Lua. Editing an enum field in gui/gm-editor would bring up a dialog with each (known) valid value, along with their names, and the enum name itself at the top. You could also track down the field in df-structures, like PatrikLundell mentioned. For scripting, you should always use the name ("df.enum_name.ValueName"), never the number, because the raw numbers can change. Valid values for other fields can vary greatly, and df-structures might have more relevant information on a case-by-case basis.

apologies for unclarity, what I meant by that was exactly what gui/gm-editor does; where i can see a list of all the properties (for example, dfhack.units has .isGelded, .isEggLayer, ...)

whoever wrote this utility must be pretty smart person as well, the options for enums works pretty nicely


Try printall() (shorthand: "~" in the "lua" interpreter). I'm guessing you were just getting something like "<nemesis_record: 0x25f25a0>", but if not, an example of what you are seeing would be helpful. Note that gui/gm-editor would also make it a bit easier to browse structures.

As for what a nemesis record is, I suppose that is something that could be documented. I would need to track down past discussions on it. Many structures don't have documentation outside of the XML files, because as of 0.47.05, there are 1721 of them, and both writing the documentation and keeping it up-to-date would be a massive undertaking.

printall is very helpful, again whoever wrote this must be pretty smart person

I think it isn't a big deal if it has explanatory documentation; I just thought from the name it was something that would be somehow more meaningful, while after looking at what it contains it just has stuff about units

What would be cool to have documentation on is what you and patrik just told me; though I guess that probably exists and I just am not great at google and didn't even know what I was trying to find.



EDIT: it seems the raws you mentioned in gui/gm-editors are changed by modifying the txt raws, as they seem to already have the fix

EDIT: found where to solve the problem, was very easy after you mentioned df.historical_entity.find(unit.civ_id) (though I actually changed for the site entity rather than the civilization entity)

11
That doesn't answer the question I posted, but I think it completely solves my problem.

will test in arena later, but seems like I'm an idiot, I resized several organs and didn't think to resize the teeth/mouth/head to make bite stronger without increasing size of the whole creature.

12
I can write a script; but is that structure (object, struct, whatever) documented somewhere?

For example, because of previous script I linked I know how to get nemesis record of a unit and insert something into the entity_links of the nemesis record; but I have no idea what a nemesis record is or what entity links is, and google only finds other scripts an no documentation or wherever whoever made the first script using entity_links figured that out from (https://docs.dfhack.org/en/stable/docs/Lua%20API.html has the function for getting nemesis record, but nothing else about it)

I can even print the nemesis record and entity_link (or values for each index since it is array) but it just gives some text that gives nothing useful (I found this https://peridexiserrant.neocities.org/docs-structures-test/docs/_auto/structures/refs.html but it doesn't seem to be very useful for this purpose) EDIT: and some hex, which is even less useful than the text

For example, if I want to find for what values of df.global.ui.xxx xxx is valid, what is best place to look?

13
Hello,

I've started modding a custom carnivore civilization and ran into a few problems (some strange behavior of milk alcohol / custom wool clothes as well, but I probably make other topics about those later) including that all natural attacks seem to be tied to size and stats so that I cannot make one natural attack weaker than the other, or make it stronger without increasing either strength of manufactured weapons attacks or size.

Specifically, I want to make the bite significantly more powerful than for example a human bite while retaining similar size as dwarfs and no more strength than dwarves. Does anyone have any ideas how to do this if it is possible? I read about someone doing something similar, but I can't find how they did it. I've tried 200% penetration on the bite, but not really any other ideas.

14
Dear UristMcWholeFort

Why is hauling rocks from the other side of the map more important to you than emptying milk buckets into barrels/pots so that you can use the buckets to get water. You will all die of dehydration carrying rocks. (note: I've modded it so my fort is carnivorious and can produce alcohol only from milk; but brewers refuse to use milk in a bucket, it must be emptied into a barrel/pot first, and the helpful milker just stores buckets full of milk in the stockpile and then cancels milking jobs because no free bucket)

the overseer

15
not sure if good place to ask this, if there is better place let me know and i can move it there.

I've modded a custom race and screwed up a bit in the entity so that my equivelent of militia captains cannot be assigned (forgot to change ID of assigner from dwarfs), and for various reasons including using dfhack I didn't test for a way into making a fort.

Can I with dfhack / lua assign them manually that way? I found a lua script here http://www.bay12forums.com/smf/index.php?topic=121272.0 for assigning monarches, but I've got no idea how to adapt it for nobles with [SITE]. I thought I would just need to figure out what the assignment ID was and insert something to the units entity_links, but it seems [SITE] nobles don't show up searching through the entity list and extrapolating a number from nobles without [SITE] gives no result.

Pages: [1] 2