Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: roqi on May 08, 2010, 11:30:28 am

Title: Little mod: Sawmill
Post by: roqi on May 08, 2010, 11:30:28 am
Hi all.

I like building out of wood, and I think it's terribly inefficient to use one log per one square of wall. Sawmill is what I'd need, I thought. After searching the forum, I found out some people have spoken of a sawmill, but nobody actually got through it and made it.
So, here it is! A custom Sawmill workshop, a special "plant" with no biome, and a working reaction.
Here's a screenie:

(http://i189.photobucket.com/albums/z309/vvan4/thin.jpg)

Somehow, it fits. I can see a dwarf refusing to call something made out of (pfft) wood its proper name...

(http://i189.photobucket.com/albums/z309/vvan4/durrwood-1.png)

And here's the raws:

Spoiler (click to show/hide)

Also, remember to add this to entity file
[PERMITTED_BUILDING:SAWMILL]
[PERMITTED_REACTION:WOOD_PLANKS]


A person more patient than me could actually write up a dozen plants and reactions to make, say, Maple Logs turn into Thin Blocks Made Out Of Maple Logs. Feel free to, if you'd like; it's quite simple. Creating reactions for plank furniture is entirely possible too.
If somebody wants to take this and put it in their mod, be my guest.

Anyway, enjoy  ;D
Title: Re: Little mod: Sawmill
Post by: Zaranthan on May 08, 2010, 12:08:44 pm
There's another issue: your carpenters will start making "a plank made out of wood logs bed," "a plank made out of wood logs barrel,"  "a plank made out of wood logs crutch," and so on. Such are the hazards of a reaction that takes one log and makes ten logs.
Title: Re: Little mod: Sawmill
Post by: roqi on May 08, 2010, 12:23:40 pm
You are correct, except "logs" is not included in the plant name so it'd be "a plank made out of wood bed". Well, poo.   :-[
I guess the way to fix it would be disabling the vanilla carpenter's workshop and making a custom one with all the reactions created so there's no stupid names.
But oh well. I guess it is not really usable without micromanaging. And I so liked the look of it...
Title: Re: Little mod: Sawmill
Post by: Arkenstone on May 08, 2010, 12:26:27 pm
Why not just limit it to a building material by removing the [WOOD] tag?  WE know the difference between a log and a plank, but the game doesn't.
Title: Re: Little mod: Sawmill
Post by: Shima on May 08, 2010, 12:31:50 pm
Could always just call it something like "wooden plank" or "processed wood" or "milled wood".  Wooden plank bed, processed wood bed, milled wood bed.  Those aren't so bad.  I'd go with "processed wood" myself.

Could even get fancy, make another reaction that requires the processed wood and something else, make lacquered wood, which has a higher value than normal woods.  Lacquered wood idols, wave them in the Elves' faces.
Title: Re: Little mod: Sawmill
Post by: roqi on May 08, 2010, 12:52:28 pm
Why not just limit it to a building material by removing the [WOOD] tag?  WE know the difference between a log and a plank, but the game doesn't.

Removing the tag from...where? And who would build using it, because I don't think it would be carpenters then ???

Could always just call it something like "wooden plank" or "processed wood" or "milled wood".  Wooden plank bed, processed wood bed, milled wood bed.  Those aren't so bad.  I'd go with "processed wood" myself.

Could even get fancy, make another reaction that requires the processed wood and something else, make lacquered wood, which has a higher value than normal woods.  Lacquered wood idols, wave them in the Elves' faces.

The game adds "logs" automatically. So it'd be wooden plank logs, processed wood logs, milled wood logs... I decided on planks made out of wood logs because it sounds almost official.  :D But it's for naught now.

Yeah, the game does need more wood industry. I mean yeah, dwarves are associated with stone, but shoving butchered trees in front of the elves is a valuable experience, too.

[EDIT] Found a solution, edited first post
Title: Re: Little mod: Sawmill
Post by: DracoGriffin on May 08, 2010, 04:23:59 pm
Uhm, isn't there a new tag in DF2010 along the lines of "get material from reagent"? Why isn't that used instead?

In 40d, it wasn't possible so you had to mickeymouse it like what's going on here. :X
Title: Re: Little mod: Sawmill
Post by: roqi on May 08, 2010, 04:37:59 pm
Uhm, isn't there a new tag in DF2010 along the lines of "get material from reagent"? Why isn't that used instead?

In 40d, it wasn't possible so you had to mickeymouse it like what's going on here. :X

I'm aware of that. But if I used that tag, it'd just be "maple logs" and it wouldn't fit a sawmill, being just a reaction that turns one log into ten...  ::)

I am so misunderstood *sulks in a corner*
Title: Re: Little mod: Sawmill
Post by: DracoGriffin on May 08, 2010, 04:44:57 pm
Why wouldn't it be maple planks? :P

There was a small mod for Kobold Camp just for this purpose but product was blocks. Things look nicer in blocks! :D
Title: Re: Little mod: Sawmill
Post by: roqi on May 08, 2010, 05:00:03 pm
Why wouldn't it be maple planks? :P

There was a small mod for Kobold Camp just for this purpose but product was blocks. Things look nicer in blocks! :D

Because there is no such item as planks... I made a custom plant so they would be named "planks" or "thin wooden blocks", but real planks cannot be made.
Title: Re: Little mod: Sawmill
Post by: Smitehappy on May 08, 2010, 05:40:16 pm
* I need to read*
Title: Re: Little mod: Sawmill
Post by: Deon on May 09, 2010, 07:33:39 am
I have refined wood too but I didn't include it in the main mod because I haven't decided which route do I want to go... Maybe I will make a separate material template which does not have ITEMS_HARD, ITEMS_WEAPON etc. so you won't have plank armor or weapons. It would work :).

* I need to read*
You don't have to.
Title: Re: Little mod: Sawmill
Post by: Arkenstone on May 09, 2010, 09:22:23 am
Why don't you just make a new material template that's made from wood, the same way that leather is made from skin?  You'd even be able to keep the tree name that way!

EDIT: I didn't see that Deon already beat me to it.
Title: Re: Little mod: Sawmill
Post by: Arkenstone on May 09, 2010, 01:42:53 pm
Why wouldn't it be maple planks? :P

There was a small mod for Kobold Camp just for this purpose but product was blocks. Things look nicer in blocks! :D
Because there is no such item as planks... I made a custom plant so they would be named "planks" or "thin wooden blocks", but real planks cannot be made.
Yeah, if all you want to do with it is build, just make a reaction that produces 5 or 10 blocks of wood.
Title: Re: Little mod: Sawmill
Post by: roqi on May 10, 2010, 04:47:25 am
I have refined wood too but I didn't include it in the main mod because I haven't decided which route do I want to go... Maybe I will make a separate material template which does not have ITEMS_HARD, ITEMS_WEAPON etc. so you won't have plank armor or weapons. It would work :).

Do go ahead. It'd be much better than what I've done. I had no idea you could do that  :P

Why wouldn't it be maple planks? :P

There was a small mod for Kobold Camp just for this purpose but product was blocks. Things look nicer in blocks! :D
Because there is no such item as planks... I made a custom plant so they would be named "planks" or "thin wooden blocks", but real planks cannot be made.
Yeah, if all you want to do with it is build, just make a reaction that produces 5 or 10 blocks of wood.

*points to first post*
That's what I've done, now  ::)
Title: Re: Little mod: Sawmill
Post by: Fullmoon on May 10, 2010, 05:33:46 am
Hmm. Quite nice. And IIUC only blocks are attainable. Great idea about limitations. Should go modify my plastic.

 ...yes, I've made plastic. Dwarves like it for it's shiny surface.
Title: Re: Little mod: Sawmill
Post by: Kazang on May 10, 2010, 07:20:38 am
Possibly a stupid question, but would not be more simple to make trees drop multiple logs when felled?  Creating more hauling jobs but circumventing the whole "game doesn't know what a plank is" issue.
Or is this a hard coded value that you can't easily change?
Title: Re: Little mod: Sawmill
Post by: Knight Otu on May 10, 2010, 09:13:15 am
Or is this a hard coded value that you can't easily change?
It's hardcoded behavior, so how many logs a tree drops isn't changeable.
Title: Re: Little mod: Sawmill
Post by: bdog on May 10, 2010, 05:56:32 pm
And as far as I know it's not possible to change "what" tree drops... so there's no way to force DF to drop "wooden unusable boulder" that could be processed into logs (but I hope that I'm wrong)
Title: Re: Little mod: Sawmill
Post by: Tiler on May 10, 2010, 07:18:20 pm
You should make the sawmill require a large serrated disc to build.

I wish there was a way for it to require power.
Title: Re: Little mod: Sawmill
Post by: Arkenstone on May 11, 2010, 05:58:53 pm
Have a MAGMA SAWMILL!!!
Title: Re: Little mod: Sawmill
Post by: Bishop36 on May 11, 2010, 07:38:40 pm
This works well with human fortresses. (following the human challenge rules from the wiki)
Title: Re: Little mod: Sawmill
Post by: Osdeath on May 12, 2010, 04:50:55 pm
So made a "workshop_sawmill.txt" File in raw/objects, copied the text from the first post into it, fixed it up so it looked like the soap makers one (copy paste stuck it all one one line, so i just pressed enter a fair bit really), did the same for "reaction_plank.txt", put the bit in Plant_standard.txt, added the two lines in Entity_default.txt in the part for dwarves, aaand, no sawmill? am i missing something here?
Title: Re: Little mod: Sawmill
Post by: Vucar Fikodastesh on May 12, 2010, 05:59:21 pm
I believe "workshop_sawmill.txt" needs to have "workshop_sawmill" at the top, not "building_custom".
Title: Re: Little mod: Sawmill
Post by: roqi on May 13, 2010, 05:00:10 am
Hm, I don't know; in my case, it works with building_custom. Perhaps you have forgotten to regen/edit the raws in your save file? I haven't tried the latter, so I don't know if a regen is really necessary.  ???
Title: Re: Little mod: Sawmill
Post by: Knight Otu on May 13, 2010, 05:26:23 am
"workshop_sawmill.txt"
That there is part of your problem. DF doesn't read all the files in the raw folder, only those with a name in a specific format. For buildings, the file needs to start with building_ , so building_sawmill.txt should work.
Title: Re: Little mod: Sawmill
Post by: LordSlowpoke on May 13, 2010, 07:59:45 am
I just noticed that here, one log makes ten logs.
Those ten logs make a hundred logs.
That hundred logs makes even more logs.
Ten sawmills, ten logs of input, one in-game year. Then, the elves arrive, and get flooded with a literal storm of chopsticks.
Title: Re: Little mod: Sawmill
Post by: roqi on May 13, 2010, 09:40:23 am
I just noticed that here, one log makes ten logs.
Those ten logs make a hundred logs.
That hundred logs makes even more logs.
Ten sawmills, ten logs of input, one in-game year. Then, the elves arrive, and get flooded with a literal storm of chopsticks.

I changed them to bricks my dear sir.
Title: Re: Little mod: Sawmill
Post by: Osdeath on May 13, 2010, 10:06:34 am
Ah, cheers, shortly after writing that post of mine, i saw a modding guide that had got bumped to the top of the page, read through that, and tagged the sawmill bits onto the end of build_custom, works fine now, cheers :P
Title: Re: Little mod: Sawmill
Post by: krbrowning on January 25, 2011, 04:36:02 pm
Planks don's stockpile as wood or blocks. what should I do to keep the shop from being cluttered?
Title: Re: Little mod: Sawmill
Post by: Putnam on August 03, 2011, 03:58:14 pm
Hmm. Sorry for the necro, but...

Can I use this in my troll mod? They have a slight problem with stone (a general lack due to a mix between the fact that the honk-birds only lay 30 stones at a time and the fact that all the other stone blows up in their face and gives them necrosis of the lungs)
Title: Re: Little mod: Sawmill
Post by: Savolainen5 on August 03, 2011, 04:25:37 pm
IT 000 also has a sawmill as part of his Corrosion mod, which has the same idea, though different look and products.  Ask him if you you get no response from OP.
Title: Re: Little mod: Sawmill
Post by: Putnam on August 03, 2011, 04:35:05 pm
IT 000 also has a sawmill as part of his Corrosion mod, which has the same idea, though different look and products.  Ask him if you you get no response from OP.

Yeah, I've been feeling like the troll mod is turning into "corrosion-lite with gray-skinned humans" >_>