Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Bed made of metal frame and cloth mattress  (Read 1646 times)

Frectorius

  • Bay Watcher
    • View Profile
Bed made of metal frame and cloth mattress
« on: August 13, 2018, 04:36:24 am »

Hello dear dwarf modders

Are you tired of chopping wood on the groud and make the elves angry?
Are your dwarfs tired and you have no bed?
I pressent to you: the BED!

First, I introduce a new workshop called bed builder's workshop. For this a new raw file is created with the name building_bedworkshop.tex. The contend of this file is:
Code: [Select]
building_bedworkshop

[OBJECT:BUILDING]

[BUILDING_WORKSHOP:BED_BUILDER]
[NAME:Bed builder's workshop]
[NAME_COLOR:3:0:1]
[DIM:3:2]
[WORK_LOCATION:2:1]
[BUILD_LABOR:BUILD_CONSTRUCTION]
        [BLOCK:1:0:0:0]
[BLOCK:2:1:1:0]
[TILE:0:1:' ':' ':150]
[TILE:0:2:' ':'/':' ']
[COLOR:0:1:0:0:0:0:0:0:6:0:0]
[COLOR:0:2:0:0:0:0:0:0:6:0:0]
[TILE:1:1:'=':' ':'+']
[TILE:1:2:'-':' ':8]
[COLOR:1:1:0:0:0:0:0:0:6:0:0]
[COLOR:1:2:6:0:0:0:0:0:6:0:0]
[TILE:2:1:'-':' ':8]
[TILE:2:2:' ':' ':8]
[COLOR:2:1:6:0:0:0:0:0:6:0:0]
[COLOR:2:2:0:0:0:0:0:0:6:0:0]
[TILE:3:1:150:' ':8]
[TILE:3:2:' ':' ':8]
[COLOR:3:1:6:0:0:0:0:0:6:7:0]
[COLOR:3:2:0:0:0:0:0:0:6:7:0]
[BUILD_ITEM:1:NONE:NONE:NONE:NONE][BUILDMAT][WORTHLESS_STONE_ONLY][CAN_USE_ARTIFACT]

Then I introdueced the new TOOLs; bed frame (made out of metal) and matress (made out of cloth). For this the raw file item_bedframe.tex with the information was created:
Code: [Select]
item_bedframe

[OBJECT:ITEM]

[ITEM_TOOL:ITEM_BED_FRAME]
  [NAME:bed frame:bed frames]
  [DESCRIPTION:The frame used to put a mattress on.]
  [METAL_MAT]
  [VALUE:15]
  [TILE:127]
  [ADJECTIVE:improvised]
  [SIZE:600]
  [MATERIAL_SIZE:600]
  [INCOMPLETE_ITEM]

[ITEM_TOOL:ITEM_MATTRESS]
  [NAME:mattress:mattresses]
  [DESCRIPTION:The mattress to sleep on it, but no body wants to sleep on the floor.]
  [SOFT_MAT]
  [VALUE:15]
  [TILE:254]
  [ADJECTIVE:improvised]
  [SIZE:600]
  [UNIMPROVABLE]
  [INCOMPLETE_ITEM]

In oder to build the bad in the bed builder's workshop the reactions were created in the reaction_bedworkshop.tex
 file:
Code: [Select]
reaction_bedworkshop

[OBJECT:REACTION]

[REACTION:MAKE_BED_FRAME]
[NAME:Construct bed frame]
[BUILDING:BED_BUILDER:NONE]
[REAGENT:metal:600:BAR:NONE:NONE:NONE]
        [METAL_ITEM_MATERIAL]
[PRODUCT:100:1:TOOL:ITEM_BED_FRAME:GET_MATERIAL_FROM_REAGENT:metal:NONE]
[SKILL:METALCRAFT]

[REACTION:MAKE_MATTRESS_FROM_CLOTH]
[NAME:Construct bed mattress from cloth]
[BUILDING:BED_BUILDER:NONE]
[REAGENT:stoff:40000:CLOTH:NONE:NONE:NONE]
        [ANY_PLANT_MATERIAL]
[PRODUCT:100:1:TOOL:ITEM_MATTRESS:GET_MATERIAL_FROM_REAGENT:stoff:NONE]
[PRODUCT_TOKEN:mattress]
[SKILL:CLOTHESMAKING]

[REACTION:MAKE_MATTRESS_FROM_YARN]
[NAME:Construct bed mattress from yarn]
[BUILDING:BED_BUILDER:NONE]
[REAGENT:stoff:40000:CLOTH:NONE:NONE:NONE]
        [ANY_YARN_MATERIAL]
[PRODUCT:100:1:TOOL:ITEM_MATTRESS:GET_MATERIAL_FROM_REAGENT:stoff:NONE]
[PRODUCT_TOKEN:mattress]
[SKILL:CLOTHESMAKING]

[REACTION:ASSEMBLE_BED]
[NAME:Assemble improvised bed]
[BUILDING:BED_BUILDER:NONE]
[REAGENT:frame:1:TOOL:ITEM_BED_FRAME:NONE:NONE]
[REAGENT:mattress:1:TOOL:ITEM_MATTRESS:NONE:NONE]
[PRODUCT:100:1:BED:NONE:GET_MATERIAL_FROM_REAGENT:mattress:NONE]
[PRODUCT_TOKEN:bed]

The entity_default.txt raw file needs to be updated so that the dwards know the reactions defined above. Add the following lines to your dwarfs:
Code: [Select]
[PERMITTED_BUILDING:BED_BUILDER]
[PERMITTED_REACTION:MAKE_BED_FRAME]
[PERMITTED_REACTION:MAKE_MATTRESS_FROM_CLOTH]
[PERMITTED_REACTION:MAKE_MATTRESS_FROM_YARN]
[PERMITTED_REACTION:ASSEMBLE_BED]

I tested it and I was able to produce a pig tail bed.

The bed
  • needs a metal frame and cloth mattress
  • has has only the cloth material properties, because the mattress makes the bed comfortable:D
  • can be placed as normal bed
  • is know for every dwarf in the game

Is there a possibility to make the bed, so that one can see it is produces from two parts? (I did not check the description of the bed yet :P)
I wanted all this things only to be known from a book for my fortress to have a challange, when i embark on a no tree place. Is there a possibility that in world generation a dwarf nation discovers how to make this metal frame/mattress bed and my dwarfs need to learn this from a book or discover themself?
Logged

Leonidas

  • Bay Watcher
    • View Profile
Re: Bed made of metal frame and cloth mattress
« Reply #1 on: August 13, 2018, 03:21:01 pm »

I think this belongs in a mod forum.
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Bed made of metal frame and cloth mattress
« Reply #2 on: August 13, 2018, 03:41:37 pm »

From the roleplaying perspective I think it suits the humans mostly. Dwarves should sleep on the stony ground or on the wooden planks, and elves in the aerial nests, like other apes. Also, what about lice? I've heard they like the mattresses much.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Bed made of metal frame and cloth mattress
« Reply #3 on: August 13, 2018, 04:43:47 pm »

What about stone beds and leather mattresses? (Untanned hides would be better, but I'm not sure that's possible in DF.)
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Findulidas

  • Bay Watcher
  • [NATURAL_SKILL:OFFTOPIC:5][NOTHOUGHT]
    • View Profile
Re: Bed made of metal frame and cloth mattress
« Reply #4 on: August 14, 2018, 01:57:52 am »

Well honestly I think df would be improved by more then one material needed for more than just beds. Specially now when the game is much easier then what it used to be.
Logged
...wonderful memories of the creeping sense of dread...

Nagidal

  • Bay Watcher
    • View Profile
    • My gaming channel
Re: Bed made of metal frame and cloth mattress
« Reply #5 on: August 15, 2018, 05:26:17 am »

This belongs to the Mod subforum. Nevertheless, I like your idea very much and I'm tempted to try it out someday. Right now I have a world generated without these comfy beds and already a fortress running. But I will consider trying it for the next worldgen.

Does this mod also specify a keyboard shortcut for the commands in the bed builder's workshop?

Do beds, bed frames and mattresses have quality levels and can they be decorated?

And, most importantly, will dwarves get happy thoughts when sleeping in these comfy beds?
Logged
I stream most of my DF sessions: gaming.youtube/nagidal146, they are archived on my youtube channel. (Dwarf Fortress Tutorials)

Frectorius

  • Bay Watcher
    • View Profile
Re: Bed made of metal frame and cloth mattress
« Reply #6 on: August 15, 2018, 06:01:57 am »

This belongs to the Mod subforum. Nevertheless, I like your idea very much and I'm tempted to try it out someday. Right now I have a world generated without these comfy beds and already a fortress running. But I will consider trying it for the next worldgen.

Does this mod also specify a keyboard shortcut for the commands in the bed builder's workshop?

Do beds, bed frames and mattresses have quality levels and can they be decorated?

And, most importantly, will dwarves get happy thoughts when sleeping in these comfy beds?

I know I chose the wrong sub-forum and i am terribly sorry about that.
I did not chose any shortcuts so far, because in the beginning I used one, that was already occupied... I think I can add them, if you have any good suggestion for a short key.

I am not sure about the quality level, but as far as I understood the mod I made, they get a quality level and they can be decorated. But because the Bed in the end only gets its material from the mattress, you will lose the value of the bed frame. I think beds are hard-coded and cant be modified into multiple part... If normal wood beds can be decorated so can this soft bed.

Because in the end, we only end up with a "pig tail bed" I think the dwarf will get the same happy thoughts as a normal wooden bed. (Can this be modified?)

If I am correct and beds are hard-coded, then bed mods will always be beds but with different material 
Logged

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: Bed made of metal frame and cloth mattress
« Reply #7 on: August 15, 2018, 11:15:39 am »

You can move threads by Toady request or you can lock this thread and repost in mods.

As for "value" You could likely get away with a metal bed and "decorate" it with the mattress if this is at all possible (a required decoration due to the construction process) giving it more modifiers and making it worth the effort required to get the materials prepared.