Bay 12 Games Forum

Dwarf Fortress => DF Dwarf Mode Discussion => Topic started by: knaveofstaves on April 23, 2011, 09:22:11 am

Title: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: knaveofstaves on April 23, 2011, 09:22:11 am
Dwarven Guidance Counselor 0.0.6 (http://dffd.wimbli.com/file.php?id=4238)

Welcome to the Fortress, Urist McMigrantMiller. We... have a miller. He spends most of his time hauling. Come in, have a seat, and let's discuss where you see yourself in five years.

Dwarven Guidance Counselor (http://dffd.wimbli.com/file.php?id=4238) is a mere 120k of JavaScript, HTML and text, but it has ambitions. You tell it the attributes and traits of the dwarf in question, and can do so by number, by phrase, or by XML upload. It will make recommendations on the course of a future career.

Look up the phrases from Thoughts and Preferences (u-v-enter) that represent attributes, and about a minute of data entry gets you an evaluation like this:

This is the same dwarf, with attr and trait values gathered from Runesmith and Dwarf Therapist and entered by hand, taking about five minutes (loading from XML should look similar to this):

There's an optional red/blue coloring feature that makes it easier to tell at a glance what an evaluation means, and a bright-side option that ignores poor choices and presents average (green) rated skills instead.

With some browsers you can load XML produced by Runesmith to evaluate your dwarfs automatically. See the readme for step-by-step instructions. It works on and Firefox 4.0.1 and IE 9.0.8.
I haven't personally tested on Opera or Chrome but the following fixes should be useful:
For Opera: opera:config#UserPrefs|AllowFileXMLHttpRequest should be set to "Allow"
For Chrome: load chrome from the command line with --allow-file-access-from-files as switch

Known Issue: If you export your dwarves from XML when the dwarven caravan is present, caravan members are read as if they're normal members of your fort. I'm not sure where to begin dealing with this, for now, just don't export your fort then!

Last version update: 11 May 2011.
Spoiler: Changelog (click to show/hide)
Title: Re: Dwarven Guidance Counselor
Post by: FearfulJesuit on April 23, 2011, 09:26:53 am
This looks really cool, so I'll alpha-test. Downloading now!
Title: Re: Dwarven Guidance Counselor
Post by: Argonnek on April 23, 2011, 09:50:29 am
This is an awesome program. I kinda wish I could copy text from DF to the clipboard, though.
Title: Re: Dwarven Guidance Counselor
Post by: Syrup Roast on April 23, 2011, 10:59:30 am
Cool, a career counselor program for dwarves! I like the name.

I've always wondered why Dwarf Therapist was called that way. Would've been more accurately named Dwarf Labor Manager or something.
Title: Re: Dwarven Guidance Counselor
Post by: cbgbluethundr on April 23, 2011, 12:38:39 pm
I've always wondered why Dwarf Therapist was called that way. Would've been more accurately named Dwarf Labor Manager or something.

It gets rid of the stress caused by the thought of a new migrant wave arriving, knowing you'll have to go through all of their jobs and sort them.
Title: Re: Dwarven Guidance Counselor
Post by: JmzLost on April 24, 2011, 03:00:49 am
Tried this out, it seems very nice.  Good for choosing some extra skills for your starting 7, or for a few extra dwarves you don't know what to do with.  I'd really hate to try and do this for a full fort, though. 

Any plans to use dfhack to access the traits and attributes directly?  Maybe pull up a list of dwarfs, user chooses 1, the Counselor returns the guidance information?

Good job, and thanks.

JMZ
Title: Re: Dwarven Guidance Counselor
Post by: knaveofstaves on April 24, 2011, 05:20:51 am
Any plans to use dfhack to access the traits and attributes directly?  Maybe pull up a list of dwarfs, user chooses 1, the Counselor returns the guidance information?
JMZ
No, that well exceeds my level of technical sophistication. I know shell scripting, JavaScript, and PHP. And I don't know them very well, but well enough for limited projects like this.

I could -- theoretically, I'd be Learning, it'd be Fun -- script it up to load the XML exported from Runesmith. But JavaScript is the tool of evil hackers, therefore forbidden from writing to disk directly. I'd have to figure out how to let you hand-scroll through the XML, and copypasta the evaluations out one at a time. And spending thirty seconds looking at it, this is another one of those areas where IE loads XML one way and the rest of the world does it another way, which is Extra Fun.

I'm in bug-squishing mode right now, and this plan is a major update, but definitely something for me to look at. The front-end data entry is a barrier.
Title: Re: Dwarven Guidance Counselor
Post by: JmzLost on April 24, 2011, 07:11:45 am
I wasn't thinking of having it write anything to DF, just avoiding the input for a large(ish) fortress.  And I know even less programming than you, which is why I'm an idea guy and not actually trying to code something :D

Kudos for the good work!

JMZ
Title: Re: Dwarven Guidance Counselor
Post by: Reelyanoob on April 24, 2011, 08:19:39 am
JavaScript is the tool of evil hackers, therefore forbidden from writing to disk directly.
Really? That's fecking awful, like cripple-ware. I can do this in VBScript. Maybe I can help you automate this.

I could even do a c++ port for you.

EDIT: I'm looking at your form. I reckon the quickest and easiest way to autofill this is with an AutoHotKey macro, just need to create a commandline program to extract the needed data from DF, then I can code the rest in a couple of hours, no trouble at all, even spitting out a log file for all your dwarves.

Only thing is, I've never worked with the DFhack back-end, so have no idea of the interface or when to look for the dev. info.

EDIT: Cool, but I dropped strength to 1 as a test, and it only lists jobs he's not good at. How about listing top suggestions?
Title: Re: Dwarven Guidance Counselor
Post by: knaveofstaves on April 24, 2011, 10:04:39 pm
JavaScript is the tool of evil hackers, therefore forbidden from writing to disk directly.
Really? That's fecking awful, like cripple-ware. I can do this in VBScript. Maybe I can help you automate this.
I'm playing a forum game in the upper forums, and one of my victory conditions for DGC -- The Game is for someone who knows a real programming language to take this over. Bonus points if that person is the project manager of Dwarf Therapist, and decides to integrate this functionality somehow. In my mind when you click on a dwarf's row, and hit a toggle, little smiley and frowny faces appear. That could easily be visually cluttered and a bad idea, but after I win DGC -- The Game it's not my problem any more.  ;D

EDIT: Cool, but I dropped strength to 1 as a test, and it only lists jobs he's not good at. How about listing top suggestions?

Because a hypothetical dwarf of strength 1 and all other stats at racial median would have as suggestions every non-strength-testing job, and the suggestion would be of equal validity in all cases. My assumption is that the DGC userbase is used to DF's way of doing things -- if an attr or trait isn't listed, it's assumed to be neutral or average, so if I don't say anything about "Miner" you know he'd be a dorf-standard miner. I'm already worried about the evaluations being too wordy, and my next update will actually tell you less. (Why did I include Alchemist and Concentration in the first place? derp derp.)

I guess I could pop out a random suggestion among average jobs for dorfs with all negatives... maybe code it green? I'll ruminate, and perhaps hauntingly moo.
Title: Re: Dwarven Guidance Counselor
Post by: Reelyanoob on April 24, 2011, 11:52:42 pm
I guess I could pop out a random suggestion among average jobs for dorfs with all negatives... maybe code it green? I'll ruminate, and perhaps hauntingly moo.
It just seemed incomplete and a bit useless to only list things not to do with him, so I thought I'd point out this case. More useful to list the things he's not nerfed at. The list in red was quite long, I'm not sure how many jobs in total there are in your program, but having a green list can't be that much longer.

The issue seems to be skipping over the category of "average" jobs, it goes straight from "good" to "poor". Maybe have this as options (show > average, show > poor, etc). There could also be tick boxes for all the jobs, and you deselect ones you're not interested in. Like, I personally do not care how good a fish dissector someone makes.

btw, exactly what does an "Intimidator" profession do in-game? Or is this just the skill level being considered? There needs to be a text file defining roles, which may use one or more skills. e.g. some dwarves seem a lot faster. I'd like to make these haulers, but that's not linked to a specific skill.

Also, there needs to be some consideration of the dwarf's current skill levels. e.g. if I get a high master surgeon, he's staying my surgeon no matter what DFC tells me. And if only there was a way to know this before embarking, while selecting skills. I guess rule of thumb will have to go there instead.
Title: Re: Dwarven Guidance Counselor
Post by: knaveofstaves on April 25, 2011, 04:16:24 am
It just seemed incomplete and a bit useless to only list things not to do with him, so I thought I'd point out this case. More useful to list the things he's not nerfed at. The list in red was quite long, I'm not sure how many jobs in total there are in your program, but having a green list can't be that much longer.

The issue seems to be skipping over the category of "average" jobs, it goes straight from "good" to "poor". Maybe have this as options (show > average, show > poor, etc).
Right now I have fifty jobs or categories. So if you've got a word wall of thirty red skills, you'd also get a word wall of twenty green skills, which I want to avoid. With the current number of skills, I could echo the 18x3 table on the left, and make a 17x3 table listing every skill, plus a row for text eval if any. But that scales badly, and there are seven implemented skills I want in the script but don't have data on yet.

A simple checkbox for "show only best skills" works for me. Show all blue skills and no red skills, unless there are no blue skills, in which case show green skills, and never show green skills otherwise.

btw, exactly what does an "Intimidator" profession do in-game? Or is this just the skill level being considered? There needs to be a text file defining roles, which may use one or more skills. e.g. some dwarves seem a lot faster. I'd like to make these haulers, but that's not linked to a specific skill.
Intimidation is used by brokers against caravans to get better deals AFAIK. I don't know what you mean by roles, if you mean like "What makes a good mayor/sheriff/etc." I've intentionally kept quiet about that until (and unless) the DGC userbase is big enough to get a consensus on how people want that handled.
Title: Re: Dwarven Guidance Counselor
Post by: Reelyanoob on April 25, 2011, 04:34:13 am
A simple checkbox for "show only best skills" works for me. Show all blue skills and no red skills, unless there are no blue skills, in which case show green skills, and never show green skills otherwise.
That's pretty much what I was after.
Quote
...I don't know what you mean by roles, if you mean like "What makes a good mayor/sheriff/etc."...
By roles I mean more like any "job description" which may possibly involve multiple skills. This would be highly user-dependent, so would be best served by letting players create and share profiles in which they weight various skills and abilities, with their own custom Professions, much like how Dwarf Therapist handles it, but with user-defined weightings on the various skills.

So, a user would be able to create their own profession list, and ratings against that list could be the primary output of DGC.
Title: Re: Dwarven Guidance Counselor
Post by: Pearlie on April 25, 2011, 10:49:20 pm
I've been wishing something like this existed for ages. I love it. SO much. I've always tried to roughly match personalities to jobs, but I find it a bit tough a lot of the time, so I'd stopped doing so except for military and social dwarfs. I just started a new game and allocated jobs based on this, and it's worked out great - maybe it's just a fluke, but all my dwarves are waaay happier than they normally are at this point in the game. It was very funny, because I had four dwarfs that were good at a lot of things, and three that weren't good at much/anything. The four that were good at stuff are the ones that have paired up! One of those pairing is my doctor and my militia commander...

As for data input - entering numbers is way too time consuming and irritating, and whilst typing in the phrases was still sort of irritating, it's totally worth it. I know you said porting the information for a dwarf straight over is beyond your abilities (and wouldn't be useful in terms of the embark screen...) but I think some sort of work around would be great. I'm not a technical person so I don't know whether or not either of these are feasible, but I had two ideas for possible solutions - the main one is, you know, you type in the start of a sentence and it fills in what the rest of the sentence is (like google search.) Or porbably much more doable, drop down boxes! Like "Creativity" set to N/A, then you click on it and it lists all the phrases that correspond to creativity..

Anyway, I love what you're doing and can't wait to see how you refine it.
Title: Re: Dwarven Guidance Counselor
Post by: cdrcjsn on April 26, 2011, 12:16:25 am
I wonder if there's a way for their item preferences (http://df.magmawiki.com/index.php/Preference) to also be considered.

For example, a dwarf that likes steel would make a good weaponsmith or armorsmith, since he'll get a bonus on quality on anything he makes with steel.

I know that I look for item preferences on my starting seven.  If someone likes a type of wood for example, I'll make that person a carpenter and embark with a ton of the preferred wood.  That means a lot of early mastercraft or exceptional beds and spiked balls (for dodge traps and early trading).
Title: Re: Dwarven Guidance Counselor
Post by: ral on April 26, 2011, 01:28:49 am
This seems like the kind of thing that would be good to integrate with Dwarf Therapist. DT already contains the information. Something like a lua engine to run arbitrary scripts in DT that make use of DT's data would be kind of cool.
Title: Re: Dwarven Guidance Counselor
Post by: thijser on April 26, 2011, 01:41:28 am
Could you link this to the therapist so it will be able to tell you what dwarf has the best chance of being good at a certain labor aswell?
Title: Re: Dwarven Guidance Counselor
Post by: ral on April 26, 2011, 01:47:09 am
That's what I was talking about. I think I'll download the src for DT and learn how to build it. Maybe I can get a lua scripting engine working or something, if it isn't too difficult for some reason.
Title: Re: Dwarven Guidance Counselor
Post by: celem on April 26, 2011, 04:04:08 am
Mmm nice app mate.  I might have a poke about with it since Javascript is kinda my thing and im projectless right now.

Incidentally you can get your javascript to write to the local disk, provided you can persuade your user to grant some 'trust'.

My favorite method is a java applet embedded in the html that handles local file system stuff.  Self-sign it and users can trust it to let it do its thing.  You can also do some filesystem operations with an ActiveX control but I imagine more users are gonna have these off/blocked.
Title: Re: Dwarven Guidance Counselor
Post by: knaveofstaves on April 26, 2011, 07:46:48 pm
Mmm nice app mate.  I might have a poke about with it since Javascript is kinda my thing and im projectless right now.

Incidentally you can get your javascript to write to the local disk, provided you can persuade your user to grant some 'trust'.

My favorite method is a java applet embedded in the html that handles local file system stuff.  Self-sign it and users can trust it to let it do its thing.  You can also do some filesystem operations with an ActiveX control but I imagine more users are gonna have these off/blocked.

I've having some trust issues at the moment, actually, of a simpler nature. I can't convince IE9 to http get a local XML file, though it'll read it if I slap an old-timey doctype on it and use a data island, which makes this an awesome security control if I can get around it with two lines of markup that everyone in the world knows. I keep getting "SCRIPT5: Access is denied", which it clearly isn't. ...isn't it sublimely ridiculous that there's no button here for the headwall smiley. I am frustrated in expressing my frustration! But any advice (http://stackoverflow.com/questions/5793831/script5-access-is-denied-in-ie9-on-xmlhttprequest) is welcome.

In other news the script works just fine in Firefox 3.6.16. I don't want to upload just that, though, if I do I'll never finish the IE side :P
Title: Re: Dwarven Guidance Counselor
Post by: RevolutionaryDorf on April 26, 2011, 10:48:23 pm
My secret personal fantasy is using a program like this to determine what a dwarf's political alignment would be via their personality, for something like tallying made-up votes of a "dwarven senate" for a self-imposed challenge game. I spent a while trying to devise a pen-and-paper calculation system for this but eventually gave up.

A strong, iron-willed, un-trusting dwarf with high aggression would vote for authoritarian things like a migrant concentration camp directly inside the magma pit.

Title: Re: Dwarven Guidance Counselor
Post by: knaveofstaves on April 27, 2011, 09:38:04 am
Thanks everybody for the suggestions and support.
By roles I mean more like any "job description" which may possibly involve multiple skills. This would be highly user-dependent, so would be best served by letting players create and share profiles in which they weight various skills and abilities, with their own custom Professions, much like how Dwarf Therapist handles it, but with user-defined weightings on the various skills.

My recent experience with loading and writing files says profiles seem hard. But custom-defined skill groups -- on average, how would this dwarf do at skills x, y, and z -- seems doable.

I wonder if there's a way for their item preferences (http://df.magmawiki.com/index.php/Preference) to also be considered.

For example, a dwarf that likes steel would make a good weaponsmith or armorsmith, since he'll get a bonus on quality on anything he makes with steel.

Yeah, a lot of people look at preferences for this sort of thing. I'm not saying that's bad, but it's subjective -- I know exactly which skills are affected by Strength, and I have a good model for how much, but I'd need to hear a consensus to know how much it's worth to like steel.

That's what I was talking about. I think I'll download the src for DT and learn how to build it. Maybe I can get a lua scripting engine working or something, if it isn't too difficult for some reason.

I hear DT is looking for a project manager, isn't it? I'd love to shut DGC down and tell everybody DT does it all now.

My secret personal fantasy is using a program like this to determine what a dwarf's political alignment would be via their personality, for something like tallying made-up votes of a "dwarven senate" for a self-imposed challenge game. I spent a while trying to devise a pen-and-paper calculation system for this but eventually gave up.

This is the sort of thing I could do, technically, but the question is the specs. You nominate dwarfs to the Senate, the script keeps their relevant traits around, and that Senate takes certain pre-defined sorts of votes? We players see ourselves as the will of the Republic, and limit our actions somehow?

maybe it's just a fluke, but all my dwarves are waaay happier than they normally are at this point in the game.

I've noticed this too! Thought 139, "Urist has been satisfied at work lately." I'd like to hear from more people on this. If it's true that matching dwarves to skills via attributes increases happiness, this sort of thing is more important than I thought, and I bothered to write a script about it!
Title: Re: Dwarven Guidance Counselor
Post by: RevolutionaryDorf on April 27, 2011, 04:36:49 pm
This is the sort of thing I could do, technically, but the question is the specs. You nominate dwarfs to the Senate, the script keeps their relevant traits around, and that Senate takes certain pre-defined sorts of votes? We players see ourselves as the will of the Republic, and limit our actions somehow?

Yes, you're mostly right. I figured that dwarf culture was work-centric, meaning that their governments would be designed around guilds (I called them "associations" in the plans I wrote up). The associations would lobby and compromise for the professions they represented in the legislature, attempting to gain them greater influence in the fortress economy.

Perhaps there are a lot of metalsmiths in your fortress. They would have a proportional number of association representatives in the senate that you would appoint based on their skill level, in this example, to the "Forges" association. During a session, they would propose a vote (that the player makes up) to do something like "expand the production of metal" or "increase the size of the forge workshop room". The rest of the senate, comprised of all the various association representatives would then vote on the proposal, using traits like "empathy" and "cooperation" to decide how they'd vote. Other factors like the linguistic ability of the dwarves proposing the legislation would affect the reaction of the senate. Measures that passed would be implemented by the player.

This sort of system makes logical role-playing sense, because the "government" as it is abstracted now is centrally planned. The associations act as a way to pretend that the central planning has some sort of democratic process behind it.

Political ideology votes would be separate from association votes. different personality trait levels would add or subtract "ideology" points. For example, Dwarves that admire tradition would gain "Conservative" points depending on how powerful their admiration is, and un-trusting dwarves would gain "authoritarian" points. The use of a calculation program would just make it easier to find out what the political alignment of each senator was, and then role-play the fortress in the way your "citizens" would actually have done it if they had free will.

Summary:
1. nominate dwarves to senate.
2. put their traits in the program. The program would tell their political alignment and how persuasive they are (all the
    senators' stats would be remembered and their names/data kept in a list that you could add or take away dwarves from)
3. when taking a vote, you input the ideology that is benefited by your made-up legislation, and who proposed it.
4. calculations are done to see how each representative votes, factoring in the persuasion of the proposing dwarf and
    deciding whether it passes or not.

Sorry if I wasn't clear, I'm exhausted right now.
Title: Re: Dwarven Guidance Counselor
Post by: Tryble on April 27, 2011, 04:40:22 pm
For example, a dwarf that likes steel would make a good weaponsmith or armorsmith, since he'll get a bonus on quality on anything he makes with steel.

Buh-wha?  Dwarves get quality bonuses on making things out of material they like?  If that's right, that is neat and I like it.
Title: Re: Dwarven Guidance Counselor
Post by: ral on April 27, 2011, 06:28:46 pm
I hear DT is looking for a project manager, isn't it? I'd love to shut DGC down and tell everybody DT does it all now.

Not sure... At the very least someone is keeping the memory mappings up to date with newer versions but I don't know of anyone adding new features. I've heard of some people working on a mac port though.

I wouldn't be a good project manager though because I haven't written any C++ in forever, and I've never done anything with Qt. I did download the code and got it building on my laptop, and I downloaded lua and got it building under the Qt IDE with qmake, but I haven't done anything beyond that yet.

If I do manage to add lua support to DT, I wouldn't want to implement DGC myself though. Basically I'd just implement something sort of like the current advanced search feature that lets you enter complex boolean expressions to find dwarves matching a certain criteria, except that you'd be able to write full scripts and not just search expressions.

Basically this would allow you to create DGC for DT as a lua "plugin" script. It could come standard with DT or not. And, anyone else who wanted to make some sort of fancy decision-making script could do so as well. Who knows what people might come up with.... Anyway, it seems within the DT vision statement of being a decision support tool.

(lua is very simple and somewhat similar to javascript)
Title: Re: Dwarven Guidance Counselor
Post by: knaveofstaves on April 27, 2011, 08:38:35 pm
Yes, you're mostly right. I figured that dwarf culture was work-centric, meaning that their governments would be designed around guilds (I called them "associations" in the plans I wrote up). The associations would lobby and compromise for the professions they represented in the legislature, attempting to gain them greater influence in the fortress economy.

I'm guessing you name them guilds now because you see that Toady has such things in the devlog? So we should put off planning this bit of metagaming until we know how they're implemented in-game? I mean, you can PM me all the details if you want, so I can get a full idea of the scope.

(lua is very simple and somewhat similar to javascript)

*googles lua* ...hunh. 15 years of Brazilian protectionist trade policies. Really! I don't know enough about how DT works to say how invested in this I'd get. I'll take a closer look at it, maybe PHP-Qt is something I could understand.
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: RevolutionaryDorf on April 27, 2011, 10:03:51 pm
I'm guessing you name them guilds now because you see that Toady has such things in the devlog? So we should put off planning this bit of metagaming until we know how they're implemented in-game? I mean, you can PM me all the details if you want, so I can get a full idea of the scope.

Agreed. Looking back on it, the paragraphs related to the associations/guilds were out of context ramblings. The real program I'm looking for is something that puts dwarves in political categories based on their personalities, for easier political style role-playing. My previous post made my idea look way more complex than it actually is. I'll PM you about how everything would fit together.
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: Pearlie on April 28, 2011, 06:34:28 am
I can't get the new version to work. I'm using the correct version of firefox and I patched runesmith, however the Dwarf List contains only three of my dwarves with their skills listed below each one as if they were dwarves.. Looking at my xml file and the one you included it seems that Runesmith is exporting all info despite only the 5 needed being ticked... I don't know what's wrong :/
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: knaveofstaves on April 28, 2011, 07:38:37 am
I can't get the new version to work. I'm using the correct version of firefox and I patched runesmith, however the Dwarf List contains only three of my dwarves with their skills listed below each one as if they were dwarves.. Looking at my xml file and the one you included it seems that Runesmith is exporting all info despite only the 5 needed being ticked... I don't know what's wrong :/

I've noticed that Runesmith exports more than you ask it to, but that shouldn't be a problem... it's true, though, I didn't thoroughly debug this. I was so happy to get it working on my own machine!

Did you keep the sample I provided? Do you recall whether it worked properly? Where were you in DF when you made the XML, and how many dwarves did you have?

I'll use More Embark Dwarves and see if I can break the script with huge files.

Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: phoenixuk on April 28, 2011, 08:19:13 am
Well this program has confirmed what i already suspected... my starting seven suck at everything except getting drunk and socialising...
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: Pearlie on April 28, 2011, 08:43:32 am
Your sample worked perfectly. My fortress has 40 dwarves, however it doesn't look like that's the issue, as I just tested and still had the same issue with a brand new fortress...

edit: I just retried and made the xml whilst on the embark screen instead of in game, and it worked perfectly.
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: knaveofstaves on April 28, 2011, 09:02:21 am
Your sample worked perfectly. My fortress has 40 dwarves, however it doesn't look like that's the issue, as I just tested and still had the same issue with a brand new fortress...

edit: I just retried and made the xml whilst on the embark screen instead of in game, and it worked perfectly.

...!

You're right! I've never tested it anywhere but from the embark screen!

I've got to say I'm a little embarrassed and a lot relieved. My script doesn't completely suck :)
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: Rez on April 28, 2011, 07:41:42 pm
bump for great justice!

This tool is awesome.
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: niku98 on April 28, 2011, 10:05:00 pm
There's a bug in the script, preventing the names of the dwarves from being picked up properly from Runesmith exports. The issue seems to be that Runesmith always includes a Skills dump even if you didn't request it, which includes a tag called "Name".

Hacky fix, but change line 105 to read this:

Code: [Select]
dwarfnames[i]=xmlDoc.getElementsByTagName("Creature")[i].getElementsByTagName("Name")[0].childNodes[0].nodeValue;
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: knaveofstaves on April 28, 2011, 10:44:12 pm
There's a bug in the script, preventing the names of the dwarves from being picked up properly from Runesmith exports. The issue seems to be that Runesmith always includes a Skills dump even if you didn't request it, which includes a tag called "Name".

Hacky fix, but change line 105 to read this:

Code: [Select]
dwarfnames[i]=xmlDoc.getElementsByTagName("Creature")[i].getElementsByTagName("Name")[0].childNodes[0].nodeValue;

Actual scriptfixes! Squee!

...right. When I generate the XML from embark, the dorfs don't HAVE any skills yet. So I wouldn't have noticed this.

And as you might have noticed, "hacky fix" is my default mode. So... thank you! I'll poke around at it.
Title: Re: Dwarven Guidance Counselor 0.0.3 27 Apr 2011
Post by: knaveofstaves on April 29, 2011, 01:04:28 am
OK, I recreated the bug working with XML generated while the game is running, and it was fixed with the script edit niku98 posted (http://www.bay12forums.com/smf/index.php?topic=83112.msg2230660#msg2230660). You also have to swap out line 183 to say this:

Code: [Select]
document.getElementById("dwarfname").value=xmlDoc.getElementsByTagName("Creature")[pick].getElementsByTagName("Name")[0].childNodes[0].nodeValue;

if you want the name display to work.

The next update will have this in it, if you prefer to wait. But I'm not updating until I figure out why IE isn't working, and that could take... a while.

UPDATE: Or, set line 183 to

Code: [Select]
document.getElementById("dwarfname").value=dwarfnames[pick];
See? I'm not that smart, but I'm learning.
Title: Re: Dwarven Guidance Counselor 0.0.4 29 Apr 2011
Post by: knaveofstaves on April 29, 2011, 11:43:57 am
Victory! IE submits!

And it only took a hackish wraparound of a proprietary, deprecated technology to get around a security feature that Microsoft claims shouldn't have stopped me in the first place.

MICROSOFT! Y U NO NOT SUCK!
Title: Re: Dwarven Guidance Counselor 0.0.4 29 Apr 2011
Post by: Pearlie on April 30, 2011, 06:34:38 am
Awesomeness :) Would you consider making it recognise nicknames so that new migrants can be easily identified?
Title: Re: Dwarven Guidance Counselor 0.0.4 29 Apr 2011
Post by: knaveofstaves on April 30, 2011, 07:15:47 am
Awesomeness :) Would you consider making it recognise nicknames so that new migrants can be easily identified?

So... if you click the Nickname button on the Runesmith XML export, and if that dwarf has a nickname...

Should it not display the normal name at all, just the nickname? Or both? Both is kind of a lot of text for that little dropdown...
Title: Re: Dwarven Guidance Counselor 0.0.4 29 Apr 2011
Post by: Pearlie on April 30, 2011, 07:55:30 am
I'd love it if it displayed just the nickname :)
Title: Re: Dwarven Guidance Counselor 0.0.5 03 May 2011
Post by: knaveofstaves on May 03, 2011, 02:23:52 am
The Find Best feature can suck down system resources pretty hard, especially if you have a lot of dorfs, your computer is old, or you're using IE. It hasn't crashed my browser, but I get spinny wheels for a while on my test of pop 224. My goal for 0.0.6 is a menu that lets you select dorfs for a "Find Best Among", and hopefully if I script it right that'll cut down on the resource use.

Nicknames are in, too.
Title: Re: Dwarven Guidance Counselor 0.0.5 03 May 2011
Post by: Freddybear on May 04, 2011, 08:52:22 pm
This is great! Out of the seven starting dwarfs, I got three "good" job matches, two "above average", and two who weren't good for much of anything.  :)
Title: Re: Dwarven Guidance Counselor 0.0.5 03 May 2011
Post by: knaveofstaves on May 05, 2011, 01:09:46 am
This is great! Out of the seven starting dwarfs, I got three "good" job matches, two "above average", and two who weren't good for much of anything.  :)

Thanks, glad you like it!

If you have to take a below average, take it in manager/broker if you can. Or just reroll until you find a group you like. I've been scumming off the same Day 1 save for my past few forts, with a starting seven in the 93rd percentile for attr points. I've already scripted that in for 0.0.6, you'll know in the aggregate how good your numbers are. Of course the points might be all in Musicality or something useless like that, it won't be that smart.
Title: Re: Dwarven Guidance Counselor 0.0.5 03 May 2011
Post by: Girlinhat on May 05, 2011, 01:28:35 am
Can this be used to read and sort likes and preferences?  I want to find that one guy who likes slade in my fortress, and kill him, then take the one who likes gold and make him a metalsmith.
Title: Re: Dwarven Guidance Counselor 0.0.5 03 May 2011
Post by: knaveofstaves on May 05, 2011, 01:45:51 am
Can this be used to read and sort likes and preferences?  I want to find that one guy who likes slade in my fortress, and kill him, then take the one who likes gold and make him a metalsmith.

Sorry, I only know what Runesmith tells me, and it doesn't export preferences. :(
Title: Re: Dwarven Guidance Counselor 0.0.5 03 May 2011
Post by: Jeoshua on May 05, 2011, 09:31:31 pm
This is a great little program, but I still look forward to a day in which this can be done as a standalone program that will grab the information out of DF on it's own, rather than through other utilities.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Antalia on May 13, 2011, 04:50:27 am
This utility is so awesome! Thanks and great job! It's helped so much with organizing my labor, and made that task a lot more fun.

I really like the change in the 0.0.6 update where I can select a subset of dwarves. That sure sped things up! But, I do think that it would be really great if I could see my dwarves' migration wave number in the selection box, like Dwarf Therapist has. Alternatively, visibility to their military squad number would help, too. I think these pieces of data aren't here because they're not in the Runesmith export file? (I had a look at it and didn't see them.)

Right now I use Guidance Counselor with a little help from a spreadsheet to track labor, and Dwarf Therapist to assign things. (And Runesmith just for its export power.) I dream of all of this getting merged somehow :)
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: knaveofstaves on May 13, 2011, 01:37:35 pm
Thanks Antalia, glad you like it.

