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 4810 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

myk

  • Bay Watcher
    • View Profile
Re: DFHack scripts: slabciv and permit_dead
« Reply #3 on: August 04, 2024, 01:46:30 pm »

@PatrikLundell there has been some interest in these scripts for the current Steam version. Would you consider updating them/allowing them to be updated and included in the DFHack distribution?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack scripts: slabciv and permit_dead
« Reply #4 on: August 05, 2024, 01:05:26 am »

I won't do anything with DF until it becomes playable (i.e. keyboard support has been fully restored).

However, I don't have anything against others continuing to work on, or at least maintain them, (as long as I'm not demanded to fix resulting issues), nor anything against the scripts I've made being incorporated into DFHack.

In my view, such scripts should not be locked in by people not actively working on them.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack scripts: slabciv and permit_dead
« Reply #5 on: August 05, 2024, 02:38:40 pm »

Thank you. I'll see if we can start getting some of your scripts incorporated into the DFHack distribution. You've done a lot of great work!
Logged