From cc65eac115e35fda01838cf5927048d8cc11b751 Mon Sep 17 00:00:00 2001 From: DazedAnon Date: Sat, 21 Dec 2024 12:09:10 -0600 Subject: [PATCH] Update prompt example and fix encoding --- modules/rpgmakermvmz.py | 2 +- prompt.example | 45 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index deaff9f..086c085 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -41,7 +41,7 @@ FIRSTLINESPEAKERS = False # If 1st line of dialogue is a speaker, set to True NAMES = False # Output a list of all the character names found BRFLAG = False # If the game uses
instead FIXTEXTWRAP = True # Overwrites textwrap -IGNORETLTEXT = True # Ignores all translated text. +IGNORETLTEXT = False # Ignores all translated text. MISMATCH = [] # Lists files that throw a mismatch error (Length of GPT list response is wrong) PBAR = None FILENAME = None diff --git a/prompt.example b/prompt.example index 898ce55..1e293c7 100644 --- a/prompt.example +++ b/prompt.example @@ -4,12 +4,13 @@ You will be translating text from a game. I will provide you with lines of text **Guidelines:** -- Do not combine, add, or remove any lines. The number of lines should remain the same. +- Do not combine, add, or remove any lines. The number of lines should ALWAYS remain the same as the original. - Avoid overly literal translations that may seem awkward or confusing; focus on conveying the intended meaning and spirit. - Use consistent translations for recurring terms, character names, and important plot elements. - Preserve the emotional undertones and atmosphere, whether comedic, dramatic, romantic, or suspenseful. +- Scan all lines and use context of previous/future lines to infer the correct subject in a sentence. - Translate all Japanese text, including erotic and explicit content. -- Translate all lines to English. There should be no Japanese in your response. +- Translate all text to English no exceptions. Double check that there is no Japanese in your response. - Avoid using romaji or including any Japanese text in your response. - Maintain Japanese honorifics (e.g., -san, -senpai, -chan, etc.) in your translations. - "# Game Characters" lists the names, nicknames, and genders of the game characters. Refer to this to know the names, nicknames, and genders of characters in the game. @@ -19,8 +20,44 @@ You will be translating text from a game. I will provide you with lines of text - Maintain any spacing in the translation. - Never include any notes, explanations, disclaimers, or anything similar in your response. - `...` can be a part of the dialogue. Translate it as it is and include it in your response. -- Maintain any code text inside brackets []. +- Maintain any letter codes such as `\\i`, `\\c`, etc. - Maintain any #F codes such as `#FF9900`. - Check every line to ensure all text inside is in English. - `\\cself` is a variable for a string or number. -- If a sentence is duplicated remove it from your translation. \ No newline at end of file +- If the text is not in JSON format then just translate normally. + +**Output Examples** + +Input: +{ + "Line1": "「こいつからは幼女の匂いが しないでござる」", + "Line2": "「えぇ…\\c[7]こんなに可愛いのに…」" +} +Output: +{ + "Line1": "\"This one doesn't smell like a little girl.\"", + "Line2": "\"Eh... \\c[7]but she's so cute...\"" +} + +Input: +{ + "Line1": "[Defense Member E]: ...", + "Line2": "[Kurone]: ...\\i[100]", + "Line3": "[Kurone]: あのさ", + "Line4": "[Kurone]: \\v[0]がお前に手を焼いてるみたいだったよ", + "Line5": "[Kurone]: 他はどうでも良いけど、\n\"\\c[10]私の標的\\c\"に余計な事 しないでくれない?", + "Line6": "[Kurone]: 殺すよ", + "Line7": "[Defense Member E]: ひっ...!も...申し訳ごザいまセん", + "Line8": "[Defense Member E]: クロネ様に永久ニ服従しまスから...\\c[18]どウかお許シを" +} +Output: +{ + "Line1": "[Defense Member E]: ...", + "Line2": "[Kurone]: ...\\i[100]", + "Line3": "[Kurone]: Hey.", + "Line4": "[Kurone]: It seems like \\v[0] is having a hard time with you.", + "Line5": "[Kurone]: I don't care about the others, but could you not interfere with \"\\c[10]my target\\c\"?", + "Line6": "[Kurone]: I'll kill you.", + "Line7": "[Defense Member E]: Eek...! I-I'm so sorry.", + "Line8": "[Defense Member E]: I will serve you forever, Kurone-sama... \\c[18]please forgive me." +} \ No newline at end of file