Commit graph

33 commits

Author SHA1 Message Date
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
Azgaar
fa03b2d705 fix: #1170 2024-11-24 15:02:56 +01:00
Azgaar
c795ac6c30 fix: allow to load smaller namesbase without issues on regeneration 2024-10-09 01:08:47 +02:00
Azgaar
05de284e02
Refactor layers rendering (#1120)
* feat: render states - use global fn

* feat: render states - separate pole detection from layer render

* feat: render provinces

* chore: unify drawFillWithGap

* refactor: drawIce

* refactor: drawBorders

* refactor: drawHeightmap

* refactor: drawTemperature

* refactor: drawBiomes

* refactor: drawPrec

* refactor: drawPrecipitation

* refactor: drawPopulation

* refactor: drawCells

* refactor: geColor

* refactor: drawMarkers

* refactor: drawScaleBar

* refactor: drawScaleBar

* refactor: drawMilitary

* refactor: pump version to 1.104.00

* refactor: pump version to 1.104.00

* refactor: drawCoastline and createDefaultRuler

* refactor: drawCoastline

* refactor: Features module start

* refactor: features - define distance fields

* feat: drawFeatures

* feat: drawIce don't hide

* feat: detect coastline - fix issue with border feature

* feat: separate labels rendering from generation process

* feat: auto-update and restore layers

* refactor - change layers

* refactor - sort layers

* fix: regenerate burgs to re-render layers

* fix: getColor is not defined

* fix: burgs overview - don't auto-show labels on hover

* fix: redraw population on change

* refactor: improve tooltip logic for burg labels and icons

* chore: pump version to 1.104.0

* fefactor: edit coastline and lake

* fix: minot fixes

* fix: submap

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-09-20 12:20:27 +02:00
Azgaar
dfa3813f04 feat: set min brush size to 1 2024-08-23 02:33:45 +02:00
Azgaar
d4aef4920c
Slider-input web component (#1109)
* feat: slider-input web component

* feat: slider-input web component - Brush size

* feat: slider-input - statesGrowthRate

* feat: slider-input - units editor

* feat: slider-input - dissalow invalid numbers

* chore: pump version to v1.99.05

* chore: pump version to v1.99.05

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-08-22 13:35:36 +02:00
Azgaar
721cec4e58 feat: manually added culture inherits parent culture in Tree (1.96.05) 2024-03-04 20:17:53 +01:00
Azgaar
14ac83e6f5 fix: uploadCulturesData 2024-02-28 00:16:07 +01:00
Azgaar
52e3088763 fix: cultures editor - don't overwrite border color on color change 2023-12-05 02:45:55 +04:00
Azgaar
1d921c18af fix: (v1.91.00) 2023-08-08 15:25:28 +04:00
Azgaar
fb4d3a4019 fix(#932): expand cultures to get scoped cells data 2023-04-15 13:32:47 +04:00
Azgaar
218887b435 feat(religions editor): debouce center dragging 2023-03-19 15:46:53 +04:00
Azgaar
e0ea578032 style(cultures editor): move regenerate burg names button closer to namesbase 2023-03-05 14:54:23 +04:00
Azgaar
660316e4bf fix: culture data change must not ignore lock status 2023-01-22 22:37:18 +04:00
Azgaar
dada419f20
Add the ability to lock states, provinces, cultures, and religions: refactoring (#910)
* Add the ability to lock states, provinces, cultures, and religions (#902)

* Add the basis for locking everything, code and test the culture locking

* Got the religion generator working, but not the tree. There are cycles being generated

* Religions work now, including the tree view

* Got the states and provinces working as well, all good and ready

* Refresh the province editor when regenerating

* Implement the versioning steps

* Fix the state naming and color changing even when locked

* The fix did not work with loaded maps, fix that too

* Fix a few more bugs and address the PR feedback

* Fix the state expanding event when they're locked bug

* Implement some logic to ignore state being locked when regenerating provinces directly.

* refactor(#902): start with states regenertion

* refactor(#902): locked states cells to be assigned on start

* refactor(#902): lock state - keep label

* refactor(#902): lock provinces

* refactor(#902): regenerate states - update provinces

* refactor(#902): regenerate cultures

* refactor(#902): regenerate religions

Co-authored-by: Guillaume St-Pierre <gstpierre01@gmail.com>
Co-authored-by: Azgaar <maxganiev@yandex.com>
2023-01-08 03:38:52 -08:00
Azgaar
4ab0311d01 fix: hierarchy-tree - make sure nodes have parents not removed 2023-01-02 16:21:13 +03:00
Schizoid Nightmares
bfba711d8b
Reducing the size of the culture center circle (#855)
* Reducing the size of the culture center circle

This makes it easier to place the center more precisely and to see what cell it is in.

* Increasing the size of the cultural centers
2022-08-17 00:15:18 -07:00
Azgaar
a617dda3ad fix: cultures upload 2022-06-28 22:11:32 +03:00
Azgaar
6cd2419f10 feat(charts): remove on dialog close 2022-06-24 15:51:10 +03:00
Azgaar
03b556ae86 feat(charts): pump version to 1.87.00 2022-06-23 23:11:57 +03:00
Azgaar
434907fa9e feat(hierarchy tree): animate on update 2022-06-12 22:21:34 +03:00
Azgaar
6e5e570c90 feature(hierarchy tree): dynamically load, control dialog 2022-06-12 00:22:39 +03:00
Azgaar
182c6d558d fix: religions and cultures are not highlightable from editor 2022-06-08 21:12:31 +03:00
Azgaar
221079321f refactor: load religions editor dynamically 2022-06-06 02:09:38 +03:00
Azgaar
b416551fb5 fix: add origin to religion and cultures csv download 2022-06-05 23:00:57 +03:00
Azgaar
ff1d3566c4 feat: multi-parental tree for religions 2022-06-05 18:26:28 +03:00
Azgaar
23ff50bd76 feat: multi-parental tree controls 2022-06-05 14:40:10 +03:00
Azgaar
f4ef859af8 feat: multi-parental tree 2022-06-05 01:27:58 +03:00
Azgaar
c2640bcada tooltip - get shortcut from its own attribute 2022-05-28 22:27:29 +03:00
Azgaar
8a9a29a9d3 refactor dialogs to be mobile-friendly 2022-05-28 01:47:25 +03:00
Azgaar
c394534246 base dialog 2022-05-23 23:52:39 +03:00
Azgaar
b39d7edc7e updata cultures-editor 2022-05-20 23:30:34 +03:00
Azgaar
2d8c5355bb load dynamically cultures editor 2022-05-19 00:19:24 +03:00