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

42 lines
1.5 KiB
PHP
Raw Normal View History

<?php
// World defaults. A world's `config` JSON overrides any key (see WorldConfig).
return [
// Multiplies production and divides every duration.
'speed' => 1.0,
'village' => [
// Building space: the sum of the buildings' `space` may not exceed
// space + space_per_hq_level × (headquarters level − 1): 40 at level 1, 60 at 2, ...
'space' => 40,
'space_per_hq_level' => 20,
'start_resources' => ['wood' => 500, 'clay' => 500, 'iron' => 500, 'food' => 300],
// Auto-placed at level 1 in this order.
'start_buildings' => ['headquarters', 'storage', 'farm'],
],
'builders' => [
'base' => 2,
// One more builder from each of these headquarters levels on.
'extra_at_hq_levels' => [10, 20],
],
'map' => [
'size' => 1000,
// Most fields one map.view may cover in each direction.
'max_view' => 61,
// Seeded once per world around the map centre, buildings at random levels up to max_level.
// Every few hours (at world speed) one building of each grows a level, up to growth.max_level.
'barbarians' => [
'count' => 120,
'radius' => 25,
'max_level' => 3,
'growth' => ['every_hours' => 8, 'max_level' => 10],
],
// New players start on a ring around the centre: start_radius + sqrt(players / (π·density)),
// ± band fields, never next to another village.
'spawn' => ['start_radius' => 6, 'density' => 0.08, 'band' => 2],
],
];