okay, guys, slight update: pretty much everything but the creatures is done, but I need help with the spawn unit script:
how can I make a syndrome stone that will spawn a hostile creature? I'm completely dfhack illiterate and I don't know how the new system with the onLoad and the syndrome/reaction triggers works.
Spawning units in DF has gone from impossible (you made your creature naturally occurring and thanked Armok if it actually appeared) to Rube-Goldberg-complexity raw modding that involved syndromes and interactions and transformations that wouldn't even work most of the time to what we have at the moment which is merely non-intuitive DFHackery with some bugginess.
Setting this up isn't actually that hard. The problem is that no matter how careful you are it won't work the first several tries, so you need to build for troubleshooting.
Step 1: Create the material that will carry your triggering syndrome.
Add this to the material in your tree:
[SYNDROME]
[SYN_NAME:anger dryad]
[SYN_INHALED][SYN_INGESTED]
[SYN_AFFECTED_CREATURE:DWARF:ALL]
[CE_FLASH_TILE:TILE:'*':7:7:1:FREQUENCY:100:100:START:0:END:600]
It doesn't really matter
what the symptom is, so long as it has one that lasts long enough for you to see it.
Step 2: Check the syndrome.
Put a log (or five) on the same tile as one of your dwarves.
createitem WOOD PLANT_MAT:SNEAKY_TREE:WOOD
Things created by DFHack aren't always checked for temperature immediately, so it might take a few tries to get it to poof. And it might take a couple poofs to get the dwarf to inhale the infectious gas. Eventually, you should have a flashing dwarf... or something worse depending on what you set up.
Step 3: Make a dummy script.
It can have one line in it.
print("You disturbed a dryad!")
Or "hello world" if you're an old-timer. Save it as
/raw/scripts/dryad.lua in both your basic raws folder and in your savegame folder. The scripts folder doesn't exist by default, so you'll have to make it.
Step 4: Set up a syndrome trigger.
Make a textfile in your raw (and savegame) folder called onload.init and include this line:
modtools/syndrome-trigger -syndrome "anger dryad" -command [ dryad ]Step 5: Trigger your dummy script.
Reload your game and create some new logs on your dwarf. This time you should see a flashing tile AND some text in the console window.
Step 6: Spawn a dryad.
Either replace the syndrome-trigger with
modtools/syndrome-trigger -syndrome "anger dryad" -command [ spawn-unit -race DRYAD -position [ \\LOCATION ] -civ_id \\-1 ]or add the bit between brackets to your dryad.lua file.Now create some logs on your hapless dwarf and verify that a dryad actually spawns. This is the point you usually realize that your creature is a coward and runs away from an embark party of dwarves.
Step 7: Make a sneaky tree.
Manipulate the raws to make sure you have a high likelihood of getting your tree, making it visually distinct so you can find it (cyan or something), and embark there. If you find some, copy the save so you can resume at this point. Cut down the tree. Determine if the dryad is tough enough to pose the intended level of challenge.
Step 8: Clean up.
If you actually got this far without you or your computer bursting into flames, you're all set! Clean up the raws to make your sneaky trees, and test them out on your unsuspecting dwarves.
Edit: Typo, and fixed a mistake in Step 6.