Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Extract game info?  (Read 1056 times)

Brian

  • Bay Watcher
    • View Profile
Extract game info?
« on: July 04, 2008, 10:40:01 am »

I started my latest fortress with a reclaim operation.  It was my first time doing one and I didn't realize I'd start with a large military operation, where each dwarf had a slew of skills enabled.

It's a year in now and I'd like to specialize my dwarves.  I have an issue figuring out who is the best at any given thing, and how to split up the jobs.  For example just because one dwarf is a wood cutter, it doesn't mean they don't happen to be my best carpenter too, in which case I'd want to change them to carpentry. 

Is there any way to extract a spreadsheet of information on my dwarves and their skills?

Side question: Since I started with a reclaim, is there any possible way to get a dwarf with appraisal skills?
Logged

pushy

  • Bay Watcher
  • [MEANDERER]
    • View Profile
Re: Extract game info?
« Reply #1 on: July 04, 2008, 11:02:49 am »

There's no way to get what you're wanting...and to be perfectly honest there's not really THAT much point in it for the most part anyway. I've got legendary miners/dabbling masons who are churning out obsidian blocks for a paved road while a novice mason/dabbling cook is busy in the kitchen. Training up a skill isn't that difficult, even if the dwarf has absolutely no previous experience of it. I frequently just assign immigrants to whatever roles I need filled - lye makers become woodcutters, soap makers become glassmakers, peasants become mechanics...having a bit of skill to begin with helps, but it doesn't make that much of a difference in the end.


As for appraisal, someone's skill in that will shoot up the second you begin trading with merchants. If that dwarf isn't already your broker (i.e. you set it that anyone could trade, perhaps because the designated broker was asleep or otherwise preoccupied) then s/he will appear at the top of the list if you wish to change the broker in the nobles screen :)
Logged
Quote from: Tim Edwards, PC Gamer UK
There are three things I know about dwarves:
1. They've got beards. Even the women.
2. They're short. Especially the women.
3. They're Scottish.

LASD

  • Bay Watcher
    • View Profile
Re: Extract game info?
« Reply #2 on: July 04, 2008, 11:04:18 am »

To the first question I think the answer is no on normal DF. The only way to do something similar to that is with an utility called Dwarf Foreman. I haven't used it, so I don't know much about it, but here's a link to it, if you decide to use it. http://dwarf.lendemaindeveille.com/index.php/Utilities

On the second question I have a definitive answer. Open the nobles screen by pressing 'n' and put someone in the position of broker, if someone isn't, and when you get to trade things he/she gets appraisal skill from watching/trading the goods in the depot.

The wiki is helpful with all problems. I checked my answers from there with an easy search (Dwarf Foreman and Appraiser).

EDIT: Ninja'd! But we have pretty different answers, so I didn't need to delete/change anything.
« Last Edit: July 04, 2008, 11:07:05 am by LASD »
Logged

Brian

  • Bay Watcher
    • View Profile
Re: Extract game info?
« Reply #3 on: July 04, 2008, 11:10:29 am »

Regarding the appraisal, I've been trading and all I've gotten for it is the trade skill.  I have been using an assigned broker.. I suppose I could loop through every dwarf I have and see if any has anything in appraisal... again would be easier if I had access to the info from the first part of what I mentioned  ::)

---

Er wait check that... my broker IS a dabbling appraiser... I just can't see the value of any goods in my inventory, or during trades.

Info on my broker, for things that seem remotely relevant:

Info: Aban is a Clerk
Consoler, Conversationalist, Pacifier, Comedian, Judge of Intent, Intimidator, Negotiator, Flatterer, Persuader, Dabbling Organizer, Professional Record Keeper, Dabbling Appraiser.

Right now he's cleaning my fort.   Too busy to appraise the goods in it?
Logged

DabblingMiner

  • Bay Watcher
    • View Profile
Re: Extract game info?
« Reply #4 on: July 04, 2008, 11:13:30 am »

