Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How can I find Adventure mode skill values actual [42.04]  (Read 1256 times)

MageOfTyr

  • Bay Watcher
  • Tab: Cave Crocodiles
    • View Profile
How can I find Adventure mode skill values actual [42.04]
« on: January 15, 2016, 11:09:36 pm »

Hello,

Since the new version (42.02) skills are now represented in Adventurer mode by vague bars. Is there a way, by use of DFHack/other application, that can tell me a skill's true value?

Thanks!
Logged

sv-esk

  • Bay Watcher
  • sorry for my bad english
    • View Profile
Re: How can I find Adventure mode skill values actual [42.04]
« Reply #1 on: January 16, 2016, 07:55:37 am »

Skills are still in the unit.status.current_soul.skills vector.
You can browse this structure by gui/gm-editor, gui/gm-unit or print its contents using script like this:
Code: [Select]
--printskills.lua

-- Since the new version (42.02) skills are now represented in Adventurer mode by vague bars. This script prints skill's true value.

local utils=require('utils')

validArgs = validArgs or utils.invert({
 'help',
 'unit'
})

local args = utils.processArgs({...}, validArgs)

if args.help then
    print('printskills select unit (by v in fort mode, z or l,a in adventure mode), or pass its unitId as an argument')
    print(' printskills -unit [unitId]')
    print(' printskills -help')
    print('  print this help message')
  return
end

if(args.unit) then
    unit = df.unit.find(args.unit)
else
    unit = dfhack.gui.getSelectedUnit()
end

if not unit then
 qerror('Error: please select a unit or pass its id as an argument.')
end

if unit then
    local v=unit.status.current_soul.skills
    for i=0,#v-1,1 do
       print(df.skill_rating[v[i].rating].." "..df.job_skill[v[i].id].."   "..v[i].experience.."/"..df.skill_rating.attrs[v[i].rating].xp_threshold)
       --print(" unused_counter:"..v[i].unused_counter)
       --print(" rusty:"..v[i].rusty)
       --print(" rust_counter:"..v[i].rust_counter)
       --print(" demotion_counter:"..v[i].demotion_counter)
       --print(" unk_1c:"..v[i].unk_1c)
    end
end
Concrete instruments and musical/dance/poetry forms are in the unk_v42_1 pointer (last thing in the unit_soul).
« Last Edit: January 16, 2016, 08:44:11 am by sv-esk »
Logged

MageOfTyr

  • Bay Watcher
  • Tab: Cave Crocodiles
    • View Profile
Re: How can I find Adventure mode skill values actual [42.04]
« Reply #2 on: January 17, 2016, 01:11:35 am »

Skills are still in the unit.status.current_soul.skills vector.
You can browse this structure by gui/gm-editor, gui/gm-unit or print its contents using script like this:
Code: [Select]
--printskills.lua

-- Since the new version (42.02) skills are now represented in Adventurer mode by vague bars. This script prints skill's true value.

local utils=require('utils')

validArgs = validArgs or utils.invert({
 'help',
 'unit'
})

local args = utils.processArgs({...}, validArgs)

if args.help then
    print('printskills select unit (by v in fort mode, z or l,a in adventure mode), or pass its unitId as an argument')
    print(' printskills -unit [unitId]')
    print(' printskills -help')
    print('  print this help message')
  return
end

if(args.unit) then
    unit = df.unit.find(args.unit)
else
    unit = dfhack.gui.getSelectedUnit()
end

if not unit then
 qerror('Error: please select a unit or pass its id as an argument.')
end

if unit then
    local v=unit.status.current_soul.skills
    for i=0,#v-1,1 do
       print(df.skill_rating[v[i].rating].." "..df.job_skill[v[i].id].."   "..v[i].experience.."/"..df.skill_rating.attrs[v[i].rating].xp_threshold)
       --print(" unused_counter:"..v[i].unused_counter)
       --print(" rusty:"..v[i].rusty)
       --print(" rust_counter:"..v[i].rust_counter)
       --print(" demotion_counter:"..v[i].demotion_counter)
       --print(" unk_1c:"..v[i].unk_1c)
    end
end
Concrete instruments and musical/dance/poetry forms are in the unk_v42_1 pointer (last thing in the unit_soul).

You're literally the best person ever.
Logged