Commit graph

62 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
d98ef5717e perf: set text-rendering to optimizeSpeed, v1.108.1 2025-02-15 14:43:51 +01:00
Azgaar
50ee5150c1 fix: #1174 2024-12-13 11:58:53 +01: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
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
f19b891421
Urquhart routes (#1072)
* feat: routes generation

* feat: routes rendering

* feat: searoutes fix, changing reGraph

* feat: searoute - change pathfinding algo

* feat: routes - cleanup code

* feat: routes - change data format

* feat: routes - add routes to json export

* feat: edit routes - start

* feat: edit routes - main

* feat: edit routes - EP

* feat: edit routes - remove route

* feat: route - generate names

* feat: route - continue

* Refactor route merging logic for improved performance

* feat: routes - show name in tooltip

* feat: routes - create route dialog

* feat: update data on control point remove

* feat: routes editor - split route

* feat: add join route functionality to routes editor

* feat: Add join route functionality to routes editor

* feat: Update join route tooltip in routes editor

* feat: routes overview - sort by length

* feat: routes overview - fix distanceScale value

* feat: routes overview - create route

* Refactor getMiddlePoint function to getCloseToEdgePoint

* feat: routes - change data format, fix issues

* feat: routes - regenerateRoutes

* feat: routes - add route on burg creation

* chore - remove merge conflict markers

* chore - remove merge conflict markers

* feat: routes name - no unnamed burg names

* feat: routes - lock routes

* fix: routes - split routes

* feat: routes - tip correction

* feat: routes - auto-update part 1

* feat: routes - return old rePacj logic to not break auto-update

* feat: routes - auto-update - add connections

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-08-15 15:46:55 +02:00
Azgaar
374c21b3d7
Ocean heightmap and Scale bar styling change [v1.96] (#1045)
* Scale bar styling (#1025)

* feat: style scale bar

* feat: style scale bar - style presets

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>

* Ocean heightmap to v1.96 (#1044)

* feat: allow to render ocean heightmap

* feat: allow to render ocean heightmap - test

* feat: allow to render ocean heightmap - fix issue

* feat: allow to render ocean heightmap - cleanup

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>

* fix: scale bar size

* fix: remove mask on terrs lavel

* fix: regenerate heigtmap preview to use current graph size

* Add the name of culture and namesbase in the name editor dialog (#1033)

* Add the name of culture and namesbase in the name editor dialog

Added the name of the culture and  namesbase in the dialog "name editor".
This tells information on the "click to generate a culture-specific name"
It tells you the culture before changing name.

* cultureName into cultureId + cultureName

And deleted the incomplete code of showing culture name on datatip

* refactor: leave culture name only

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>

* Added Burgs column to province editor (#1031)

* Added Burgs column to province editor

Added to province editor:
+ Burgs column
+ the number of Burgs, p.burgs.length
+ "icon-dot-circled" to go to overviewBurgs.
+ overviewBurgs Filtered by state id.
+ Fixed some typos.

* fixed code as Azgaar suggested

+ Corrected provincesHeader distance in em.
+ const stateId = pack.provinces[p].state;
- Deleted cell count.

* deleted HTML code for provincesFooter cells

- Deleted Total land cells number HTML from provincesFooter.

* deleting totalCells in the code, maybe i will add provinceCells in the future.

Deleted lines for const totalCells and for (+cells / totalCells) * 100 + "%";

* refactor: cleanup

* refactor: cleanup

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>

* fix: burgs overview - add MFCG link back

* feat: add more details to burgs export

* feat: don't show auto-update dialog

* feat: pump version

* fix: #1041

* feat: update style presets

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
Co-authored-by: Ángel Montero Lamas <angel.montero1@gmail.com>
2024-02-24 19:12:48 +04:00
Azgaar
87599d1530
State labels: new label placing algorithm (#977)
* feat: draw state labels start

* feat: update old .map files

* chore: update version hash

* fear: add change to the user's changelog
2023-08-11 18:56:42 +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
5dea22c4a3 hotfix for provinces editor 2022-05-19 19:17:02 +03:00
Azgaar
2d8c5355bb load dynamically cultures editor 2022-05-19 00:19:24 +03:00
Azgaar
1573fad58d annotate template strings for syntax hightlight and format 2022-05-08 19:22:15 +03:00
Azgaar
8184b416b9 fill-box web component 2022-01-22 17:47:56 +03:00
Azgaar
865afdc2aa diplomacy - change relations screen 2021-12-31 18:21:37 +03:00
Azgaar
6de70f5897 buttons to release all provinces and regenerate culture name 2021-11-07 18:57:52 +03:00
Ken
377b023791
Update State, Province, Burg exports to have both short and long names for State, Province (#655)
* Update burg export to use short names for State, Province

* Add full names to exports for Burg, Province, State
2021-08-21 11:32:30 +03:00
Azgaar
5ed08e156a store populationRate and urbanization in memory 2021-06-27 14:24:55 +03:00
Azgaar
0ecd910f79 fixed 618 2021-04-08 00:02:29 +03:00
Azgaar
7a94ab632f v1.5.69 - ability to drag province labels 2021-02-26 21:52:01 +03:00
Azgaar
b62e57f5a7 v1.5.63- fix for state promotion 2021-02-25 20:40:10 +03:00
Azgaar
9908188a51 v1.5.59 - fix for cannot remove provinces 2021-02-25 14:05:26 +03:00
Azgaar
66bd7b7f6f v1.5.25 - smarter generation 2021-02-14 15:11:42 +03:00
Azgaar
6987474c2e v1.5.14 - Province/diplom. editors - emblems added 2021-02-10 02:30:31 +03:00
Azgaar
a5b2f23cee v1.5.12 - emblems adding, save/load 2021-02-09 00:02:21 +03:00
Azgaar
378ed71702 v1.5.09 - speak functionality 2021-02-04 15:56:28 +03:00
Azgaar
925e7accbd v1.5.05 - emblems regeneration 2021-02-04 15:56:28 +03:00
Azgaar
24d2efe8b6 v1.5.05 - optimization, partial d3 removal 2021-02-04 15:56:28 +03:00
Azgaar
b86d985607 v1.5.01 - COA gen integration, first try, embed 2021-02-04 15:56:27 +03:00
Azgaar
3a55ed1c08 v1.4.6 2021-02-04 15:56:27 +03:00
Azgaar
2a67ee5d9f v1.4.14 2020-05-16 00:52:45 +03:00
Azgaar
617e8d4306 v1.4.09 2020-05-09 23:51:14 +03:00
Azgaar
beb2d0ad7c v1.4.06 2020-05-05 02:00:40 +03:00
Azgaar
5e9bd86069 v1.3.46 2020-04-08 23:35:32 +03:00
Azgaar
997456a37d v1.3.39 2020-04-04 01:57:09 +03:00
Azgaar
aab1b8eac6 v1.3.3 2020-04-04 00:18:29 +03:00
Azgaar
5d0c51f6be v1.3.28 2020-04-02 23:26:43 +03:00
Azgaar
498ab097f9 v1.3.17a 2020-03-31 00:39:28 +03:00
Azgaar
f4a84fc6d6 v1.3a 2020-03-15 17:35:07 +03:00
Marc Emmanuel
8be4a5e151 fix: 🐛 Allow also cmd key for all ctrl actions on mac 2020-01-04 13:10:44 +01:00
Azgaar
e3e2de9e9b v1.22.27 2019-12-15 13:50:09 +03:00
Azgaar
c54ee39c68 v1.22.09 2019-11-16 16:50:58 +03:00
evolvedexperiment
41643ee5ac Fix for province pattern painting bug and moved the color picker forward. (#362)
* Fix for 3d heightmap / 3d view conflict

* Fix for provinces painting patterns over color and color picker now in front of edit window
2019-11-12 22:31:53 +03:00
Azgaar
a3fa5443d6 v1.2.02 2019-10-24 22:27:41 +03:00
Azgaar
f7a3eafe1f 1.11.1 2019-10-18 23:18:02 +03:00
Azgaar
aadae58072 1.1.14 2019-10-16 23:25:48 +03:00
Azgaar
76a5ade3d0 v1.1.12 2019-10-03 23:17:17 +03:00
Azgaar
8ff1fe46b8 v1.1.11 2019-10-03 00:48:33 +03:00
Azgaar
c050353d70 v1.1.09 2019-10-02 22:20:01 +03:00
Azgaar
38abc74c11 1.1.07 2019-09-30 10:06:17 +03:00
Azgaar
1c5f9f7ab6 v1.1.03 2019-09-28 20:25:53 +03:00