Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: (0.47) Is it possible to make a non-wood log?  (Read 786 times)

Bihlbo

  • Bay Watcher
    • View Profile
(0.47) Is it possible to make a non-wood log?
« on: December 14, 2022, 06:49:28 pm »

I'm trying to make logs out of bone, while being sorta new to modding. It's probably a stupid concept, but whatever, this is just for myself. Any help would be appreciated.

  • Making the reaction seems straight-forward. Made just like other reactions that use bone found in the raws. Then, PRODUCT:100:1:WOOD:NONE:GET_MATERIAL_FROM_REAGENT:Bone:LOG is where I get tripped up. I'm sure that looking at that, it's wrong. There aren't any reactions I've found that produce a log, so I don't have an example to use.
  • I can find raws for stone, so making new stone is easy. I don't see a way to make new logs without making a new tree or creature. I included creature here, because wagons are the only source of wagon wood, so it's not produced by a tree. Not even sure how to start with defining the log. There's no items_log.txt file.
  • I want the log to be non-plant, organic, and totally metal. Aside from the calcium in the bones being technically a metal, I mean that last bit as more of a musical style reference, as in, "By Armok, that door is made of bones! That's totally metal!" So, that means the bone log needs to have the IMPLIES_ANIMAL_KILL tag that the MATERIAL_TEMPLATE:BONE_TEMPLATE has in material_template_default.txt. How do you have a log with a bone template, and still have it work like a log?
  • From what I can tell, the WOOD token is required for all reactions that use a log, and WOOD also defines something as "from a plant" though I haven't seen anything like an IMPLIES_PLANT_KILL token. The elves should be okay with buying a bin made from bones, but I don't know how to make that happen while also making the carpenter do the job of crafting it.
  • I mainly want the log to be used to make items like furniture, constructions, cups, etc. I would prefer that it is not burnable into charcoal, or any more flammable than bone. Probably not that big of a deal if this is difficult, as I can just take steps to keep the unfortunately-burnable bone log from being used for charcoal if I don't like it.
  • I'm worried that in the end I'll need to make a new item, and then create an alternate list of reactions, duplicating every way in which wood logs can be used, to instead use a bone log (like, "make bed" and just under it, "make bed from bone logs"). I don't want to do that, because it will clutter up workshop menus during play. Also, it's a lot of work to do, but I'd do it if it actually produced a desired result. I really just want "bone" listed among all the other woods, but to then produce something with properties that are un-wood-like.
« Last Edit: December 14, 2022, 07:31:18 pm by Bihlbo »
Logged

chipathingy

  • Bay Watcher
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #1 on: December 14, 2022, 07:14:52 pm »

