Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarf modding question  (Read 1019 times)

Shadow_Hornet

  • Bay Watcher
    • View Profile
Dwarf modding question
« on: October 26, 2013, 04:17:50 pm »

I wonder if there is a way to mod the game so that I would have one really good dwarf and also have some really bad things happen that may even end the fortress if the dwarf were to die on me.

Would also like to make that one dwarf not die of old age.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf modding question
« Reply #1 on: October 26, 2013, 07:17:30 pm »

I think thats possible. I dont know about the "if he dies, something bad happens", but you can certainly make a unique dwarf with special boosts that does not die of old age. You can easily make him very bad for your fort if he tantrums or goes berserk, but I dont know how to do a "upon death, cast X" spell.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Dwarf modding question
« Reply #2 on: October 26, 2013, 10:28:20 pm »

the upon death thing is possible with DFHack and so is having a particular death of a certain unit causing game over.

Isn't that convenient.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf modding question
« Reply #3 on: October 27, 2013, 06:21:37 am »

the upon death thing is possible with DFHack and so is having a particular death of a certain unit causing game over.

Isn't that convenient.
I'd love it. Keep your king alive, or your race is doomed. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Shadow_Hornet

  • Bay Watcher
    • View Profile
Re: Dwarf modding question
« Reply #4 on: October 27, 2013, 12:24:31 pm »

thanks.
I will be looking up how to mod that into my own game.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf modding question
« Reply #5 on: October 27, 2013, 12:28:46 pm »

No, seriously Putnam, I'd love to have some sort of Glass-Cannon dwarf that has to be alive. Lets say Drow Underdark - If you Matriarch dies, all your population has 50% chance of going berserk. Or Elf Hamlet - Your Druid dies, all your treants turn to lifeless trees/logs. You Goblin Cave Crawler Handler dies? too bad, your warbeast go amok. thats awesome.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Shadow_Hornet

  • Bay Watcher
    • View Profile
Re: Dwarf modding question
« Reply #6 on: October 27, 2013, 02:30:08 pm »

I also want to have a mod like that to play around with, but because I am kind of new to dwarf fortress ( started playing the game about 2 or 3 weeks ago) I don't think I am likely to find out how to mod it in myself.

Edit: in other news I just found some kind of ore called adamantine.... one block of it..... across a sea of lava.....
« Last Edit: October 27, 2013, 02:33:06 pm by Shadow_Hornet »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Dwarf modding question
« Reply #7 on: October 27, 2013, 03:28:34 pm »

The main issue with that is the marking of the unit for "on death do this".

Here's the code (DFHack r4):

Code: [Select]
eventful=require('plugins.eventful')

eventful.enableEvent(eventful.eventType.UNIT_DEATH,5)

eventful.onUnitDeath.extinctionEvent=function(unit_id)
    local unit = df.unit.find(unit_id)
    if unit == mostImportantUnit then df.global.ui.game_over=true end --mostImportantUnit has to be defined elsewhere somehow
end

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf modding question
« Reply #8 on: October 27, 2013, 04:25:42 pm »

I'd use autosyndrome and a reaction.

Example:
You have an elf. You want a elf-druid, which can spawn treants. You transform the elf with a reaction, which also adds the "on death do this". That would work. I'll think I make an extra thread for this in the utility-area and see who can come up with something. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Dwarf modding question
« Reply #9 on: October 27, 2013, 04:33:37 pm »

Creature classes would be perfect for that.

golemgunk

  • Bay Watcher
  • you are melting!
    • View Profile
Re: Dwarf modding question
« Reply #10 on: October 28, 2013, 04:21:05 am »

I'm not certain of what you mean by "a really good dwarf" or "some really bad things", so forgive me for extrapolating a bit, but here's my idea:
you could set up a caste of dwarf that has higher learning rates, better attributes, no aging, etc. then make a regional interaction that occurs in all regions and targets that specific caste of dwarf. you can set up the interaction to reanimate this dwarf when he dies, and turn him into evil magic zombie, or some giant monster or whatever.

so yeah this is probably possible
Logged

Shadow_Hornet

  • Bay Watcher
    • View Profile
Re: Dwarf modding question
« Reply #11 on: October 28, 2013, 11:18:41 pm »

By really good I mostly mean making one dwarf better in some way like maybe be highly skilled or something like that.

Idea being along the lines of having one all important dwarf to keep around and if he dies or something what ever is set to happen next should be the kind of thing that could do a lot of dmg if not end the fortress.

I kind of what to stay away from just giving a gameover screen. I more want to go along the lines of making bad things happen like spawning a giant monster or going boom with some kind of syndrome thing infecting all the dwarfs in a huge area (I don't know what syndromes do). I'm sure there are other bad things that could be set to happen.
Logged

golemgunk

  • Bay Watcher
  • you are melting!
    • View Profile
Re: Dwarf modding question
« Reply #12 on: October 31, 2013, 07:38:36 am »

I made some stuff you can probably use, just put the caste in the creature_standard file around where the other castes are defined, and put the interactions anywhere in interactions_standard, or make your own files.
the interaction resurrects the dwarf as a superpowerful necromancer that wants to kill everyone, should cause sufficient mayhem.

the caste

Spoiler (click to show/hide)

the interactions

Spoiler (click to show/hide)
« Last Edit: October 31, 2013, 09:04:31 am by twentytentacles »
Logged

Shadow_Hornet

  • Bay Watcher
    • View Profile
Re: Dwarf modding question
« Reply #13 on: November 01, 2013, 12:17:06 pm »

thanks
later when I have time I will try playing around with this.
Logged