preload button hover image:
HomeSearchRankingsStatisticsAboutContact
Current Time: Apr 19, 2024, 01:03:47 am
 Dwarf Fortress File Depot » Utilities » Putnam's Scripts for modders
      
Registration is not required to download. However, it will allow you to vote, comment, and upload. Forgot your password?
File Listing: Putnam's Scripts for modders
Last Updated: Sep 30, 2013, 01:44:24 am
First Created: Mar 11, 2013, 01:05:26 pm
File version: 5.4
For DF version: 0.34.11
Downloads: 420 (837) Size: 9.2 KB
Views: 2,570 (4,634) Type: ZIP
Home:  Forum topic
Rating (2 votes): 5.0 / 5.0
Description
These are scripts that attempt to expand raw modding a bit.


itemsyndrome
Version 2

A script that allows modders to apply syndromes to creatures who are wielding items.

Example usage:


Cursed weapon that only curses dwarves!
Code:
[SYNDROME] [SYN_AFFECTED_CREATURE:DWARF:MALE] <<It checks the SYN_AFFECTED_CREATURE directly, so no need to worry. [SYN_AFFECTED_CREATURE:DWARF:FEMALE] <<You need all castes for a specific creature affected. Immunity takes precedence over affectedness. [SYN_CLASS:DFHACK_ITEM_SYNDROME] << This is all the syndrome needs. [SYN_CLASS:DFHACK_AFFECTS_STUCKINS] << Also affects stuckins. [CE_SKILL_ROLL_ADJUST:PERC:0:PERC_ON:20:START:0:END:200] The syndrome will be reapplied every 150 ticks.

Bin of speed!
Code:
[SYNDROME] [SYN_CLASS:DFHACK_ITEM_SYNDROME] [SYN_CLASS:DFHACK_AFFECTS_HAULER] << If this is in the syndrome, it'll affect haulers, too. [CE_SPEED_CHANGE:SPEED_PERC:200:START:0:END:200]

Protective armor that halves damage!
Code:
[SYNDROME] [SYN_CLASS:DFHACK_ITEM_SYNDROME] [SYN_CLASS:DFHACK_ARMOR_ONLY] << Only affects armor. [CE_MATERIAL_FORCE_MULTIPLIER:MAT_MULT:NONE:NONE:1:2:START:0:END:200]


And more, definitely possible with this script.

You need to put itemsyndrome into your scripts folder and the line "itemsyndrome" into your init, of course. Requires DFHack for obvious reasons.

Since 1.4, I've kept up a changelog because adding new examples was getting tedious!

1.4
Added [SYN_CLASS:DFHACK_WIELDED_ONLY], for your magic wands and such.

1.5
Added DFHACK_STUCKINS_ONLY for... I don't know, you'd think ADD_SPATTER's good enough :P But it was asked for, so I made it.

1.5.1
Updated for DFHack 0.34.11 r3.

1.6
Script now recognizes spatters on items. The spatters should still correctly check for how the item is equipped, too.

1.7
Items can now have syndromes independent of materials, like so:
Code:
[INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_TEST] Inorganic needs to be called DFHACK_ITEMSYNDROME_MATERIAL_(anything goes here) [USE_MATERIAL_TEMPLATE:STONE_TEMPLATE] This is just a quirk of mine >_> [SYNDROME] [SYN_NAME:long sword] All creatures with long swords will be affected by this syndrome. [CE_BODY_TRANSFORMATION:START:0:END:160] [CE_CREATURE:TOAD:MALE] Syndrome turns creature into a toad.
1.8
Now recognizes when unit is already affected with a syndrome and acts accordingly.

1.9
Fixed an issue with contaminants and added compatibility for syndromeTrigger.

1.10
Allowed multiple inorganics for items.

1.11
Added a few arguments:

"itemsyndrome" or the argument "enable" will enable itemsyndrome. If you have any arguments at all, "enable" is required to enable itemsyndrome.

A number in the arguments will set the number of ticks between checks. 499 is default.

The argument "disable" will disable itemsyndrome.

1.12
Added "debugon" and "debugoff" arguments and fixed a showstopper.

1.13
Made debug more verbose and added "ContaminantsOn" and "ContaminantsOff" (non-case-sensitive) arguments. Also sped it up in general.

2
Extreme speed-up due to complete change in how it goes through units for assignment.

projectileExpansion
I couldn't figure out how to get interactions done with things, so this is the next best thing!

This script expands projectiles a bit by allowing 2 things:

1. Flows can be spawned on projectile hit with these reaction classes:

DFHACK_MIASMA
DFHACK_MIST
DFHACK_MIST2
DFHACK_DUST
DFHACK_LAVAMIST
DFHACK_SMOKE
DFHACK_DRAGONFIRE
DFHACK_FIREBREATH
DFHACK_WEB
DFHACK_GAS_UNDIRECTED
DFHACK_VAPOR_UNDIRECTED
DFHACK_OCEAN_WAVE
DFHACK_SEA_FOAM

A few of those need an INORGANIC attached, which can be chosen with this (using copper as an example):

[REACTION_CLASS:DFHACK_SPECIFIC_MAT]
[REACTION_CLASS:COPPER]

2. Commands can be done with the following reaction classes:
\COMMAND
commands+args...
\ENDCOMMAND
Only one per mat, for now.

There's a special argument for the script commands: \UNIT_HIT_ID, which uses the unit that gets hit by the projectile as the argument.

3. If the projectile has a syndrome, it'll automatically give the syndrome to the attacked unit.

Changelog:

1.1
Added "disable". Allows you to disable. "enable" now required to enable.

2
Optimized. A lot.

forceEvent
Allows you to force an event. Syntax is simple:
"force siege EVIL" forces a goblin siege.
"force siege FOREST" forces an elf siege.
"force migrants" forces migrants.
"force caravan player" forces a caravan from the player's parent civ.

There are other events that can be done; just type "force" to see them.

Changelog:

1.1
Migrants no longer requires an argument.

removeRelationship
Removes all relationships from a given unit. Selected unit if no argument, specific unit if given an ID.

moddableGods
Allows gods to be modded in-game, like so:
Code:
[CREATURE:SHEOGORATH] [DOES_NOT_EXIST] If you want a definition as small as this, you'll definitely want this token. [MALE] Sex will be transferred over to the god. [NAME:jovial man:Daedra:madness] The third one here is what it shows in legends mode--"madness god". [CASTE_NAME:Sheogorath:Sheogorath:Sheogorath] The third one here is the name of the god--"Sheogorath", madness god. [DESCRIPTION:The Daedra of madness.] This is unnecessary and does nothing, but I have it just in case. [CREATURE_CLASS:DFHACK_GOD] Required for god to be god. [SPHERE:MUSIC] Spheres are carried over. [SPHERE:ART] [SPHERE:CHAOS]
Must be enabled with the command moddableGods in dfhack.init.
Raw Data: JSON / Text
Checksum / Hash
SHA-256: 0adc2205600611caa80591e4bc1e1635e0618baa81d95c106585217ac69cf0d4
IP: logged
Commands
More From This Author
Comments
No comments have been posted for this file yet.
HomeSearchRankingsStatisticsAboutContact

Website by Brett Flannigan. The core site script is PHCDownload (© 2005-2024).
Hosted by Linode.