Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Is it possible to add custom reactions to the loom?  (Read 486 times)

Narrrz

  • Bay Watcher
    • View Profile
Is it possible to add custom reactions to the loom?
« on: May 08, 2023, 08:55:52 pm »

I've made a mod to allow feathers to be woven into cloth (silk), which works, but i can't seem to make it take place at the loom. Is the tag for the building not LOOM? it shows up as that (actually as WORKSHOP_LOOM) in the graphics files.

Also, one side effect of giving feathers the [SILK] tag is that when butchered, a creature drops a stack of x feathers instead of a single feather item proportionate to their body size. That would be good, except the reaction eats the entire stack without multiplying the products. I think this is a bug, reminiscent of an old one where any bone- related job would use the entire stack of bones; indeed, if i change this reaction to take bones instead of feathers, it uses just a single bone from the stack.
Logged

DPh Kraken

  • Bay Watcher
  • [PRONOUN:she:her:herself][PRONOUN:it:its:itself]
    • View Profile
Re: Is it possible to add custom reactions to the loom?
« Reply #1 on: May 09, 2023, 11:09:57 am »

No building token is listed for the loom on the reaction tags wiki page. I'd use the tanner's shop or farmer's shop as a stand-in, unless there's an unintuitive building token hidden in the code.
Bone-related bug 0011804 nonwithstanding, I think the intricacies of stacks and item dimensions might also be playing a part. One bolt of CLOTH or SHEET is
Code: [Select]
PRODUCT_DIMENSION:10000, and creating sheets might be rounding everything up into that. Does your reaction have
Code: [Select]
[MAX_MULTIPLIER:1]?
Logged
[CHEESE_PLANT] and [CHEESE_GRAPHICS] biggest fan
My mods:
Language & symbolsMiscellanyGraphics resourcesPseudo-ASCII

Narrrz

  • Bay Watcher
    • View Profile
Re: Is it possible to add custom reactions to the loom?
« Reply #2 on: May 09, 2023, 08:36:44 pm »

Yes, i went through the reaction tags list and found that one. I'm also specifying [PRODUCT_DIMENSION:10000] for the output, but to my knowledge there's no way to actually inspect the dimensions of a piece of cloth, to check if the quantity is being used to multiply that dimension. I guess i could create another reaction to take 10000 cloth and output 10000 cloth, and see if it can be used multiple times on the cloth item being output, but my hunch is that as a body part, the stack of feathers is still being regarded as a single item by the game.
Logged