game-village-politics-backend/config/game/buildings.php

232 lines
9.7 KiB
PHP
Raw Normal View History

<?php
// Values per building type. Levels start at 1, which has the base values.
// `space` is how much of the village's building space an instance takes, at any level.
// Level n: cost = cost × factor^(n−1), workers = round(base × factor^(n−1)), and
// production, capacity, hides, detection and beds = base × factor^(n−1). A new instance or
// level is only queued when idle villagers stand ready for the workers it adds; farms are
// exempt.
// Build time follows Die Stämme (economy.build_time): `base` seconds at world speed 1 times
// a per-level factor, sped up by the headquarters, never under `min`. The bases are Die
// Stämme's; a building that differs there brings its own `min` (wall, watchtower) or
// `factors` (academy) here.
// One instance of a type is enough; copies are the exception. The instance at rank n
// (0-based, by level, highest first) costs instance_cost_factor^n times as much, and
// copies work at a falling share (economy.instance_share).
// Map points of an instance: round(points.base × points.factor^(level−1)).
return [
'headquarters' => [
'space' => 9,
'max_per_village' => 1,
'max_level' => 30,
'cost' => ['wood' => 90, 'clay' => 80, 'iron' => 70, 'factor' => 1.26],
'build_time' => ['base' => 900],
'workers' => ['base' => 2, 'factor' => 1.1],
'production' => null,
'instance_cost_factor' => 1.0,
'points' => ['base' => 10, 'factor' => 1.2],
'requires' => [],
],
'storage' => [
'space' => 4,
'max_per_village' => null,
'max_level' => 30,
'cost' => ['wood' => 60, 'clay' => 50, 'iron' => 40, 'factor' => 1.27],
'build_time' => ['base' => 1020],
'workers' => ['base' => 1, 'factor' => 1.1],
'production' => null,
'capacity' => ['base' => 1000, 'factor' => 1.23],
'instance_cost_factor' => 2.0,
'points' => ['base' => 6, 'factor' => 1.2],
'requires' => [],
],
'farm' => [
'space' => 4,
'max_per_village' => null,
'max_level' => 30,
'cost' => ['wood' => 45, 'clay' => 40, 'iron' => 30, 'factor' => 1.27],
'build_time' => ['base' => 1200],
'workers' => ['base' => 2, 'factor' => 1.1],
'production' => ['resource' => 'food', 'base' => 30, 'factor' => 1.25],
'instance_cost_factor' => 2.0,
'points' => ['base' => 5, 'factor' => 1.2],
'requires' => [],
],
'timber_camp' => [
'space' => 4,
'max_per_village' => null,
'max_level' => 30,
'cost' => ['wood' => 50, 'clay' => 60, 'iron' => 40, 'factor' => 1.25],
'build_time' => ['base' => 900],
'workers' => ['base' => 2, 'factor' => 1.12],
'production' => ['resource' => 'wood', 'base' => 30, 'factor' => 1.163],
'instance_cost_factor' => 2.0,
'points' => ['base' => 6, 'factor' => 1.2],
'requires' => [],
],
'clay_pit' => [
'space' => 4,
'max_per_village' => null,
'max_level' => 30,
'cost' => ['wood' => 65, 'clay' => 50, 'iron' => 40, 'factor' => 1.27],
'build_time' => ['base' => 900],
'workers' => ['base' => 2, 'factor' => 1.12],
'production' => ['resource' => 'clay', 'base' => 30, 'factor' => 1.163],
'instance_cost_factor' => 2.0,
'points' => ['base' => 6, 'factor' => 1.2],
'requires' => [],
],
'iron_mine' => [
'space' => 4,
'max_per_village' => null,
'max_level' => 30,
'cost' => ['wood' => 75, 'clay' => 65, 'iron' => 70, 'factor' => 1.252],
'build_time' => ['base' => 1080],
'workers' => ['base' => 2, 'factor' => 1.12],
'production' => ['resource' => 'iron', 'base' => 30, 'factor' => 1.163],
'instance_cost_factor' => 2.0,
'points' => ['base' => 6, 'factor' => 1.2],
'requires' => [],
],
'hiding_place' => [
'space' => 1,
'max_per_village' => null,
'max_level' => 10,
'cost' => ['wood' => 50, 'clay' => 60, 'iron' => 50, 'factor' => 1.25],
'build_time' => ['base' => 1800],
'workers' => ['base' => 0, 'factor' => 1.0],
'production' => null,
// Wood, clay and iron each that raiders can't take; instances add up.
'hides' => ['base' => 150, 'factor' => 1.3335],
'instance_cost_factor' => 2.0,
'points' => ['base' => 5, 'factor' => 1.2],
'requires' => [],
],
'wall' => [
// Surrounds the village and takes no building space.
'space' => 0,
'max_per_village' => 1,
'max_level' => 20,
'cost' => ['wood' => 50, 'clay' => 100, 'iron' => 20, 'factor' => 1.26],
'build_time' => ['base' => 3600, 'min' => 240],
'workers' => ['base' => 1, 'factor' => 1.1],
'production' => null,
'instance_cost_factor' => 1.0,
'points' => ['base' => 8, 'factor' => 1.2],
'requires' => [],
],
'rally_point' => [
'space' => 1,
'max_per_village' => 1,
'max_level' => 1,
'cost' => ['wood' => 10, 'clay' => 40, 'iron' => 30, 'factor' => 1.26],
'build_time' => ['base' => 10860],
'workers' => ['base' => 0, 'factor' => 1.0],
'production' => null,
'instance_cost_factor' => 1.0,
'points' => ['base' => 2, 'factor' => 1.2],
'requires' => [],
],
// Spots incoming groups further out: adds `detection` fields to the village's radius.
'watchtower' => [
'space' => 2,
'max_per_village' => 1,
'max_level' => 20,
'cost' => ['wood' => 12000, 'clay' => 14000, 'iron' => 10000, 'factor' => 1.17],
'build_time' => ['base' => 13200, 'min' => 30],
'workers' => ['base' => 1, 'factor' => 1.1],
'production' => null,
'detection' => ['base' => 1.1, 'factor' => 1.162],
'instance_cost_factor' => 1.0,
'points' => ['base' => 42, 'factor' => 1.2],
'requires' => ['headquarters' => 5, 'farm' => 5],
],
// Military buildings. Each instance runs its own recruiting queue; its level and
// staffing speed up training there (economy.recruit_speed_per_level).
'barracks' => [
'space' => 6,
'max_per_village' => null,
'max_level' => 25,
'cost' => ['wood' => 200, 'clay' => 170, 'iron' => 90, 'factor' => 1.26],
'build_time' => ['base' => 1800],
'workers' => ['base' => 3, 'factor' => 1.1],
'production' => null,
'instance_cost_factor' => 2.0,
'points' => ['base' => 16, 'factor' => 1.2],
'requires' => [],
],
'stable' => [
'space' => 6,
'max_per_village' => null,
'max_level' => 20,
'cost' => ['wood' => 270, 'clay' => 240, 'iron' => 260, 'factor' => 1.26],
'build_time' => ['base' => 6000],
'workers' => ['base' => 3, 'factor' => 1.1],
'production' => null,
'instance_cost_factor' => 2.0,
'points' => ['base' => 20, 'factor' => 1.2],
'requires' => ['barracks' => 3],
],
'workshop' => [
'space' => 6,
'max_per_village' => null,
'max_level' => 15,
'cost' => ['wood' => 300, 'clay' => 240, 'iron' => 260, 'factor' => 1.26],
'build_time' => ['base' => 6000],
'workers' => ['base' => 4, 'factor' => 1.1],
'production' => null,
'instance_cost_factor' => 2.0,
'points' => ['base' => 24, 'factor' => 1.2],
'requires' => ['barracks' => 5],
],
// The Adelshof: trains noblemen. The one advanced building with real requirements.
// Die Stämme's has one level at base 586800 and the table's 0.0075; levels 2 and 3 are
// ours and take 1.5 times the level before.
'academy' => [
'space' => 9,
'max_per_village' => 1,
'max_level' => 3,
'cost' => ['wood' => 15000, 'clay' => 25000, 'iron' => 10000, 'factor' => 2.0],
'build_time' => ['base' => 586800, 'factors' => [0.0075, 0.01125, 0.016875]],
'workers' => ['base' => 5, 'factor' => 1.2],
'production' => null,
'instance_cost_factor' => 1.0,
'points' => ['base' => 512, 'factor' => 1.2],
'requires' => ['headquarters' => 5, 'barracks' => 1],
],
// The Lazarett: a share of the own troops who fall defending the village come back
// wounded into its beds and heal after a while (combat.hospital). A bed holds one
// wounded; beds add up over instances and shrink with staffing like production. Die
// Stämme has none: it builds at the barracks' pace.
'hospital' => [
'space' => 4,
'max_per_village' => null,
'max_level' => 20,
'cost' => ['wood' => 160, 'clay' => 200, 'iron' => 120, 'factor' => 1.26],
'build_time' => ['base' => 1800],
'workers' => ['base' => 2, 'factor' => 1.1],
'production' => null,
'beds' => ['base' => 20, 'factor' => 1.2],
'instance_cost_factor' => 2.0,
'points' => ['base' => 12, 'factor' => 1.2],
'requires' => ['barracks' => 1],
],
// The market: its merchants carry resources to other villages (config/game/market.php).
// `merchants` per level, Die Stämme's table; staffing doesn't scale it.
'market' => [
'space' => 4,
'max_per_village' => 1,
'max_level' => 25,
'cost' => ['wood' => 100, 'clay' => 100, 'iron' => 100, 'factor' => 1.26],
'build_time' => ['base' => 2700],
'workers' => ['base' => 1, 'factor' => 1.1],
'production' => null,
'merchants' => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 19, 26, 35, 46, 59, 74, 91, 110, 131, 154, 179, 206, 235],
'instance_cost_factor' => 1.0,
'points' => ['base' => 10, 'factor' => 1.2],
'requires' => ['headquarters' => 3, 'storage' => 2],
],
];