Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 11 12 [13] 14 15 ... 44

Author Topic: Putnam's DFHack scripts  (Read 120492 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #180 on: April 21, 2013, 08:29:45 pm »

Updated itemsyndrome again. That error shouldn't be showing up AND it should be going a bit faster.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #181 on: April 22, 2013, 10:37:26 am »

Thanks. :)

While updating Orc fortress I saw this example:

Code: [Select]
[INORGANIC:LUNACY_ENCHANT]
[USE_MATERIAL_TEMPLATE:METAL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:lunar]
[STATE_NAME_ADJ:LIQUID:lunar]
[STATE_NAME_ADJ:GAS:lunar]
[SYNDROME]   
  [SYN_CLASS:DFHACK_ITEM_SYNDROME]
  [SYN_AFFECTED_CREATURE:ORC_TAIGA:DREAMWALKER_MALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:DREAMWALKER_FEMALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:SORCERER_MALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:SORCERER_FEMALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:DRUID_MALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:DRUID_FEMALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:FROSTSKALD_MALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:FROSTSKALD_FEMALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:ORACLE_MALE]
[SYN_AFFECTED_CREATURE:ORC_TAIGA:ORACLE_FEMALE]
        [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:10000]
[CDI:ADV_NAME:Lunacy]
  [CDI:INTERACTION:LUNACY_ORC]
  [CDI:USAGE_HINT:ATTACK]
[CDI:BP_REQUIRED:BY_CATEGORY:HAND]
[CDI:VERB:performs the rite of lunacy:performs the rite of lunacy:NA]
[CDI:TARGET_VERB:takes note of the phase of the moon:takes note of the phase of the moon:NA]
  [CDI:TARGET:A:LINE_OF_SIGHT]
  [CDI:TARGET_RANGE:A:20]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:10000]
[DISPLAY_COLOR:1:1:1]
[TILE:'*']
[SOLID_DENSITY:5520]
[MATERIAL_VALUE:20]

A powerful spell that has a wait period of 10000, given to any mage wielding an object of this material. But if the syndrome is re-applied every 499 ticks, does the wait period even matter? Will the mages wait 10000 ticks before casting it again, or will they gain a new interaction every 499 ticks, cast it once, then wait for the cooldown?
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 :::

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #182 on: April 22, 2013, 11:50:33 am »

Testing in arena mode, when wielding an enchanted stave or what not, you do get additional copies of the syndrome stacked up every 150 499 ticks, but you can't actually cast the spell again until the cooldown is up.

I'm not sure what happens with things like stat boosting effects though.  Since there are multiple copies of the syndrome on the character I wouldn't rule out that it would apply multiple stat boosts. 

Maybe if I had been more careful to include... what are they called, syndrome classes?  So you can't be affected by a second copy if you already have a similar syndrome?  Does itemsyndrome respect those?

ed. to clarify i was thinking of IT_CANNOT_HAVE_SYNDROME_CLASS, but that is an interaction target token, so not useful here.  I think.
« Last Edit: April 22, 2013, 12:25:13 pm by smakemupagus »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #183 on: April 22, 2013, 12:29:39 pm »

Stat boosts are easily handled, by making them run out with END:498.

Putnam, I think you fed my misinformation :P Or I discovered something that shouldnt happen. You said that caravans/diplomats only arrive on their active seasons, for example humans are active only in summer, so force caravan plains would only work in summer.

Well, turns out it works all year around. this screenshot is from spring, and I forced a human (summer) and a drow (winter) caravan. The liaison arrives as well.


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

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #184 on: April 22, 2013, 04:23:18 pm »

DFHACK_DUST seems to default to the very first inorganic entry it can find, in my case "small fire gems".
DFHACK_WEB also default to the very first inorganic entry it can find.
Lavamist is extremely potent and kills almost instantly.
Dragonfire is the same, insant kills.
I couldnt find a difference between mist and mist2.
Mist, Mist2, Miasma, Dust and smoke have no ill effect on the target.
Undirected gas and vapor default to "boiling magma", causing no ill effect.
Ocean waves and sea foam have no ill effect on target. They also wont spawn water, wont put out fire or wont clean the tiles.
DFHACK_DISAPPEAR only removes intact ammo that landed somewhere. Broken ammo tiles will remain.