I was actually thinking about this exact same thing today.  I would also want the spreadsheet to include currently allowed labor preferences.  It appears, though, that there is not utility available to do this.  I think it would be particularly useful in "cleaning up" the labor prefs. of dwarves because I *hate* when some dabbling dwarf that I don't even want to train gets in the way of a more experienced dwarf.

I wonder how hard it is to decode those .dat files...
Logged
AQUIFERS KILL

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: Extract game info?
« Reply #5 on: July 04, 2008, 11:15:26 am »

A dwarf trains the Appraiser skill only by viewing the goods the traders bring in the [t]rade screen.  You won't be able to see the values until he is at novice level.  Also, AFAIK he only gains experience the first time you enter the screen for each caravan.
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

Brian

  • Bay Watcher
    • View Profile
Re: Extract game info?
« Reply #6 on: July 04, 2008, 11:23:15 am »

Thanks! I'll be sure to do what I can to get it up there.  Is it at all possible to get an immigrant with appraisal?
Logged

Samyotix

  • Bay Watcher
    • View Profile
Re: Extract game info?
« Reply #7 on: July 04, 2008, 12:44:45 pm »

I haven't seen any immigrant with Appraisal so far.

As far as I know, with skills like Manage Work Orders and Appraisal, the amount of goods is vital.

So managing 20 work orders of 1 rock craft each gives the dwarf as much experience as managing one work order of 20 rock craft (confirm?). AFAIK it's the same with trading: You won't gain much XP for making hundreds of individual transactions, but instead for the overall volume (amount) traded.

So ... make lots of rock craft and buy out caravans. Once you get sieges, trade narrow clothing for stuff you don't need. Then buy the more expensive stuff right BACK from the trader. Trade lots of stuff, even if you don't really need it. (Offering gifts does not affect the appraisal skill).
Logged

Redburne

  • Escaped Lunatic
    • View Profile
Re: Extract game info?
« Reply #8 on: July 04, 2008, 01:33:36 pm »

Is there any way to extract a spreadsheet of information on my dwarves and their skills?

Funny you should ask ...

Just yesterday I've written a little script for Dwarf Companion which does something very similar.

It produces a text file with a list of all skills, like this:
Code: [Select]
...
Armorsmith
  [16] Nish Bisekzuglar, Armorer
  [2] Udil Adilibmat, Armorer
  [2] Bomrek Delethber, Armorer
  [2] Siegeop Uno Kadoldalzat, Siege Operator
  [1] Inod Cattenurist, Furnace Operator
Bone Carver
  [1] Tirist Lazdodok, Trader
Bowyer
  [1] Mosus Erithusan, Woodcutter
Brewer
  [3] Brewski Sosadrovod, Planter
  [2] Brewski Itonuzol, Fisherman
  [0] Zasit Asmelmuthir, Woodcrafter
Building Designer
  [1] Besmar Cerolkosh, Miner
  [0] Tirist Lazdodok, Trader
...

Changing the output to CVS format for a spreadsheet program would not be much work.

Here's the script, if anyone's interested:
Code: (Python) [Select]
import sys
sys.path.append("..")
from dwarfdbg import *

dbg = dwarfdbg()
cl = dbg.getCreatures(1)

bag_of_skills = {}

for cid in cl.keys():
    name = cl[cid][2]
    dwf = cl[cid][13]
    slist = dbg.getSkills(dwf)
    if slist:
        for sk in slist:
            try:
              bag_of_skills[dbg.getSkillName(sk[0])].append((sk[1], name, dwf))
            except KeyError:
              bag_of_skills[dbg.getSkillName(sk[0])] = [(sk[1], name, dwf)]

def get_prof(dbg, c):
    prof = dbg.locString(c.customProfName)
    if prof=='':
    prof = dbg.getProfName(c.prof)
    if dbg.isRGuard(c):
        prof += " (RG)"
    if dbg.isFGuard(c):
        prof += " (FG)"
    return prof

