node-tf2 icon indicating copy to clipboard operation
node-tf2 copied to clipboard

Fulfilling Dynamic Recipe

Open jamtat opened this issue 10 years ago • 4 comments

It would be great to have some way of crafting up Chemistry Kits (dragging 200 items is a huge pain...) and Fabricators automatically. I've had a play around with sending messages of various formats to the GC using the Language.FulfillDynamicRecipeComponent msg ID but so far haven't had any luck and have no idea where to start looking to find the correct structure.

jamtat avatar Jul 04 '15 11:07 jamtat

message CMsgRecipeComponent {
    optional uint64 subject_item_id = 1;
    optional uint64 attribute_index = 2;
}

message CMsgFulfillDynamicRecipeComponent {
    optional uint64 tool_item_id = 1;
    repeated .CMsgRecipeComponent consumption_components = 2;
}

I'll see about adding support, I agree that this would be nice to have. I'm assuming that tool_item_id is the ID of the chemistry set/fabricator, subject_item_id is the ID of an item which you want to apply to it, and attribute_index is the defindex (maybe?) of the input attribute which you're trying to fulfill.

I'll run some NetHook tests later today if possible.

DoctorMcKay avatar Jul 04 '15 20:07 DoctorMcKay

Thank you so much! I've got it working and will send a pull request

jamtat avatar Jul 04 '15 23:07 jamtat

If someone can provide me a way to parse value_bytes I can implement this feature

peymil avatar Apr 05 '23 22:04 peymil

I figured it out. Incoming buffer is CSOEconItem.

peymil avatar Apr 05 '23 23:04 peymil