diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index b679aca..b6e1e55 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -612,6 +612,10 @@ def searchNames(data, pbar, context): tokensResponse = translateNote(data[i], r"ADTs?:(.+?)>") totalTokens[0] += tokensResponse[0] totalTokens[1] += tokensResponse[1] + if "") + totalTokens[0] += tokensResponse[0] + totalTokens[1] += tokensResponse[1] i += 1 else: @@ -1205,7 +1209,7 @@ def searchCodes(page, pbar, jobList, filename): ## Event Code: 122 [Set Variables] if "code" in codeList[i] and codeList[i]["code"] == 122 and CODE122 is True: # This is going to be the var being set. (IMPORTANT) - if codeList[i]["parameters"][0] not in list(range(800, 811)): + if codeList[i]["parameters"][0] not in list(range(0, 1200)): i += 1 continue @@ -1216,16 +1220,21 @@ def searchCodes(page, pbar, jobList, filename): # i += 1 # continue - # Definitely don't want to mess with files - # if 'gameV' in jaString or '_' in jaString: - # i += 1 - # continue - # Validate String if not isinstance(jaString, str): i += 1 continue + # Definitely don't want to mess with files + if 'gameV' in jaString or '_' in jaString: + i += 1 + continue + + # Avoid anything not quoted + if '\"' not in jaString: + i += 1 + continue + # Validate Japanese Text if not re.search(LANGREGEX, jaString): i += 1 @@ -1515,33 +1524,116 @@ def searchCodes(page, pbar, jobList, filename): ## Event Code: 355 or 655 Scripts [Optional] if "code" in codeList[i] and (codeList[i]["code"] == 355 or codeList[i]["code"] == 655) and CODE355655 is True: jaString = codeList[i]["parameters"][0] - regexPatterns = [r"setValue\((.+)\)"] - # Iterate over the list of regex patterns - for regex in regexPatterns: + if "テキスト-" in jaString: + jaString = codeList[i]["parameters"][0] + regex = r"テキスト-(.+)" + + # Check Exist match = re.search(regex, jaString) - if re.search(regex, jaString): - finalJAString = match.group(1) + if match: + replaceString = match.group(1) + finalJAString = replaceString # Remove Textwrap - finalJAString = finalJAString.replace("\n", " ") + # finalJAString = finalJAString.replace("\n", " ") + + # Remove Spaces + finalJAString = finalJAString.replace("\u3000", "") + finalJAString = finalJAString.strip() + + # Final Set + if finalJAString: + # Pass 1 + if setData: + list355655.append(finalJAString) + + # Pass 2 + else: + # Grab and Replace + translatedText = list355655[0] + translatedText = translatedText.replace("'", "\\'") + + # Textwrap + # translatedText = textwrap.fill(translatedText, width=WIDTH) + + # Set + codeList[i]["parameters"][0] = codeList[i]["parameters"][0].replace(replaceString, translatedText) + list355655.pop(0) + + # Grab Next Instead if Text + elif "テキスト" in jaString: + i += 1 + jaString = codeList[i]["parameters"][0] + + # Regex + regex = r'setValue\(\d+,[\\]?"([^_]+)"' + + match = re.search(regex, jaString) + if match: + replaceString = match.group(1) + finalJAString = replaceString + + # Remove Textwrap + # finalJAString = finalJAString.replace("\n", " ") + + # Remove Spaces + finalJAString = finalJAString.replace("\u3000", "") + finalJAString = finalJAString.strip() # Pass 1 - if setData: - list355655.append(finalJAString) + if finalJAString: + if setData: + list355655.append(finalJAString) - # Pass 2 - else: - # Grab and Replace - translatedText = list355655[0] - translatedText = translatedText.replace("'", "\\'") + # Pass 2 + else: + # Grab and Replace + translatedText = list355655[0] + translatedText = translatedText.replace("'", "\\'") - # Textwrap - translatedText = textwrap.fill(translatedText, width=WIDTH) + # Textwrap + # translatedText = textwrap.fill(translatedText, width=WIDTH) - # Set - codeList[i]["parameters"][0] = codeList[i]["parameters"][0].replace(finalJAString, translatedText) - list355655.pop(0) + # Set + codeList[i]["parameters"][0] = codeList[i]["parameters"][0].replace(replaceString, translatedText) + list355655.pop(0) + + elif "logtxt = " in jaString: + jaString = codeList[i]["parameters"][0] + regex = r"logtxt\s=\s'(.+)'" + + # Check Exist + match = re.search(regex, jaString) + if match: + replaceString = match.group(1) + finalJAString = replaceString + + # Remove Textwrap + # finalJAString = finalJAString.replace("\n", " ") + + # Remove Spaces + finalJAString = finalJAString.replace("\u3000", "") + finalJAString = finalJAString.strip() + + # Final Set + if finalJAString: + # Pass 1 + if setData: + list355655.append(finalJAString) + + # Pass 2 + else: + # Grab and Replace + translatedText = list355655[0] + translatedText = translatedText.replace("'", "\\'") + + # Textwrap + # translatedText = textwrap.fill(translatedText, width=WIDTH) + + # Set + codeList[i]["parameters"][0] = codeList[i]["parameters"][0].replace(replaceString, translatedText) + list355655.pop(0) ## Event Code: 408 (Script) if "code" in codeList[i] and (codeList[i]["code"] == 408) and CODE408 is True: diff --git a/modules/rpgmakerplugin.py b/modules/rpgmakerplugin.py index b504b42..c69aeff 100644 --- a/modules/rpgmakerplugin.py +++ b/modules/rpgmakerplugin.py @@ -202,7 +202,7 @@ def translatePlugin(data, pbar, filename, translatedList): colorCode = r"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\C" # Custom - regex = r'\\+"HelpText\\+":\\+"(.+?)\\+",' + regex = r'"Text[\\]+":[\\]+"(.+?)[\\]' matchList = re.findall(regex, data[i]) if len(matchList) > 0: for match in matchList: diff --git a/vocab.txt b/vocab.txt index 4673a4a..c6dbb41 100644 --- a/vocab.txt +++ b/vocab.txt @@ -1,15 +1,7 @@ Here are some vocabulary and terms so that you know the proper spelling and translation. ``` # Game Characters -紅音 梨歩 (Akane Riho) - Female -紅音 るみ (Akane Rumi) - Female -星の女王 (Hoshi no Joou / Star Queen) - Female -稲葉 柚月 (Inaba Yuzuki) - Female -カミラ (Camila) - Female -ハルト (Haru) - Male -魔王 (Maou) - Female -月紅神姫コーネリア (Moon Crimson Goddess Cornelia) - Female - +アリシア (Alicia) - Female # Lewd Terms マンコ (pussy) @@ -70,6 +62,40 @@ ME 音量 (ME Volume) 破滅 (Destruction) 魂 (Soul) 巫女 (Shrine Maiden) +回 (x) +人 (x) + +# Sex Terms +理性 (Sanity) +性欲 (Libido) +子宮の状態 (Uterus) +最後の相手 (Last Partner) +陰茎の長さ (Penis Length) +射精量 (Cum) +絶頂回数 (Orgasm) +搾精回数 (Semen Milked) +経験人数 (Partners) +膣内射精 (Creampie) +膣外射精 (Non-Creampie) +アナル (Anal) +パイズリ (Paizuri) +フェラ (Blowjob) +手コキ (Handjob) +太もも (Thighjob) +尻コキ (Assjob) +ぶっかけ (Cumshot) +おさわり (Touched) +受精 (Fertilized) +出産 (Births) +子宮 (Womb) +股触られ (Fingered) +乳揉まれ (Fondled) +尻揉まれ (Ass Groped) +乳首 (Nipples) +キス (Kiss) +舐めた (Lick) +舐められ (Licked By) +衣装ごとの性行為回数 (Sex Acts per Outfit) # Demons/Angels/Monsters 悪魔 (Devil)