The Migration Wave thing is a bit of a hack on DT's part, in KNOWN_ISSUES.txt they call it "shady guesswork". Not that I mind, if I had the information for a shady guess I'd do it too. I only mean to say that there's no one number anybody can rely on directly for this information. DGC (and the Runesmith XML underneath it) naturally sort by arrival time, which is something, I guess.

You're basically right on the problem, if Runesmith's XML doesn't know it, I don't know it. We could go over to the Runesmith thread and demand with furious entitlement very politely request that the XML export function include more information, such as dwarf ID, preferences, or squad info. Once we have a full list of what we really want, so he only has to change the thing once. And I only have to rewrite DGC once to incorporate it. ;)

For now, maybe use the nickname system to label your dwarves by squad? It's not a great option but it's there.

The whole great merger idea sounds good to me, too. Like I've said before, eventually a real application will do labor evaluation and this stopgap of a script can be retired. Out of curiosity, what sort of information do you keep on your labor spreadsheet?
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: wlerin on May 23, 2011, 08:28:01 pm
For some reason Runesmith doesn't pay any heed to which options I check while exporting, and gives me a file with *everything*.

Unfortunately, since each skill has it's own <Name> tag, this causes my list of dwarves to be populated mostly with things like "Butchery" and "Miller" and "Sandwicher". Er... well, not sandwicher, but you get the point. I'd suggest replacing this:

