hoi4-agent-tools 4.11.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/hoi4_agent_tools/map/gameplay/crossings.js +55 -16
  3. package/dist/hoi4_agent_tools/map/partition-fields.js +14 -0
  4. package/dist/hoi4_agent_tools/map/partition-geography.js +55 -6
  5. package/dist/hoi4_agent_tools/map/partition-provinces.js +105 -24
  6. package/dist/hoi4_agent_tools/map/relief/hydrology.js +9 -0
  7. package/dist/hoi4_agent_tools/map/relief/macro-relief.js +21 -1
  8. package/dist/hoi4_agent_tools/map/relief/painted-relief.js +8 -5
  9. package/dist/hoi4_agent_tools/map/world-provinces.js +36 -19
  10. package/dist/hoi4_agent_tools/version.js +1 -1
  11. package/docs/map.md +16 -16
  12. package/engine/bin/manifest.json +1 -1
  13. package/engine/bin/win32-x64/hoi4-engine.exe +0 -0
  14. package/npm-shrinkwrap.json +2 -2
  15. package/package.json +1 -1
  16. package/schemas/configuration.schema.json +1 -1
  17. package/schemas/continuous-focus-palette.schema.json +1 -1
  18. package/schemas/custom-weighted-pool.schema.json +1 -1
  19. package/schemas/decision-inspect-input.schema.json +1 -1
  20. package/schemas/error-log-input.schema.json +1 -1
  21. package/schemas/event-feature-manifest.schema.json +1 -1
  22. package/schemas/focus-plan.schema.json +1 -1
  23. package/schemas/focus-planning-sidecar.schema.json +1 -1
  24. package/schemas/geography-model.schema.json +1 -1
  25. package/schemas/gui-animation-source.schema.json +1 -1
  26. package/schemas/gui-helper.schema.json +1 -1
  27. package/schemas/gui-scenario.schema.json +1 -1
  28. package/schemas/helper-expansion-request.schema.json +1 -1
  29. package/schemas/helper-expansion-summary.schema.json +1 -1
  30. package/schemas/impact-inspect-input.schema.json +1 -1
  31. package/schemas/map-operation.schema.json +1 -1
  32. package/schemas/mechanic-test-input.schema.json +1 -1
  33. package/schemas/mod-index-input.schema.json +1 -1
  34. package/schemas/operation-result.schema.json +1 -1
  35. package/schemas/package-check-input.schema.json +1 -1
  36. package/schemas/package-manifest.schema.json +1 -1
  37. package/schemas/probability-analysis-result.schema.json +1 -1
  38. package/schemas/probability-compare-input.schema.json +1 -1
  39. package/schemas/probability-evaluate-input.schema.json +1 -1
  40. package/schemas/probability-inspect-input.schema.json +1 -1
  41. package/schemas/probability-render-input.schema.json +1 -1
  42. package/schemas/probability-scenario-set.schema.json +1 -1
  43. package/schemas/probability-sequence-input.schema.json +1 -1
  44. package/schemas/probability-simulate-input.schema.json +1 -1
  45. package/schemas/probability-sweep-input.schema.json +1 -1
  46. package/schemas/reference-context-input.schema.json +1 -1
  47. package/schemas/reference-read-input.schema.json +1 -1
  48. package/schemas/reference-search-input.schema.json +1 -1
  49. package/schemas/reference-sheets.schema.json +1 -1
  50. package/schemas/scenario-suite.schema.json +1 -1
  51. package/schemas/scenario-test-input.schema.json +1 -1
  52. package/schemas/script-validate-input.schema.json +1 -1
  53. package/schemas/shared-scenario.schema.json +1 -1
  54. package/schemas/source-lookup-input.schema.json +1 -1
  55. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.11.1 - 2026-11-07
6
+
7
+ - Close impassable walls in generated maps, and keep pass saddles and point river mouths that a 4.10.0 `create_world` lost.
8
+ - Walls leaked: the synthesis marks a wall's whole footprint as a barrier band, often 10 to 60 pixels wide, and the partition put the province border wherever its fronts met in the band or at the band's edge, not on the range path. The crossings only block borders that cross the path, so most pairs got no `impassable` row. The partition now records the side of each wall (`wallSide`), gives every band pixel to the nearest province on its own side, and keeps the sliver and corner repairs of the province assembly from merging across it. A border that touches across the path at a single pixel now gets a row, and `MAP_RANGE_NOT_CLOSED` samples the provinces that meet at the path. On a 5,120 x 2,560 world with a closed ring wall and a long massif wall the open samples went from 49 of 79 and 186 of 193 to none for either wall.
9
+ - `relief.painted` no longer fills a declared pass: its raise is capped in the pass corridor at the saddle the macro relief carved, so a painted or impassable range over a pass no longer raises `MAP_PASS_NOT_LOWER`.
10
+ - A river whose course already runs through the cell of its point mouth (its last `via` within a half-resolution cell of the mouth) now ends there instead of failing with `MAP_RIVER_UNREACHABLE_MOUTH`.
11
+
5
12
  ## 4.11.0 - 2026-11-07
6
13
 
7
14
  - Add `hoi4.skill` and the skill resources (#108, M-1). The tool lists the skills HOI4 Mod Setup installed in the mod or loads one by name, and the same `SKILL.md` text is the resource `hoi4-agent://workspace/{workspaceId}/skill/{name}`. Both serve the kit version the mod's Setup lock pins, with the kit revision and each file's SHA-256. A file edited since Setup installed it is refused with `SKILL_TEXT_DRIFTED` unless the caller accepts local edits, and a mod without a lock gets its installed skills marked unpinned.
@@ -639,13 +639,54 @@ function scanRange(range, input) {
639
639
  }
640
640
  return { range, hits, passes };
641
641
  }
642
- /** A pair is a wall crossing when enough of its border lies across the range's line. */
642
+ /**
643
+ * A pair is a wall crossing when enough of its border lies across the range's line. One pixel
644
+ * is enough: two provinces that touch across the line at a single corner of their borders are
645
+ * as open to an army as a long border.
646
+ */
643
647
  function isWallPair(hit, stat) {
644
- if (hit.wall < 2)
648
+ if (hit.wall < 1)
645
649
  return false;
646
650
  const total = stat?.count ?? hit.wall;
647
651
  return hit.wall >= 0.2 * total;
648
652
  }