Is there a reason you can't bypass the creation of logs and just make stuff directly from bone? If that is ok for what you want, check out splints utility mod. It's got a bonecarving section with a bunch of reactions. You have to make a seperate reaction for each product though
Logged
Author of Fantastic Fantasy Fortress (http://www.bay12forums.com/smf/index.php?topic=180748.0)

Bihlbo

  • Bay Watcher
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #2 on: December 14, 2022, 07:28:15 pm »

Is there a reason you can't bypass the creation of logs and just make stuff directly from bone? If that is ok for what you want, check out splints utility mod. It's got a bonecarving section with a bunch of reactions. You have to make a seperate reaction for each product though

I don't mind creating new reactions for a long list, but I don't think that will accomplish what I'm after, and the usability sucks. I'm trying to turn 5 or 6 bones into one log, because large quantities of bones are a lot easier to come by, and that seems balanced to me. Also, I want that one bone log to be usable just as easily as any log would. 10 bone walls used up 50 bones just as easily as using up 10 random logs. The carpenter grabbed a bone log to make the cabinet because I didn't define the work order to only use tunneltube. I hit d to define a job's details, and in the list of available wood is a bone log. That ease of use is what I'm after.

Also, I just want to learn more.
« Last Edit: December 14, 2022, 07:30:38 pm by Bihlbo »
Logged

Klisz

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #3 on: December 15, 2022, 09:12:36 pm »

I believe your issue lies in "GET_MATERIAL_FROM_REAGENT:Bone:LOG". It should be Bone:NONE; as it stands, the game is trying to make the log out of the bone's "LOG" reaction product (similarly to, say, when tanners converting skin to leather). Using Bone:NONE makes it out of the reagent's material instead; testing it, I've successfully made horse bone logs, which the carpenter did indeed then use to make a -horse bone bed-.
Logged

Bihlbo

  • Bay Watcher
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #4 on: December 16, 2022, 06:25:23 am »

I believe your issue lies in "GET_MATERIAL_FROM_REAGENT:Bone:LOG". It should be Bone:NONE; as it stands, the game is trying to make the log out of the bone's "LOG" reaction product (similarly to, say, when tanners converting skin to leather). Using Bone:NONE makes it out of the reagent's material instead; testing it, I've successfully made horse bone logs, which the carpenter did indeed then use to make a -horse bone bed-.
Thank you! I didn't think that was correct, it was just a slapdash example I threw in. So, I'm not surprised it's wrong. If you still have the raw handy, could you please show me the reaction you wrote to make that work? It'll help just to test my own attempts against, if nothing else.
Logged

Klisz

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #5 on: December 16, 2022, 10:16:53 am »

Code: [Select]
[REACTION:MAKE_BONE_LOG]
[NAME:make bone log]
[BUILDING:CARPENTER:NONE]
[REAGENT:Bone:5:NONE:NONE:NONE:NONE]
[USE_BODY_COMPONENT]
[ANY_BONE_MATERIAL]
[PRODUCT:100:1:WOOD:NONE:GET_MATERIAL_FROM_REAGENT:Bone:NONE]
Logged

brewer bob

  • Bay Watcher
  • euphoric due to inebriation
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #6 on: December 16, 2022, 11:13:02 am »

I would prefer that it is not burnable into charcoal, or any more flammable than bone.

I think logs are burnable in wood furnaces regardless of their material. Tried a bunch of different stuff with a personal mod, but couldn't find a way around it.

Bihlbo

  • Bay Watcher
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #7 on: December 17, 2022, 11:01:54 am »

I would prefer that it is not burnable into charcoal, or any more flammable than bone.
I think logs are burnable in wood furnaces regardless of their material. Tried a bunch of different stuff with a personal mod, but couldn't find a way around it.
I presume it's that way with elfbait, too. From what I can tell, if it's a log, then it is wood, then it angers the elves. If it has the WOOD token, then it's a log, and it can be used as one. But you can't use anything in the carpenter shop that doesn't have the WOOD token, without adding new reactions to the shop.

Is there a way to mod the WOOD token? Or, is it possible to change the carpenter reactions to require a token like CARPENTER_USE instead of WOOD, then change trees to produce logs with that new token as well as the WOOD token, so that other things can be accepted by the carpenter that do not have the WOOD token? I assume the answer to that is no, because it looks like other large-scale mods have gone the route of removing a race's ability to make a carpenter workshop entirely, and replaced it with a custom workshop that is controllable. Maybe I can borrow their work. Or, I may have to bite the bullet and make a submenu in the carpenter shop for fake logs, with entirely new reactions. Seems like a bad solution.
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: (0.47) Is it possible to make a non-wood log?
« Reply #8 on: December 18, 2022, 07:25:29 am »

I would prefer that it is not burnable into charcoal, or any more flammable than bone.
I think logs are burnable in wood furnaces regardless of their material. Tried a bunch of different stuff with a personal mod, but couldn't find a way around it.
I presume it's that way with elfbait, too. From what I can tell, if it's a log, then it is wood, then it angers the elves. If it has the WOOD token, then it's a log, and it can be used as one.

Rule of thumb, this actually applies to 'Inorganic' settings. As elven grown items can be entirely be subdivided in stockpiles in classic DF by using the bottommost option of inorganic/organic items to separate them from regular wood crafts. So in a cage stockpile this creates a grown wood & metal/glass cage exclusivity.

Initially no its not possible to alter hardcoded tokens like [WOOD] as its a descriptor to its purpose (which are tied into so many other things too), but you can set up the specifics with [REACTION_CLASS] which often breaks down the complications of specifying exactly what material is suitable for a custom reaction.

EI: Carpenter only deals with [WOOD] and the default (this *i think* could possibly be solved with DFhack scripts to remove outright hardcoded workshops) jobs would still pick up not actual tree wood [WOOD], but your bone-logger workshop/subcategory would wait for the specific material of the horse bone bed via the bone material, inserted into the creature ("Sturdy Bones" "Equine Bones", targeting which part of the leg-structure and swapping it out) from a defined material definition.
Logged