*snip*

with this:

*snip*

There may be a better way to do it, I'm not a coder. Still, I can verify that this will work. There are several of these that need to be changed.


edit: Nevermind, the newest version already implements this change.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: SerpentStare on July 02, 2011, 10:55:29 pm
This is a very cool tool. I'm trying it on my embarkers.

But I have a question. I will quite happily admit to being a non-coder and probably only a Novice Dwarf Fortress player. I don't use any other programs with the dwarf fortress client like runecrafter or anything, so I'm inputting values by hand - which is easy, if a bit menial - I'm not complaining.

Here's my question/request. Is there any way to "save current dwarf" to a list, and start on a new one without resetting the form and losing the first dwarf's information (while inputting details by hand from Thoughts and Preferences)? If not, I think it would be very helpful if there was. Then you could use the "best among" features even entering details by hand, or at the very least, click back and forth to see which of several dwarves who would make a decent "X profession" would make the -best- one, or which were roughly equally suited to other tasks.

Also, if this is implemented, would it be possible to save your current dwarf list as a file of some kind which could then be reloaded to look it over again and add to it when your next immigrant wave arrives?

If so, then yay! This program alone could make a fine stand-alone way to organize your dwarves' talents and labours, using manual entry only, which would rock.

Also, if I'm missing something obvious, please let me know. ^^

