Bay 12 Games Forum

Please login or register.

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

Author Topic: DFHack Script Collection  (Read 68235 times)

Urist McTeellox

  • Bay Watcher
    • View Profile
DFHack Script Collection
« on: January 15, 2014, 04:56:31 pm »

DFHack Script Collection

Here are a list of additional scripts for DFHack. Please add any you know about to this list:

  • announce.lua - Print an announcement to the screen and the gamelog.
  • df-ai - a script that plays alone in fortress mode.
  • force - Allows forcing of events. Some of them are iffy, some don't work at all. It's mostly functional.
  • hackWish - Use a swanky GUI interface to create an item with any material and quality.
  • instant transmission - Allows teleportation to units in adventure mode by adventurer. Also gives power level readout.
  • itemsyndrome - Allows items to impart syndromes when equipped.
  • moddableGods - Allows custom gods to be added as hist figures. They do nothing as of now. Might do something funny next version, but nobody knows what exactly.
  • Probability Syndrome - Run AutoSyndrome commands which honour reaction probabilities.
  • projectileExpansion - Allows a lot of stuff related to projectiles, such as explosions, syndrome addition and script running-on-creatures.
  • rip-heart - removes units heart for a better storage (usually kills in process)
  • shapechange - Allows willful polymorph into arbitrary creature with filtering by ID or size.
  • skillroll - Allows for skills to be considered when running Lua scripts. Probability Syndrome is probably better for most purposes.
  • take-slave - Like hire-guard, but with more transformation. Requires a SLAVE caste for currently played race.
  • teleport - Allows simple teleportation of unit to position. Position can be cursor or hardcoded.
  • trainskill - Raises the skill level of an unit.
  • fovcommand - Executes a dfhack command on targets within the line of sight of an unit.
  • callsiege - Causes a random siege, you can set a probability for this to happen.
  • naturalSkills - Make sure creatures have their natural skills.
  • points - Allows to pick any number of embark points.
  • construct-creature - Allows you to construct creatures with reactions that incorporate the reagent materials into the creature's body.  Perfect for robots and golems.
  • slam - A simple script that slams a creature into the ground at a given velocity.  Can cause targets to explode at high enough values.
  • exile - Sends units away into the wild. Options include fort members, pets, wild animals, invaders, merchants, and diplomats.
  • hfspit - Creates a pit under the target leading straight to the underworld.  Instant death to non-fliers.  Very small chance of triggering a demon attack.
  • DFHack spells - Set of scripts for more complex interaction based spells
  • spawn unit - finally a central place for spawn unit script updates
  • heal unit - heal units script
  • rubble_fluids module - Functions for easy fluid and minecart interaction from Lua code.
  • rubble_fluids command - Test driver and autoSyndrome command for the rubble_fluids module.
  • whosout - lists any dorfs who are not in any of the burrows passed as arguments.
  • show-cursed - list assumed name of any cursed dorfs
  • show-dfhack-version - outputs dfhack release to the console (put it in your dfhack.init)
  • show-speeds - Shows current speed and encumbrance for each citizen.
  • add-exp - Adds a set amount of experience in a particular skill to a particular unit, and levels them up accordingly.
  • timestream - Multiplies the speed of calendar time by the specified value.


This top-post is generated automatically!  You can edit it in markdown format if you think it's missing something.  Be bold with your edits, they're easy to undo!
« Last Edit: March 12, 2015, 08:03:43 pm by Urist McTeellox »
Logged

Urist McTeellox

  • Bay Watcher
    • View Profile
Re: DFHack Script Collection
« Reply #1 on: January 15, 2014, 04:56:51 pm »

Hi everyone,

Meph nudged me and said it would be great to have a post that keeps track of all the third-party DFHack scripts. And it would be even better if anyone could edit that post to make sure it stay up to date.

As it happens, I have the ability to turn wiki pages into automatically updating phpBB forum posts. So in a couple of minutes this top-post is going to be replaced with wiki content.  In the meantime, you can edit the wiki-page used to generate it here.

I'll also duplicate this information in the second post, so it doesn't get lost. There'll also be a short discussion on how you and do this yourself (all the tools are open source), but only after I've had a coffee. :)

Many thanks,

~ T
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack Script Collection
« Reply #2 on: January 15, 2014, 04:58:02 pm »

AWSOME! I'll add my announce script right now...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Script Collection
« Reply #3 on: January 15, 2014, 05:16:06 pm »

Just as a completion, I will leave this here as well. Its also an announcement script. Its way inferior to milos, since this one has hardcoded announcements in the script, and needs an inorganic/interaction to call it. milo christiansen version adds the announcements into the inorganics/interactions directly, which takes out one work step.

Spoiler: Announcement.lua (click to show/hide)
Spoiler: Announcement Readme (click to show/hide)
« Last Edit: January 15, 2014, 05:27:34 pm by Meph »
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 :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack Script Collection
« Reply #4 on: January 15, 2014, 05:29:58 pm »

Why don't you take a look at my script :)
The messages are specified in the raws rather than in the script, so adding new messages is MUCH easier, plus it writes to the gamelog...

(Actually it's not all my script, I made the first version then... (I forget who, one of the DFHack experts) polished up my lua a little, then I made further edits until it was perfect.)
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack Script Collection
« Reply #5 on: January 15, 2014, 11:17:50 pm »

I decided to be bold and add all of mine.

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack Script Collection
« Reply #6 on: January 16, 2014, 05:24:12 am »

I went bolder in my a few scripts of mine.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack Script Collection
« Reply #7 on: January 16, 2014, 06:07:18 am »

natural skills should be incorporated into spawn unit script really because afaik it's the only source of units not having natural skills set.

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack Script Collection
« Reply #8 on: January 16, 2014, 06:24:04 am »

natural skills should be incorporated into spawn unit script really because afaik it's the only source of units not having natural skills set.

Transformations also cause that, I originally wrote because I was using trueTransform in my mod. However it is true that spawnunit can use this. I'll have a look.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Script Collection
« Reply #9 on: January 16, 2014, 11:19:30 am »

Posting to watch.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack Script Collection
« Reply #10 on: January 16, 2014, 02:44:08 pm »

I'm damn impressed by that AI so far, btw.

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: DFHack Script Collection
« Reply #11 on: January 16, 2014, 03:46:24 pm »

ptw

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Script Collection
« Reply #12 on: January 17, 2014, 03:00:53 pm »

dwarves.rb - type "dwarves #" at the embark selector/map before you embark. It will raise your starting dwarves to the number you entered.

Code: [Select]
# patch start dwarf count

nr = $script_args[0].to_i

raise 'too low' if nr < 7

addr = df.get_global_address('start_dwarf_count')
df.memory_patch(addr, [nr].pack('L'))

points.lua - type "points #" at the embark selector/map before you embark. It will raise your embark points to that number.
Code: [Select]
df.global.world.worldgen.worldgen_parms.embark_points=tonumber(...)
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: DFHack Script Collection
« Reply #13 on: January 18, 2014, 03:57:26 pm »

Added a link to my set of scripts.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: DFHack Script Collection
« Reply #14 on: January 19, 2014, 12:58:31 pm »

I'll add mine as they come out.  I might update occasionally though.
Added constructCreature to start.
Pages: [1] 2 3 ... 5