Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Dwarven Emigration: An alternative to insanity. Let's try this again.  (Read 24120 times)

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game

Download here: http://dffd.wimbli.com/file.php?id=8404

There may come a day when migrating to a dwarf fortresses is not a one way ticket, when a miserable dwarf will have options besides going insane.  But today is not that day, so I'm making this plugin based on a post I read in the suggestion forum.

It allows dwarves to have a chance of leaving the fortress with a caravan.  The chances are greatly increased if the dwarf is feeling miserable.  There are some caveats: only non-noble civilians can leave, and married dwarves will make their decision together.  Also, there must be a caravan to leave with.  So insanity will still happen, but the intensity of tantrum spirals should be greatly reduced.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dwarven Emigration: An alternative to insanity (not quite finished)
« Reply #1 on: February 06, 2014, 09:51:45 am »

Nice, also if they have non-grown children they could take them.

Roses

  • Bay Watcher
    • View Profile
Re: Dwarven Emigration: An alternative to insanity (not quite finished)
« Reply #2 on: February 06, 2014, 11:37:42 am »

Question, would they count as dead or simple having left? I wonder if it would be possible for them to migrate back to the fortress at a later time.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Dwarven Emigration: An alternative to insanity (not quite finished)
« Reply #3 on: February 06, 2014, 12:04:05 pm »

Question, would they count as dead or simple having left? I wonder if it would be possible for them to migrate back to the fortress at a later time.

They don't count as dead.  Turns out that if you set flags.merchant to true, they'll act like merchants, hanging around the depot during trading time and leaving with the caravan.  I'm not sure if they can migrate back, but I'm guessing that they could.  I'm also not sure what their history says.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #4 on: February 06, 2014, 06:50:23 pm »

First version is up.

It's pretty rare for dwarves to emigrate, but it is working properly.  They can leave with any caravan, but are more likely to leave with a caravan of their own race.  They may also leave with diplomats or, in extremely rare circumstances, go off into the wild by themselves.

I tried to add the traitor option as well, but wasn't able to do it without making them the enemies of both civs and starting a loyalty cascade, so that's disabled for now.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #5 on: February 08, 2014, 02:40:10 pm »

Oh my, I tried this (with Putnams help, as so often) a long time ago... I never waited long enough to a caravan to come... I always had these friendly dwarves with the active merchant flag hanging around, and it never occured to me to just wait a year and see what happens. Damn, I feel silly now.

Great work :)
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 :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #6 on: February 08, 2014, 02:56:05 pm »

First version is up.

It's pretty rare for dwarves to emigrate, but it is working properly.  They can leave with any caravan, but are more likely to leave with a caravan of their own race.  They may also leave with diplomats or, in extremely rare circumstances, go off into the wild by themselves.

I tried to add the traitor option as well, but wasn't able to do it without making them the enemies of both civs and starting a loyalty cascade, so that's disabled for now.
you could prevent loyality cascade if you remove them from civ members (in df.historical_entity.find(civ_id)). Though they would probably be killed by nearby dwarves.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #7 on: February 09, 2014, 07:45:52 am »

Does the script directly read the dwarf's mood anywhere?

Also:
Code: [Select]
if unit.military.squad_id ~= -1 then return false end -- Cannot leave: military

Does this mean dwarves can be prevented from leaving just by putting them in a squad?
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #8 on: February 09, 2014, 07:58:13 am »

Yes and yes.  It's not hard to keep them from leaving (they also won't quit in the middle of a job) but if they've reached the point where they're likely to leave, they're also at the point where they're likely to go insane.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #9 on: February 09, 2014, 02:28:46 pm »

Oh, I've found the happiness check.

Are you considering putting in a check for dwarves who've had moods? They can't go insane any more anyway. The check for legendaries will cover that most of the time, but possessions or lowered skill gain rates will result in fewer mooded Legendary dwarves.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #10 on: February 09, 2014, 02:52:05 pm »

Oh, I've found the happiness check.

Are you considering putting in a check for dwarves who've had moods? They can't go insane any more anyway. The check for legendaries will cover that most of the time, but possessions or lowered skill gain rates will result in fewer mooded Legendary dwarves.

Oh, if they had a mood they can't go insane?  I didn't know that.  Well, there's probably a simple variable for that, so it shouldn't be hard to add in.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #11 on: February 09, 2014, 04:09:42 pm »

So... if there is a switch that makes dwarves immune to going insane, why not link that to a psychological workshop that treats dwarves against insanity?  :)
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 :::

Roses

  • Bay Watcher
    • View Profile
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #12 on: February 09, 2014, 04:15:08 pm »

Well you can always raise their happiness counter and lower their insane chance counter if you want a workshop that just treats insanity instead of making them immune to it.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #13 on: February 11, 2014, 04:47:23 pm »

Oh, I've found the happiness check.

Are you considering putting in a check for dwarves who've had moods? They can't go insane any more anyway. The check for legendaries will cover that most of the time, but possessions or lowered skill gain rates will result in fewer mooded Legendary dwarves.

Oh, if they had a mood they can't go insane?  I didn't know that.  Well, there's probably a simple variable for that, so it shouldn't be hard to add in.
I believe it's the "had_mood" flag, and it indeed prevents a dwarf from going insane due to unhappiness.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Timeless Bob

  • Bay Watcher
    • View Profile
Re: Dwarven Emigration: An alternative to insanity (Released)
« Reply #14 on: February 14, 2014, 08:08:44 am »

YES YES YES YES YES!!!

I've been wondering why this isn't in the vanilla game already - It seems like the logical reason why so many dwarves come in waves to your fortress - they're unhappy elsewhere and emigrate looking for a chance at a new beginning!  Of course, this also applies to the dwarves in your fortress, so that dwarven embarks have less of the "Hotel California" feeling.  (You can "check out" anytime you like, but you can never leave...)

Thank you!
Logged
L33tsp34k does to English what Picasso did to faces.

Dwarfopoly
The Luckiest Tourist EVER
Bloodlines of the Forii
Pages: [1] 2 3