SS
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: gimlet on July 04, 2011, 04:17:29 pm
DGC is really handy, I'm using it a lot - thanks!!

My few minor feature suggestions:
1) Please somewhere put the count of dwarves loaded from the dwarves.xml file.  That way I can easily compare to Dwarf Therapist to check if I need to do a Runesmith/reload step to get current.
2) It would be really cool to have a "check for misfits" button/list - that would look through dwarves and their current assignments and put up a page/list of ill-suited assignments (and ideally reasons and factor weight) ie "Ulrist McWimpy - Assigned Close Combat Military but Horrible Strength (-20), Horrible Recovery(-40)" "Axel McHouse - Assigned Doctor but Hates to Help People(-50)" etc.
3) It would be cool to see a list of factors for/against the profession ratings too ("in-depth counseling" heh).  It would help me learn the factors, and also help spot any bugs.
4) Yea, some indication of the wave number would be SUPER especially with a way to quickly select a specific wave as a subset, so I can look at just the latest arrivals.  In parenthesis after the name maybe?  And/or "sort list by wave number" "sort list by name   " so I could range select the end of the list easily?
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on July 05, 2011, 11:20:51 am
My few minor feature suggestions:[...]

1, 2 and 3 seem possible. I'm looking at the Runesmith export file and I don't see a wave number. So until Runesmith exports wave number (or there's a better export utility) then it probably can't be added to DGC.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Itnetlolor on July 05, 2011, 02:08:24 pm
Haven't tried it yet, but looking at the concept of this and my experience with using DwarfTherapist gives me the idea that you should find a way to be able to get this working simultaneously with DT, or at least work with them to find a way to integrate it with the program (like a secondary background/foreground color/pattern/highlight (or symbol/number color/highlight) to signify some of these other suggestions; job is best/worst suited for them, neutrals are ignored (no highlight, DT background, no formatting change to the cell)). Not only do you see their current skill in the field like DT shows, and the highlight of the job they're assigned, but another overlay of if they're suited for the task and etc..

It can really streamline things even further. And I would agree about trying to get it to work with DFHack to get more in-depth with the data and accuracy (with a set update rate from realitime, to every 10 seconds or something, or at least have a refresh option readily available), and minimize effort of assigning tasks based on stats/specs. Heck, it can work well as a separate option/tab for DT to use if it can get integrated. Just ask to be credited for your feature. I definitely will whenever I get around to working on a megaproject again.

EDIT:
Trying it out for a bit, I also want this (if integrated with DT sometime) to have an (auto-)override ability for any/all jobs best suited for the dwarf (if selected; multiple even). Essentially, it would take what jobs the dorf(s) in question already have assigned, and replace them with what they're better/best suited for; of course, with a confirmation required by the player if they're okay with it. Can get really helpful for larger forts, but on the other hand, can make for some really lazy DF players (IE- those willing to select all, and auto-assign; I know you're out there, admit it). I guess the color scheme can use a light orange for below-average, and a yellow-green for above average or something when highlighted. But yeah, DT's grid, with this summarized to fit that format would work beautifully, with the options to use this as a separate window if need be later on for the same detailed info as it shows already.

Furthermore testing it, I can see how it can be integrated with DT. Just use a similar setup, but reformed to fit DT's model. Same thing, highlights, format overrides/overlays and all that, but only if you're actively seeking out dwarves best suited. It really helps in case you have really skilled dwarves (as DT would display) even if they're not suited to it immediately. Wouldn't want to make that legendary ambusher/swordsdwarf a doctor now, would we? Unless you want to have Dr. Urist McNinja on your team.

On the other hand... ^_^

I can see it now, the fort's up ablaze, and he's running around on fire. You ask why? "Because nobody can catch you while you're on fire."
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on August 06, 2011, 05:36:10 am
A few months ago I forked DGC and made some changes to it. This was more of a personal convenience than anything else. Out of boredom I added a few more things, then rewrote most of the interface. Even had a look at making a patch for DT, however my C++ skills are meager so I didn't get far.

knaveofstaves seemed enthusiastic and said he'd test it on his next fortresses, however never got back when I replied to him. I didn't want to be in charge of this project as my interests are fickle. This is why I waited so long before posting on here.

I'm not planning on developing it much further, though I'll fix minor bugs people point out. In a few months I may (or may not) work on it some more, but it would be in the form of an application using DF Hack. (C++ gives me headaches)

The current version was tested with Firefox 5 only and XML files.

Old updated version: https://github.com/AnnanFay/DGC/
Most recent version: https://github.com/AnnanFay/DGC/tree/jui

Hope some people find any changes I made useful! :)
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AaronLS on August 28, 2011, 07:07:50 pm
Knave, I found a bug in the calculation of MASON ARMORSMITH METAL CRAFTER METALSMITH WEAPONSMITH GLASSMAKER LEATHERWORKER skills.

They should be calculated based on SAECSsKs, but you are using this:
skillcomp=strbest()+agibest()+endrbest()+willbest()+spabest()+kinbest();

So you see you should swap the willbest with crebest.  This is on line 669 of DGC.html
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AaronLS on August 28, 2011, 07:25:24 pm
Hope some people find any changes I made useful! :)

