Construction
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 | shallow pit | 10 | shovel | |
pit | 10 | shovel | ||||
Spike Pit | 0 | Changes pit trap into spiked pit trap | spiked pit | 5 | 4x wood spear | |
Fill Pit | 0 | Removes pit trap | shallow pit | 5 | shovel | |
dirt | 5 | shovel | ||||
Chop Down Tree | 0 | Creates 1-8 log tiles in asked direction, but destroying original underneath tiles which is noizy. | dirt | 10 | wood ax / chainsaw (on) | |
Chop Up Log | 0 | Converts log tile into 10-20 two by four planks | dirt | 20 | wood ax / chainsaw (on) | |
Clean Broken Window | 0 | Removes sharp fragments of glass from broken window. | empty window | 5 | ||
Remove Window Pane | 1 | Removes whole pane of non-broken window and gives one sheet of glass. | empty window | 10 |
|
|
Repair Door | 1 | Repair broken wooden door (not an empty door frame). | closed wood door | 10 | hammer / hatchet / nail gun |
|
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 / hatchet / nail gun |
|
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 / hatchet / nail gun |
|
Build Wall | 2 | Creates wall on tile with 100 move cost. | half-built wall | 10 | hammer / hatchet / nail gun |
|
wooden wall | 10 | hammer / hatchet / nail gun |
| |||
Build Window | 3 | Cut a window in wooden wall. | empty window | 10 | wood saw | |
window | 5 | 1x sheet of glass | ||||
Build Door | 4 | Cut a door in wooden wall. | empty door frame | 15 | wood saw | |
damaged wood door | 15 | hammer / hatchet / nail gun |
| |||
closed wood door | 15 | hammer / hatchet / nail gun |
| |||
Build Roof | 4 | Creates a floor and a roof, prevents damage from acid rain. | floor | 40 | hammer / hatchet / nail gun |
|
Start vehicle construction | 0 | 10 | 1x steel frame |
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 STAGE you define what map tile will be placed there (see mapdata.h) and time that it takes to finish this stage (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);