Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 339 340 [341] 342 343 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1399554 times)

Cocoprimate

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5100 on: January 13, 2014, 10:19:25 pm »

Hey guys,

Is there any way I can fertilize eggs/impregnate a creature with dfhack?

Say, I have a female tame giant toad, and I want her to have babies. I've already modded them to be breedable. Could I have her hatch little toadlings?
Logged
The story of Aban Diamondtowns the Charms of Society, dwarf legend, and his descent into the depths. (SPOILER)
http://www.bay12forums.com/smf/index.php?topic=79229.0

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5101 on: January 14, 2014, 10:14:31 am »

You mean this?  df-structures

I find it difficult to read it sometimes, so I oftentimes just printall(something) within the Lua interface to see what is available and defined.  Some things you'll want or need the link above for though, like enums.

...

Similar to how df.unit.find(unitID) works, IIRC you can print enums from within DFHack lua. I haven't tested it, but it might be printall(df.enum) or print(df.enum(ID)).

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5102 on: January 14, 2014, 12:51:50 pm »

print-enum.lua:
Code: [Select]
--prints enum values
local args={...}
function isEnum(t)
    return t._kind=='enum-type'
end
function printEnum(t)
    if not isEnum(t) then
        qerror("type is not an enum")
    end
   
    for i=t._first_item, t._last_item do
        print(i,t[i])
    end
end
local f,err=load("return "..table.concat (args," "))
if f==nil then
    qerror(err)
end
printEnum(f())
Usage: print-enum df.building_type

Nopenope

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5103 on: January 15, 2014, 11:52:23 am »

This will sound like a dumb question but what's the current dfhack version, r3 or r4? People talk as if r4 was already released but I see no link in the OP, is it in beta or something?
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5104 on: January 15, 2014, 03:41:59 pm »

r4 was released not quite officially...

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5105 on: January 15, 2014, 06:41:20 pm »

A very random thought just crossed my mind: Does autosyndrome trigger on boulders made of creature mats? Something like PRODUCT:0:1:BOULDER:NONE:CREATURE_MAT:DFHACK_EXAMPLE:MUSCLE, if the muscle tissue/material has the \AUTOSYNDROME and \COMMAND?

I just ask because forgotten beasts, demons, titans and procedually generated content in general will use any inorganics in the raws, and that is a problem once you have several hundret fake inorganics that only exist to call dfhack scripts. One dfhack creature with a few hundret castes would solve that problem beautifully.
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 :::

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5106 on: January 16, 2014, 12:25:11 am »

I'm 70% certain it won't work.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #5107 on: January 16, 2014, 04:54:56 pm »

I just ask because forgotten beasts, demons, titans and procedually generated content in general will use any inorganics in the raws
No they won't - any inorganic material marked with [SPECIAL], either explicitly (evil weather) or implicitly (by specifying [DEEP_SPECIAL] or [DEEP_SURFACE]), is ignored when selecting random-creature materials.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5108 on: January 16, 2014, 05:00:33 pm »

I just ask because forgotten beasts, demons, titans and procedually generated content in general will use any inorganics in the raws
No they won't - any inorganic material marked with [SPECIAL], either explicitly (evil weather) or implicitly (by specifying [DEEP_SPECIAL] or [DEEP_SURFACE]), is ignored when selecting random-creature materials.
In that case let me just leave and slap SPECIAL on ~2000 mats, and I'll be right back.
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 :::

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5109 on: January 16, 2014, 05:52:16 pm »

Just to clarify, what all does the [SPECIAL] tag do?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5110 on: January 16, 2014, 06:43:46 pm »

I knew only that it restricts metals from being used in worldgen. If you have WONDERMETAL and give it the SPECIAL tag, traders wont bring it, and sieges wont use gear made from it.

It does not work with gems or rock. You can still buy/order SPECIAL tagged stone or gems.
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: DFHack 0.34.11 r3
« Reply #5111 on: January 16, 2014, 06:47:52 pm »

SPECIAL means basically that stuff won't show up at all except where it's explicitly made to. If you make stone that occurs anywhere, that counts as "explicitly made to". Reactions do not.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5112 on: January 16, 2014, 07:28:18 pm »

I have a question about syndrometrigger. (Edit: its solved, I added the solution at the bottom of the post.)

I tried running animaltrain.lua on a specific caste only, but I cant get it to work. I started with this:

Code: [Select]
[INORGANIC:TRAIN_SKELETON_BITE]
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
[STATE_NAME_ADJ:ALL:Train one skill point]
[MATERIAL_VALUE:0]
[SYNDROME]
[SYN_CLASS:\AUTO_SYNDROME]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:animaltrain]
[SYN_CLASS:\WORKER_ID]
[SYN_CLASS:BITE]

It works beautifully and adds 1 skill in biting to the creature running the reaction. Sadly, I cant restrict it to only accept a specific creature caste. So I thought I try syndrometrigger, which I have never used so far, and have never seen in other mods yet. I made an inorganic that teaches an interaction, and the interaction should trigger the script:

Code: [Select]
[INORGANIC:TRAIN_SKELETON_BITE]
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
[STATE_NAME_ADJ:ALL:Train one skill point]
[MATERIAL_VALUE:0]
[SYNDROME]
[SYN_CLASS:\AUTO_SYNDROME]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:SKELETON]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:IRONBONE_SKELETON]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:BLOODSTEEL_SKELETON]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:DREADNOUGHT_SKELETON]
      [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:100]
         [CDI:INTERACTION:TRAIN_SKELETON_BITE]
[CDI:VERB:learn biting:learns how to bite better:NA]
[CDI:TARGET:A:SELF_ONLY]
[CDI:TARGET_RANGE:A:1]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:300]

Code: [Select]
[INTERACTION:TRAIN_SKELETON_BITE]
   [I_SOURCE:CREATURE_ACTION]
   [I_TARGET:A:CREATURE]
      [IT_LOCATION:CONTEXT_CREATURE]
      [IT_AFFECTED_CREATURE:WARLOCK_CIV:SKELETON]
      [IT_AFFECTED_CREATURE:WARLOCK_CIV:IRONBONE_SKELETON]
      [IT_AFFECTED_CREATURE:WARLOCK_CIV:BLOODSTEEL_SKELETON]
      [IT_AFFECTED_CREATURE:WARLOCK_CIV:DREADNOUGHT_SKELETON]
   [I_EFFECT:ADD_SYNDROME]
      [IE_TARGET:A]
      [IE_IMMEDIATE]
      [SYNDROME]
[SYN_CLASS:\COMMAND]
[SYN_CLASS:animaltrain][SYN_CLASS:\UNIT_ID][SYN_CLASS:BITE]

The skeletons use the interaction just fine, they show the "learns how to bite better" in the combat log. But the interaction does not trigger syndrometrigger. What did I do wrong?

Edit: SyndromeTrigger is enabled in the init. In case you were wondering.

EDIT: Ups. It actually needs some effect in that syndrome. I used
   [CE_SPEED_CHANGE:SPEED_PERC:99:START:0:END:10], and everything works just fine. :)
« Last Edit: January 16, 2014, 08:00:31 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 :::

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5113 on: January 16, 2014, 07:52:22 pm »

I've got a problem when trying to change the webbed counter with a script it doesn't stay changed. Is there another flag that I need to set to keep the creature webbed?

(for reference this is what I am doing, unitTarget.counters.webbed = 5000)


EDIT: Nevermind, stupid mistake. I had a > when I wanted a >= in an if statement.

New question. I am able to create items on the ground in front of units, and I am even able to create items in their inventory, but how do I create items in the air above their heads? Fiddling with the creation scripts I was able to get the item to appear, but it just hung in the air. Is there a flag to let it know it should fall?
« Last Edit: January 17, 2014, 01:23:18 pm by Roses »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5114 on: January 17, 2014, 05:34:08 pm »

I've got a problem when trying to change the webbed counter with a script it doesn't stay changed. Is there another flag that I need to set to keep the creature webbed?

(for reference this is what I am doing, unitTarget.counters.webbed = 5000)


EDIT: Nevermind, stupid mistake. I had a > when I wanted a >= in an if statement.

New question. I am able to create items on the ground in front of units, and I am even able to create items in their inventory, but how do I create items in the air above their heads? Fiddling with the creation scripts I was able to get the item to appear, but it just hung in the air. Is there a flag to let it know it should fall?
I think you need to create them as projectiles. Though not sure how much is needed to be filled. Use "dfhack.items.makeProjectile(item)" for that and then set positions probably (if they are not set).
Pages: 1 ... 339 340 [341] 342 343 ... 373