Commit graph

55 commits

Author SHA1 Message Date
Claude
9243c43d2d
fix(obsidian): pass string elementId instead of number to editObsidianNote
The editObsidianNote function expects elementId as a string (e.g. 'burg123')
but was receiving a number. This caused elementId.replace() to fail.

Fixed in both:
- burg-editor.js: Pass 'burg' + id instead of id
- markers-editor.js: Pass id (already a string) instead of marker.i
2025-11-14 04:11:45 +00:00
Claude
619bea1b99
feat: integrate Obsidian notes into burg and marker editors
Replace the old TinyMCE notes editor with Obsidian integration in:
- Burg editor "Edit note" button
- Marker editor "Edit note" button

Changes:
- modules/ui/burg-editor.js: Update editBurgLegend() to call editObsidianNote()
- modules/ui/markers-editor.js: Update editMarkerLegend() to call editObsidianNote()
- Both functions fall back to old editNotes() if Obsidian is not configured
- index.html: Update version hashes to 1.108.13

Now when users click "Edit note" on a burg or marker, they get the modern
Markdown editor with Obsidian vault integration instead of the old WYSIWYG.
2025-11-14 03:59:19 +00:00
Azgaar
04c6fb3ee7 feat: like temp likeness, 1.106.6 2024-12-17 12:48:41 +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
Ángel Montero Lamas
b273c77166
added icon-dot-circled to locate burg in burg editor menu (#1123)
* added icon-dot-circled to locate burg

- icon dot-circled
- function zoomIntoBurg()

* pack.burgs[id] and icons

pack.burgs[id].x and y
icon target and map pin

* Update versioning.js to 1.102.0

* Update index.html burg-editor.js to 1.102.00
2024-09-04 02:34:48 +02:00
Azgaar
eb29c5ec5d
Zones generator update (#1113)
* feat: style - store emblem size mod in style (v1.99.10)

* fix the isOutdated function for versions past 1.99

* fix: showUploadMessage function not called correctly for isUpdated case

* feat: load - improve version detection

* feat: improve version detection and update process

* feat: Update version and use constant for VERSION in multiple files

* Update versioning.js to fix incorrect message display for stored version

* feat: zones editor - update to work with pack data

* feat: zones editor - update editor

* feat: zones editor - update editor

* chore: update version

* feat: zones - regenerate

* feat: zones - render zones as continuius line

* feat: zones - editot changes

* feat: zones - auto-update

* feat: zones - generation fixes

* feat: zones - generation fixes

* feat: zones - restore layer

* feat: zones - proselytism - check population

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-09-01 12:48:39 +02:00
Azgaar
d6c3c46a5e
feat: generate watabou preview links for villages (#1056)
Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-03-14 13:56:12 +04: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
1573fad58d annotate template strings for syntax hightlight and format 2022-05-08 19:22:15 +03:00
Gergely Mészáros, Ph.D
5703e62177
Dev submaps (#770)
* bioms shouldn't be masked or the style selection box is useless

* fix: misleading comment

* experimental submapping feature

* burg remapping

* Submap with options

* Fix: calculating absolute flux from precipitation normal-value.

* effective distanceScale

* updated resampler

* fix: missing cell

* Fix: River automatic rerender on regeneration.

* FIX: wrong culture migration

* fixed 0 index burg bug, more accurate coast detection for burgs

* FIX: wrong burg cell id

* fix invalid feature number at burg.ports, option to disable regenerations

* Relocate submap

* update height model and scale parameters

* new menu

* Dropbox OAuth implementation and Cloud framework

* add some space

* removing uneccesary logs, defer script load

* map position on planet, fix wrong riverbed generation

* fix:riverbed generation

* better cell sampler

* Auto-Smoothing,dist fix

* FIX: incorrect province copy and minor fix of rebels

* Cleanup

* FIX: water detection bug

* Recompute centers (states, cultures, provinces)

* activating forwardmap

* FIX: port burg relocation algo

* FIX: coast detection (for burgs)

* Fix: invalid html id

* add dot

* update for FMG 1.73

* Update submap gui

* refactored submap ui options

* Copy all visible military units from the old map.

* add info text

* Add Markers.deleteMarker API.

* Lock markers and lock burgs options

* better comment

* submapper gui updates, remove feature mapping on/off

* Fix typo (thx evolvedexperiment)

* fix ugly GUI (2 digit roundoff)

* resample dialog

* Town Promotion to largetown

* don't promote to capitals.

* Fix typo

* round style settings

* do not draw removed burgs

* Fix port cell search algo

* Fix: robust error handling, no error for 0.

* submap: projection moved to options, fix double burg error

* complete rewrite of burg relocation

* findcell by coordinates

* prepare to merge, add comments, remove fluff

* replacing lodash with deepCopy implementation

Co-authored-by: Mészáros Gergely <monk@geotronic.hu>
2022-04-15 12:45:02 +03:00
Azgaar
5f0be0401e burg temperature graph - corrections 2022-02-04 00:13:10 +03:00
Ilia Pushkin
ccb75570da
Graph of temperature changes for the year in the burg (#733)
* Option for exporting grid cell (#731)

* Added Save Option for Api-like json export.
Will be updated and set to a scheme

* Save Option for Api-like added

* Moved UI of json export to export dialog.
Moved json export to another file named export-json.js

* Added Seperated json export selections
- all JSON : exports all json data.
- minimal JSON : exports json data without cells data.
- cells JSON : exports json data only with pack.cells data.

* More Stable Cell Export...

* Grid cells export option.

* Graph of temperature changes for the year in the burg

I'm bad at writing in English. Please excuse me for this.
It seems illogical to me the parameter of the average temperature for the year in the burg.
Therefore, I found a database of meteorological measurements at https://ru.climate-data.org/
And I analyzed it. With the help of a neural network. I approximately established the dependence of Dy[X] and Dd[X], Md[X] = f(t,p,l).
Dy[X] - how much the temperature in winter differs from the temperature in summer
Md[X] - how much the temperature during the day differs from the temperature at night, on average per year
Dd[X] - how much the temperature difference between day and night is not constant in winter and summer
t - average temperature for the year
p - average rainfall for the year
l - latitude
Now, for each city, you can plot the temperature change. Based on t,p and l.

ATTENTION!!!
The characteristics of the planet and its orbit coincide with those of the earth!

Further, I will use the Russian language, if you want to know my reasoning, please use the Google Translate capabilities.

Я изменил свою первоначальную идею и доработал её. Что касается качества и используемых функций - жду критики. JavaScript - не знакомый мне язык и я не уверен, что выполнил всё верно.
Что касается самой идеи - её реализация пока далека от совершенства. Я понял, что если установить в настройках мира температуру на экваторе ниже, чем на Земле, то графики получаются слишком далекими от реальности. Эта ошибка связана с тем, что Dy[X] зависит от широты, а не среднегодовой температуры. К сожалению добиться хорошей сходимости удалось только расширением нейросети - ещё больше магических чисел.
Теперь, на основе прошлой выборки из 899 городов, попущенных через нейросеть миллион раз среднеквадратичная ошибка стала 3%.
Входными данными для сети являются широта и влажность, а средняя температура иcпользуется только как ориентир при построении графиков.

* Add legnd in graph

* Editing Coefficients

The coefficients have been changed so that the sign of the latitude does not affect the result

Co-authored-by: Efruz Yıldırır <30903352+yldrefruz@users.noreply.github.com>
2022-02-03 10:21:50 +03:00
Azgaar
207b564180 improve MFCG link generation 2022-01-16 14:54:30 +03:00
Azgaar
e06356aa57 allow to edit MFCG link 2022-01-13 00:43:57 +03:00
Azgaar
a55e8d96ff lock burg - values is boolean, not 1/0 2022-01-01 19:09:50 +03:00
Azgaar
f57f004f9e set MFCG iframe to preview mode 2021-12-16 00:51:12 +03:00
Evolvedexperiment
c108da7cdc Changed text on burg group delete 2021-12-03 16:50:11 +00:00
Azgaar
165d8e48be add mfcg link to burg overrview csv export 2021-11-10 20:41:23 +03:00
Azgaar
cc82d258fa urbanDensity - save/load 2021-10-17 12:01:38 +03:00
dranorter
3f58b9f362
Watabou cities integration change, new Urban Density setting (#672)
* Watabou cities integration change, new Urban Density setting

New setting does not yet save/load - I don't want to change the .map file format.

* new markers - monsters

* markers - fix bridges placement

* markers - fix number

* markers - sacred places

* markers - refactor functions

* markers - course generator for inns

* markers - course generator enhancement

* markers - bandits and pirates

* reset PRNG - make points generation deterministic

* use imperial measures for US only

* split save and export to different files

* remove unused js libs

* markers - statues

* markers - magic portals

* markers - magic portals fix

* markers - palm grove fix

* markers - round coords on zoom

* markers data rework - master data object

* markers rework - optional pin shapes

* markers rework - editor start, dragging

* markers rework - editor functions

* markers rework - editor UI

* editable theme color

* added self-hosted analytics

* collect statistics for a short period

* umami - we do'nt need html class events

* umami - don't collect if noTrack is set

* markers - add on click

* saveTiles clean up listeners on close

* markers - generate from config file

* config generate markers dialog

* config generate markers dialog fixes

* markers overview

* markers - export as geoJSON

* markers overview - export data to csv

* markers - auto-update on load

* markers overview - focus on marker

* burg editor - MFCG preview

* markers - generate tool + lock tooltip

* Watabou cities integration change, new Urban Density setting

New setting does not yet save/load - I don't want to change the .map file format.

* Trying to put the formula in the right place

Again, sorry for the mess

* whoops

* Getting the equation right

* Change default

Co-authored-by: Azgaar <maxganiev@yandex.ru>
2021-10-17 11:48:56 +03:00
Azgaar
576fb9a6d0 showMFCGMap option 2021-10-12 16:36:15 +03:00
Azgaar
bdc0c9f8ee minmax util function 2021-10-10 17:59:27 +03:00
Azgaar
2a9edd2458 markers - generate tool + lock tooltip 2021-09-23 21:07:03 +03:00
Azgaar
a9755dacc8 burg editor - MFCG preview 2021-09-16 10:20:54 +03:00
Azgaar
5ed08e156a store populationRate and urbanization in memory 2021-06-27 14:24:55 +03:00
Legogizmo
f855de6fb8
Added a lock function to burgs (#612)
* Added a lock function to burgs that will prevent them from being regenerated

* Updated tooltips and fixed culture change from renaming locked burgs and group remove from deleting locked burgs
2021-03-30 00:05:49 +03:00
Azgaar
a9a9e8c7da v1.5.5 - Copenhagen fix 2021-02-22 14:15:35 +03:00
Azgaar
0fcb4eea0b v1.5.29 - burg type editable 2021-02-14 18:31:29 +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
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
Bryce Kabat
122c456588 Added Logging Options to Improve Performance (#529)
* Added Logging Options to Improve Performance

* Requested Changes

Co-authored-by: Onyx Azryn <brycekabat@onyxazryn.com>
2021-02-04 15:56:27 +03:00
Azgaar
957bab32c1 v1.4.21 2020-06-05 22:21:32 +03:00
Evolvedexperiment
bdf5c048a8 Fix for FMG/MFCG sea direction integration 2020-05-16 16:52:28 +00:00
Azgaar
72d124d95d v1.4.01 2020-04-23 19:44:32 +03:00
Azgaar
6d0e106f1f v1.3.45 2020-04-07 22:46:16 +03:00
Azgaar
a60b2eed9f v1.3.36 2020-04-04 01:17:47 +03:00
Azgaar
63ac434e1d v1.3.35 2020-04-04 01:13:56 +03:00
Azgaar
5ecbcdaf85 v1.3.31 2020-04-04 00:42:16 +03:00
Azgaar
aab1b8eac6 v1.3.3 2020-04-04 00:18:29 +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
bc6b8cdafe v1.22.31 2019-12-23 20:06:43 +03:00
Azgaar
c558029992 v1.22.29 2019-12-18 23:47:49 +03:00
Azgaar
5ffd30dee8 v 1.21 2019-10-28 00:18:17 +03:00
Azgaar
c27d3e1689 1.1.20 2019-10-17 21:13:43 +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
35b3e9dd9c v1.1 2019-09-28 15:10:53 +03:00