diff --git a/data/skills/project_setup.md b/data/skills/project_setup.md index 03c3950..ab37ee9 100644 --- a/data/skills/project_setup.md +++ b/data/skills/project_setup.md @@ -161,11 +161,15 @@ geometry rather than generic RPG Maker defaults whenever project code is availab 4. Convert usable pixels to DazedTL's character-count wrap setting by measuring representative English glyphs in the real font when possible. Otherwise use a conservative documented average glyph width. Never copy a pixel width directly into `width`, `listWidth`, or `noteWidth`. -5. Test representative short, median, long, control-code-heavy, icon-heavy, and font-changed values. - Use the largest effective font when one shared setting must cover several variants. -6. For dialogue, verify the recommendation against the actual message-row limit, commonly four. - If a long message cannot fit without unreadable font reduction or horizontal overflow, flag it - for pagination/manual reflow instead of forcing an unsafe four-line wrap. +5. Simulate final wrapping for representative short, median, long, control-code-heavy, icon-heavy, + font-changed, and explicitly line-broken values. Use the largest effective font when one shared + setting must cover several variants. Accept a recommendation only when each rendered line fits + horizontally and the rendered line count stays within the actual visible-row limit. +6. Treat horizontal capacity and visible rows as simultaneous constraints. Distinguish fixed or + clipped windows from scrolling, paging, and auto-sizing windows. If no readable font and wrap + width satisfies both constraints, flag the value for pagination/manual reflow or a game-side + window change; do not reduce wrap width as a supposed fix for vertical overflow because that + usually creates more lines. 7. Detect standard message faces from non-empty code-101 parameter 0 values. Calculate both the full dialogue width and the reduced `faceWidth`; DazedTL selects `faceWidth` automatically for those message groups. For plugin portraits outside code 101, document the detection gap and use @@ -188,7 +192,7 @@ List/Help: listWidth= ; font= ; Notes : noteWidth= ; font= ; rows= Evidence: -- +- Exceptions / playtests: - diff --git a/data/skills/wrap_config.md b/data/skills/wrap_config.md index a17f81c..adeadda 100644 --- a/data/skills/wrap_config.md +++ b/data/skills/wrap_config.md @@ -18,16 +18,23 @@ list/help text, and notes. selects `faceWidth` automatically for those message groups. Identify plugin portraits that do not use code 101 as exceptions requiring a conservative width or custom handling. 3. For Dialogue, List/Help, and Notes, calculate usable pixels from the actual window geometry: - subtract padding, text inset, faces/portraits, icons, columns, and plugin margins. Calculate row - capacity from usable height and line height. + subtract padding, text inset, faces/portraits, icons, columns, and plugin margins. Derive the + exact visible-row limit from usable height and the largest applicable line height. Distinguish + fixed/clipped windows from scrolling, paging, or auto-sizing windows. 4. Account for the real font face and base size plus `\\{`, `\\}`, `\\FS[n]`, custom font codes, inline icons/images, and plugin scaling. Measure representative English glyphs in the real font when possible; otherwise state the conservative average used. Never copy pixels directly into a character-count setting. -5. Test representative short, long, icon-heavy, control-code-heavy, and font-changed values. Check - dialogue against its real row limit, commonly four. Recommend pagination/manual reflow when a - message cannot fit without unreadable font reduction or horizontal overflow. -6. Recommend a readable font for each category. Use `keep current (px)` when no game-side font +5. Simulate the final wrapping of representative short, long, icon-heavy, control-code-heavy, and + font-changed values, including explicit line breaks. A recommendation is valid only when every + rendered line fits horizontally **and** the rendered line count does not exceed that window's + visible-row limit. Report both the widest rendered line and row count for the tested cases. +6. Treat horizontal and vertical fit as simultaneous constraints: horizontal capacity sets the + largest safe wrap width, while a fixed row limit may require enough text per line to avoid an + extra row. If no readable font and wrap width satisfies both, recommend + pagination/manual reflow or a game-side window change. Do not claim that reducing the wrap + width fixes vertical overflow; narrower wrapping usually creates more lines. +7. Recommend a readable font for each category. Use `keep current (px)` when no game-side font change is needed; otherwise cite the exact plugin parameter or function that would change it. @@ -40,7 +47,7 @@ List/Help: listWidth= ; font= ; rows= Notes : noteWidth= ; font= ; rows= Evidence: -- +- Exceptions / playtests: - diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index 721fa8d..0b3abb5 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -152,7 +152,7 @@ CODE405 = True CODE102 = True # Optional -CODE408 = True +CODE408 = False # Variables CODE122 = False diff --git a/tests/test_workflow_prompts.py b/tests/test_workflow_prompts.py index b92e1fe..61f9506 100644 --- a/tests/test_workflow_prompts.py +++ b/tests/test_workflow_prompts.py @@ -110,6 +110,10 @@ class WorkflowTranslationPromptTests(unittest.TestCase): self.assertIn("non-empty parameter 0", prompt) self.assertIn("plugin portraits", prompt) self.assertIn("pagination/manual reflow", prompt) + self.assertIn("rendered line count", prompt) + self.assertIn("visible-row limit", prompt) + self.assertIn("simultaneous constraints", prompt) + self.assertIn("narrower wrapping usually creates more lines", prompt) def test_image_translation_prompt_ends_skips_with_recovery_options(self): prompt = load_clipboard_skill("image_translation.md")