Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 27 28 [29] 30 31 ... 44

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

spikeof2010

  • Bay Watcher
    • View Profile
Re: Putnam's DFHack scripts
« Reply #420 on: November 10, 2013, 10:05:12 pm »

Needs the SYN_NAME.

Code: [Select]
[INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_GASATE]
[USE_MATERIAL_TEMPLATE:METAL_TEMPLATE]
[SYNDROME]
[SYN_CLASS:DFHACK_ITEM_SYNDROME]
[SYN_NAME:long sword]
[CE_SPEED_CHANGE:SPEED_PERC:200:START:0]

Still doesn't work. I'm very sorry for pestering you, I'm just rather confused as to why it doesn't work.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack scripts
« Reply #421 on: November 10, 2013, 11:32:09 pm »

Quote
[SYN_NAME:long sword] All creatures with long swords will be affected by this syndrome.

It needs to be named "boot of speed", not "long sword"

Roses

  • Bay Watcher
    • View Profile
Re: Putnam's DFHack scripts
« Reply #422 on: November 10, 2013, 11:59:35 pm »

Did you read the example? The syndrome goes in a material, not in the item.

Whats the difference between the [SYN_CLASS:DFHACK_ITEM_SYNDROME] and using [INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_]? I thought the first was what went in items (so that that item, no matter what its made of, will give the unit the syndrome) and that the second went in the inorganic (so that any item made of the material, no matter the item, will give the unit the syndrome).
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack scripts
« Reply #423 on: November 11, 2013, 01:16:09 am »

Nothing goes in the item ever.

The SYN_CLASS goes in the syndrome under the item. Read the entire example, not just part.

To answer your question, [SYN_CLASS:DFHACK_ITEM_SYNDROME] means that any item made of that material will have the syndrome; using [INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_X] will make it so that the specific item made out of any [/i]material[/i] will give the syndrome.

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Putnam's DFHack scripts
« Reply #424 on: November 11, 2013, 01:44:56 am »

Alright, I'm tearing my hair out here.  Just upgraded to the r4 version, and I'm having two problems...

1) When the game loads, itemsyndrome prints "itemsyndrome enabled," but starts disabled, despite being enabled in the dfhack init.

2) Even once it's enabled, itemsyndrome isn't actually applying syndromes.  Turning debug on shows a bunch of unit and item checks, but none of them actually get the syndrome.

Code: (dfhack.init) [Select]
##########LFR v0.21 init file##########

##binary patches to fix vanilla bugs##

binpatch apply deconstruct-heapfall #prevents buildings from killing or injuring dwarves when deconstructed#
binpatch apply deconstruct-teleport  #prevents items from teleporting around when a building is deconstructed#
binpatch apply hospital-overstocking #makes hospitals actually obey their stock limits#
binpatch apply custom-reagent-size #allows for partial use of reagents with dimensions in custom reactions - not used in LFR, but doesn't hurt#
binpatch apply training-ammo #allows marksdwarves to pick up and use training ammunition even if their quiver is full of combat ammo#
binpatch apply armorstand-capacity     #doubles the capacity of armorstands#
binpatch apply weaponrack-unassign #fixes weapon racks - works together with the "fix armory" plugin#

##tweaks##

tweak patrol-duty #dwarves will not get negative thoughts for training sessions#
tweak stable-cursor #cursor remembers its position between menus#
tweak fix-dimensions #something involved with the custom reagent size fix#
tweak military-stable-assign #military position assignment list will no longer jump back to the start every time a unit is assigned#
tweak military-color-assigned #units already in squads will appear as a different color in the military assignment list#
tweak hive-crash #fixes a bee-related crash bug#

##plugins##

load autoSyndrome #required for ritual transformations and mechanical constructs#
autoSyndrome enable
load syndromeTrigger #required to make paragons work properly#
syndromeTrigger enable
load infiniteSky
infiniteSky enable #raises the map ceiling if you build up to it#

##scripts##

fix/growthbug enable #Fixes a bug with dwarves not growing to full adult size#
itemsyndrome enable contaminantsoff #Required for magical weapons#


Code: (material) [Select]

[INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_STONECRUSHER]
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
[SYNDROME]
[SYN_NAME:stonecrusher]
[SYN_CLASS:DFHACK_ITEM_SYNDROME]
[SYN_CLASS:DFHACK_WIELDED_ONLY]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:pulverizing smash]
[CDI:INTERACTION:MATERIAL_EMISSION]
[CDI:MATERIAL:INORGANIC:GRANITE:SOLID_GLOB]
[CDI:TARGET:C:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:C:3]
    [CDI:VERB:smash the stonecrusher into the ground, kicking up stone fragments:smashes the stonecrusher into the ground, kicking up stone fragments:NA]
