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

47 lines
2.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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' => [
// Fields per side. The world starts at 0|0; coordinates run from −size/2 to size/2 − 1.
'size' => 1000,
// Most fields one map.view may cover in each direction.
'max_view' => 61,
// Like Die Stämme, villages settle on a frontier around 0|0 that grows with all
// villages (players and barbarians): start_radius + sqrt(villages / (π·density)),
// ± band fields. 0.29 is DS's density: about one village in 3.4 fields. A new
// player avoids the fields right next to other players for as long as it can.
'spawn' => ['start_radius' => 0, 'density' => 0.29, 'band' => 3],
// Barbarian villages come with the players: per_join on average for each joining
// player (1.3 = one, and a second with 30% chance, as in DS), within near fields of
// the new village, 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' => [
'per_join' => 1.3,
'near' => 4,
'max_level' => 3,
'growth' => ['every_hours' => 8, 'max_level' => 10],
],
],
];