Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How can you tweak dwarf skills with dfhack?  (Read 15545 times)

someone12345

  • Bay Watcher
    • View Profile
How can you tweak dwarf skills with dfhack?
« on: January 01, 2014, 11:18:24 am »

Is it possible to change the skills of dwarves with dfhack? If so, how do you do it? I could not find it on the readme. Thanks.
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #1 on: January 01, 2014, 12:03:50 pm »

there's a script that does it. I think its superdwarf. u can use the individual commands in the script to run it in the built in lua interpreter

someone12345

  • Bay Watcher
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #2 on: January 01, 2014, 12:22:45 pm »

there's a script that does it. I think its superdwarf. u can use the individual commands in the script to run it in the built in lua interpreter
Superdwarf is just fastdwarf for a single creature. Also, I have no idea how to use lua, df companion, or commands other than the preprogramed ones.
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #3 on: January 01, 2014, 04:21:52 pm »

check my signature, my scripts.

wait... I never did skills.

but I have the original link in the thread

http://dwarffortresswiki.org/index.php/User:Vjek#armoks_blessing

that script modifies skills.  You can open it up, edit the values you want it to set to, and then run it
« Last Edit: January 01, 2014, 04:23:26 pm by thistleknot »
Logged

someone12345

  • Bay Watcher
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #4 on: January 01, 2014, 04:51:25 pm »

Which values control the level the unit is set to? I do not want to make this dwarf a legendary. Also, which values correspond to each level?
function LegendaryByClass(skilltype,v)
unit=v
   if unit==nil then
      print ("No unit available!  Aborting with extreme prejudice.")
      return
   end

utils = require 'utils'
local i
local skillclass
   for i=0, 115 do
      skillclass = df.job_skill_class[df.job_skill.attrs.type]
         if skilltype == skillclass then
            print ("Skill "..df.job_skill.attrs.caption.." is type: "..skillclass.." and is now Legendary for "..unit.name.first_name)
            utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = i, rating = 20 }, 'id')
         end
   end
end
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #5 on: January 01, 2014, 04:54:36 pm »

Rating refers to skill level. 20 is legendary+5, 0 is dabbling, 1 is novice, etc.

someone12345

  • Bay Watcher
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #6 on: January 01, 2014, 05:56:48 pm »

Rating refers to skill level. 20 is legendary+5, 0 is dabbling, 1 is novice, etc.
So you would replace { new = true, id = i, rating = 20} with 5 if you wanted a proficient dwarf?
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #7 on: January 01, 2014, 05:57:35 pm »

Yes, { new = true, id = i, rating = 5}.

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #8 on: January 02, 2014, 05:21:07 pm »

Also, just for skills there is make_legendary found here.
(rather than using armoks_blessing which does a lot of other things at the same time.)

Journier

  • Bay Watcher
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #9 on: January 05, 2014, 12:09:22 am »

Hello Vjek im trying to get your lua script armok blessing to work, and uh im getting an error.

says cannot write field unit_attribute.unk1: not found.
then gives a traceback.

does this work with the lazy newb pack with df hack? what do i need to change sir? appreciate any help :)
Logged
Aurora 4x Steam group -http://steamcommunity.com/gid/103582791430952164

Aurora 4x Succession game - http://www.bay12games.com/forum/index.php?topic=51366.0

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #10 on: January 05, 2014, 12:21:00 am »

Hello Vjek im trying to get your lua script armok blessing to work, and uh im getting an error.

says cannot write field unit_attribute.unk1: not found.
then gives a traceback.

does this work with the lazy newb pack with df hack? what do i need to change sir? appreciate any help :)
Just make sure you're using the right version of the script with the right version of dfhack.

In particular, the newest version of the script with the newest released version of dfhack.  the .unk1 fields are from the old versions of the scripts.  They're only there for users still using 34.10 of both df and dfhack.

Journier

  • Bay Watcher
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #11 on: January 05, 2014, 12:31:44 am »

hmm ok double checking
Logged
Aurora 4x Steam group -http://steamcommunity.com/gid/103582791430952164

Aurora 4x Succession game - http://www.bay12games.com/forum/index.php?topic=51366.0

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
Re: How can you tweak dwarf skills with dfhack?
« Reply #12 on: January 05, 2014, 09:52:15 pm »

There's this script also, that also seems to work in the 2012 version. I've used it and it works... not much to say other than this.
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!