[CDI:MAX_TARGET_NUMBER:C:8]
[CDI:WAIT_PERIOD:1300]
[CDI:USAGE_HINT:ATTACK]
« Last Edit: November 11, 2013, 02:02:34 am by narhiril »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack scripts
« Reply #425 on: November 11, 2013, 02:05:31 am »

Does it output the "item itself has syndrome" message?

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Putnam's DFHack scripts
« Reply #426 on: November 11, 2013, 02:07:03 am »

Does it output the "item itself has syndrome" message?

Nope.  Using the latest code from github.

I feel compelled to note that this same setup worked with my old r3 version of itemsyndrome - the only thing I changed in the raws was removing the end times.
« Last Edit: November 11, 2013, 02:09:18 am by narhiril »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack scripts
« Reply #427 on: November 11, 2013, 02:16:31 am »

Oh.

Oh.

"SC_WORLD_LOADED" should be SC_WORLD_LOADED.

Oy.

Fixed.

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Putnam's DFHack scripts
« Reply #428 on: November 11, 2013, 02:24:18 am »

Oh.

Oh.

"SC_WORLD_LOADED" should be SC_WORLD_LOADED.

Oy.

Fixed.

Got it, it's working perfectly now.  Thanks!
« Last Edit: November 11, 2013, 02:27:11 am by narhiril »
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Putnam's DFHack scripts
« Reply #429 on: November 11, 2013, 02:43:06 am »

Say, I noticed you altered the spawnunit code to use in reactions...

I could use this.

Just a question: how do I make the unit spawn in the workshop?
autosyndrome

Will spawnunit accept \LOCATION in place of a cursor position?  I'd like to be able to call it using syndromeTrigger to spawn a unit at the affected unit.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack scripts
« Reply #430 on: November 11, 2013, 02:49:37 am »

Very much yes; I changed it specifically to allow for that.

Warmist's version is necessary for r4, mind; mine is just for r3. I'm not sure if Warmist's version has the location code in it, though.

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Putnam's DFHack scripts
« Reply #431 on: November 11, 2013, 02:50:41 am »

Very much yes; I changed it specifically to allow for that.

Warmist's version is necessary for r4, mind; mine is just for r3. I'm not sure if Warmist's version has the location code in it, though.

Alright, thanks.  Where might I find that?  I can only find the r3 one.
« Last Edit: November 11, 2013, 02:58:59 am by narhiril »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack scripts
« Reply #432 on: November 11, 2013, 03:01:39 am »

https://gist.github.com/warmist/4296504

And no, this doesn't have the location code. Lemme just stick that in there, wait a sec...

EDIT: here it is
« Last Edit: November 11, 2013, 03:03:57 am by Putnam »
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Putnam's DFHack scripts
« Reply #433 on: November 11, 2013, 03:09:53 am »

Alright, here's what I get.

Code: [Select]
[DFHack]# spawnunit DWARF 0 Urist
...sktop\LFR DFHack r4 Test Copy\hack\scripts/spawnunit.lua:84: Cannot read fiel
d body_component_info.body_layer_338: not found.
stack traceback:
        [C]: in function '__index'
        ...sktop\LFR DFHack r4 Test Copy\hack\scripts/spawnunit.lua:84: in funct
ion 'CreateUnit'
        ...sktop\LFR DFHack r4 Test Copy\hack\scripts/spawnunit.lua:169: in func
tion 'PlaceUnit'
        ...sktop\LFR DFHack r4 Test Copy\hack\scripts/spawnunit.lua:233: in main
 chunk
        (...tail calls...)
[DFHack]#

Not as worried about this one, as I don't have any raws that depend on it yet, but I thought you guys should see it.
« Last Edit: November 11, 2013, 03:14:23 am by narhiril »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Putnam's DFHack scripts
« Reply #434 on: November 11, 2013, 03:33:24 am »

To answer your question, [SYN_CLASS:DFHACK_ITEM_SYNDROME] means that any item made of that material will have the syndrome; using [INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_X] will make it so that the specific item made out of any [/i]material[/i] will give the syndrome.

Can the [INORGANIC:DFHACK_ITEMSYNDROME_MATERIAL_X] be given multiple [SYN_NAME] tokens so that it applies to multiple items?

i.e.

Code: [Select]
[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.
                [SYN_NAME:short sword]
                [SYN_NAME:bastard sword]
[CE_BODY_TRANSFORMATION:START:0]
[CE_CREATURE:TOAD:MALE] Syndrome turns creature into a toad.

So that all creatures with long swords, short swords, or bastard swords are affected by the syndrome? Or do I need a separate inorganic for each item?
Logged
Pages: 1 ... 27 28 [29] 30 31 ... 44