Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFHack scripts: slabciv and permit_dead  (Read 3245 times)

PatrikLundell

  • Bay Watcher
    • View Profile
DFHack scripts: slabciv and permit_dead
« on: August 03, 2017, 08:52:22 am »

Acting on Toady's info in the FotF, a couple of dead civ related scripts have been made:
- slabciv: Kills off controllable civs (i.e. dwarven ones) if they haven't shows any sign of life for 100 years (arbitrary duration).
- permit_dead: Adds dead controllable civs to the pre embark civ selection list.

slabciv.lua
Spoiler (click to show/hide)

permit_dead.lua:
Spoiler (click to show/hide)

slabciv is started before generating a world and acts in the background during world gen, while permit_dead is run while on the pre embark screen to extend the civ selection list.

A quirk with permit_dead is that a if you have embarked and abandoned (and presumably also retired) a fortress that civ is neither picked up by DF nor by permit_dead for subsequent embarks.

The scripts are stored in a "text" file as<DF>\hack\scripts\<script name.lua> and are invoked from the DFHack console by typing the script name without the .lua suffix.

Edit: Updated to handle changed field names.
Edit2: Inserted permit_dead, which was missing, for some reason.
Edit 3: For some reason one of the indices was missing (line 159) from slabciv, which has been corrected.
« Last Edit: October 26, 2019, 03:15:30 pm by PatrikLundell »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack scripts: slabciv and permit_dead
« Reply #1 on: August 03, 2017, 04:39:32 pm »

Huh. Well, I'll toast to another script solution to worldgen difficulty. I can already see an use, a world that uses more dwarven fortresses for major site control, less population and more scholars, while allowing one to still embark as dead civ so that visitors would be only source of 'migrants' - perhaps at an archeological dig.

I see no reason why not include something like this in a map I'm having dim dream of for 0.45, tbh.

(Alas, it seems I don't generate worlds as often as you do.)

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack scripts: slabciv and permit_dead
« Reply #2 on: August 03, 2017, 04:57:45 pm »

Actually my intended usage was for the next release to allow artifact disagreements (and possible associated diplomacy) with other dwarven civs while still having my own civ in the twilight zone. However, how it's used depends on the user's wishes. More options is a good thing in my book (as long as that doesn't mean unending mandatory selection of things you don't really care about, of course).
As an aside, I did get some use out of the Breakout Box for this.

Edit: It seems I have bungled the post by missing to apply the code indicator correctly (it was present at the end, but not at the beginning), resulting in all the indices being stripped out of slabciv. Furthermore, my own copy also had the save error, for some reason (which is how I detected it). I believe I've corrected the first post (I've made a test world gen with it, indicating it probably works).
« Last Edit: December 03, 2017, 02:54:15 pm by PatrikLundell »
Logged