Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Questions about dwarven hostility  (Read 640 times)

Matoro

  • Bay Watcher
  • if you drive alone you drive with hitler
    • View Profile
Questions about dwarven hostility
« on: June 28, 2013, 03:48:57 pm »

A questions concerning more utilities and DFHack than real raw modding, but still:

Is it possible to make a dwarf suddenly hostile? I remember that Runesmith was able to do this, but it doesen't work with the latest version, right? Is there any DFhack/fusion thing for that?

Logged

Brilliand

  • Bay Watcher
    • View Profile
Re: Questions about dwarven hostility
« Reply #1 on: June 28, 2013, 05:56:37 pm »

A questions concerning more utilities and DFHack than real raw modding, but still:

Is it possible to make a dwarf suddenly hostile? I remember that Runesmith was able to do this, but it doesen't work with the latest version, right? Is there any DFhack/fusion thing for that?

The easiest way is probably to mark the dwarf CRAZED.  That's not too hard to do with raw modding, but if you have an already-existing fortress and are suddenly struck by a desire to have a particular one of your dwarves go berserk, it should be a one-liner in lua.  I don't have ready access to DF right now, though, so I can't tell you what that one line would be.  (Maybe later today, if no one else beats me to it.)
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

Brilliand

  • Bay Watcher
    • View Profile
Re: Questions about dwarven hostility
« Reply #2 on: June 28, 2013, 11:58:36 pm »

Okay, "dfhack.gui.getSelectedUnit().mood=df.mood_type.Berserk" will send the selected unit into a berserk rage, which apparently is not the same thing as being CRAZED.

If you actually want the dwarf to act like an invader, then you could enable "flags1.marauder", "flags1.invades" and "flags1.invader_origin", but by itself that will cause a loyalty cascade.  Setting the dwarf's "civ_id" to something else might fix that, but I haven't tested it.
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Questions about dwarven hostility
« Reply #3 on: June 28, 2013, 11:59:58 pm »

Okay, "dfhack.gui.getSelectedUnit().mood=df.mood_type.Berserk" will send the selected unit into a berserk rage, which apparently is not the same thing as being CRAZED.

If you actually want the dwarf to act like an invader, then you could enable "flags1.marauder", "flags1.invades" and "flags1.invader_origin", but by itself that will cause a loyalty cascade.  Setting the dwarf's "civ_id" to something else might fix that, but I haven't tested it.

People keep neglecting to mention that you need to do this in the lua interface

so

you need to type "lua" in the DFHack console before you do any of these, and all those "flags1"s go after dfhack.gui.getSelectedUnit()

Matoro

  • Bay Watcher
  • if you drive alone you drive with hitler
    • View Profile
Re: Questions about dwarven hostility
« Reply #4 on: June 29, 2013, 02:56:26 am »

Okay, thank you for the fast response. I'll try it out.
Logged