I like the way I can click through the names and skills in the report.  Very cool Annan.
Title: Spelling Mistake?
Post by: SerpentStare on September 18, 2011, 12:10:24 am
Hi, guys.

I think I've just encountered a slight bug in Dwarven Guidance Counselor's manual input system.

It refuses entirely to recognize the "is entirely averse to risk and excitement" tag, the most extremely low level of the Excitement_Seeking trait. This could be due to a spelling mistake in the system - I double-checked my own spelling, and then checked it against the entry on the magmawiki, so I'm pretty sure it's not my own error.

Just a notice, someone should probably fix this.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Bifidus on October 15, 2011, 07:16:23 am
Hope some people find any changes I made useful! :)
Thank you, i use it a lot.

Now, for minor annoyances :

- specials characters don't appear, and are replaced with weirds symbols. Make it hard to find a dwarf whose name start with one, when you have hundred.
- in the left column, long names make the number appear on the dwarf below.
- you have to select a competence before trying to find the best dwarf in that competence, else, it only display the current dwarf.

I hope you're still playing DF ^^
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: LittleJP on October 31, 2011, 09:51:12 pm
Not sure how to run this from Chrome.
EDIT: Got it to run the switch, but it isn't loading from the XML.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: nomad_delta on February 08, 2012, 01:13:02 pm
Just saw in the change log for dfhack that they've added a new "dwarfexport" command to spit out RuneSmith compatible XML files for quick loading into Dwarven Guidance Counselor.

