Warning! This operation is destructive and irreversible. Don't forget to save your original map!
-
Population rate (Units editor -> population) and map pixel size will
- be automatically updated according to the current scale factor. If you'd like
- to generate a new parent-map, don't forget to reset them! Options are interpreted as usual.
-
- Data to be copied: Heightmap, Biome, Religion, Population, Precipitation, Cultures, States, Provinces, Regiments (military).
-
-
- Data to be destroyed (regenerated): Markers, Zones, Rivers (mostly regenerate at the same place).
- Remapping Burgs (cities) is not 100% guaranteed, you may need to fix missing or wrongly mapped burgs manually.
-
-
-
Remap (copy) the following features to the new map:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Settings to be changed: Population rate, map pixel size.
+
+
+ Data to be copied: Heightmap, Biome, Religion, Population, Precipitation, Cultures, States, Provinces, Regiments (military), Markers.
+
+
+ Data to be destroyed (regenerated): Zones, Roads, Rivers (mostly regenerate at the same place).
+
+
+ Remapping Burgs (cities) may be imprecise, you will need to fix missing or wrongly mapped burgs manually.
+
Lock remapped items for:
@@ -3711,18 +3694,30 @@
-
+
-
+
-
+
+
+ WIP (not working yet)
+
+
Points number
+
+
+
+
+
+
+
+
Warning!
diff --git a/modules/submap.js b/modules/submap.js
index c15d91f7..5f989aaf 100644
--- a/modules/submap.js
+++ b/modules/submap.js
@@ -229,7 +229,7 @@ window.Submap = (function () {
});
stage("Porting and locking burgs.");
- if (options.copyBurgs) copyBurgs(parentMap, projection, options);
+ copyBurgs(parentMap, projection, options);
// transfer states, mark states without land as removed.
stage("Porting states.");
@@ -242,7 +242,7 @@ window.Submap = (function () {
s.neighbors = s.neighbors.filter(n => validStates.has(n));
// find center
- s.center = (options.copyBurgs && pack.burgs[s.capital].cell)
+ s.center = pack.burgs[s.capital].cell
? pack.burgs[s.capital].cell // capital is the best bet
: pack.cells.state.findIndex(x => x===i); // otherwise use the first valid cell
});
@@ -264,12 +264,10 @@ window.Submap = (function () {
: pack.cells.province.findIndex(x => x===i);
});
- // regenerate (if not copied) and display burgs
- if (!options.copyBurgs) BurgsAndStates.regenerateBurgs();
BurgsAndStates.drawBurgs();
stage("Regenerating road network.");
- if (!options.copyRoads) Routes.regenerate();
+ Routes.regenerate();
drawStates();
drawBorders();
@@ -306,7 +304,7 @@ window.Submap = (function () {
drawMarkers();
stage("Regenerating Zones.");
- if (!options.copyZones) addZones();
+ addZones();
Names.getMapName();
stage("Submap done.");
diff --git a/modules/ui/options.js b/modules/ui/options.js
index f9c9473c..9d75ddc5 100644
--- a/modules/ui/options.js
+++ b/modules/ui/options.js
@@ -335,24 +335,24 @@ function copyMapURL() {
.catch(err => tip("Could not copy URL: " + err, false, "error", 5000));
}
-function changeCellsDensity(value) {
- const convert = v => {
- if (v == 1) return 1000;
- if (v == 2) return 2000;
- if (v == 3) return 5000;
- if (v == 4) return 10000;
- if (v == 5) return 20000;
- if (v == 6) return 30000;
- if (v == 7) return 40000;
- if (v == 8) return 50000;
- if (v == 9) return 60000;
- if (v == 10) return 70000;
- if (v == 11) return 80000;
- if (v == 12) return 90000;
- if (v == 13) return 100000;
- };
- const cells = convert(value);
+const cellsDensityConstants = {
+ 1: 1000,
+ 2: 2000,
+ 3: 5000,
+ 4: 10000,
+ 5: 20000,
+ 6: 30000,
+ 7: 40000,
+ 8: 50000,
+ 9: 60000,
+ 10: 70000,
+ 11: 80000,
+ 12: 90000,
+ 13: 100000,
+};
+function changeCellsDensity(value) {
+ const cells = value in cellsDensityConstants? cellsDensityConstants[value]: 1000;
pointsInput.setAttribute("data-cells", cells);
pointsOutput_formatted.value = cells / 1000 + "K";
pointsOutput_formatted.style.color = cells > 50000 ? "#b12117" : cells !== 10000 ? "#dfdf12" : "#053305";
diff --git a/modules/ui/submap.js b/modules/ui/submap.js
index 084c594b..20533805 100644
--- a/modules/ui/submap.js
+++ b/modules/ui/submap.js
@@ -13,6 +13,15 @@ function openSubmapOptions() {
});
}
+function openRemapOptions() {
+ $("#remapOptionsDialog").dialog({
+ title: "Resampler options",
+ resizable: false,
+ width: fitContent(),
+ position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"}
+ });
+}
+
const generateSubmap = debounce(async function () {
// Create submap from the current map
// submap limits defined by the current window size (canvas viewport)
@@ -21,11 +30,6 @@ const generateSubmap = debounce(async function () {
closeDialogs("#worldConfigurator, #options3d");
const checked = id => Boolean(document.getElementById(id).checked)
const options = {
- copyBurgs: checked("submapCopyBurgs"),
- copyZones: checked("submapCopyZones"),
- copyRivers: checked("submapCopyRivers"),
- copyRoads: checked("submapCopyRoads"),
-
lockMarkers: checked("submapLockMarkers"),
lockBurgs: checked("submapLockBurgs"),
@@ -77,6 +81,7 @@ const generateSubmap = debounce(async function () {
oldstate = null; // destroy old state to free memory
restoreLayers();
+ turnButtonOn('toggleMarkers');
if (ThreeD.options.isOn) ThreeD.redraw();
if ($("#worldConfigurator").is(":visible")) editWorld();
}, 1000);