From 7c8cfb0b5895eed2661e3adb53419358e0654233 Mon Sep 17 00:00:00 2001 From: onms Date: Sat, 27 Dec 2025 22:48:09 -0600 Subject: [PATCH 1/2] greater than or equal to --- data/CommonEvents.json | 2 +- data/Map043.json | 2 +- data/Map133.json | 20 ++++++++++---------- data/Map251.json | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/data/CommonEvents.json b/data/CommonEvents.json index 9011250..c9022bd 100644 --- a/data/CommonEvents.json +++ b/data/CommonEvents.json @@ -190129,7 +190129,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, diff --git a/data/Map043.json b/data/Map043.json index 27c9eba..2d253d7 100644 --- a/data/Map043.json +++ b/data/Map043.json @@ -13834,7 +13834,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity refused to expose herself\n\\C[27][Condition: Lewdness >25%]\\C[0]" + "text": "\\n[1]'s sense of chastity refused to expose herself\n\\C[27][Condition: Lewdness ≥25%]\\C[0]" } ] }, diff --git a/data/Map133.json b/data/Map133.json index 872c5d1..9773f33 100644 --- a/data/Map133.json +++ b/data/Map133.json @@ -19307,7 +19307,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -20153,7 +20153,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -20975,7 +20975,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -21807,7 +21807,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -24751,7 +24751,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -25569,7 +25569,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -26385,7 +26385,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -27200,7 +27200,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -28756,7 +28756,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, @@ -36771,7 +36771,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >\\v[406]%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥\\v[406]%]" } ] }, diff --git a/data/Map251.json b/data/Map251.json index c893326..236840e 100644 --- a/data/Map251.json +++ b/data/Map251.json @@ -25904,7 +25904,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >40%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥40%]" } ] }, @@ -26072,7 +26072,7 @@ "addLog", "テキストをログウィンドウに追加", { - "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness >40%]" + "text": "\\n[1]'s sense of chastity rejected it\n\\C[27][Condition: Lewdness ≥40%]" } ] }, From b70f17ef46ee8ef9bd678229e3913919cf6b3f6a Mon Sep 17 00:00:00 2001 From: onms Date: Sat, 27 Dec 2025 23:53:58 -0600 Subject: [PATCH 2/2] fixed spacing for multi-line logwindows --- js/plugins/MNKR_TMLogWindowMZ.js | 52 +++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/js/plugins/MNKR_TMLogWindowMZ.js b/js/plugins/MNKR_TMLogWindowMZ.js index 90fa404..438d8ba 100644 --- a/js/plugins/MNKR_TMLogWindowMZ.js +++ b/js/plugins/MNKR_TMLogWindowMZ.js @@ -550,17 +550,47 @@ Imported.TMLogWindow = true; } }; - // リフレッシュ - Window_MapLog.prototype.refresh = function () { - this.contents.clear(); - let actionLog = $gameSystem.actionLog(); - let lh = this.lineHeight(); - let n = Math.min(logWindowLines, actionLog.length); - for (let i = 0; i < n; i++) { - // this.drawTextEx(actionLog[actionLog.length - n + i], 0, lh * i); - this.drawTextEx('\\FS[' + String(logWindowFontSize) + ']' + actionLog[actionLog.length - n + i], 0, lh * i); - } - }; + // リフレッシュ (Universal dynamic spacing) + Window_MapLog.prototype.refresh = function () { + this.contents.clear(); + + const actionLog = $gameSystem.actionLog(); + const lh = this.lineHeight(); + + let startIndex = actionLog.length; + let linesUsed = 0; + + // 1. Determine which entries fit + for (let i = actionLog.length - 1; i >= 0; i--) { + const lineCount = actionLog[i].split(/\n/).length; + if (linesUsed + lineCount > logWindowLines) { + break; + } + linesUsed += lineCount; + startIndex = i; + } + + // 2. Draw entries + let currentY = 0; + for (let i = startIndex; i < actionLog.length; i++) { + const text = actionLog[i]; + const linesInThisEntry = text.split(/\n/).length; + + this.drawTextEx( + '\\FS[' + logWindowFontSize + ']' + text, + 0, + currentY + ); + + // 3. Universal Logic: + // Calculate total height (lh * lines) + // Then subtract 12 pixels for EVERY newline after the first one. + const totalHeight = lh * linesInThisEntry; + const correction = (linesInThisEntry - 1) * 12; + + currentY += (totalHeight - correction); + } + }; //----------------------------------------------------------------------------- // Window_MenuLog