Does anyone else still use DGC?  I use it constantly, but I haven't seen any updates 'round here in a long long time.  I'm guessing AnnanFay is no longer around or working on it?

If you *are* still around, big thanks for making DGC, even if you're not able to continue updating it -- it significantly improves my DF experience.  :)

--nomad_delta
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Muffindog on February 08, 2012, 05:52:50 pm
This is absolutely awesome and incredibly useful! Thank you for this little utility, it helped me quite a bit.

Although I have one question. After the evaluation of one dwarf, the counselor says "Excellent!" When does it say that? Because I've got this...
Spoiler (click to show/hide)

He's worst of the starting 7 and can't do any job right. What's so excellent about it? :P
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Yaotzin on February 08, 2012, 06:58:27 pm
That's part of the "his breaks will be short" section. It means he's not a lazy bugger like most dwarves, which is excellent!
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on February 08, 2012, 07:58:14 pm
Just saw in the change log for dfhack that they've added a new "dwarfexport" command to spit out RuneSmith compatible XML files for quick loading into Dwarven Guidance Counselor.

Does anyone else still use DGC?  I use it constantly, but I haven't seen any updates 'round here in a long long time.  I'm guessing AnnanFay is no longer around or working on it?

If you *are* still around, big thanks for making DGC, even if you're not able to continue updating it -- it significantly improves my DF experience.  :)

I stopped working on DGC for a long while though recently I have started developing it again. I'm currently reprogramming it to be a dfhack module with GUI (though I didn't know about dwarfexport). I'm not fond of C++ so I am writing it in a mix or Clojure and Java, both of which I am relatively new to. It will be about 1-2 months before I release a new version.

Not sure if knaveofstaves is working on DGC in any way.

Glad people still use this utility! :)
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: nomad_delta on February 08, 2012, 08:32:47 pm
I stopped working on DGC for a long while though recently I have started developing it again. I'm currently reprogramming it to be a dfhack module with GUI (though I didn't know about dwarfexport). I'm not fond of C++ so I am writing it in a mix or Clojure and Java, both of which I am relatively new to. It will be about 1-2 months before I release a new version.

oh wow, new DGC as a dfhack module with a GUI?  That sounds rad, good luck on learning Clojure/Java along the way.

--nomad_delta
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: orius on February 09, 2012, 01:26:06 am
Just saw in the change log for dfhack that they've added a new "dwarfexport" command to spit out RuneSmith compatible XML files for quick loading into Dwarven Guidance Counselor.

Does anyone else still use DGC?  I use it constantly, but I haven't seen any updates 'round here in a long long time.  I'm guessing AnnanFay is no longer around or working on it?

It's pretty useful for analyzing dwarves.  I use it when I get crap like potash makers or just plain peasants as immigrants so I can see where they'll be of better use to my fort.  I've also used it when kids reach adulthood.

I tried the new command line in DFHack, but something didn't work right and it didn't load properly.  I'm going to take a look at it again.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on February 09, 2012, 05:39:06 am
Just thought i'd give this a try, and when using the latest dfhack to export i noticed that the original DGC works fine but your "jui" version AnnanFay doesn't work with it? unless i'm doing something wrong, it just won't read in any XML file. And what is the DGC-spread.html file for? it doesn't seem todo anything just gives me a blank screen.

Seems odd that i'd get immigrants with say 10 in weaving and the DGC says they'd make a poor weaver ;p i guess he really just likes weaving!
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on February 09, 2012, 10:41:59 am
Just thought i'd give this a try, and when using the latest dfhack to export i noticed that the original DGC works fine but your "jui" version AnnanFay doesn't work with it? unless i'm doing something wrong, it just won't read in any XML file.

If you email/message me the XML file your using or post an issue of github I will have a look into it. I assume your using Firefox since that's the only browser the old-new jui version supports. (annanfay gmail com)

Quote
And what is the DGC-spread.html file for? it doesn't seem todo anything just gives me a blank screen.

