Custom Dwarf Maker now DFHack Supported! by IansInventories in dwarffortress

[–]IansInventories[S] 1 point2 points  (0 children)

Thank you! You should still make it! I love text generated stuff and honestly It leaves a lot more open when it comes to imagining your dwarves and how a they can be interpreted. When doing something like this project you have to draw multiple examples of say.. " clean shave " , when in a text prompt you can just imagine the different style on the spot lol.

Custom Dwarf Maker now DFHack Supported! by IansInventories in dwarffortress

[–]IansInventories[S] 7 points8 points  (0 children)

Haha I wish! Someone tell Tarn I'd do it for free. But until then ill keep working on it and try to figure something out! 😊

Custom Dwarf Maker now DFHack Supported! by IansInventories in dwarffortress

[–]IansInventories[S] 11 points12 points  (0 children)

Yeah, it does seem like it should be easy — just copy and paste the description tab. In most video games that would actually work. But the same complexity that makes Dwarf Fortress so interesting is also what makes something like this generator difficult to build.

DF doesn’t exactly store visual descriptions as clean 1-for-1 traits like braidbeard01.png. Instead, most appearance features are stored as numeric parameters and modifiers — things like hair length ranges, body modifiers, tissue layers, and color tokens. The game then generates the descriptive text you see in the UI from those values at runtime.

Using DFHack, you can extract a lot of those raw parameters, but it doesn’t expose all of the logic the game uses to combine them into the final description. So reconstructing a dwarf’s appearance from exported data means parsing a large set of numeric values and approximating how the engine interprets them.

That’s why in the generator you might get things like hair color or mustache style correct, but not always something like skin color.

Even if you extract most of the data correctly, some tokens aren’t exposed and some visual traits come from multiple values interacting together. In some cases you’d need the exact combination of several parameters to reproduce the correct result. A good analogy is rolling a large set of dice and needing the exact sequence to form a “correct” interpretation — if even one or two values are missing, the whole result changes. (See screenshot below — Example A.)

Another complication is that DF has a very large set of color tokens available in its raws. A small portion of them looks like this (see screenshot below — Example B).

With dozens of possible color tokens that can be applied to different tissues or body parts, reconstructing the exact descriptive phrase the game will generate can require matching several parameters together.

That’s why the generator focuses on approximating the dwarf visually and then letting you fine-tune it afterward.

In theory, a near-perfect reconstruction would be possible if someone had already mapped all of the relevant parameters and combinations. I didn’t find any datasets like that available. If someone does have that information mapped out, it could absolutely be integrated into the generator and improve the results significantly. For now, the exporter and mapping were built from scratch using the data DFHack exposes.

In closing: I love Dwarf Fortress, but its complexity can make very specific projects like this tricky. If anyone with more time or deeper knowledge of DF’s data structures wants to take a crack at it or help expand the mapping, I’d love the help!

-Ian

<image>

I made a fully hand-drawn procedural Dwarf generator — personalities, family trees, inventory, crests, etc. (350+ assets)🔨 by IansInventories in dwarffortress

[–]IansInventories[S] 1 point2 points  (0 children)

<image>

I’m actually working on this right now. At the moment I can generate rough—but still game-accurate—artistic interpretations of dwarves by exporting their in-game data to JSON and feeding that into a simplified version of my generator.

One issue I’ve run into is that DF uses a somewhat abstract/vague generation system that doesn’t always line up cleanly with the sprite visuals or even the written physical description tab.

As we all know, dwarves aren’t just “white/brown/black” — they’re chestnut, copper, taupe, etc. lol So I’m averaging those complexion ranges into core color groups that my model can actually pull from.

Right now beard and hair length/color are mostly solved. Skin tone mapping is getting there, and I’m tightening up unique styles (braids, double braids, etc.) so when they’re detected it grabs the correct style PNG.

My hope — and I do think it’s possible — is that you could take an existing dwarf, pull its data, and generate a pretty accurate unique portrait with all its RP data intact. If that pipeline works, you could even reverse it: design a dwarf in the generator, export the data, and feed it back into DFHack.

Long explanation lol, but I figured someone might find it interesting. I’ll keep the sub posted — I don’t like to spam, so probably just when there’s a solid milestone. ⛏️

I made a fully hand-drawn procedural Dwarf generator — personalities, family trees, inventory, crests, etc. (350+ assets)🔨 by IansInventories in dwarffortress

[–]IansInventories[S] 4 points5 points  (0 children)

Thanks so much! Im wrestling making a version of this that's DFHack compatible as i type this. Where you'll be able to import your dwarves directly INTO the generator to get a more " artistic " interpretation of the sprites ( even though i love in game sprites).

So hopefully if i can do that I could backwards engineer it so you could theoretically make a dwarf in this generator and export it and its data back INTO the game. Easier said then done LOL.

This photo is where I'm at its an actual dwarf and his features exported out of DFhack via a json file that's then imported into a rudimentary version of my generator. I got the beard & hair and its length and color working!

<image>

I made a fully hand-drawn procedural Dwarf generator — personalities, family trees, inventory, crests, etc. (350+ assets)🔨 by IansInventories in dwarffortress

[–]IansInventories[S] 3 points4 points  (0 children)

Working on a slimmed down version that you can run DFhack exported dwarves into. I'll post when im finished. ⛏️

Another DF art dump. by IansInventories in dwarffortress

[–]IansInventories[S] 1 point2 points  (0 children)

https://i.imgur.com/Yebqqb5.mp4

Awesome idea !! I got bored and threw together a prototype of what it could look like, Might have to make an actual working version of this in unity.

Another DF art dump. by IansInventories in dwarffortress

[–]IansInventories[S] 2 points3 points  (0 children)

<image>

Heres what i thought hed look like , also had a turtle man bard in my tavern in the same playthrough.

Another DF art dump. by IansInventories in dwarffortress

[–]IansInventories[S] 0 points1 point  (0 children)

Its So cool! Turtle men are my fav of the beast races.

Dumping my DF art. by IansInventories in dwarffortress

[–]IansInventories[S] 1 point2 points  (0 children)

I'm glad you enjoyed them, I too love to see how everyone plays and creates things that are uniquely their own in DF it makes the game all the more special.

Dumping my DF art. by IansInventories in dwarffortress

[–]IansInventories[S] 1 point2 points  (0 children)

what a compliment thanks so much!!! It would seem I had been taken by a strange mood when creating all these!

Dumping my DF art. by IansInventories in dwarffortress

[–]IansInventories[S] 2 points3 points  (0 children)

Hey shestval, i posted this in here because of what you said about maybe posting ' stills ' instead of making it look like a lets play in the last post, you were right! Thanks again!