Adding resources from construction

So the new pit construction creating soil and other debris gave me another idea for using constructions to get a resource.

The ability to cut grass is basically useless currently since it requires fairly rare tools and doesn’t give you anything but an easier tile to walk on, which can already be accomplished via turning the tile to dirt with a digging implement. I’m thinking if cutting down tall and long grass actually yielded piles of straw it would have a use for quickly stockpiling the material for camp construction or other crafts that allow piles of straw.

In my mind it’s an easy change but I’m no coder so if I wanted to add it myself I would need to learn how to do so, register a github, learn how to do a pull request, etc. so it will take me quite a while to do, so anyone else is welcome to do it if it’s as easy as I think and it interests them.

Otherwise, what would I need to look for to basically make the cut grass yield straw? Is it even actually just a quick json edit like I’m assuming it is?

1 Like

Looking at the “extract clay” construction below the various grass cutting in construction.json, it looks like “byproduct” is an option for constructions. That spawns items after a completed construction.

json editing is pretty easy, and I’d be happy to help you through the github process if you’d like to contribute, or I can whip up a PR for you.

1 Like

It might be up to a week before I have actual computer access to do such, so if you wanted to whip up a quick PR and toss a link to it for me to look at I would be fine with that. Adding some byproducts to distillation recipes is another thing I’ve wanted to do.

I’ve edited Raws in Dwarf Fortress before and json editing seems similar, so if you don’t mind me pestering you with questions when I actually sit down to learn I would be fine with that.

1 Like

Here you are! https://github.com/CleverRaven/Cataclysm-DDA/pull/29584

If you’ve editing DF Raws, json should be a breeze. Feel free to ask away; I’m always happy to see more contributors.

2 Likes

Awesome! Thank you very much!

1 Like

By the way, if you click on the “changes” tab in a Pull Request, you can see exactly what’s added or changed. It’s the best way to learn (or relearn) what needs to be done to add a new feature.

Oh that’s perfect. It’s much easier for me to do things “fill in the blank” style with a reference sheet.