The wiki has all the info you should need to do that, but as usual its all over the damn place. The four big pages you'll need to reference are
reactions,
item tokens,
material tokens, and
material definition tokensBasically you just want the first reagent to be a stack of cloth of any material (use quantity 10000 iirc to consume one full stack) - note that using any material cloth also allows the game to choose adamantine cloth. But a bed made of adamantine cloth would be totally rad, so yay? It's just easier to not add yet another material you have to be selective about.
The second will be trickier, because hair and feathers are two very different things, and you probably dont want two different reactions, one to use feathers one to use hair, and you also dont want to have to make a reaction for every single creature, but there isnt a token in the hair or feather material definition that tells reactions whether a CORPSEPIECE (because that's what youd get from a butcher's shop) is made of an appropriate material, and we also dont want the reaction to use things like cartilage or nervous tissue, which would also be generated as CORPSEPIECE items from butchering animals.
So before anything else, you have to modify the hair and feather material definitions to make that possible.
First you need to add a REACTION_CLASS token to each of those material definitions in the material_template_default.txt file. Use the same one on each, maybe call it [REACTION_CLASS:
PILLOW_STUFFING_MAT]
Then the reagent line then needs to be:
[REAGENT:bedstuffing:1:CORPSEPIECE:NONE:NONE:NONE][REACTION_CLASS:
PILLOW_STUFFING_MAT]
- this then tells the game to look for bits of corpses made of any material that has the PILLOW_STUFFING_MAT, which since we added to both feathers and hair at the material definition level, should now include feathers or hair from literally every animal in the game.
Then the product is a single BED item, no subtype, with GET_MATERIAL_FROM_REAGENT:{the reagent ID of the cloth}:NONE, and you should now have a bed made of whatever cloth was used. The second reagent, the hair/feather stuffing, just gets consumed and disappears in this case, but you could instead tell the GET_MATERIAL_FROM... line to use the feather/hair material, if you're more interested in whats inside the mattress than what cloth covers it. But if it was made of adamantine cloth, you now have a bed made of chicken feathers and its the adamantine cloth that vanishes, which is also wonky.