All tests done with metal bolts of these materials in the arena. No catapult or thrown weapon tests.

Spoiler: Here the RAWS (click to show/hide)

Conclusion:
Flowsize 1 only affects the tile that is hit.
Flowsize 20 gives a max of 4x4 tiles of gas, or 1-3 webs.
Flowsize 50 gives about 12x12 tiles of gas. Similar to the original vanilla dust from cave ins
Flowsize 10000 gives about 32x32 tiles of gas. Denser then before, but you cant get a higher radius then this.

DFHACK_MIASMA: Useless, might give negative thoughts to civ.members, nice graphical effect.
DFHACK_MIST: Useless, might give positive thoughts to civ.members.
DFHACK_MIST2: Useless, might give positive thoughts to civ.members.
DFHACK_DUST: No damage, Bug: Uses first inorganic entry in the raws.
DFHACK_LAVAMIST: Instakill, starts fires as well.
DFHACK_SMOKE: No damage, nice graphical effect.
DFHACK_DRAGONFIRE: Instakill, starts fires as well.
DFHACK_FIREBREATH: Small fire damage, starts fires as well.
DFHACK_WEB: Awesome to web from a distance. Bug: Uses first inorganic entry in the raws.
DFHACK_GAS_UNDIRECTED: No damage, but can carry syndromes.
DFHACK_VAPOR_UNDIRECTED: No damage, but can carry syndromes.
DFHACK_OCEAN_WAVE: Nice graphical effect, otherwise useless.
DFHACK_SEA_FOAM: Useless
DFHACK_DISAPPEARS: Awesome to avoid clutter, destroy all those single bolts/arrows lying around.

Personally I can see my evil mages use miasma-weapons to lower the happyness of hit units, have some magical elven nonsense with water-ocean-wave arrows just for the looks, make smoke grenades with an unconciousness syndrome, use disappear to reduce clutter, use firebreath for grenades, use dragonfire for very powerful grenades, use web in magical ammo slowing the invaders down.

Question: Any ideas how to use the mist generation on friendly dwarves? If you can create mist from this, cant you write a plugin that creates mist from a workshop? Would be really nice for a sauna or something, to raise happiness. Same for miasma of course, I could add it to the tanner/slaughterhouse for example. Lower happiness for dwarves working in these not-so-pleasant jobs.

Suggestion: You should probably say somewhere that people have to write "projectileExpansion" into their dfhack init, otherwise it wont do anything. ;)

EDIT: Here the raws for people that want to test siege engines with this:

Code: [Select]
[REACTION:CHEAT]
[NAME:catapult and ballista test]
[BUILDING:STILL:NONE]
[PRODUCT:100:6:BALLISTAPARTS:NONE:METAL:STEEL]
[PRODUCT:100:6:CATAPULTPARTS:NONE:METAL:STEEL]

[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_MIASMA]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_MIST]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_MIST2]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_DUST]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_LAVAMIST]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_SMOKE]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_DRAGONFIRE]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_FIREBREATH]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_WEB]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_GAS_UNDIRECTED]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_VAPOR_UNDIRECTED]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_OCEAN_WAVE]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_SEA_FOAM]
[PRODUCT:100:1:BOULDER:NONE:INORGANIC:ZZZ_MAGIC_AMMO_DISAPPEARS]

[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_MIASMA]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_MIST]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_MIST2]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_DUST]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_LAVAMIST]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_SMOKE]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_DRAGONFIRE]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_FIREBREATH]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_WEB]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_GAS_UNDIRECTED]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_VAPOR_UNDIRECTED]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_OCEAN_WAVE]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_SEA_FOAM]
[PRODUCT:100:1:SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA:INORGANIC:ZZZ_MAGIC_AMMO_DISAPPEARS]
« Last Edit: April 22, 2013, 04:45:32 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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #185 on: April 22, 2013, 04:53:49 pm »

