Fix population aggregation system to eliminate double-counting

- Fixed core issue where cells.pop and burg.population were both being counted
- Changed aggregation logic across all modules to use either burg OR cell population, never both
- If cell has burg: count only burg population (represents all people in that area)
- If cell has no burg: count only cells.pop (represents scattered population)

Files modified:
- modules/burgs-and-states.js: Fixed state population aggregation
- modules/ui/provinces-editor.js: Fixed province population aggregation
- modules/dynamic/editors/cultures-editor.js: Fixed culture population aggregation
- modules/dynamic/editors/religions-editor.js: Fixed religion population aggregation
- modules/ui/biomes-editor.js: Fixed biome population aggregation
- modules/ui/zones-editor.js: Fixed zone population calculations (2 locations)
- modules/military-generator.js: Redesigned military generation to use only burg populations

Military system changes:
- Removed rural military generation (all forces now come from settlements)
- Only burgs with 500+ people can maintain military forces
- Military strength based on actual burg population (2.5% mobilization rate)

Result: Population totals now consistent across all CSV exports (~2M total vs previous 40x discrepancy)
This commit is contained in:
barrulus 2025-08-13 18:54:32 +01:00
parent 334ef2b58b
commit e669549390
18 changed files with 2960 additions and 297 deletions

View file

@ -8099,11 +8099,12 @@
<script src="modules/biomes.js?v=1.99.00"></script>
<script src="modules/names-generator.js?v=1.105.11"></script>
<script src="modules/cultures-generator.js?v=1.106.0"></script>
<script src="modules/burgs-and-states.js?v=1.106.0"></script>
<script src="modules/provinces-generator.js?v=1.106.0"></script>
<script src="modules/routes-generator.js?v=1.106.0"></script>
<script src="modules/performance-optimizer.js?v=1.0.0"></script>
<script src="modules/burgs-and-states.js?v=1.106.6"></script>
<script src="modules/provinces-generator.js?v=1.106.1"></script>
<script src="modules/routes-generator.js?v=1.106.2"></script>
<script src="modules/religions-generator.js?v=1.106.0"></script>
<script src="modules/military-generator.js?v=1.107.0"></script>
<script src="modules/military-generator.js?v=1.107.3"></script>
<script src="modules/markers-generator.js?v=1.107.0"></script>
<script src="modules/zones-generator.js?v=1.106.0"></script>
<script src="modules/coa-generator.js?v=1.99.00"></script>
@ -8125,7 +8126,7 @@
<script defer src="modules/ui/tools.js?v=1.108.5"></script>
<script defer src="modules/ui/world-configurator.js?v=1.105.4"></script>
<script defer src="modules/ui/heightmap-editor.js?v=1.105.2"></script>
<script defer src="modules/ui/provinces-editor.js?v=1.108.1"></script>
<script defer src="modules/ui/provinces-editor.js?v=1.108.3"></script>
<script defer src="modules/ui/biomes-editor.js?v=1.108.4"></script>
<script defer src="modules/ui/namesbase-editor.js?v=1.105.11"></script>
<script defer src="modules/ui/elevation-profile.js?v=1.99.00"></script>