Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Trying to modify dwarven preferences  (Read 645 times)

Mad Jackal

  • Bay Watcher
    • View Profile
Trying to modify dwarven preferences
« on: February 05, 2014, 08:26:40 pm »


Quite a while ago I stumbled upon a mod or script that allowed you to change the preferences of dwarves.

For example, you could make them like steel, cows, or sewer brew.

I know that it required df hack, which I could not get to run on my machine before.

After running numerous searches on this forums and may machine and everywhere. I have to post again.

Is it possible to alter a dwarf's or many dwarfs' preferences ? And can some-one point me to there ?

Thanks
Logged
an''t catch me!

Jonz

  • Escaped Lunatic
    • View Profile
Re: Trying to modify dwarven preferences
« Reply #1 on: February 05, 2014, 11:26:52 pm »

Preferences are part of a dwarf's soul and can be edited by DFHack. You can write a lua script or edit the preferences interactively from a lua console.

Here's an example script that removes all of the "absolutely detests..." preferences from a selected dwarf:

Code: [Select]
unit=dfhack.gui.getSelectedUnit()
if unit==nil then
  print ("No unit under cursor.")
  return
end

local done
local i
local v
done = false
while done == false do
  done = true
  for i,v in ipairs(unit.status.current_soul.preferences) do
    if v.type == 3 then -- Type 3 = absolutely detests vermin
      unit.status.current_soul.preferences:erase(i)
      done = false
      break
    end
  end
end
Logged

Bo-Rufus CMVII

  • Bay Watcher
    • View Profile
Re: Trying to modify dwarven preferences
« Reply #2 on: February 06, 2014, 01:30:54 am »

I wonder if there's a console that your favorite god uses to fididdle with our souls...
Logged

Mad Jackal

  • Bay Watcher
    • View Profile
Re: Trying to modify dwarven preferences
« Reply #3 on: February 12, 2014, 12:44:37 am »

Right. I have no idea how to write a script.

maybe some-one had been nice enough to do it for me before.  It mut have been on the mac laptop that died a while ago. Because it is not on this machine.

Could any-one write me a script to use to modify a dwarf's preferences to what I want? 

Or explain to me what those words / symbol mean so I can translate that script above to something that does what Iw ant ?

Thanks.
Logged
an''t catch me!

Zavvnao

  • Bay Watcher
    • View Profile
Re: Trying to modify dwarven preferences
« Reply #4 on: February 12, 2014, 07:01:13 pm »

I thin editing entity or creature raws may have a little bit of an effect for general personalities.
Logged