653
+ /**
654
+ * The province of the first pixel strictly on one side of a line through (`cx`, `cy`) with the
655
+ * given tangent, walking out along the normal in half-pixel steps up to three pixels; -1 when
656
+ * the walk leaves the map. `side` 1 is the right of travel as drawn on screen, -1 the left.
657
+ */
658
+ function besideLine(pixel, width, height, cx, cy, tx, ty, side) {
659
+ for (let step = 1; step <= 6; step += 1) {
660
+ const k = side * step * 0.5;
661
+ const x = Math.floor(cx - ty * k);
662
+ const y = Math.floor(cy + tx * k);
663
+ if (x < 0 || y < 0 || x >= width || y >= height)
664
+ return -1;
665
+ const cross = tx * (y + 0.5 - cy) - ty * (x + 0.5 - cx);
666
+ if (cross * side > 0.25 || step === 6)
667
+ return pixel[y * width + x];
668
+ }
669
+ return -1;
670
+ }
671
+ /**
672
+ * True when province `own`, which lies on both sides of the line here, continues into land on
673
+ * the given side: walking out along the normal up to six pixels meets land (its own or another
674
+ * province's) at least three pixels out, not water first.
675
+ */
676
+ function reachesOn(pixel, kind, width, height, cx, cy, tx, ty, side, own) {
677
+ for (let step = 1; step <= 6; step += 1) {
678
+ const x = Math.floor(cx - ty * side * step);
679
+ const y = Math.floor(cy + tx * side * step);
680
+ if (x < 0 || y < 0 || x >= width || y >= height)
681
+ return false;
682
+ const province = pixel[y * width + x];
683
+ if (kind[province] !== LAND)
684
+ return false;
685
+ if (province !== own || step >= 3)
686
+ return true;
687
+ }
688
+ return true;
689
+ }
649
690
  /** Border pixel pairs inside a pass window that free a pair: any border through the gate is the gate. */
650
691
  const GATE_HITS = 1;
651
692
  // ---------------------------------------------------------------------------------------------
