Fantasy-Map-Generator/modules/ui
barrulus e669549390 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)
2025-08-13 18:54:32 +01:00
..
3d.js Refactor layers rendering (#1120) 2024-09-20 12:20:27 +02:00
ai-generator.js feat(ai-generator): update supported AI models list 2025-06-14 15:24:23 +02:00
battle-screen.js Allow data URI scheme for custom images (#1196) 2025-03-08 14:51:48 +01:00
biomes-editor.js Fix population aggregation system to eliminate double-counting 2025-08-13 18:54:32 +01:00
burg-editor.js feat: like temp likeness, 1.106.6 2024-12-17 12:48:41 +01:00
burgs-overview.js Add world coordinate export for burgs with improved unit conversion 2025-08-12 18:30:21 +01:00
coastline-editor.js Refactor layers rendering (#1120) 2024-09-20 12:20:27 +02:00
diplomacy-editor.js Merge states (#962) 2023-07-23 14:25:41 +04:00
editors.js Allow data URI scheme for custom images (#1196) 2025-03-08 14:51:48 +01:00
elevation-profile.js Urquhart routes (#1072) 2024-08-15 15:46:55 +02:00
emblems-editor.js fix: (v1.91.00) 2023-08-08 15:25:28 +04:00
general.js fix: routes (v1.104.3) 2024-09-20 14:16:07 +02:00
heightmap-editor.js fix: disable double-click on heightmap edit 2024-09-22 20:07:55 +02:00
hotkeys.js Refactor layers rendering (#1120) 2024-09-20 12:20:27 +02:00
ice-editor.js fix(#906): ice to follow expected size, reduce ice elements in general 2023-02-25 16:01:22 +04:00
labels-editor.js Draw state labels improvement (#1155) 2024-10-19 13:25:34 +02:00
lakes-editor.js fix: features rendering - close the ring 2024-10-13 20:32:37 +02:00
layers.js refactor: drawReliefIcons, v1.108.4 2025-02-15 18:03:54 +01:00
markers-editor.js Allow data URI scheme for custom images (#1196) 2025-03-08 14:51:48 +01:00
markers-overview.js fix(ui): correct marker note lookup by adding prefix 2025-07-02 00:52:41 +02:00
measurers.js Refactor layers rendering (#1120) 2024-09-20 12:20:27 +02:00
military-overview.js Fix population aggregation system to eliminate double-counting 2025-08-13 18:54:32 +01:00
namesbase-editor.js fix: allow to load smaller namesbase without issues on regeneration 2024-10-09 01:08:47 +02:00
notes-editor.js fix: notes editor size to be relative to canvas size 2025-02-10 12:41:14 +01:00
options.js fix: submap - generate in current canvas size 2024-12-13 13:15:01 +01:00
provinces-editor.js Fix population aggregation system to eliminate double-counting 2025-08-13 18:54:32 +01:00
regiment-editor.js Allow data URI scheme for custom images (#1196) 2025-03-08 14:51:48 +01:00
regiments-overview.js Allow data URI scheme for custom images (#1196) 2025-03-08 14:51:48 +01:00
relief-editor.js annotate template strings for syntax hightlight and format 2022-05-08 19:22:15 +03:00
rivers-creator.js [Draft] Submap refactoring (#1153) 2024-12-12 13:11:54 +01:00
rivers-editor.js [Draft] Submap refactoring (#1153) 2024-12-12 13:11:54 +01:00
rivers-overview.js Urquhart routes (#1072) 2024-08-15 15:46:55 +02:00
route-group-editor.js fix: #1129 2024-09-12 12:55:31 +02:00
routes-creator.js fix: routes id after removing all 2024-08-16 13:15:00 +02:00
routes-editor.js fix: routes (v1.104.3) 2024-09-20 14:16:07 +02:00
routes-overview.js Implement hierarchical burg placement and route generation system 2025-08-12 22:44:54 +01:00
style-presets.js feat: letter-spacing - update style files 2024-09-01 14:07:18 +02:00
style.js refactor: drawReliefIcons, v1.108.4 2025-02-15 18:03:54 +01:00
submap-tool.js fix: submap - generate in current canvas size 2024-12-13 13:15:01 +01:00
temperature-graph.js feat: like temp likeness, 1.106.6 2024-12-17 12:48:41 +01:00
tools.js Allow data URI scheme for custom images (#1196) 2025-03-08 14:51:48 +01:00
transform-tool.js fix: submap - generate in current canvas size 2024-12-13 13:15:01 +01:00
units-editor.js Refactor layers rendering (#1120) 2024-09-20 12:20:27 +02:00
world-configurator.js fix: typo 2024-09-25 12:13:16 +02:00
zones-editor.js Fix population aggregation system to eliminate double-counting 2025-08-13 18:54:32 +01:00