I got annoyed at only seeing a single profession or single dwarf so created a large table where you can see a large overview. It was checking for the xml file in the wrong place, which should be fixed now. (Screen (http://www.imageupload.co.uk/files/6tlj3q0tfbygqvei1ppd.png))

Quote
Seems odd that i'd get immigrants with say 10 in weaving and the DGC says they'd make a poor weaver ;p i guess he really just likes weaving!

Yeah, I think skills are assigned randomly independent of attributes. Though someone should do some !SCIENCE! :D
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on February 10, 2012, 04:18:17 am
Maybe i got the wrong files originally...i clicked the download button on github and it downloaded AnnanFay-dgc-2b601a0 even though i started from the jui tree. So i had to copy pasta the link it would have downloaded, and then replaced master with jui and now i have the correct files using AnnanFay-dgc-cce541a...

I don't use FF, but downloaded the latest FF(10) portable but still issues though, it sees my xml file, but i guess refuses to read it in as i get no dwarves displayed down the left in the browser window. Maybe some config setting i need to change? although i saw nothing obvious. I'll email you a screenshot and my XML anyways and a copy of this post.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on February 11, 2012, 10:41:13 am
Maybe i got the wrong files originally...i clicked the download button on github and it downloaded AnnanFay-dgc-2b601a0 even though i started from the jui tree. So i had to copy pasta the link it would have downloaded, and then replaced master with jui and now i have the correct files using AnnanFay-dgc-cce541a...

I don't use FF, but downloaded the latest FF(10) portable but still issues though, it sees my xml file, but i guess refuses to read it in as i get no dwarves displayed down the left in the browser window. Maybe some config setting i need to change? although i saw nothing obvious. I'll email you a screenshot and my XML anyways and a copy of this post.

Thanks for sending me the files :) I had a look at them and figured out the problem. Unfortunately there's not much I can do about it :(

TL;DR : dwarfexport exports aren't compatible with Runesmith exports.

Runesmith only writes out the textual descriptions of traits that are not average, dwarf export writes out all traits with the average ones having no description. This means the exported file is better as it gives more information about traits, however it means it's not compatible with the Runesmith export. dwarfexport also doesn't export the skills and doesn't use UTF-8, though I'm not sure if the encoding would cause a problem.

I could change DGC so that it can use files from Runesmith and dwarfexport. However as it would remove some of the functionality and I am already working on a new version I will leave it as it is.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Feb on February 12, 2012, 02:09:38 pm
*eagerly awaits new release of DF along with new version of DGC*
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on February 19, 2012, 11:15:52 am
Just to say i tried that Runesmith tool for export and it works like a charm, looks like a v handy tool so i'll give it a shot on my next fort. Thanks to the original author and AnnanFay for their excellent work.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on March 03, 2012, 04:03:02 am
Not sure if i found an issue here, but i noticed one of my dwarfs has a much higher Pacifier value that anyone else. So i took a look at her in DGC and it says:

Because of personality problems She cannot be a:

    [deek] Liar
    [deek] Leader/manager
    (2 Consoling 6 Pacification)

Her unassertive nature won't allow her to attempt Persuasion.

She cannot be relied on to Pacify others.

She is too straightforward to Lie or Flatter.


I checked an earlier save(only around a few months of gametime earlier) which i had laying around with this being my 1st big fortress and i was experimenting. And it was lower so it's not like she came to my fort with it being high. She was a 5th wave migrant so has been around a few years.
So, is something wrong with DGC calc's, or maybe just because she had a slightly higher pacify value than other dwarfs that they went to see her, which then slowly kept increasing her's above others and so the same cycle repeats?

PS And what does [deek] mean anyways?
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on March 05, 2012, 08:30:35 pm
Not sure if i found an issue here, but i noticed one of my dwarfs has a much higher Pacifier value that anyone else. So i took a look at her in DGC and it says:

Because of personality problems She cannot be a:

    [deek] Liar
    [deek] Leader/manager
    (2 Consoling 6 Pacification)

Her unassertive nature won't allow her to attempt Persuasion.

She cannot be relied on to Pacify others.

She is too straightforward to Lie or Flatter.


I checked an earlier save(only around a few months of gametime earlier) which i had laying around with this being my 1st big fortress and i was experimenting. And it was lower so it's not like she came to my fort with it being high. She was a 5th wave migrant so has been around a few years.
So, is something wrong with DGC calc's, or maybe just because she had a slightly higher pacify value than other dwarfs that they went to see her, which then slowly kept increasing her's above others and so the same cycle repeats?

PS And what does [deek] mean anyways?

Deek is the term used to mean the person is unable to gain skill levels for skills that are part of the profession. This happens when traits are too high or low. I'm not sure why "deek" was chosen, it was already being used in the code and I just kept using it.

If you send me the export file that you are using I can have a look?

The wiki (http://dwarffortresswiki.org/index.php/v0.31:Personality_trait) says to gain pacifier skills you need 40 or greater cooperation. So either DGC thinks there is less than there really is, or the wiki is wrong. Probably a bug in DGC :P
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on March 06, 2012, 02:53:46 am
File sent :)
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Vattic on March 06, 2012, 03:47:30 am
Thank you for this tool. It's been really handy in the past.

I do have one request / suggestion and figure someone likely suggested it before. It would be nice if we could tell it we want x number of dwarves and what jobs we want each dwarf to do and have it tell us which set of dwarves fill the roles least worst.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on March 06, 2012, 10:58:10 am
File sent :)

Thanks :) I narrowed down the problem, the export says she "Doesn't like to compromise with others". The wiki says this means she is between 25 and 39 cooperation. The wiki also says that if she's below 40 she can't gain pacifier levels.

If you look at her in game description to see if it says "Doesn't like to compromise with others"?

If it says that then the wiki is wrong, otherwise runesmith is exporting incorrect data.

Thank you for this tool. It's been really handy in the past.

I do have one request / suggestion and figure someone likely suggested it before. It would be nice if we could tell it we want x number of dwarves and what jobs we want each dwarf to do and have it tell us which set of dwarves fill the roles least worst.

This is a good idea! I've been thinking about it while working on the current version though I'm still unsure how to add it to the interface. Maybe I'll post a screenshot later to see if anyone has any ideas.

Also, given a list of professions and dwarfs, what is the best way to deal the dwarves?

Example:

Code: [Select]
Profs  a b c
Urist1 4 0 7
Urist2 2 1 8
Urist3 4 3 5
Urist4 1 6 5
Urist5 8 7 6
Urist6 6 2 6

Lets say you want 2a 3b 1c. What happens to Urist5 as he is the best at professions a and b.

One possibility is having the profs choose the best dwarf and rotate profs.
a <- Urist5
b <- Urist4
c <- Urist2
a <- Urist6
b <- Urist3
c <- n/a - filled
a <- Urist1
b <- n/a - filled
c <- n/a - filled

However this means the profs that choose first get the better dwarves. A bit like choosing players in a field game.

Another possibility is sorting the dwarves by their highest aptitude then placing dwarves into profs by that order.

Code: [Select]
Profs  a b c
Urist5 8 7 6
Urist2 2 1 8
Urist1 4 0 7
Urist4 1 6 5
Urist6 6 2 6
Urist3 4 3 5

Urist5 -> a
Urist2 -> c
Urist1 -> a
Urist4 -> b
Urist6 -> b
Urist3 -> b

Which is definitely sub optimal... Any ideas?
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on March 06, 2012, 12:10:16 pm
Thanks :) I narrowed down the problem, the export says she "Doesn't like to compromise with others". The wiki says this means she is between 25 and 39 cooperation. The wiki also says that if she's below 40 she can't gain pacifier levels.

If you look at her in game description to see if it says "Doesn't like to compromise with others"?

If it says that then the wiki is wrong, otherwise runesmith is exporting incorrect data.