@@ -891,26 +932,24 @@ export function planCrossings(input) {
891
932
  continue;
892
933
  const cx = sample.x * width;
893
934
  const cy = sample.y * height;
894
- const ax = Math.round(cx - sample.tangentY * 3);
895
- const ay = Math.round(cy + sample.tangentX * 3);
896
- const bx = Math.round(cx + sample.tangentY * 3);
897
- const by = Math.round(cy - sample.tangentX * 3);
898
- if (ax < 0 ||
899
- ay < 0 ||
900
- bx < 0 ||
901
- by < 0 ||
902
- ax >= width ||
903
- bx >= width ||
904
- ay >= height ||
905
- by >= height)
935
+ // The provinces that meet at the line here: the nearest pixel on each side of it, up to
936
+ // three pixels out along the normal. Probing further out could step over a narrow
937
+ // province between them and report two provinces that do not touch.
938
+ const a = besideLine(view.pixel, width, height, cx, cy, sample.tangentX, sample.tangentY, 1);
939
+ const b = besideLine(view.pixel, width, height, cx, cy, sample.tangentX, sample.tangentY, -1);
940
+ if (a < 0 || b < 0)
906
941
  continue;
907
- const a = view.pixel[ay * width + ax];
908
- const b = view.pixel[by * width + bx];
909
942
  if (input.kind[a] !== LAND || input.kind[b] !== LAND)
910
943
  continue;
911
944
  // A pair of provinces freed at a gate is a whole border; all of it counts as the gate.
912
945
  if (a !== b && gatePairs.has(pairKey(a, b, view.count)))
913
946
  continue;
947
+ // One province on both sides is a way across only where it reaches on into the land of
948
+ // both sides; a sliver of the line that ends at water on one side leads nowhere.
949
+ if (a === b &&
950
+ !(reachesOn(view.pixel, input.kind, width, height, cx, cy, sample.tangentX, sample.tangentY, 1, a) &&
951
+ reachesOn(view.pixel, input.kind, width, height, cx, cy, sample.tangentX, sample.tangentY, -1, a)))
952
+ continue;
914
953
  samples += 1;
915
954
  if (a === b || !blockedSet.has(pairKey(a, b, view.count))) {
916
955
  open += 1;
@@ -25,6 +25,8 @@ export const PARTITION_TERRAIN = {
25
25
  };
26
26
  /** Pixel kinds, as the province generator already uses them. */
27
27
  export const PARTITION_KIND = { sea: 0, land: 1, lake: 2 };
28
+ /** Values of `PartitionFields.wallSide`. */
29
+ export const WALL_SIDE = { none: 0, left: 1, right: 2, line: 3 };
28
30
  const MAP_PIXEL_LIMIT = 13_238_272;
29
31
  function invalid(message, details) {
30
32
  throw new ServiceError('MAP_PARTITION_FIELDS_INVALID', message, details);
@@ -59,6 +61,18 @@ export function assertPartitionFields(fields) {
59
61
  expected: total,
60
62
  });
61
63
  }
64
+ if (fields.wallSide !== undefined) {
65
+ if (!(fields.wallSide instanceof Uint8Array) || fields.wallSide.length !== total)
66
+ invalid('Partition field wallSide must be a Uint8Array matching the map dimensions', {
67
+ field: 'wallSide',
68
+ });
69
+ for (let p = 0; p < total; p++)
70
+ if (fields.wallSide[p] > WALL_SIDE.line)
71
+ invalid('Partition wallSide contains a value other than 0 to 3', {
72
+ pixel: p,
73
+ value: fields.wallSide[p],
74
+ });
75
+ }
62
76
  for (let p = 0; p < total; p++)
63
77
  if (fields.kind[p] > 2)
64
78
  invalid('Partition kind contains a value other than sea (0), land (1) or lake (2)', {
@@ -1,6 +1,6 @@
1
1
  import { ServiceError } from '../core/result.js';
2
- import { forEachPolylinePixel, rowStrips, scanAreaStrip, } from './geography/index.js';
3
- import { PARTITION_KIND } from './partition-fields.js';
2
+ import { clearBandStrip, createBandStrip, forEachPolylinePixel, rasterizeBandStrip, rowStrips, scanAreaStrip, } from './geography/index.js';
3
+ import { PARTITION_KIND, WALL_SIDE, } from './partition-fields.js';
4
4
  import { BARRIER_CREST, BARRIER_FORT_LINE, BARRIER_WALL, } from './relief/fields.js';
5
5
  /**
6
6
  * Geography inputs of the partition (ADR 0058): the named regions and seas of the model become the
@@ -66,9 +66,8 @@ export function partitionFieldsFromGeography(fields, geography, options = {}) {
66
66
  });
67
67
  }
68
68
  const whole = { y0: 0, y1: height };
69
- for (const range of geography.ranges) {
70
- if (range.profile !== 'wall' && range.barrier !== 'impassable')
71
- continue;
69
+ const walls = geography.ranges.filter((range) => range.profile === 'wall' || range.barrier === 'impassable');
70
+ for (const range of walls) {
72
71
  forEachPolylinePixel(range.path, grid, whole, (x, y) => {
73
72
  for (let dy = -WALL_HALF_WIDTH; dy <= WALL_HALF_WIDTH; dy++)
74
73
  for (let dx = -WALL_HALF_WIDTH; dx <= WALL_HALF_WIDTH; dx++) {
@@ -81,7 +80,57 @@ export function partitionFieldsFromGeography(fields, geography, options = {}) {
81
80
  }
82
81
  });
83
82
  }
84
- return { ...fields, regionId, barrier, regions: table };
83
+ const wallSide = walls.length === 0 ? undefined : wallSideField(walls, grid, options.stripRows ?? 256);
84
+ return {
85
+ ...fields,
86
+ regionId,
87
+ barrier,
88
+ ...(wallSide === undefined ? {} : { wallSide }),
89
+ regions: table,
90
+ };
91
+ }
92
+ /**
93
+ * Reach of a wall's side field in pixels: past the barrier band the synthesis draws for it (the
94
+ * range footprint, displaced a little by the crest wander), so every band pixel has a side.
95
+ */
96
+ function wallReachPx(range, width) {
97
+ let halfWidthPx = 0;
98
+ for (const half of range.path.halfWidth)
99
+ halfWidthPx = Math.max(halfWidthPx, half * width);
100
+ return Math.min(WALL_REACH_LIMIT_PX, Math.ceil(3 * halfWidthPx) + 8);
101
+ }
102
+ const WALL_REACH_LIMIT_PX = 128;
103
+ /**
104
+ * The side of the nearest wall line for every pixel within its reach (`WALL_SIDE`). Beyond the
105
+ * ends of an open line there is no side, so provinces may join around the end of a wall.
106
+ */
107
+ function wallSideField(walls, grid, stripRows) {
108
+ const { width } = grid;
109
+ const side = new Uint8Array(width * grid.height);
110
+ const nearest = new Float32Array(width * grid.height).fill(Infinity);
111
+ for (const strip of rowStrips(grid, stripRows)) {
112
+ const band = createBandStrip(grid, strip);
113
+ for (const range of walls) {
114
+ clearBandStrip(band);
115
+ rasterizeBandStrip(range.path, grid, strip, wallReachPx(range, width), band);
116
+ const open = !range.path.closed;
117
+ for (let cell = 0; cell < band.distance.length; cell++) {
118
+ const distance = band.distance[cell];
119
+ if (distance === Infinity)
120
+ continue;
121
+ const t = band.t[cell];
122
+ if (open && (t <= 0 || t >= 1))
123
+ continue;
124
+ const p = strip.y0 * width + cell;
125
+ if (distance >= nearest[p])
126
+ continue;
127
+ nearest[p] = distance;
128
+ const s = band.side[cell];
129
+ side[p] = s === 0 ? WALL_SIDE.line : s < 0 ? WALL_SIDE.left : WALL_SIDE.right;
130
+ }
131
+ }
132
+ }
133
+ return side;
85
134
  }
86
135
  /** Strength each model-drawn line of the terrain synthesis gives the partition's barrier plane. */
87
136
  const TERRAIN_LINE_STRENGTH = [
@@ -1,6 +1,6 @@
1
1
  import { ServiceError } from '../core/result.js';
2
2
  import { assembleWorldProvinces, assertProvinceMaskFeasible } from './world-provinces.js';
3
- import { assertPartitionFields, PARTITION_KIND, PARTITION_TERRAIN } from './partition-fields.js';
3
+ import { assertPartitionFields, PARTITION_KIND, PARTITION_TERRAIN, WALL_SIDE, } from './partition-fields.js';
4
4
  import { PARTITION_PROVINCE_ERROR } from './partition-tuning.js';
5
5
  import { hash32, placeSeeds, STEP_UNIT, unit32, weightedWatershed } from './partition-watershed.js';
6
6
  /**
@@ -454,34 +454,111 @@ function splitAcrossLines(fields, labels, minPixels, queue) {
454
454
  }
455
455
  sizes.push(tail);
456
456
  }
457
- // Line pixels join the smallest-numbered neighbouring piece of the same province.
458
- for (let pass = 0; pass < 8; pass++) {
459
- let changed = false;
457
+ // A wall's barrier band can be many pixels wide. Its pixels go to the nearest piece on their
458
+ // own side of the wall line, whatever its province (a pixel on the line to either side), so the
459
+ // province border runs on the line, where the crossings look for it, never at the far edge of
460
+ // the band or along a strip that one piece pushed down the band.
461
+ const side = fields.wallSide;
462
+ const inWall = (p) => side !== undefined && side[p] !== WALL_SIDE.none;
463
+ const joins = (p, q) => {
464
+ const sp = side[p];
465
+ const sq = side[q];
466
+ return sp === WALL_SIDE.none || sq === WALL_SIDE.none || sp === sq || sp === WALL_SIDE.line;
467
+ };
468
+ const straddles = (p, q) => {
469
+ if (side === undefined)
470
+ return false;
471
+ const sp = side[p];
472
+ const sq = side[q];
473
+ return sp !== WALL_SIDE.none && sq !== WALL_SIDE.none && sp !== sq;
474
+ };
475
+ const neighboursOf = (p) => {
476
+ const x = p % width;
477
+ return [
478
+ x > 0 ? p - 1 : p + width - 1,
479
+ x + 1 < width ? p + 1 : p - width + 1,
480
+ p >= width ? p - width : -1,
481
+ p + width < total ? p + width : -1,
482
+ ];
483
+ };
484
+ // Other line pixels (rivers, and walls without a side field) join the smallest-numbered
485
+ // neighbouring piece of the same province.
486
+ const joinLines = () => {
487
+ let any = false;
488
+ for (let pass = 0; pass < 8; pass++) {
489
+ let changed = false;
490
+ for (let p = 0; p < total; p++) {
491
+ if (piece[p] !== -1 || kind[p] !== LAND || inWall(p))
492
+ continue;
493
+ let best = -1;
494
+ for (const q of neighboursOf(p))
495
+ if (q >= 0 &&
496
+ piece[q] >= 0 &&
497
+ labels[q] === labels[p] &&
498
+ (best === -1 || piece[q] < best))
499
+ best = piece[q];
500
+ if (best >= 0) {
501
+ piece[p] = best;
502
+ sizes[best]++;
503
+ changed = true;
504
+ }
505
+ }
506
+ if (!changed)
507
+ break;
508
+ any = true;
509
+ }
510
+ return any;
511
+ };
512
+ // Wall pixels: a breadth-first fill from the pieces, which takes the province of the piece.
513
+ const fillWalls = () => {
514
+ if (side === undefined)
515
+ return false;
516
+ let tail = 0;
460
517
  for (let p = 0; p < total; p++) {
461
- if (piece[p] !== -1 || kind[p] !== LAND)
518
+ if (piece[p] !== -1 || kind[p] !== LAND || !inWall(p))
462
519
  continue;
463
- const x = p % width;
464
520
  let best = -1;
465
- for (const q of [
466
- x > 0 ? p - 1 : p + width - 1,
467
- x + 1 < width ? p + 1 : p - width + 1,
468
- p >= width ? p - width : -1,
469
- p + width < total ? p + width : -1,
470
- ])
471
- if (q >= 0 &&
472
- piece[q] >= 0 &&
473
- labels[q] === labels[p] &&
474
- (best === -1 || piece[q] < best))
521
+ let from = -1;
522
+ for (const q of neighboursOf(p))
523
+ if (q >= 0 && piece[q] >= 0 && joins(p, q) && (best === -1 || piece[q] < best)) {
475
524
  best = piece[q];
476
- if (best >= 0) {
477
- piece[p] = best;
478
- sizes[best]++;
479
- changed = true;
480
- }
525
+ from = q;
526
+ }
527
+ if (best < 0)
528
+ continue;
529
+ queue[tail++] = p;
530
+ piece[p] = -2 - from;
531
+ }
532
+ // Assigned after the scan, so the first ring does not depend on the scan order.
533
+ for (let index = 0; index < tail; index++) {
534
+ const p = queue[index];
535
+ const from = -2 - piece[p];
536
+ piece[p] = piece[from];
537
+ labels[p] = labels[from];
538
+ sizes[piece[p]]++;
539
+ }
540
+ let head = 0;
541
+ while (head < tail) {
542
+ const p = queue[head++];
543
+ for (const q of neighboursOf(p))
544
+ if (q >= 0 && piece[q] === -1 && kind[q] === LAND && inWall(q) && joins(q, p)) {
545
+ piece[q] = piece[p];
546
+ labels[q] = labels[p];
547
+ sizes[piece[p]]++;
548
+ queue[tail++] = q;
549
+ }
550
+ }
551
+ return tail > 0;
552
+ };
553
+ if (side === undefined)
554
+ joinLines();
555
+ else
556
+ for (let round = 0; round < 8; round++) {
557
+ const lines = joinLines();
558
+ const walls = fillWalls();
559
+ if (!lines && !walls)
560
+ break;
481
561
  }
482
- if (!changed)
483
- break;
484
- }
485
562
  for (let p = 0; p < total; p++)
486
563
  if (piece[p] === -1 && kind[p] === LAND) {
487
564
  piece[p] = sizes.length;
@@ -504,6 +581,9 @@ function splitAcrossLines(fields, labels, minPixels, queue) {
504
581
  for (const q of [x + 1 < width ? p + 1 : -1, p + width < total ? p + width : -1]) {
505
582
  if (q < 0 || kind[q] !== LAND || labels[q] !== labels[p] || piece[q] === piece[p])
506
583
  continue;
584
+ // A small piece never joins a piece across a wall line.
585
+ if (straddles(p, q))
586
+ continue;
507
587
  const a = piece[p];
508
588
  const b = piece[q];
509
589
  if (sizes[a] < minPixels && (best[a] === -1 || sizes[b] > sizes[best[a]]))
@@ -735,6 +815,7 @@ export function partitionProvinces(input) {
735
815
  kind,
736
816
  ...(usesRegions ? { group: fields.regionId } : {}),
737
817
  line: lines,
818
+ ...(fields.wallSide === undefined ? {} : { wallSide: fields.wallSide }),
738
819
  }, labels);
739
820
  return { provinces, barrier, statistics: provinceStatistics(provinces, expected), notes };
740
821
  }
@@ -648,6 +648,15 @@ function routeNamedRivers(context) {
648
648
  const target = landCellAt(macro, mouth.x, mouth.y, 8);
649
649
  if (target < 0)
650
650
  unreachable('its mouth lies far from any land');
651
+ if (target !== current && occupant[target] === ownId) {
652
+ // The course already runs through the mouth's cell, which happens when the last via
653
+ // point lies within a cell of the mouth: the river ends there instead of looking for
654
+ // a way back into its own bed, which the router never enters.
655
+ const at = cells.lastIndexOf(target);
656
+ for (const cell of cells.splice(at + 1))
657
+ occupant[cell] = 0;
658
+ current = target;
659
+ }
651
660
  final =
652
661
  target === current
653
662
  ? { cells: [current], joined: -1 }
@@ -33,6 +33,13 @@ export function peakHeight(peak, scale) {
33
33
  export function plateauHeight(height, scale) {
34
34
  return Math.min(HEIGHT_CEILING, LAND_FLOOR + PEAK_SPAN * height * scale);
35
35
  }
36
+ /** Lower `height` toward a pass cap: unchanged outside a corridor or where it is already lower. */
37
+ export function cappedAtPass(caps, cell, height) {
38
+ if (caps === undefined)
39
+ return height;
40
+ const level = caps.level[cell];
41
+ return level < height ? height + (level - height) * caps.weight[cell] : height;
42
+ }
36
43
  /** Kind of each macro cell: the majority of its four pixels, with lake before land before sea. */
37
44
  function downsampleKind(kind, width, height) {
38
45
  const mw = width / 2;
@@ -487,6 +494,7 @@ function applyVolcano(volcano, base, kind, mw, mh, scale, seed, targets) {
487
494
  * sides wherever it lies.
488
495
  */
489
496
  function carvePassSaddles(geography, tables, heights, kind, mw, mh) {
497
+ let caps;
490
498
  const aspect = mh / mw;
491
499
  // The line of every range in cell units, one point per table entry, with its footprint.
492
500
  const lines = new Map();
@@ -579,10 +587,21 @@ function carvePassSaddles(geography, tables, heights, kind, mw, mh) {
579
587
  const weight = nearestDistance <= corridor ? 1 : 1 - smoothstep((nearestDistance - corridor) / edge);
580
588
  if (cap < heights[cell])
581
589
  heights[cell] = heights[cell] + (cap - heights[cell]) * weight;
590
+ // Kept for the stages that raise the relief afterwards (painted relief), so they
591
+ // cannot fill the saddle back up to the crest.
592
+ caps ??= {
593
+ level: new Float32Array(mw * mh).fill(Infinity),
594
+ weight: new Float32Array(mw * mh),
595
+ };
596
+ if (cap < caps.level[cell])
597
+ caps.level[cell] = cap;
598
+ if (weight > caps.weight[cell])
599
+ caps.weight[cell] = weight;
582
600
  }
583
601
  }
584
602
  }
585
603
  void aspect;
604
+ return caps;
586
605
  }
587
606
  /** Build the macro relief of the model. */
588
607
  export function synthesizeMacroRelief(input) {
@@ -625,7 +644,7 @@ export function synthesizeMacroRelief(input) {
625
644
  heights[index] = Math.min(HEIGHT_CEILING, heights[index] + targets.delta[index]);
626
645
  footprint[index] = Math.max(footprint[index], targets.footprint[index]);
627
646
  }
628
- carvePassSaddles(geography, ranges, heights, kind, mw, mh);
647
+ const passCap = carvePassSaddles(geography, ranges, heights, kind, mw, mh);
629
648
  return {
630
649
  width: mw,
631
650
  height: mh,
@@ -636,6 +655,7 @@ export function synthesizeMacroRelief(input) {
636
655
  snowLine: targets.snow,
637
656
  crest: targets.crest,
638
657
  barrier: targets.barrier,
658
+ ...(passCap === undefined ? {} : { passCap }),
639
659
  ranges,
640
660
  scale,
641
661
  };
@@ -11,12 +11,14 @@
11
11
  * - a cell keeps the model's height where that is higher, and every other cell keeps the model's
12
12
  * broad elevation untouched;
13
13
  * - impassable land (ZR-28) rises toward `impassablePeak`, the highest ground of the map;
14
+ * - a declared pass keeps the saddle the macro relief carved for it: the raise is capped there
15
+ * as the carving capped the model's own heights, so a painted range never fills its pass;
14
16
  * - painted mountains and volcanoes get permanent snow above a height that falls from the
15
17
  * equator toward the poles, and weight the full-resolution detail as model ranges do.
16
18
  */
17
19
  import { LAND } from './grid.js';
18
20
  import { fractal2, ridged2, smoothstep } from './math.js';
19
- import { HEIGHT_CEILING, PEAK_BASE, PEAK_SPAN } from './macro-relief.js';
21
+ import { cappedAtPass, HEIGHT_CEILING, PEAK_BASE, PEAK_SPAN, } from './macro-relief.js';
20
22
  /** Reference terrain codes the stage reads (`REFERENCE_TERRAIN` of the reference interpretation). */
21
23
  export const PAINTED_MOUNTAIN = 3;
22
24
  export const PAINTED_VOLCANO = 5;
@@ -112,11 +114,12 @@ export function applyPaintedRelief(target, input) {
112
114
  const goal = Math.min(HEIGHT_CEILING, Math.max(PEAK_BASE + lift(input.settings.mountainPeak) * m * ridges, PEAK_BASE + lift(input.settings.hillsPeak) * h * swell, PEAK_BASE + lift(input.settings.volcanoPeak) * v,
113
115
  // Impassable land keeps its crests but never sinks below most of its peak.
114
116
  PEAK_BASE + lift(input.settings.impassablePeak) * i * (0.8 + 0.2 * ridges)));
115
- if (goal > target.heights[cell]) {
116
- target.heights[cell] = goal;
117
+ const raised = cappedAtPass(target.passCap, cell, goal);
118
+ if (raised > target.heights[cell]) {
119
+ target.heights[cell] = raised;
117
120
  raisedCells += 1;
118
- if (goal > highest)
119
- highest = goal;
121
+ if (raised > highest)
122
+ highest = raised;
120
123
  }
121
124
  const weight = Math.max(m, 0.6 * h, v, i);
122
125
  if (weight > target.footprint[cell])
@@ -1,4 +1,30 @@
1
1
  import { ServiceError } from '../core/result.js';
2
+ /** True when two pixels lie on different sides of a wall line (or one on it). */
3
+ function acrossWall(input, p, q) {
4
+ const side = input.wallSide;
5
+ if (side === undefined)
6
+ return false;
7
+ const a = side[p];
8
+ const b = side[q];
9
+ return a !== 0 && b !== 0 && a !== b;
10
+ }
11
+ /** Repair stages, strictest first; with a wall side field every stage but a last fallback keeps to its side. */
12
+ function repairStages(input) {
13
+ const stages = [];
14
+ if (input.group !== undefined && input.line !== undefined)
15
+ stages.push({ sameGroup: true, avoidLine: true });
16
+ if (input.line !== undefined)
17
+ stages.push({ sameGroup: false, avoidLine: true });
18
+ if (input.group !== undefined)
19
+ stages.push({ sameGroup: true, avoidLine: false });
20
+ stages.push({ sameGroup: false, avoidLine: false });
21
+ if (input.wallSide === undefined)
22
+ return stages.map((stage) => ({ ...stage, avoidWall: false }));
23
+ return [
24
+ ...stages.map((stage) => ({ ...stage, avoidWall: true })),
25
+ { sameGroup: false, avoidLine: false, avoidWall: false },
26
+ ];
27
+ }
2
28
  function invalid(message) {
3
29
  throw new ServiceError('MAP_WORLD_INVALID_PROVINCES', message);
4
30
  }
@@ -270,15 +296,7 @@ function absorbSlivers(input, parts) {
270
296
  // repeated because a previously isolated fragment may become mergeable afterwards. With groups
271
297
  // or lines, the first stages merge inside a group and not across a line, and the last stage
272
298
  // takes what is left.
273
- const stages = [];
274
- if (input.group !== undefined && input.line !== undefined)
275
- stages.push({ sameGroup: true, avoidLine: true });
276
- if (input.line !== undefined)
277
- stages.push({ sameGroup: false, avoidLine: true });
278
- if (input.group !== undefined)
279
- stages.push({ sameGroup: true, avoidLine: false });
280
- stages.push({ sameGroup: false, avoidLine: false });
281
- for (const { sameGroup, avoidLine } of stages) {
299
+ for (const { sameGroup, avoidLine, avoidWall } of repairStages(input)) {
282
300
  for (let pass = 0; pass < 4; pass++) {
283
301
  let changed = false;
284
302
  for (let p = 0; p < parts.pixel.length; p++) {
@@ -289,6 +307,8 @@ function absorbSlivers(input, parts) {
289
307
  continue;
290
308
  if (avoidLine && (input.line[p] !== 0 || input.line[q] !== 0))
291
309
  continue;
310
+ if (avoidWall && acrossWall(input, p, q))
311
+ continue;
292
312
  const a = root(parts, parts.pixel[p]);
293
313
  const b = root(parts, parts.pixel[q]);
294
314
  if (a === b || (parts.size[a] >= 20 && parts.size[b] >= 20))
@@ -356,7 +376,7 @@ function rebalanceSlivers(input, parts) {
356
376
  for (const p of cells) {
357
377
  const x = p % width;
358
378
  for (const q of [x > 0 ? p - 1 : -1, x + 1 < width ? p + 1 : -1, p - width, p + width]) {
359
- if (q < 0 || q >= kind.length || kind[q] !== kind[p])
379
+ if (q < 0 || q >= kind.length || kind[q] !== kind[p] || acrossWall(input, p, q))
360
380
  continue;
361
381
  const donor = root(parts, parts.pixel[q]);
362
382
  if (donor === id || parts.size[donor] <= 20 || !removable(parts, q, width, height))
@@ -387,14 +407,7 @@ function rebalanceSlivers(input, parts) {
387
407
  }
388
408
  function repairCrossings(input, parts) {
389
409
  const { width, height, kind } = input;
390
- const repairStages = [];
391
- if (input.group !== undefined && input.line !== undefined)
392
- repairStages.push({ sameGroup: true, avoidLine: true });
393
- if (input.line !== undefined)
394
- repairStages.push({ sameGroup: false, avoidLine: true });
395
- if (input.group !== undefined)
396
- repairStages.push({ sameGroup: true, avoidLine: false });
397
- repairStages.push({ sameGroup: false, avoidLine: false });
410
+ const stages = repairStages(input);
398
411
  for (let pass = 0; pass < 12; pass++) {
399
412
  let changed = false;
400
413
  for (let y = 0; y + 1 < height; y++) {
@@ -414,10 +427,12 @@ function repairCrossings(input, parts) {
414
427
  let repaired = false;
415
428
  // Whole-cell unions cannot introduce crossings or disconnected provinces. With groups or
416
429
  // lines, the repairs inside one group and not across a line come first.
417
- for (const { sameGroup, avoidLine } of repairStages) {
430
+ for (const { sameGroup, avoidLine, avoidWall } of stages) {
418
431
  for (const [i, j] of edges) {
419
432
  if (avoidLine && (input.line[corners[i]] !== 0 || input.line[corners[j]] !== 0))
420
433
  continue;
434
+ if (avoidWall && acrossWall(input, corners[i], corners[j]))
435
+ continue;
421
436
  if (merge(parts, ids[i], ids[j], width, height, sameGroup)) {
422
437
  repaired = true;
423
438
  break;
@@ -433,6 +448,8 @@ function repairCrossings(input, parts) {
433
448
  const q = corners[j];
434
449
  if (avoidLine && (input.line[p] !== 0 || input.line[q] !== 0))
435
450
  continue;
451
+ if (avoidWall && acrossWall(input, p, q))
452
+ continue;
436
453
  if (kind[p] !== kind[q] || !removable(parts, p, width, height))
437
454
  continue;
438
455
  if (sameGroup &&
@@ -1,6 +1,6 @@
1
1
  import { LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/sdk/types.js';
2
2
  export const PACKAGE_NAME = 'hoi4-agent-tools';
3
- export const PACKAGE_VERSION = '4.11.0';
3
+ export const PACKAGE_VERSION = '4.11.1';
4
4
  export const MCP_PROTOCOL_VERSION = LATEST_PROTOCOL_VERSION;
5
5
  export const CONFIG_VERSION = 1;
6
6
  export const TRANSACTION_VERSION = 2;
package/docs/map.md CHANGED
@@ -141,12 +141,12 @@ A model that needs an edit is reported by `MAP_GEOGRAPHY_*` diagnostics that nam
141
141
 
142
142
  `create_world` with a geography writes `heightmap.bmp`, `world_normal.bmp`, `rivers.bmp`, the land and lake mask, and the permanent-snow terrain from the model; every other output follows the usual generator. Without a geography nothing changes. [ADR 0056](adr/0056-terrain-relief-and-hydrology-synthesis.md) records the design.
143
143
 
144
- | Input | Meaning |
145
- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
146
- | `relief.scale` | `vanilla` (default), `low` (everything above the lowland 25% lower) or `dramatic` (15% higher). |
147
- | `relief.detail` | 0 to 1, default 0.5: full-resolution roughness. |
148
- | `relief.painted` | With a reference picture: `true` or `{falloffPx, mountainPeak, hillsPeak, volcanoPeak, impassablePeak}`. Raises the macro relief toward the picture's painted mountain, hills and volcano classes before the rivers are routed, so the drawn ranges stand out and the model's rivers flow around them. Each class is blurred over `falloffPx` (default 24; below 16 the slopes steepen fast), mountains follow ridged noise, a cell keeps the model's height where that is higher, and painted mountains get permanent snow above a height that falls from 232 at the equator to 140 at the poles. Peaks are 0 to 1 on the range scale (defaults 0.82, 0.27, 0.9, 0.95). Impassable land is raised even when this is off. `MAP_RELIEF_PAINTED` reports the cells raised. |
149
- | `rivers` | `{ "density": 0.02 }`: the share of land pixels the unnamed network covers (0 to 0.04, default 0.02; never more than 2.5% of the land or 130,000 pixels in all). An integer instead limits the number of unnamed river systems. |
144
+ | Input | Meaning |
145
+ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
146
+ | `relief.scale` | `vanilla` (default), `low` (everything above the lowland 25% lower) or `dramatic` (15% higher). |
147
+ | `relief.detail` | 0 to 1, default 0.5: full-resolution roughness. |
148
+ | `relief.painted` | With a reference picture: `true` or `{falloffPx, mountainPeak, hillsPeak, volcanoPeak, impassablePeak}`. Raises the macro relief toward the picture's painted mountain, hills and volcano classes before the rivers are routed, so the drawn ranges stand out and the model's rivers flow around them. Each class is blurred over `falloffPx` (default 24; below 16 the slopes steepen fast), mountains follow ridged noise, a cell keeps the model's height where that is higher, and painted mountains get permanent snow above a height that falls from 232 at the equator to 140 at the poles. Peaks are 0 to 1 on the range scale (defaults 0.82, 0.27, 0.9, 0.95). A declared pass keeps the saddle carved for it: inside its corridor the raise is capped at the saddle level, so a painted or impassable range over a pass does not fill it (`MAP_PASS_NOT_LOWER`). Impassable land is raised even when this is off. `MAP_RELIEF_PAINTED` reports the cells raised. |
149
+ | `rivers` | `{ "density": 0.02 }`: the share of land pixels the unnamed network covers (0 to 0.04, default 0.02; never more than 2.5% of the land or 130,000 pixels in all). An integer instead limits the number of unnamed river systems. |
150
150
 
151
151
  What each feature becomes. Heights are heightmap values: land from 96, sea 89 (ADR 0053), a crest of `peak` stands at `100 + 148 * peak`, a plateau of `height` at `96 + 148 * height`, and the base game reaches 239 (the synthesis stops at 252).
152
152
 
@@ -156,7 +156,7 @@ What each feature becomes. Heights are heightmap values: land from 96, sea 89 (A
156
156
  - **Volcanoes** are cones from the rim of a `crater`, with radial gullies; the crater bowl is eight height units deep or more.
157
157
  - **Plateaus** blend to their height inside the polygon with a short cliff or a ramp; height 0 is the land floor and, inside higher ground, a chasm.
158
158
  - **Lakes** are carved out of the land and lie at 89; a lake with an `outflow` river starts that river on its lowest or nearest free shore.
159
- - **Rivers** are routed over the land from the source (or lake shore) through the `via` points to the mouth, with bends, so a mouth that lies across a range or on another landmass is an error. Tributaries (`mouth: { river }`) join with a red pixel (index 1), a `delta` river splits into two distributaries that start in a yellow pixel (index 2), the main branch of every connected river has one green source (index 0), and widths from 3 to 11 follow the catchment and never narrow downstream. The network of unnamed rivers drains the rest of the land into them. Rivers avoid the high ground, keep a pixel apart, never form a 2 x 2 block and flow downhill in the written heights.
159
+ - **Rivers** are routed over the land from the source (or lake shore) through the `via` points to the mouth, with bends (a point mouth that the course already passes through, as when the last `via` lies within a half-resolution cell of it, ends the river there), so a mouth that lies across a range or on another landmass is an error. Tributaries (`mouth: { river }`) join with a red pixel (index 1), a `delta` river splits into two distributaries that start in a yellow pixel (index 2), the main branch of every connected river has one green source (index 0), and widths from 3 to 11 follow the catchment and never narrow downstream. The network of unnamed rivers drains the rest of the land into them. Rivers avoid the high ground, keep a pixel apart, never form a 2 x 2 block and flow downhill in the written heights.
160
160
 
161
161
  The synthesis checks its own output and reports: `MAP_RELIEF_SYNTHESIZED` (info: land median, 99th percentile, maximum, mean step per half-resolution pixel, river pixels and share, the first named rivers), `MAP_PASS_NOT_LOWER` (error: a pass that is not lower than the crest either side), `MAP_RIVER_UNREACHABLE_MOUTH` (error: a named river that cannot reach its mouth over land or would climb more than 22 height units), `MAP_RANGE_CREST_LOW`, `MAP_VOLCANO_NO_CRATER`, `MAP_RELIEF_FLAT`, `MAP_RIVER_STRAIGHT_RUN` (more than 3% of river pixels on straight 41-pixel stretches; the base game has 1.1%), `MAP_RIVER_DENSITY` and `MAP_RIVER_PIXEL_ROUTE_INCOMPLETE` (warnings), and `MAP_LAKE_ENDORHEIC` and `MAP_RIVER_STREAMS_DROPPED` (info). They need the model, so `hoi4.map_inspect` cannot repeat them on an existing mod; the [appearance validators](#appearance-validation) read every file written.
162
162
 
@@ -467,15 +467,15 @@ Keys that take exactly one value (`capital`, `state`, `to_state`, `start_state`,
467
467
 
468
468
  A world built from a geography also gets its gameplay facts from the model (ADR [0062](adr/0062-straits-passes-and-impassable-ranges.md) and [0063](adr/0063-geography-driven-ports-development-names-and-railways.md)). A world without a geography is unchanged.
469
469
 
470
- | Model feature | What the world gets |
471
- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
472
- | `strait` | A named `sea` row in `adjacencies.csv` (land to land through a sea province; sea to sea through land when the path crosses an isthmus) and a rule in `adjacency_rules.txt` whose access follows `rule`: `open`, `army-closed` or `navy-closed`. The closest shores give the crossing line. |
473
- | `range` with `barrier: "impassable"` | `impassable` rows for every pair of land provinces whose border crosses the range's path, except at its passes. The partition cuts along the wall, so provinces do not straddle it. |
474
- | `pass` | A gap in the wall: the province pairs whose border passes through it carry no row. `fort` above 0 puts `bunker = level` on both provinces of the gate (the same for `fort-line` ranges, which write no rows). |
475
- | `lake` with `gameplay: "inland-sea"` | Sea provinces, so ships and naval bases can use it; a canal row joins a sealed one to the nearest ocean unless a declared strait does. Other lakes stay `lake` provinces and cannot hold a port. |
476
- | `site` | Victory points and names for capital, city, port and fortress sites (importance 1 to 5 gives 3 to 20 points); a port site holds a port; a `mine` site gives its `resource` (steel by default); a `country` anchor chooses that country's capital. |
477
- | fertility, rivers, coast, passes | Population, state category, infrastructure, factories and the harbour score of each coastal province, with no random rolls. |
478
- | names | State, strategic region, victory-point and lake-province names from sites, lake shores, river valleys, ranges, regions, lands and seas by containment; shared names get a compass adjective. |
470
+ | Model feature | What the world gets |
471
+ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
472
+ | `strait` | A named `sea` row in `adjacencies.csv` (land to land through a sea province; sea to sea through land when the path crosses an isthmus) and a rule in `adjacency_rules.txt` whose access follows `rule`: `open`, `army-closed` or `navy-closed`. The closest shores give the crossing line. |
473
+ | `range` with `barrier: "impassable"` | `impassable` rows for every pair of land provinces whose border crosses the range's path, except at its passes; a border that touches across the path at a single pixel counts. The partition cuts along the path itself, also where the synthesis draws the range's barrier band many pixels wide, so provinces do not straddle it and their borders run on it. `MAP_RANGE_NOT_CLOSED` samples the provinces that meet at the path. |
474
+ | `pass` | A gap in the wall: the province pairs whose border passes through it carry no row. `fort` above 0 puts `bunker = level` on both provinces of the gate (the same for `fort-line` ranges, which write no rows). |
475
+ | `lake` with `gameplay: "inland-sea"` | Sea provinces, so ships and naval bases can use it; a canal row joins a sealed one to the nearest ocean unless a declared strait does. Other lakes stay `lake` provinces and cannot hold a port. |
476
+ | `site` | Victory points and names for capital, city, port and fortress sites (importance 1 to 5 gives 3 to 20 points); a port site holds a port; a `mine` site gives its `resource` (steel by default); a `country` anchor chooses that country's capital. |
477
+ | fertility, rivers, coast, passes | Population, state category, infrastructure, factories and the harbour score of each coastal province, with no random rolls. |
478
+ | names | State, strategic region, victory-point and lake-province names from sites, lake shores, river valleys, ranges, regions, lands and seas by containment; shared names get a compass adjective. |
479
479
 
480
480
  Impassable land (ADR 0079) comes from painted `impassable_mountain` pixels and from model `regions` with `impassable: true`. A land province with most of its pixels in it becomes part of an impassable state, written as the base game writes its impassable states: `impassable = yes`, `force_link_ownership_to` the nearest passable state and its owner, category `enclave` where the mod defines it, infrastructure 0 and nothing built. Generated capitals and ports avoid it; a city on it, or a workspace capital in one of its provinces, is the error `MAP_FEATURE_IN_IMPASSABLE`. The relief raises it toward `relief.painted.impassablePeak`. Range lines with `barrier: "impassable"` and their gated passes are unchanged and work beside it. Whenever impassable land or rows exist, `MAP_REALM_CUT_OFF` (warning) lists land of a realm that impassable land or borders separate from its capital, and `MAP_REALM_ENCLOSED` (warning) a realm whose land reaches no other realm except through them; islands are never reported.
481
481
 
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "win32-x64": {
21
21
  "file": "win32-x64/hoi4-engine.exe",
22
- "sha256": "ae5df0fd0b699f683ced37323d95db8afc01237f4969f0d055e126574fa4e4af",
22
+ "sha256": "e3de6d2103a78107a51fa5904a84f89c39d149f034c87e5a28c19b6ccad13f11",
23
23
  "size": 4125184
24
24
  }
25
25
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "hoi4-agent-tools",
3
- "version": "4.11.0",
3
+ "version": "4.11.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "hoi4-agent-tools",
9
- "version": "4.11.0",
9
+ "version": "4.11.1",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@fontsource-variable/roboto": "5.3.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hoi4-agent-tools",
3
3
  "mcpName": "io.github.klimPaskov/hoi4-agent-tools",
4
- "version": "4.11.0",
4
+ "version": "4.11.1",
5
5
  "description": "Build HOI4 mods: focus trees, events, decisions, worlds, GUI previews, docs and AI balance.",
6
6
  "type": "module",
7
7
  "license": "Apache-2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/configuration.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/configuration.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/continuous-focus-palette.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/continuous-focus-palette.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/custom-weighted-pool.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/custom-weighted-pool.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/decision-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/decision-inspect-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/error-log-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/error-log-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/event-feature-manifest.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/event-feature-manifest.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/focus-plan.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/focus-plan.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/focus-planning-sidecar.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/focus-planning-sidecar.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/geography-model.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/geography-model.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/gui-animation-source.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/gui-animation-source.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/gui-helper.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/gui-helper.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/gui-scenario.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/gui-scenario.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/helper-expansion-request.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/helper-expansion-request.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/helper-expansion-summary.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/helper-expansion-summary.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/impact-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/impact-inspect-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/map-operation.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/map-operation.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "oneOf": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/mechanic-test-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/mechanic-test-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/mod-index-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/mod-index-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/operation-result.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/operation-result.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/package-check-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/package-check-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/package-manifest.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/package-manifest.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-analysis-result.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-analysis-result.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-compare-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-compare-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-evaluate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-evaluate-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-inspect-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-render-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-render-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-scenario-set.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-scenario-set.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-sequence-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-sequence-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-simulate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-simulate-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/probability-sweep-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/probability-sweep-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/reference-context-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/reference-context-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/reference-read-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/reference-read-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/reference-search-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/reference-search-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/reference-sheets.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/reference-sheets.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/scenario-suite.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/scenario-suite.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/scenario-test-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/scenario-test-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/script-validate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/script-validate-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/shared-scenario.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/shared-scenario.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.0/schemas/source-lookup-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.11.1/schemas/source-lookup-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.klimPaskov/hoi4-agent-tools",
4
4
  "title": "HOI4 Agent Tools",
5
5
  "description": "Build HOI4 mods: focus trees, events, decisions, worlds, GUI previews, docs and AI balance.",
6
- "version": "4.11.0",
6
+ "version": "4.11.1",
7
7
  "repository": {
8
8
  "url": "https://github.com/klimPaskov/hoi4-agent-tools",
9
9
  "source": "github"
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "hoi4-agent-tools",
16
- "version": "4.11.0",
16
+ "version": "4.11.1",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  }