Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Extract blood from vermin reaction?  (Read 759 times)

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Extract blood from vermin reaction?
« on: May 06, 2020, 04:13:20 pm »

I'm having a little trouble acquiring blood in fortress mode. My basic outline so far is, use the existing reaction to capture a vermin. Then drain the blood from that vermin with a custom reaction.

This is what I have so far. The reagents part works I'm pretty sure. I'm also pretty sure my attempt at the product isn't correct. The reaction happens, but I just get back an empty animal trap and an empty jug.

Code: [Select]
[REACTION:DRAIN_BLOOD_FROM_VERMIN]
[NAME:drain blood from vermin]
[BUILDING:SACRIFICIAL_ALTAR:CUSTOM_B]
[REAGENT:vermin:1:VERMIN:NONE:NONE:NONE]
[REAGENT:animal trap:1:ANIMALTRAP:NONE:NONE:NONE]
[CONTAINS:vermin]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:liquid container:1:NONE:NONE:NONE:NONE]
[EMPTY]
[DOES_NOT_ABSORB]
[PRESERVE_REAGENT]
[HAS_TOOL_USE:LIQUID_CONTAINER]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:LIQUID_MISC:NONE:GET_MATERIAL_FROM_REAGENT:vermin:BLOOD]
[PRODUCT_TO_CONTAINER:liquid container]
[PRODUCT_DIMENSION:150]
[SKILL:DISSECT_VERMIN]

Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Extract blood from vermin reaction?
« Reply #1 on: May 06, 2020, 05:37:39 pm »

This won't work because the vermin isn't a material, so GET_MATERIAL_FROM_REAGENT (which is designed to work with materials) won't work on it.
It is very unlikely that this kind of reaction will work with vermin; most reactions don't.
It is possible that reactions may consider the vermin to be made of whatever its "main" material is; that is the material that composes most of its body mass, generally muscle, but I have not tested this (you can try making a custom reaction that turns a vermin into an item using its material).  You can try adding blood as a reaction material to the muscle template, similar to how milk produces cheese as a reaction material, but this may cause errors for any creature that has muscle but no blood.
Your best option is probably to add blood as an extract to the creatures you want to extract it from, this should allow you to use them in the default vermin extraction reaction.

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: Extract blood from vermin reaction?
« Reply #2 on: May 06, 2020, 06:41:13 pm »

I took a look at how Meph arrived at getting blood for his Warlock mod. It looks like he has it set up to get blood from either meat or from vermin remains, so we know at least those two work.  I'm going to see if the [PRODUCT:100:5:LIQUID_MISC:NONE:CREATURE_MAT:ANIMAL_BLOOD:BLOOD] works on living vermin or only on remains. I'm also wondering now if you can extract blood from a non-vermin corpse via similar means.

It's a damned shame that I can't actually "sacrifice" an animal with mechanics similar to butchery. Perhaps some day.

Code: [Select]
[REACTION:EXTRACT_BLOOD]
    [NAME:Extract blood from meat or organs]
    [BUILDING:KITCHEN:CUSTOM_B]
    [REAGENT:meat:1:NONE:NONE:NONE:NONE]
[REACTION_CLASS:FRESH_BLOOD_MAT]
[UNROTTEN]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
    [REAGENT:barrel:1:NONE:NONE:NONE:NONE]
[FOOD_STORAGE_CONTAINER]
[EMPTY]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
    [PRODUCT:100:5:LIQUID_MISC:NONE:CREATURE_MAT:ANIMAL_BLOOD:BLOOD]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT_DIMENSION:150]
    [SKILL:COOK]

[REACTION:EXTRACT_BLOOD_VERMIN]
    [NAME:Extract blood from vermin remains]
    [BUILDING:KITCHEN:CUSTOM_B]
[REAGENT:A:1:REMAINS:NO_SUBTYPE:NONE:NONE]
    [REAGENT:barrel:1:NONE:NONE:NONE:NONE]
[FOOD_STORAGE_CONTAINER]
[EMPTY]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
    [PRODUCT:100:5:LIQUID_MISC:NONE:CREATURE_MAT:ANIMAL_BLOOD:BLOOD]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT_DIMENSION:150]
    [SKILL:COOK]

EDIT: Damn, it doesn't seem to work. I end up just creating jugs that contain liquid [5]
« Last Edit: May 06, 2020, 07:35:54 pm by Rekov »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Extract blood from vermin reaction?
« Reply #3 on: May 10, 2020, 03:29:42 pm »

One you're using something from Masterwork, which is highly customized, something like

Code: [Select]
    [PRODUCT:100:5:LIQUID_MISC:NONE:CREATURE_MAT:DOG:BLOOD]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT_DIMENSION:150]

would work, ANIMAL_BLOOD is just some placeholder creature he made to house a generic type of blood, or other materials.

also for living small creatures VERMIN is the live version PET is a tamed vermin, REMAINS for well dead vermin, and as IndigoFenix stated it's near impossible to use GET_MATERIAL_FROM_REAGENT on REMAINS, CORPSEPIECE, and CORPSE. and VERMIN and PET I don't think it can be used at all.

so your best bet is just to have a generic blood type you can "extract" from things and have that as your product on MEAT, VERMIN, PET, REMAINS, etc.
Logged

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: Extract blood from vermin reaction?
« Reply #4 on: May 10, 2020, 04:24:26 pm »

Yeah, I realized that eventually. I ended up creating my own SACRIFICIAL_BLOOD placeholder creature.
Logged