fout = open('skill_survey.txt', 'w')
for k in sorted(bag_of_skills.iterkeys()):
    bag_of_skills[k].sort(key=lambda s: -s[0])
    print k
    fout.write("%s\n" % k)
    for (skill, name, c) in bag_of_skills[k]:
        print "  [%d] %s, %s" % (skill, name.title(), get_prof(dbg, c))
        fout.write("  [%d] %s, %s\n" % (skill, name.title(), get_prof(dbg, c)))
fout.close()
Logged

pushy

  • Bay Watcher
  • [MEANDERER]
    • View Profile
Re: Extract game info?
« Reply #9 on: July 05, 2008, 02:43:08 pm »

It produces a text file with a list of all skills, like this:
Code: [Select]
...
Armorsmith
  [16] Nish Bisekzuglar, Armorer
  [2] Udil Adilibmat, Armorer
  [2] Bomrek Delethber, Armorer
  [2] Siegeop Uno Kadoldalzat, Siege Operator
  [1] Inod Cattenurist, Furnace Operator
Bone Carver
  [1] Tirist Lazdodok, Trader
Bowyer
  [1] Mosus Erithusan, Woodcutter
Brewer
  [3] Brewski Sosadrovod, Planter
  [2] Brewski Itonuzol, Fisherman
  [0] Zasit Asmelmuthir, Woodcrafter
Building Designer
  [1] Besmar Cerolkosh, Miner
  [0] Tirist Lazdodok, Trader
...
Can't be bothered trying to make heads or tails out of the python code, but there are only 16 levels (from Dabbling to Legendary), so assuming that the numbers refer to the dwarf's skill level how is it that things would range from 0 to 16? Is that showing people who have the labour active but have no skill in it (as 0)? Or is it counting Dabbling as 0 and then 16 would be 'Legendary+1' or something?
Logged
Quote from: Tim Edwards, PC Gamer UK
There are three things I know about dwarves:
1. They've got beards. Even the women.
2. They're short. Especially the women.
3. They're Scottish.

Talith

  • Bay Watcher
    • View Profile
Re: Extract game info?
« Reply #10 on: July 05, 2008, 03:38:15 pm »

Legendary is not actually the best you can get, i believe you can get legendary+5, it will just still show up as legenedary.
Logged

pushy

  • Bay Watcher
  • [MEANDERER]
    • View Profile
Re: Extract game info?
« Reply #11 on: July 05, 2008, 11:04:51 pm »

Legendary is not actually the best you can get, i believe you can get legendary+5, it will just still show up as legenedary.
Jesus Christ, what is it with people only reading half of my fucking posts? Read the whole damn thing. I covered that.
Logged
Quote from: Tim Edwards, PC Gamer UK
There are three things I know about dwarves:
1. They've got beards. Even the women.
2. They're short. Especially the women.
3. They're Scottish.

Redburne

  • Escaped Lunatic
    • View Profile
Re: Extract game info?
« Reply #12 on: July 06, 2008, 10:28:02 am »

Or is it counting Dabbling as 0 and then 16 would be 'Legendary+1' or something?

Yep, 0 is "dabbling", that much I've noticed.

And I'm pretty sure my few legendaries are all 15+.
I've never really bothered to investigate.
Logged

pushy

  • Bay Watcher
  • [MEANDERER]
    • View Profile
Re: Extract game info?
« Reply #13 on: July 06, 2008, 11:11:23 am »

Yeah, that'd make sense :) Dabbling is 0, Legendary is 15 (hence 0-15 being the 16 levels I referred to earlier), then 16+ would be the "Legendary+X" levels. That's fine, cleared up my confusion.
Logged
Quote from: Tim Edwards, PC Gamer UK
There are three things I know about dwarves:
1. They've got beards. Even the women.
2. They're short. Especially the women.
3. They're Scottish.