1. It doesn't reapply, it ressts the timer. This was my fix to Deon's stackinng issue.

2. About force: good news! Sieges still have issues, though, I think.

3. Using the first material isn't a bug, it's intended behavior. It defaults to the first material if there isn't one defined in the inorganic.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #186 on: April 22, 2013, 05:02:58 pm »

Could you be so kind to show me how to define the inorganic then?

Would this for example work?
Code: [Select]
[INORGANIC:ZZZ_MAGIC_AMMO_WEB]
   [USE_MATERIAL_TEMPLATE:METAL_TEMPLATE]
   [STATE_NAME_ADJ:ALL:web]
   [REACTION_CLASS:DFHACK_WEB]   
   [REACTION_CLASS:DFHACK_FLOW_SIZE]
   [REACTION_CLASS:20]
   [REACTION_CLASS:DFHACK_SPECIFIC_MAT]
   [REACTION_CLASS:CREATURE_MAT:GIANT_CAVE_SPIDER:SILK]
   [ITEMS_AMMO][MATERIAL_VALUE:5]

Just tested in fortress mode with ballistas and catapults. All works well, although nothing burns. Ammo hits something, firebreath starts, ground turns to ashes, but no brushfires start. Very odd, but nice behavior.

I have to say seeing 7 siege engines with unlimited ammo being operated by "fastdwarf 1" dwarves is fun. :)

What issues should sieges have? I didnt notice any bugs or strange behaviors with those.
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #187 on: April 22, 2013, 05:29:02 pm »

It can only be inorganics, unfortunately. It's damn difficult to figure out creature mats at this point for me. Inorganic webs shouldn't be too much of an issue, though. Just have a generic inorganic with an adjective of "spider". You have to omit the INORGANIC:, too.

Forced sieges shouldn't have any bugs or issues whatsoever. The issue I meant was the seasonality issue.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #188 on: April 22, 2013, 05:43:51 pm »

Ah, I understand. Example: Steel ammo that shoots golden webs could be done by adding this to INORGANIC:STEEL

Code: [Select]
   [REACTION_CLASS:DFHACK_WEB]   
   [REACTION_CLASS:DFHACK_FLOW_SIZE]
   [REACTION_CLASS:50]
   [REACTION_CLASS:DFHACK_SPECIFIC_MAT]
   [REACTION_CLASS:GOLD]

Doesnt really matter if its creature mats or not, inorganics are good enough. You cant do a silk-farm, but metal threads work as well. Or special kinds of magic webs. :)

Sieges do indeed work in any season. I wonder if it can become a viable tactic to summon a siege of a civ that is at war with the civ that is already sieging you. Lets say goblins and humans are at war, and goblins siege you. Solution: Trigger a human siege, watch them fight. ^^
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 :::

Zioko345

  • Bay Watcher
  • no
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #189 on: April 22, 2013, 11:06:04 pm »

I know how to create syndromes, but what would be the proper way to poison a projectile? The syndrome causes drowsiness, unconsciousness and dizziness, and enters the blood.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #190 on: April 22, 2013, 11:27:57 pm »

add-spatter :P

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #191 on: April 24, 2013, 02:40:28 pm »

Any input on the "create miasma/mist from a workshop" idea?
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #192 on: April 24, 2013, 02:45:01 pm »

That is ridiculously easy. I'll be in a position to program in about 4 hours.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #193 on: April 24, 2013, 03:05:27 pm »

That is ridiculously good to hear. :) Stinky tanners and nice sauna-baths, here we come.
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 :::

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #194 on: April 28, 2013, 12:46:06 pm »

thanks for the tools.

I've done this before but can't recall how I went about it.

Where do I place the lua scripts?

How do I invoke a script from within the dfhack terminal?

do I have to start lua by typing in lua?
an example for force migrants would be appreciated.

Thank you in advance.
Pages: 1 ... 11 12 [13] 14 15 ... 44