Construction: Difference between revisions

From The Cataclysm: Dark Days Ahead Wiki
Jump to navigation Jump to search
(Changed "carpentry" to "construction")
(updated to latest github version, changed the table a bit so it matches wiki standard table format, added stub warning)
Line 1: Line 1:
{{stub}}
Use {{k|*}} to display the construction screen.
Use {{k|*}} to display the construction screen.


Line 6: Line 7:


== List of constructions ==
== List of constructions ==
{| border="1" cellpadding="3" class="va-table" style="border-collapse: collapse"
 
|-style="background-color:lightgray"
{| border="1" cellpadding="3" class="va-table sortable" style="border-collapse: collapse; border: 1px dashed white; margin: 1em 0"
|-style="background-color:lightgreen"
! Action
! Action
! <abbr title="Difficulty">D</abbr><br>
! <abbr title="Difficulty">D</abbr><br>
! Description
! scope="col"| Description
! Creates tile
! scope="col"|Creates tile
! <abbr title="Crafting time in minutes (1 min = 10 turns)">T</abbr><br>
! scope="col"|<abbr title="Crafting time in minutes (1 min = 10 turns)">T</abbr><br>
! Tools
! scope="col"|Tools
! Materials
! scope="col"|Materials


|-
|-
|rowspan="2"| Dig Pit
|rowspan="2" scope="row"| '''Dig Pit'''
|rowspan="2"| 0
|rowspan="2" align="center"|0
|rowspan="2"| <!-- &construct::able_dig, &construct::done_nothing --> Creates [[traps#pit|pit trap]] on any diggable tile
|rowspan="2"|<!-- &construct::able_dig, &construct::done_nothing --> Creates [[traps#pit|pit trap]] on any diggable tile in two steps
| shallow pit || 10 || shovel ||
|1: shallow pit ||align="center"|10 || shovel OR stone shovel OR digging stick ||
|-
|-
| pit || 10 || shovel ||
|style="border-top: 1px dashed gray;"|2: pit || style="border-top: 1px dashed gray;" align="center"|10 || style="border-top: 1px dashed gray;"|shovel OR stone shovel OR digging stick ||style="border-top: 1px dashed gray;"|


|-
|-
| Spike Pit || 0
| scope="row"|'''Spike Pit''' || align="center"|0
| <!-- &construct::able_pit, &construct::done_nothing --> Changes [[traps#pit|pit trap]] into [[traps#spiked pit|spiked pit trap]]
| <!-- &construct::able_pit, &construct::done_nothing --> Changes pit trap into [[traps#spiked pit|spiked pit trap]]
| spiked pit || 5 ||  || 4x wood spear
| spiked pit || align="center"|5 ||  || 4x wood spear


|-
|-
| rowspan="2"| Fill Pit
| rowspan="2" scope="row"| '''Fill Pit'''
| rowspan="2"| 0
| rowspan="2" align="center"|0
| rowspan="2"| <!-- &construct::able_pit, &construct::done_nothing --> Removes [[traps#pit|pit trap]]
| rowspan="2"|<!-- &construct::able_pit, &construct::done_nothing --> Removes [[traps#pit|pit trap]] in two steps
| shallow pit || 5 || shovel ||
| 1: shallow pit || align="center"|5 || shovel OR stone shovel ||
|-
|-
| dirt || 5 || shovel ||
| style="border-top: 1px dashed gray;"|2: dirt ||style="border-top: 1px dashed gray;" align="center"|5 ||style="border-top: 1px dashed gray;"| shovel OR stone shovel ||style="border-top: 1px dashed gray;"|


|-
|-
| Chop Down Tree
| scope="row"| '''Chop Down Tree'''
| 0
| align="center"|0
| <!-- &construct::able_tree, &construct::done_tree --> Creates 1-8 log tiles in asked direction, but destroying original underneath tiles which is [[noise|noizy]].<!-- 40 points in each tile -->
| <!-- &construct::able_tree, &construct::done_tree --> Creates 1-8 log tiles in asked direction, but destroying original underneath tiles which is [[noise|noisy]].<!-- 40 points in each tile -->
| dirt || 10 || wood ax  / chainsaw (on)
| dirt || align="center"|10 || wood axe OR chainsaw (on) OR stone axe


|-
|-
| Chop Up Log
| scope="row"| '''Chop Up Log'''
| 0
| align="center"|0
| <!-- &construct::able_log, &construct::done_log --> Converts log tile into 10-20 two by four planks
| <!-- &construct::able_log, &construct::done_log --> Converts log tile into 10-20 two by four planks
| dirt || 20 || wood ax  / chainsaw (on)
| dirt || align="center"|20 || wood axe OR chainsaw (on) OR stone axe


|-
|-
| Clean Broken Window || 0
| scope="row"| '''Move Furniture''' || align="center"|-1
| <!-- &construct::able_broken_window, &construct::done_nothing --> Removes sharp fragments of glass from broken window.
| <!-- &construct::able_furniture, &construct::done_furniture --> Moves the selected furniture object one tile in the desired direction
| empty window || 5 ||  ||
| null || align="center"|5 ||  ||


|-
|-
| Remove Window Pane || 1
| scope="row"| '''Clean Broken Window''' || align="center"|0
| <!-- &construct::able_window_pane, &construct::done_window_pane --> Removes whole pane of non-broken window and gives one sheet of glass.
| <!-- &construct::able_broken_window, &construct::done_nothing --> Removes sharp fragments of glass from broken window.
| empty window || 10
| empty window || align="center"|5 ||  ||
|
* hammer / rock / hatchet
* screwdriver / butter knife / integrated toolset
|


|-
|-
| Repair Door || 1
| scope="row"| '''Repair Door''' || align="center"|1
| <!-- &construct::able_door_broken, &construct::done_nothing --> Repair broken wooden door (not an empty door frame).
| <!-- &construct::able_door_broken, &construct::done_nothing --> Repair broken wooden door (not an empty door frame).
| closed wood door || 10 || hammer / hatchet / nail gun
| closed wood door || align="center"|10 || hammer OR stone hammer OR hatchet OR nail gun
|
|
* 3x two by four  
* 3x two by four  
Line 72: Line 70:


|-
|-
| Board Up Door || 0
| scope="row"| '''Board Up Door''' || align="center"|0
| <!-- &construct::able_door, &construct::done_nothing --> Reinforces closed, opened, broken or locked wooden door. Boards can be pried out with crowbar or hammer (boards and nails will be fully returned).
| <!-- &construct::able_door, &construct::done_nothing --> Reinforces closed, opened, broken or locked wooden door. Boards can be pried out with crowbar or hammer (boards and nails will be fully returned).
| boarded up door || 8 || hammer / hatchet / nail gun
| boarded up door || align="center"|8 || hammer OR sledge hammer OR stone hammer OR hatchet OR nail gun
|
|
* 4x two by four  
* 4x two by four  
Line 80: Line 78:


|-
|-
| Board Up Window || 0
| scope="row"| '''Board Up Window''' || align="center"|0
| <!-- &construct::able_window, &construct::done_nothing --> Reinforces window, empty window or window frame. Boards can be pried out with crowbar or hammer (boards and nails will be fully returned).
| <!-- &construct::able_window, &construct::done_nothing --> Reinforces window, empty window or window frame. Boards can be pried out with crowbar or hammer (boards and nails will be fully returned).
| boarded up window || 5 || hammer / hatchet / nail gun
| boarded up window || align="center"|5 || hammer OR sledge hammer OR primitive hammer OR hatchet OR nail gun
|
|
* 4x two by four  
* 4x two by four  
* 8x nails  
* 8x nails  


|-
|-
|rowspan="2"| Build Wall
|rowspan="3" scope="row"| '''Build Window'''
|rowspan="2"| 2
|rowspan="3" align="center"| 2
|rowspan="2"| <!-- &construct::able_empty, &construct::done_nothing -->Creates wall on tile with 100 move cost.
|rowspan="3"| <!-- &construct::able_empty, &construct::done_nothing -->Builds a window in three steps
| half-built wall || 10 || hammer / hatchet / nail gun
|1: empty window frame || align="center"|10 || hammer OR stone hammer OR hatchet OR nailgun ||
* 15x two by four OR 2x log
* 30x nails
|-
| style="border-top: 1px dashed gray;"|2: window || style="border-top: 1px dashed gray;" align="center"|5 || style="border-top: 1px dashed gray;"|hammer OR stone hammer OR hatchet OR nail gun ||style="border-top: 1px dashed gray;"|
* 1x sheet of glass
|-
| style="border-top: 1px dashed gray;"|3: closed window || style="border-top: 1px dashed gray;" align="center"|5 || style="border-top: 1px dashed gray;"|wood saw ||style="border-top: 1px dashed gray;"|
* 4x nails
* 2x sheet
* 1x heavy stick
 
 
|-
|rowspan="2" scope="row"| '''Build Door'''
|rowspan="2" align="center"| 2
|rowspan="2"| <!-- &construct::able_empty, &construct::done_nothing -->Builds a door in two steps
|1: empty door frame || align="center"|15 || hammer OR stone hammer OR hatchet OR nailgun ||
* 12x two by four
* 24x nails
|-
| style="border-top: 1px dashed gray;"|2: closed wood door || style="border-top: 1px dashed gray;" align="center"|15 || style="border-top: 1px dashed gray;"|hammer OR stone hammer OR hatchet OR nail gun ||style="border-top: 1px dashed gray;"|
* 4x two by four
* 12x nails
 
|-
|rowspan="2" scope="row"| '''Build Wire Fence'''
|rowspan="2" align="center"| 3
|rowspan="2"| <!-- &construct::able_dig, &construct::done_nothing -->Builds a wire fence in two steps
| 1: wire fence posts || align="center"|20 || hammer OR stone hammer OR hatchet OR rock ||
* 6x pipe
* 8x scrap metal
|-
| style="border-top: 1px dashed gray;"|2: wire fence || style="border-top: 1px dashed gray;" align="center"|20 ||style="border-top: 1px dashed gray;"|  ||style="border-top: 1px dashed gray;"|
* 15x wire
 
|-
| rowspan="2" scope="row"|'''Realign Fence'''
| rowspan="2" align="center"|0
| rowspan="2"|<!-- &construct::able_chainlink, &construct::done_nothing -->Realigns a wire fence either vertically or horizontally
| 1: align horizontally ||align="center"|0 || ||
|-
| style="border-top: 1px dashed gray;"|2: align vertically ||style="border-top: 1px dashed gray;" align="center"|0 ||style="border-top: 1px dashed gray;"| ||style="border-top: 1px dashed gray;"|
 
|-
| scope="row"|'''Build Wire Gate''' || align="center"|3
| <!-- &construct::able_between_walls, &construct::done_nothing -->Creates a wire gate
| wire fence gate || align="center"|15 ||
|
|
* 10x two by four
* 20x wire
* 20x nails
* 3x chunk of steel OR 12x scrap metal
* 6x pipe
 
|-
|-
| wooden wall || 10 || hammer / hatchet / nail gun
| scope="row"|'''Build Roof''' || align="center"|4
| <!-- &construct::able_between_walls, &construct::done_nothing -->Creates a floor and a roof, prevents damage from acid rain.
| floor || align="center"|40 || hammer OR stone hammer OR hatchet OR nail gun
|
|
* 10x two by four  
* 8x two by four  
* 20x nails  
* 40x nails  


|-
|-
|rowspan="2"| Build Window
| scope="row"|'''Build Bulletin Board''' || align="center"|0
|rowspan="2"| 3
| <!-- &construct::able_empty, &construct::done_nothing -->Creates a bulletin board to designate a base, which allows [[NPC]]s to be ordered to move and protect it.
|rowspan="2"| <!-- &construct::able_wall_wood, &construct::done_nothing -->Cut a window in wooden wall.
| bulletin board || align="center"|10 || wood saw OR hammer OR hatchet OR nail gun
| empty window || 10 || wood saw ||
|
* 4x two by four
* 8x nails
 
|-
|-
| window || 5 || || 1x sheet of glass
| scope="row"|'''Build Dresser''' || align="center"|1
| <!-- &construct::able_indoors, &construct::done_nothing -->Creates a dresser
| dresser || align="center"|20 || wood saw OR hammer OR stone hammer OR hatchet OR nail gun
|
* 8x nails
* 6x two by four


|-
|-
|rowspan="3"| Build Door
| scope="row"|'''Build Bookcase''' || align="center"|1
|rowspan="3"| 4
| <!-- &construct::able_indoors, &construct::done_nothing -->Creates a bookcase
|rowspan="3"| <!-- &construct::able_wall_wood, &construct::done_nothing -->Cut a door in wooden wall.
| bookcase || align="center"|20 || wood saw OR hammer OR stone hammer OR hatchet OR nail gun
| empty door frame || 15 || wood saw ||
|
* 16x nails
* 12x two by four
 
|-
|-
| damaged wood door || 15 || hammer / hatchet / nail gun
| scope="row"|'''Build Makeshift Bed''' || align="center"|1
| <!-- &construct::able_indoors, &construct::done_nothing -->Creates a makeshift bed
| makeshift bed || align="center"|20 || hammer OR stone hammer OR hatchet OR nail gun
|
|
* 4x two by four  
* 8x nails
* 12x nails
* 10x two by four  
* 1x sheet
 
|-
| scope="row"|'''Tape up window''' || align="center"|0
| <!-- &construct::able_window, &construct::done_tape -->Covers a window with duct tape, so it obscures line of sight and reduces the leaking of human odor outside
| <!-- t_null --> || align="center"|2 || ||
* 50x duct tape
 
|-
|-
| closed wood door || 15 || hammer / hatchet / nail gun
| scope="row"|'''Deconstruct Furniture'''
| align="center"|0
| <!-- &construct::able_deconstruct, &construct::done_deconstruct -->Disassembles a furniture object to it's construction components
| <!-- t_null --> || align="center"|20
|
* hammer OR stone hammer OR hatchet OR nailgun
* screwdriver OR integrated toolset
|
|
* 4x two by four
* 12x nails
<!--
Removed until we have some way of auto-aligning fences!


|-
|-
| Build Fence
| scope="row"|'''Start vehicle construction'''
| 1
| align="center"|0
| 15, &construct::able_empty
| <!-- &construct::able_empty, &construct::done_vehicle -->To start building a vehicle from scratch
| t_fence_h || 10 || hammer / hatchet || 5x two by four, 8x nails
| <!-- t_null --> || align="center"|10 || ||
-->
* 1x steel frame


|-
|-
| Build Roof || 4
| scope="row"|'''Fence Posts''' || align="center"|0
| <!-- &construct::able_between_walls, &construct::done_nothing -->Creates a floor and a roof, prevents damage from acid rain.
| <!-- &construct::able_dig, &construct::done_nothing -->Creates a fence post
| floor || 40 || hammer / hatchet / nail gun
| fence post || align="center"|5 || hammer OR stone hammer OR shovel OR stone shovel OR rock OR hatchet OR wood axe OR stone axe
|
|
* 8x two by four
* 2x wood spear
* 40x nails


|-
|-
| Start vehicle construction
| scope="row"|'''Build Wood Stove''' || align="center"|0
| 0
| <!-- &construct::able_empty, &construct::done_nothing -->Creates a wood stove
| <!-- &construct::able_empty, &construct::done_vehicle -->
| wood stove || align="center"|10 || hack saw
| <!-- t_null --> || 10 || 1x steel frame
|
* 1x metal tank
* 1x pipe


|}
|}
Line 165: Line 239:
In CONSTRUCT you define name as it appears in the menu (30 characters or less), difficulty (what level of construction [[skill]] that requires), condition- and post-construction-functions (see [https://raw.github.com/TheDarklingWolf/Cataclysm-DDA/master/construction.h construction.h] for options, and later in construction.cpp for definitions).
In CONSTRUCT you define name as it appears in the menu (30 characters or less), difficulty (what level of construction [[skill]] that requires), condition- and post-construction-functions (see [https://raw.github.com/TheDarklingWolf/Cataclysm-DDA/master/construction.h construction.h] for options, and later in construction.cpp for definitions).


In STAGE you define what map tile will be placed there (see [https://raw.github.com/TheDarklingWolf/Cataclysm-DDA/master/mapdata.h mapdata.h]) and time that it takes to finish this stage (in ''minutes'', 10 turns = 1 minute)
In you define what map tile will be placed there (see [https://raw.github.com/TheDarklingWolf/Cataclysm-DDA/master/mapdata.h mapdata.h]) and time that it takes to finish this (in ''minutes'', 10 turns = 1 minute)


In TOOL you define what tools are needed and if it should be used up. Tools are always will be kept, because tools with charges are not set in constructions yet.
In TOOL you define what tools are needed and if it should be used up. Tools are always will be kept, because tools with charges are not set in constructions yet.

Revision as of 13:25, 4 April 2013

This page is not complete enough; please help if you can.

Use * to display the construction screen.

Both items in your inventory and all items in 2 square radius are available as construction tools and components. If items needed can be found in both your inventory and on the ground, you will be prompted as to which items you want to use in your crafting.

A completed construction trains character's construction skill by [construction difficulty] * 10 points (or 10 points for a zero difficulty).

List of constructions

Action D
Description Creates tile T
Tools Materials
Dig Pit 0 Creates pit trap on any diggable tile in two steps 1: shallow pit 10 shovel OR stone shovel OR digging stick
2: pit 10 shovel OR stone shovel OR digging stick
Spike Pit 0 Changes pit trap into spiked pit trap spiked pit 5 4x wood spear
Fill Pit 0 Removes pit trap in two steps 1: shallow pit 5 shovel OR stone shovel
2: dirt 5 shovel OR stone shovel
Chop Down Tree 0 Creates 1-8 log tiles in asked direction, but destroying original underneath tiles which is noisy. dirt 10 wood axe OR chainsaw (on) OR stone axe
Chop Up Log 0 Converts log tile into 10-20 two by four planks dirt 20 wood axe OR chainsaw (on) OR stone axe
Move Furniture -1 Moves the selected furniture object one tile in the desired direction null 5
Clean Broken Window 0 Removes sharp fragments of glass from broken window. empty window 5
Repair Door 1 Repair broken wooden door (not an empty door frame). closed wood door 10 hammer OR stone hammer OR hatchet OR nail gun
  • 3x two by four
  • 12x nails
Board Up Door 0 Reinforces closed, opened, broken or locked wooden door. Boards can be pried out with crowbar or hammer (boards and nails will be fully returned). boarded up door 8 hammer OR sledge hammer OR stone hammer OR hatchet OR nail gun
  • 4x two by four
  • 8x nails
Board Up Window 0 Reinforces window, empty window or window frame. Boards can be pried out with crowbar or hammer (boards and nails will be fully returned). boarded up window 5 hammer OR sledge hammer OR primitive hammer OR hatchet OR nail gun
  • 4x two by four
  • 8x nails


Build Window 2 Builds a window in three steps 1: empty window frame 10 hammer OR stone hammer OR hatchet OR nailgun
  • 15x two by four OR 2x log
  • 30x nails
2: window 5 hammer OR stone hammer OR hatchet OR nail gun
  • 1x sheet of glass
3: closed window 5 wood saw
  • 4x nails
  • 2x sheet
  • 1x heavy stick


Build Door 2 Builds a door in two steps 1: empty door frame 15 hammer OR stone hammer OR hatchet OR nailgun
  • 12x two by four
  • 24x nails
2: closed wood door 15 hammer OR stone hammer OR hatchet OR nail gun
  • 4x two by four
  • 12x nails
Build Wire Fence 3 Builds a wire fence in two steps 1: wire fence posts 20 hammer OR stone hammer OR hatchet OR rock
  • 6x pipe
  • 8x scrap metal
2: wire fence 20
  • 15x wire
Realign Fence 0 Realigns a wire fence either vertically or horizontally 1: align horizontally 0
2: align vertically 0
Build Wire Gate 3 Creates a wire gate wire fence gate 15
  • 20x wire
  • 3x chunk of steel OR 12x scrap metal
  • 6x pipe
Build Roof 4 Creates a floor and a roof, prevents damage from acid rain. floor 40 hammer OR stone hammer OR hatchet OR nail gun
  • 8x two by four
  • 40x nails
Build Bulletin Board 0 Creates a bulletin board to designate a base, which allows NPCs to be ordered to move and protect it. bulletin board 10 wood saw OR hammer OR hatchet OR nail gun
  • 4x two by four
  • 8x nails
Build Dresser 1 Creates a dresser dresser 20 wood saw OR hammer OR stone hammer OR hatchet OR nail gun
  • 8x nails
  • 6x two by four
Build Bookcase 1 Creates a bookcase bookcase 20 wood saw OR hammer OR stone hammer OR hatchet OR nail gun
  • 16x nails
  • 12x two by four
Build Makeshift Bed 1 Creates a makeshift bed makeshift bed 20 hammer OR stone hammer OR hatchet OR nail gun
  • 8x nails
  • 10x two by four
  • 1x sheet
Tape up window 0 Covers a window with duct tape, so it obscures line of sight and reduces the leaking of human odor outside 2
  • 50x duct tape
Deconstruct Furniture 0 Disassembles a furniture object to it's construction components 20
  • hammer OR stone hammer OR hatchet OR nailgun
  • screwdriver OR integrated toolset
Start vehicle construction 0 To start building a vehicle from scratch 10
  • 1x steel frame
Fence Posts 0 Creates a fence post fence post 5 hammer OR stone hammer OR shovel OR stone shovel OR rock OR hatchet OR wood axe OR stone axe
  • 2x wood spear
Build Wood Stove 0 Creates a wood stove wood stove 10 hack saw
  • 1x metal tank
  • 1x pipe

Construction.cpp

The syntax is quite simple:

CONSTRUCT("Build Wall", 2, &construct::able_empty, &construct::done_nothing);
 STAGE(t_wall_half, 10);
  TOOL(itm_hammer, itm_hatchet, itm_nailgun, NULL);
  COMP(itm_2x4, 10, NULL);
  COMP(itm_nail, 20, NULL);
 STAGE(t_wall_wood, 10);
  TOOL(itm_hammer, itm_hatchet, itm_nailgun, NULL);
  COMP(itm_2x4, 10, NULL);
  COMP(itm_nail, 20, NULL);

In CONSTRUCT you define name as it appears in the menu (30 characters or less), difficulty (what level of construction skill that requires), condition- and post-construction-functions (see construction.h for options, and later in construction.cpp for definitions).

In you define what map tile will be placed there (see mapdata.h) and time that it takes to finish this (in minutes, 10 turns = 1 minute)

In TOOL you define what tools are needed and if it should be used up. Tools are always will be kept, because tools with charges are not set in constructions yet.

Multiply items in one TOOL can substitute each other, if you want a recipe to need two tools at a time you need a second TOOL line.

In COMP you define which and how much components the recipe uses, if you want a recipe to need two different components at a time you need a second COMP line.

TOOL and COMP both have to end in ,NULL);