Here is a dump of what you need i think:
(http://www.zenadsl5706.zen.co.uk/DF/BlacksmithTsnPs.png)

Inside here are dumps from DT and Runesmith about what it says they have set. And to me, it looks as though what DT says and what Runesmith says for Trait's don't match? The DT readout seems more inline with the TnPs ingame above?
Spoiler (click to show/hide)
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on March 06, 2012, 05:50:30 pm
Here is a dump of what you need i think:
Spoiler (click to show/hide)

Inside here are dumps from DT and Runesmith about what it says they have set. And to me, it looks as though what DT says and what Runesmith says for Trait's don't match? The DT readout seems more inline with the TnPs ingame above?
Spoiler (click to show/hide)

Yeah, looks like Runesmith has a bug in it if it! DT seems to detect the correct traits like you say. This is slightly worrisome because it means most of the time DGC uses traits may be incorrect.

This won't be a problem once I've integrated it into dfhack. Though you should report it on the Runesmith thread (http://www.bay12forums.com/smf/index.php?topic=59056.0) if you haven't already.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on March 07, 2012, 01:02:16 am
Yes worrisome indeed, if the source data is incorrect then DGCs findings could also be skewed.

Have posted in the RS thread.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Vattic on March 07, 2012, 02:42:47 am
Thank you for this tool. It's been really handy in the past.

I do have one request / suggestion and figure someone likely suggested it before. It would be nice if we could tell it we want x number of dwarves and what jobs we want each dwarf to do and have it tell us which set of dwarves fill the roles least worst.

This is a good idea! I've been thinking about it while working on the current version though I'm still unsure how to add it to the interface. Maybe I'll post a screenshot later to see if anyone has any ideas.

Also, given a list of professions and dwarfs, what is the best way to deal the dwarves?

-snip-

Any ideas?
It could try every possible arrangement of jobs, rank each arrangement, and give you the highest scoring arrangement. It could rank each individual dwarf in each arrangement by how well he fits the jobs allocated and the overall arrangement rank could just be all the individual ranks added together. This is kind of a brute method and wouldn't be ideal for large numbers of dwarves but for the starting seven it should be fine. I'd imagine someone could come up with a better method, though.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: thistleknot on March 07, 2012, 11:32:01 am
By the way chrisadams3997 on the Dwarf therapist thread http://www.bay12forums.com/smf/index.php?topic=66525.1320 has intentions of intetgrating DGC features into Dwarf Therapist.  One could in theory open up the DGC.html and just copy the formulas down (there simply averages of the basic stats that make up that profession) and create filter scripts in Dwarf Therapist.  The only issue is you have to set a threshold of what you want to view.  It might not be possible to create a new data column based on the average.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: thistleknot on March 07, 2012, 12:31:49 pm
Two questions:

I intend on porting the formulas for dgc to dwarf therapist.  Was wondering where knaveofstaves got his attributes to base his job filters on from?  (Wiki locations?)

2nd:
Should weights be applied to certain attributes vs just a straight average.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on March 07, 2012, 01:40:37 pm
By the way chrisadams3997 on the Dwarf therapist thread http://www.bay12forums.com/smf/index.php?topic=66525.1320 has intentions of intetgrating DGC features into Dwarf Therapist.  One could in theory open up the DGC.html and just copy the formulas down (there simply averages of the basic stats that make up that profession) and create filter scripts in Dwarf Therapist.  The only issue is you have to set a threshold of what you want to view.  It might not be possible to create a new data column based on the average.

Hopefully he's talked with AnnanFay about this, seeing as she(?) has already put in a lot of work on the new version.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: thistleknot on March 09, 2012, 09:48:49 am
I keep reading about "runesmith".  Well dfhack's dwarfexport does the same thing and exports more information.

Update:
I just downloaded each file individually for AnnanFay's DGC, but I didn't see a single .zip

Also...
I imported a Dwarves.xml from the old DGC (the default one) and I couldn't get it to read any dwarves in your new version.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: Intrinsic on March 09, 2012, 11:44:23 am
The download button is outdated on the github page, you have to click the Zip one at the top for this link: https://github.com/AnnanFay/dgc/zipball/jui

And the previous page here contains the info issues i found and comments from AnnanFay starting from here:
http://www.bay12forums.com/smf/index.php?topic=83112.msg2975725#msg2975725

It only works in firefox too. So i just downloaded the portableapps version of FF and used DGC with that.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: thistleknot on March 09, 2012, 07:57:56 pm
A few months ago I forked DGC and made some changes to it. This was more of a personal convenience than anything else. Out of boredom I added a few more things, then rewrote most of the interface. Even had a look at making a patch for DT, however my C++ skills are meager so I didn't get far.

knaveofstaves seemed enthusiastic and said he'd test it on his next fortresses, however never got back when I replied to him. I didn't want to be in charge of this project as my interests are fickle. This is why I waited so long before posting on here.

I'm not planning on developing it much further, though I'll fix minor bugs people point out. In a few months I may (or may not) work on it some more, but it would be in the form of an application using DF Hack. (C++ gives me headaches)

The current version was tested with Firefox 5 only and XML files.

Old updated version: https://github.com/AnnanFay/DGC/
Most recent version: https://github.com/AnnanFay/DGC/tree/jui

Hope some people find any changes I made useful! :)

I was looking at DGC, old, updated by AnnanFay and the default dwarf values look correct except for the 1500 for focus, and the other 1500.  I was doing calculations today, and those caught my eye.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: thistleknot on March 09, 2012, 10:48:03 pm
I took a sample of 294 dwarves, and found their min/max values.

I updated the wiki (hopefully they don't pull it).

http://dwarffortresswiki.org/index.php/DF2012:Attribute#Sample_of_294_Dwarves_with_Min.2FAvg.2FMax_Values

Min value for dwarves is 146 (Agility)
Highest value is 2537 (Musicality)

Dwarves have higher than reported center for musicality and memory

They have a few stat's that are higher than the center's reported on attributes wiki.  I marked them after their name with either a < or a >.  Agility was pretty much right on.

I did discover that their is a bell curve to these values (possibly skewed, but I need a bigger sample), which is good to know.

I made this formula for close combat dwarf based on the new averages I found.  It also uses additional attributes, subtracts the average from the attribute, and then apply a weight.  The weight can be easily removed.  The 110 is 10% of the average of all averages (factored (.98) down from 113-115)

Spoiler (click to show/hide)
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: yew on May 05, 2012, 04:37:15 am
It could try every possible arrangement of jobs, rank each arrangement, and give you the highest scoring arrangement. It could rank each individual dwarf in each arrangement by how well he fits the jobs allocated and the overall arrangement rank could just be all the individual ranks added together. This is kind of a brute method and wouldn't be ideal for large numbers of dwarves but for the starting seven it should be fine. I'd imagine someone could come up with a better method, though.

I have written a small python script which finds one arrangement with max sum.  It turns out that this is a Mixed Integer Linear Programming (MILP) problem, and open source softwares are freely available for solving this type of problems quickly.  I used OpenOpt and GLPK.

For people working on integrating DGC into Dwarf Therapist, AFAIK, packages for solving MILP is available for Lua too.


Thank you for this tool. It's been really handy in the past.

I do have one request / suggestion and figure someone likely suggested it before. It would be nice if we could tell it we want x number of dwarves and what jobs we want each dwarf to do and have it tell us which set of dwarves fill the roles least worst.

This is a good idea! I've been thinking about it while working on the current version though I'm still unsure how to add it to the interface. Maybe I'll post a screenshot later to see if anyone has any ideas.

Also, given a list of professions and dwarfs, what is the best way to deal the dwarves?

-snip-

Any ideas?
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: TerryDactyl on May 18, 2012, 01:39:59 pm
I recently patched DGC to color-code attributes based on how far above or below average they land. And then I found out about splinterz' work on Therapist. *sigh*
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: AnnanFay on May 22, 2012, 01:39:59 pm
Update: So people don't wonder if DGC is a dead project.

I'm currently revising for exams, hence why I haven't managed to get the DFHack version finished. Good news though is that I managed to get the RPC working (a month ago :P), just need to add the DFHack side of things and integrate it.
Title: Re: Dwarven Guidance Counselor 0.0.6 11 May 2011
Post by: TerryDactyl on May 22, 2012, 07:26:38 pm
Pipe up on the DTherapist and DFHack threads ... before I make a further ass of myself.  ::)