Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Custom reactions involving bones  (Read 3198 times)

JackSlinger

  • Bay Watcher
    • View Profile
Custom reactions involving bones
« on: May 27, 2012, 12:58:58 pm »

I loaded up kobold camp again the other day after noticing that bone carving was working properly (only uses one bone not the whole stack)

The custom reactions for kobold camp are still using the whole stack. I can't find the normal bone carving in the raw's, is it hard coded?
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Custom reactions involving bones
« Reply #1 on: May 27, 2012, 01:11:22 pm »

hard coded, all custom reactions always eat up the entire stack/reagent. It's a current bug
Logged

JackSlinger

  • Bay Watcher
    • View Profile
Re: Custom reactions involving bones
« Reply #2 on: May 27, 2012, 02:49:57 pm »

shame :(
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Custom reactions involving bones
« Reply #3 on: May 27, 2012, 03:02:51 pm »

Yea only way to use bones 1 by one is to make a custom tool/toy/item can a reaction that uses [REACTION_CLASS:BONE] and creates a 1:1 ratio of bones to new item, so a stack of 8 bones will make 8 of that item, in which you use those seperate items as reagents. More work, but it gets what you want.

Edit:
It's not as hard as it sounds
Logged

Corai

  • Bay Watcher
    • View Profile
Re: Custom reactions involving bones
« Reply #4 on: May 27, 2012, 10:27:36 pm »

What. What version of kobold camp, mine still uses a stack.
Logged
Jacob/Lee: you have a heart made of fluffy
Jeykab/Bee: how the fuck do you live your daily life corai
Jeykab/Bee: you seem like the person who constantly has mini heart attacks because cuuuute

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Custom reactions involving bones
« Reply #5 on: May 27, 2012, 10:52:29 pm »

What. What version of kobold camp, mine still uses a stack.
for custom reactions? or the craftshop?
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: Custom reactions involving bones
« Reply #6 on: May 28, 2012, 05:08:07 am »

Oh cool.... might make a reaction to turn stack of bones into TOOL_BONE_MATERIAL and then use it to make anything you want. And make that reaction automatic. Cool will need to try to implement it in my game:)
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Custom reactions involving bones
« Reply #7 on: May 28, 2012, 11:35:44 am »

Oh cool.... might make a reaction to turn stack of bones into TOOL_BONE_MATERIAL and then use it to make anything you want. And make that reaction automatic. Cool will need to try to implement it in my game:)
The material_template for bones will need [MATERIAL_REACTION_PRODUCT:BONE_MAT:LOCAL_CREATURE_MAT:BONE] im sure [REACTION_CLASS:BONE_MAT] would work too

then your reaction would look like this:

[REACTION:MAKE_BONE_MAT]
   [NAME:make bone contruction material]
   [BUILDING:CRAFTSMAN:CUSTOM_SHIFT_B] --- vanilla craftshop
   [REAGENT:A:1:CORPSEPIECE:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:BONE_MAT]
   [PRODUCT:100:1:BLOCK:NONE:GET_MATERIAL_FROM_REAGENT:A:BONE_MAT]
   [SKILL:BONECARVE]

this reaction should make a even 1:1 ratio of 'BONE' blocks to bones (stack of 7 bones would make 7 bone blocks)
I used blocks as an example because with the [HAS_MATERIAL_REACTION_PRODUCT] you can target Bone Blocks as reagents in other custom reactions, and not only that but you can build with it.

REACTION_CLASS version (im sure has the same effect as above)

[REACTION:MAKE_BONE_MAT]
   [NAME:make bone contruction material]
   [BUILDING:CRAFTSMAN:CUSTOM_SHIFT_B] --- vanilla craftshop
   [REAGENT:A:1:CORPSEPIECE:NONE:NONE:NONE][REACTION_CLASS:BONE_MAT]
   [PRODUCT:100:1:BLOCK:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:BONECARVE]


now there is a [ANY_BONE_MATERIAL] for reagents to target only BONE materials, but I don't know if that has the same effect as the two above methods.
« Last Edit: May 28, 2012, 11:37:52 am by Hugo_The_Dwarf »
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: Custom reactions involving bones
« Reply #8 on: May 30, 2012, 03:25:31 am »

Thanks a lot. I will try it later. It should greatly improve bone usage:) Maybe i would even make a mod and put it on wimbly for everyone to see.
Logged

Trouserman

  • Bay Watcher
    • View Profile
Re: Custom reactions involving bones
« Reply #9 on: June 10, 2012, 07:39:36 pm »

his reaction should make a even 1:1 ratio of 'BONE' blocks to bones (stack of 7 bones would make 7 bone blocks)

I tried your HAS_MATERIAL_REACTION_PRODUCT version. It logged an error on BLOCK in the line

   [PRODUCT:100:1:BLOCK:NONE:GET_MATERIAL_FROM_REAGENT:A:BONE_MAT]

so I amended it to BLOCKS. Perhaps it should give blocks 1:1 to the bones, but I found it still consumes the entire stack.

Quote
now there is a [ANY_BONE_MATERIAL] for reagents to target only BONE materials, but I don't know if that has the same effect as the two above methods.

I've used this version by Graebeard:

[REACTION:MAKE_BONE_BLOCKS]
   [NAME:Make Bone Blocks]
   [BUILDING:BONE_QUARRY:NONE]
   [REAGENT:bones:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][ANY_BONE_MATERIAL]
   [PRODUCT:100:1:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:bones:NONE]
   [SKILL:BONECARVE]

It also consumes the entire stack. It differs from your HAS_MATERIAL_REACTION_PRODUCT version in that it only accepts bones. Yours also accepts skulls (good), vermin remains (not so good), and bone blocks (very bad). (Edit: [USE_BODY_COMPONENT] is responsible for that difference.)

