Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 7

Author Topic: Dwarven Guidance Counselor 0.0.6 11 May 2011  (Read 49635 times)

knaveofstaves

  • Bay Watcher
  • Likes bogeymen for their terror-inspiring antics.
    • View Profile
Dwarven Guidance Counselor 0.0.6 11 May 2011
« on: April 23, 2011, 09:22:11 am »

Dwarven Guidance Counselor 0.0.6

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 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)
« Last Edit: May 11, 2011, 03:19:27 am by knaveofstaves »
Logged
Dwarven Guidance Counselor, my little scripting project.

FearfulJesuit

  • Bay Watcher
  • True neoliberalism has never been tried
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #1 on: April 23, 2011, 09:26:53 am »

This looks really cool, so I'll alpha-test. Downloading now!
Logged


@Footjob, you can microwave most grains I've tried pretty easily through the microwave, even if they aren't packaged for it.

Argonnek

  • Bay Watcher
  • Surging Forward
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #2 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.

Syrup Roast

  • Bay Watcher
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #3 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.
Logged
My answer to just about everything is magma. In fact, most threads end up with me running in screaming it 

cbgbluethundr

  • Escaped Lunatic
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #4 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.
Logged

JmzLost

  • Bay Watcher
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #5 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
Logged
Also, obviously, magma avalanches and tsunamis weren't exactly a contingency covered in the mission briefing.
I can assure you that Ardentdikes is not the first fortress to be flooded with magma. What's unusual is that we actually meant to flood it with magma.

knaveofstaves

  • Bay Watcher
  • Likes bogeymen for their terror-inspiring antics.
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #6 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.
Logged
Dwarven Guidance Counselor, my little scripting project.

JmzLost

  • Bay Watcher
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #7 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
Logged
Also, obviously, magma avalanches and tsunamis weren't exactly a contingency covered in the mission briefing.
I can assure you that Ardentdikes is not the first fortress to be flooded with magma. What's unusual is that we actually meant to flood it with magma.

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #8 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?
« Last Edit: April 24, 2011, 08:32:14 am by Reelyanoob »
Logged

knaveofstaves

  • Bay Watcher
  • Likes bogeymen for their terror-inspiring antics.
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #9 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.
Logged
Dwarven Guidance Counselor, my little scripting project.

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #10 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.
« Last Edit: April 25, 2011, 12:17:32 am by Reelyanoob »
Logged

knaveofstaves

  • Bay Watcher
  • Likes bogeymen for their terror-inspiring antics.
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #11 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.
Logged
Dwarven Guidance Counselor, my little scripting project.

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #12 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.
Logged

Pearlie

  • Escaped Lunatic
    • View Profile
Re: Dwarven Guidance Counselor
« Reply #13 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.
Logged

cdrcjsn

  • Bay Watcher
  • My name is Cedric
    • View Profile
    • Familiar Ground, fantasy comedy from a familiar point of view.
Re: Dwarven Guidance Counselor
« Reply #14 on: April 26, 2011, 12:16:25 am »

I wonder if there's a way for their item preferences 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).
Logged
Check out my comic!
http://www.familiar-ground.com
Fantasy Comedy.  Familiar Point of View.
Pages: [1] 2 3 ... 7