aboutsummaryrefslogtreecommitdiffstats
path: root/data/materials.lua
diff options
context:
space:
mode:
authorEmil A. Overbeck <emil.a.overbeck@gmail.com>2026-07-19 03:14:53 +0200
committerEmil A. Overbeck <emil.a.overbeck@gmail.com>2026-07-19 03:14:53 +0200
commitc217861ab62987b798835194786dc99424e1804e (patch)
tree37baf5b0a9ae9141da4556515caccedc7b5ab6dc /data/materials.lua
parentd42411ef884484c9c49482dd944a8394e78d8e15 (diff)
downloadforts_clone-c217861ab62987b798835194786dc99424e1804e.tar.gz
forts_clone-c217861ab62987b798835194786dc99424e1804e.zip
Recoil and armor
Diffstat (limited to 'data/materials.lua')
-rw-r--r--data/materials.lua27
1 files changed, 25 insertions, 2 deletions
diff --git a/data/materials.lua b/data/materials.lua
index 3725aa9..b88a1da 100644
--- a/data/materials.lua
+++ b/data/materials.lua
@@ -1,7 +1,7 @@
-- Base building materials for the clone.
--
--- The engine reads the global `Materials` array (in order). Build modes 1/2/3
--- map to entries 1/2/3. Mods under data/mods/ run AFTER this file and may use
+-- The engine reads the global `Materials` array (in order). Build modes 1-4
+-- map to entries 1-4. Mods under data/mods/ run AFTER this file and may use
-- FindMaterial(name) to tweak these, or table.insert(Materials, ...) to add new
-- ones. (angle_threshold is in DEGREES; the engine converts to radians.)
@@ -17,6 +17,7 @@ Materials =
flammable = true, burn_rate = 15, spread_time = 2.0, -- wood: slow burn/spread
blocks_projectiles = true, blocks_beam = true, -- solid: stops shells & beams
half_width = 0.15,
+ cost_metal = 5, cost_energy = 25, -- Forts wood 0.1 / 0.5
color = { 1.0, 1.0, 1.0, 1.0 }, -- white = show texture untinted
texture = "data/textures/wood.png",
texture_forts = "forts:materials/wood_panel.tga",
@@ -31,6 +32,7 @@ Materials =
flammable = true, burn_rate = 22, spread_time = 0.7, -- burns ~3x faster than wood
blocks_projectiles = false, blocks_beam = false, -- shells AND beams pass through (beam still burns it)
half_width = 0.15,
+ cost_metal = 5, cost_energy = 25,
color = { 1.0, 1.0, 1.0, 0.45 }, -- translucent
texture = "data/textures/bgbrace.png",
texture_forts = "forts:materials/bracing-bg.tga",
@@ -45,10 +47,31 @@ Materials =
flammable = true, burn_rate = 25, spread_time = 1.0, -- burns through fast
blocks_projectiles = false, blocks_beam = false, -- shells AND beams pass through
half_width = 0.04,
+ cost_metal = 5, cost_energy = 25,
color = { 0.72, 0.66, 0.55, 1.0 }, -- tan: tints the cable art, and is
-- the visible rope when it is absent
texture_forts = "forts:materials/cable.tga",
},
+ -- Appended LAST on purpose: build modes map to this array by index, so a new
+ -- material goes on the end (key 4) rather than shifting bg-brace and rope.
+ {
+ name = "armour", -- the kinetic tank
+ -- Forts armor: 25% stiffer than wood, 2x the mass, HP 400, and it does
+ -- NOT catch fire (its Fire deg/s is n/a). 3 wood (450 HP) still beats
+ -- 1 armour (400 HP), so armour buys durability per strut, not per metal.
+ stiffness = 750, damping = 12, mass = 0.5,
+ max_compression = 0.90, max_expansion = 1.10, -- same +/-10% as wood
+ angle_threshold = 30, tension_only = false,
+ min_length = 0.4, max_length = 3.0, max_link_length = 6.0,
+ hit_points = 400,
+ flammable = false, burn_rate = 0, spread_time = 0, -- metal: never burns
+ blocks_projectiles = true, blocks_beam = true, -- solid
+ half_width = 0.18, -- reads chunkier than wood
+ cost_metal = 90, cost_energy = 75, -- Forts 1.8 / 1.5, i.e.
+ -- 18x wood metal, 3x energy
+ color = { 0.62, 0.66, 0.70, 1.0 }, -- steel (also the fallback)
+ texture_forts = "forts:materials/armor.tga",
+ },
}
-- Helpers mods can use (mirrors the Forts modding API shape).