Could you elaborate on using a custom tool/toy/item? I don't see how that would change the behavior from what we get with blocks.
« Last Edit: June 10, 2012, 07:50:47 pm by Trouserman »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Custom reactions involving bones
« Reply #10 on: June 10, 2012, 08:30:15 pm »

Know whats funny, I ran into that exact same issue. For some reason "Bones" seem to act like "skin" or at least act like a stack is still 1 item. So a stack of 20 is still 1 bone  :-\

But my mentioned method works fine with plants, and other items. It seems CORPSEPIECE items always count as "1" no matter what
Only way I could think of breaking stacks into "seperate" items would be carving them into items through the craftshop with a vanilla hardcoded reaction. Then use the bone products to be made into new items.

That is the only workaround I can think of for this Bone issue.
Currently I have a reaction that takes 1 bone (stack or indiv.) and has percent chances to make my desired products.
If only bones could be made into a non eatible meat... without being stockpiled as food :P

EDIT:
Idea!! MUSCLE has [BUTCHER_SPECIAL:MEAT:NONE] mayhaps if I add [BUTCHER_SPECIAL:TOOL:ITEM_TOOL_GROUND_ORE] --- this is for my mod buchering would yield "bone chunks"? or a stack of. But this has the issue of ruining vanilla bone carving reactions... darn.

[REACTION:MAKE_BONE_BLOCKS]
   [NAME:Make Bone Blocks]
   [BUILDING:BONE_QUARRY:NONE]
   [REAGENT:bones:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][ANY_BONE_MATERIAL]
   [PRODUCT:100:1:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:bones:NONE]
   [SKILL:BONECARVE]

the ANY_XXXXX_MATERIAL acaully doesn't have the desired effect of making ratios saddly (or at least to my knowledge) and to limit the use of bone stacks with my REACTION_CLASS method use ...CORPSEPIECE:NONE:NONE:NONE][REACTION_CLAS....

Could you elaborate on using a custom tool/toy/item? I don't see how that would change the behavior from what we get with blocks.

Sure:

[REACTION:PROCESS_SMALL_TREE]
   [NAME:process small tree]
   [BUILDING:WOOD_REGEN:CUSTOM_P]
   [BUILDING:WOOD_PROCESSOR:CUSTOM_P]
   [REAGENT:A:1:PLANT:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:LOG_MAT] --- this will take any custom plant that I have made that is has a reaction_product LOG_MAT, in which this is how I make farmable trees without having duplicate wood types in the wood menus ([MATERIAL_REACTION_PRODUCT:LOGMAT:PLANT_MAT:OAK:WOOD] for an example)
   [PRODUCT:100:1:WOOD:NONE:GET_MATERIAL_FROM_REAGENT:A:LOG_MAT] --- since farmable plants can be made into maximum stacks of 5, depending if fertilizer is not used. so a stack of 5 trees would make 5 logs. 1:1 ratio
   [PRODUCT:65:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:A:SEED_MAT]
   [PRODUCT:15:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:A:SEED_MAT]
   [SKILL:CARPENTRY]

now if I changed my reagent to lets say "2" 2:1 ratio. I would get only two logs from a stack of 4 trees.

EDIT2:
Hmm my above mentioned [BUTCHER_SPECIAL:COIN:NONE] --- coins are vanilla stackable items. Only way it would work is if there are two Bone materials in the creature and tissued on them. Which would require some altering of B-Detail_Plans and sneaking the new bone layer under/over/before/after ARG3    [BP_LAYERS:BY_CATEGORY:BODY:BONE_M:50:ARG3:50:ARG2:5:ARG1:1] -- inside the B_Detail_Plan for tissue layering

A custom tissue_template can be made and called marrow, marrow will be made from our new BONE_M that gets butchered into bone coins. But... another hitch with this too... there will be twice as many BONE materials in the menus
"Bluejay bone
Bluejay bone
Rat bone
Rat bone"
« Last Edit: June 10, 2012, 09:02:47 pm by Hugo_The_Dwarf »
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: Custom reactions involving bones
« Reply #11 on: June 13, 2012, 09:19:27 am »

serious science here:) Had any success here Hugo?
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Custom reactions involving bones
« Reply #12 on: June 13, 2012, 12:18:07 pm »

Yea only way to use bones 1 by one is to make a custom tool/toy/item can a reaction that uses [REACTION_CLASS:BONE] and creates a 1:1 ratio of bones to new item, so a stack of 8 bones will make 8 of that item, in which you use those seperate items as reagents. More work, but it gets what you want.

Edit:
It's not as hard as it sounds
Hold on, WHAT?!? Awesome! I can make bone blocks at a ratio of less than one yak per block!
...
Maybe 3 units of bone per block...
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Custom reactions involving bones
« Reply #13 on: June 13, 2012, 05:34:20 pm »

@GWG
That bit of info that you quoted from me, alas is false. I did some testing and any item that is a CORPSEPIECE (skin, bones, hooves/horns?, teeth?, hair?) don't count as a "stack" for custom reactions

the only way this can be done (the Ratio method) is if BONE_TEMPLATE has [BUTCHER_SPECIAL:COINS:NONE] so instead of getting bones you get bone coins. But this has the issue of not being able to use vanilla bone carving reactions

or you can make a custom ammo type that has no usable weapon. And permit it in your entity, then carve that bone ammo. Then your bone block reactions can take 5 bone ammo of that type to make a block. It's a clunky workaround for something that shouldn't need a work around :/
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: Custom reactions involving bones
« Reply #14 on: June 14, 2012, 04:28:03 am »

ammo may be a good solution. I rarely use bone ammo btw - a stack of 11 bones will make 55 ammo then right?
Logged
Pages: [1] 2