Blue Sky Characters and updates to images/wolf
This commit is contained in:
parent
9fac989f7a
commit
785b5a3e29
3 changed files with 55 additions and 84 deletions
|
|
@ -263,6 +263,20 @@ def processImagesDir(directory_path, imageList):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing {file_name}: {e}")
|
print(f"Error processing {file_name}: {e}")
|
||||||
|
|
||||||
|
if ".txt" in file_name:
|
||||||
|
try:
|
||||||
|
with open(f'{directory_path}/{file_name}', 'r', encoding='utf8') as file:
|
||||||
|
for line in file:
|
||||||
|
line = line.strip()
|
||||||
|
line = line.replace(':', ':')
|
||||||
|
line = line.replace('/', '/')
|
||||||
|
line = line.replace('?', '?')
|
||||||
|
imageList[0].append(line) # Using strip() to remove any extra newlines or spaces
|
||||||
|
imageList[1].append([100, 15])
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f"The file at {file_path} was not found.")
|
||||||
|
except IOError:
|
||||||
|
print(f"An error occurred while reading the file at {file_path}.")
|
||||||
return imageList
|
return imageList
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ FILENAME = None
|
||||||
# Dialogue / Scroll
|
# Dialogue / Scroll
|
||||||
CODE101 = False
|
CODE101 = False
|
||||||
CODE102 = False
|
CODE102 = False
|
||||||
CODE122 = True
|
CODE122 = False
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
CODE210 = False
|
CODE210 = False
|
||||||
|
|
@ -383,8 +383,8 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
True,
|
True,
|
||||||
)
|
)
|
||||||
translatedChoiceList = response[0]
|
translatedChoiceList = response[0]
|
||||||
totalTokens[0] = response[1][0]
|
totalTokens[0] += response[1][0]
|
||||||
totalTokens[1] = response[1][1]
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Validate and Set Data
|
# Validate and Set Data
|
||||||
if len(choiceList) == len(translatedChoiceList):
|
if len(choiceList) == len(translatedChoiceList):
|
||||||
|
|
@ -402,8 +402,8 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
# # Translate
|
# # Translate
|
||||||
# response = translateGPT(jaString, f'Reply with the {LANGUAGE} translation of the location', False)
|
# response = translateGPT(jaString, f'Reply with the {LANGUAGE} translation of the location', False)
|
||||||
# translatedText = response[0]
|
# translatedText = response[0]
|
||||||
# totalTokens[0] = response[1][0]
|
# totalTokens[0] += response[1][0]
|
||||||
# totalTokens[1] = response[1][1]
|
# totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# # Textwrap
|
# # Textwrap
|
||||||
# translatedText = textwrap.fill(translatedText, WIDTH)
|
# translatedText = textwrap.fill(translatedText, WIDTH)
|
||||||
|
|
@ -470,7 +470,11 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
if codeList[i]["code"] == 122 and CODE122 == True:
|
if codeList[i]["code"] == 122 and CODE122 == True:
|
||||||
if "stringArgs" in codeList[i] and len(codeList[i]["stringArgs"]) > 0:
|
if "stringArgs" in codeList[i] and len(codeList[i]["stringArgs"]) > 0:
|
||||||
# Grab String
|
# Grab String
|
||||||
jaString = codeList[i]["stringArgs"][0]
|
jaString = re.search(r'^\n?(.*)\n?$', codeList[i]["stringArgs"][0])
|
||||||
|
if jaString:
|
||||||
|
jaString = jaString.group(1)
|
||||||
|
else:
|
||||||
|
jaString = codeList[i]["stringArgs"][0]
|
||||||
|
|
||||||
# Translate Conversations
|
# Translate Conversations
|
||||||
if ":Nothing" in jaString:
|
if ":Nothing" in jaString:
|
||||||
|
|
@ -478,8 +482,8 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
list122 = jaString.split("\n\n")
|
list122 = jaString.split("\n\n")
|
||||||
|
|
||||||
# Remove Textwrap
|
# Remove Textwrap
|
||||||
for j in range(len(list122)):
|
# for j in range(len(list122)):
|
||||||
list122[j] = list122[j].replace("\n", " ")
|
# list122[j] = list122[j].replace("\n", " ")
|
||||||
|
|
||||||
# Translate
|
# Translate
|
||||||
response = translateGPT(
|
response = translateGPT(
|
||||||
|
|
@ -488,8 +492,8 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
True,
|
True,
|
||||||
)
|
)
|
||||||
list122TL = response[0]
|
list122TL = response[0]
|
||||||
totalTokens[0] = response[1][0]
|
totalTokens[0] += response[1][0]
|
||||||
totalTokens[1] = response[1][1]
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Validate and Set Data
|
# Validate and Set Data
|
||||||
if len(list122) == len(list122TL):
|
if len(list122) == len(list122TL):
|
||||||
|
|
@ -522,7 +526,7 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
r"[一-龠ぁ-ゔァ-ヴーa-zA-Z0-9]+", jaString
|
r"[一-龠ぁ-ゔァ-ヴーa-zA-Z0-9]+", jaString
|
||||||
):
|
):
|
||||||
# Remove Textwrap
|
# Remove Textwrap
|
||||||
jaString = jaString.replace("\n", " ")
|
# jaString = jaString.replace("\n", " ")
|
||||||
|
|
||||||
# Translate
|
# Translate
|
||||||
response = translateGPT(
|
response = translateGPT(
|
||||||
|
|
@ -531,14 +535,14 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
False,
|
False,
|
||||||
)
|
)
|
||||||
translatedText = response[0]
|
translatedText = response[0]
|
||||||
totalTokens[0] = response[1][0]
|
totalTokens[0] += response[1][0]
|
||||||
totalTokens[1] = response[1][1]
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Textwrap
|
# Textwrap
|
||||||
translatedText = textwrap.fill(translatedText, WIDTH)
|
# translatedText = textwrap.fill(translatedText, WIDTH)
|
||||||
|
|
||||||
# Set String
|
# Set String
|
||||||
codeList[i]["stringArgs"][0] = translatedText
|
codeList[i]["stringArgs"][0] = codeList[i]["stringArgs"][0].replace(jaString, translatedText)
|
||||||
|
|
||||||
### Event Code: 300 Common Events
|
### Event Code: 300 Common Events
|
||||||
if (
|
if (
|
||||||
|
|
@ -559,8 +563,8 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
# question = codeList[i]['stringArgs'][2]
|
# question = codeList[i]['stringArgs'][2]
|
||||||
# response = translateGPT(question, "", True)
|
# response = translateGPT(question, "", True)
|
||||||
# translatedText = response[0]
|
# translatedText = response[0]
|
||||||
# totalTokens[0] = response[1][0]
|
# totalTokens[0] += response[1][0]
|
||||||
# totalTokens[1] = response[1][1]
|
# totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# # Translate Question
|
# # Translate Question
|
||||||
# codeList[i]['stringArgs'][2] = translatedText
|
# codeList[i]['stringArgs'][2] = translatedText
|
||||||
|
|
@ -568,8 +572,8 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
# Translate Choices
|
# Translate Choices
|
||||||
response = translateGPT(choiceList, translatedText, True)
|
response = translateGPT(choiceList, translatedText, True)
|
||||||
choiceListTL = response[0]
|
choiceListTL = response[0]
|
||||||
totalTokens[0] = response[1][0]
|
totalTokens[0] += response[1][0]
|
||||||
totalTokens[1] = response[1][1]
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Replace Commas
|
# Replace Commas
|
||||||
for j in range(len(choiceListTL)):
|
for j in range(len(choiceListTL)):
|
||||||
|
|
@ -670,7 +674,7 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
# Validate size
|
# Validate size
|
||||||
if len(codeList[i]["stringArgs"]) > 2:
|
if len(codeList[i]["stringArgs"]) > 2:
|
||||||
if (
|
if (
|
||||||
codeList[i]["stringArgs"][1] == "┗所持防具個数"
|
codeList[i]["stringArgs"][1] == "所持商品"
|
||||||
and codeList[i]["stringArgs"][2] != ""
|
and codeList[i]["stringArgs"][2] != ""
|
||||||
):
|
):
|
||||||
# Grab String
|
# Grab String
|
||||||
|
|
@ -699,8 +703,8 @@ def searchCodes(events, pbar, jobList, filename):
|
||||||
False,
|
False,
|
||||||
)
|
)
|
||||||
translatedText = response[0]
|
translatedText = response[0]
|
||||||
totalTokens[0] = response[1][0]
|
totalTokens[0] += response[1][0]
|
||||||
totalTokens[1] = response[1][1]
|
totalTokens[1] += response[1][1]
|
||||||
TERMSLIST.append([jaString, translatedText])
|
TERMSLIST.append([jaString, translatedText])
|
||||||
|
|
||||||
# Add back Potential Variables in String
|
# Add back Potential Variables in String
|
||||||
|
|
@ -810,7 +814,7 @@ def formatDramon(jaString):
|
||||||
return cleanedList
|
return cleanedList
|
||||||
|
|
||||||
|
|
||||||
# DatabaseDatabase
|
# Database
|
||||||
def searchDB(events, pbar, jobList, filename):
|
def searchDB(events, pbar, jobList, filename):
|
||||||
# Set Lists
|
# Set Lists
|
||||||
if len(jobList) > 0:
|
if len(jobList) > 0:
|
||||||
|
|
@ -857,7 +861,7 @@ def searchDB(events, pbar, jobList, filename):
|
||||||
try:
|
try:
|
||||||
for table in tableList:
|
for table in tableList:
|
||||||
# Translate NPC
|
# Translate NPC
|
||||||
if table["name"] == "キャラ会話" and NPCFLAG == True:
|
if table["name"] == "状態設定(戦場)" and NPCFLAG == True:
|
||||||
for npc in table["data"]:
|
for npc in table["data"]:
|
||||||
dataList = npc["data"]
|
dataList = npc["data"]
|
||||||
|
|
||||||
|
|
@ -931,7 +935,7 @@ def searchDB(events, pbar, jobList, filename):
|
||||||
NPCList[2].pop(0)
|
NPCList[2].pop(0)
|
||||||
|
|
||||||
# Grab Scenarios
|
# Grab Scenarios
|
||||||
if table["name"] == "Hシナリオ" and SCENARIOFLAG == True:
|
if table["name"] == "MGP_参加者" and SCENARIOFLAG == True:
|
||||||
for hScenario in table["data"]:
|
for hScenario in table["data"]:
|
||||||
dataList = hScenario["data"]
|
dataList = hScenario["data"]
|
||||||
|
|
||||||
|
|
@ -958,7 +962,7 @@ def searchDB(events, pbar, jobList, filename):
|
||||||
scenarioList[2].pop(0)
|
scenarioList[2].pop(0)
|
||||||
|
|
||||||
# Grab Items
|
# Grab Items
|
||||||
if table["name"] == "オーブ" and ITEMFLAG == True:
|
if table["name"] == "キャラクタプロフィール" and ITEMFLAG == True:
|
||||||
with open("translations.txt", "a", encoding="utf-8") as file:
|
with open("translations.txt", "a", encoding="utf-8") as file:
|
||||||
for item in table["data"]:
|
for item in table["data"]:
|
||||||
dataList = item["data"]
|
dataList = item["data"]
|
||||||
|
|
@ -966,7 +970,7 @@ def searchDB(events, pbar, jobList, filename):
|
||||||
# Parse #
|
# Parse #
|
||||||
for j in range(len(dataList)):
|
for j in range(len(dataList)):
|
||||||
# Name
|
# Name
|
||||||
if dataList[j].get("name") == "オーブの名前":
|
if dataList[j].get("name") == "名前":
|
||||||
# Pass 1 (Grab Data)
|
# Pass 1 (Grab Data)
|
||||||
if setData == False:
|
if setData == False:
|
||||||
if dataList[j].get("value") != "":
|
if dataList[j].get("value") != "":
|
||||||
|
|
@ -978,11 +982,15 @@ def searchDB(events, pbar, jobList, filename):
|
||||||
file.write(
|
file.write(
|
||||||
f'{dataList[j].get('value')} ({itemList[0][0]})\n'
|
f'{dataList[j].get('value')} ({itemList[0][0]})\n'
|
||||||
)
|
)
|
||||||
dataList[j].update({"value": itemList[0][0]})
|
line = itemList[0][0]
|
||||||
|
line = line.replace(':', ':')
|
||||||
|
line = line.replace('/', '/')
|
||||||
|
line = line.replace('?', '?')
|
||||||
|
dataList[j].update({"value": line})
|
||||||
itemList[0].pop(0)
|
itemList[0].pop(0)
|
||||||
|
|
||||||
# Description 1 (You are my specialz)
|
# Description 1 (You are my specialz)
|
||||||
if dataList[j].get("name") == "オーブの説明":
|
if dataList[j].get("name") == "戦闘面での特徴":
|
||||||
# Clean String
|
# Clean String
|
||||||
fontSize = 18
|
fontSize = 18
|
||||||
translatedText = ""
|
translatedText = ""
|
||||||
|
|
@ -1044,7 +1052,7 @@ def searchDB(events, pbar, jobList, filename):
|
||||||
dataList[j].update({"value": translatedText})
|
dataList[j].update({"value": translatedText})
|
||||||
|
|
||||||
# Description 2 (You are my specialz)
|
# Description 2 (You are my specialz)
|
||||||
if dataList[j].get("name") == "NULL":
|
if dataList[j].get("name") == "01_説明":
|
||||||
# Clean String
|
# Clean String
|
||||||
fontSize = 24
|
fontSize = 24
|
||||||
translatedText = ""
|
translatedText = ""
|
||||||
|
|
@ -1106,7 +1114,7 @@ def searchDB(events, pbar, jobList, filename):
|
||||||
dataList[j].update({"value": translatedText})
|
dataList[j].update({"value": translatedText})
|
||||||
|
|
||||||
# Description 3 (You are my specialz)
|
# Description 3 (You are my specialz)
|
||||||
if dataList[j].get("name") == "NULL":
|
if dataList[j].get("name") == "01_説明未婚":
|
||||||
# Clean String
|
# Clean String
|
||||||
fontSize = 24
|
fontSize = 24
|
||||||
translatedText = ""
|
translatedText = ""
|
||||||
|
|
|
||||||
55
vocab.txt
55
vocab.txt
|
|
@ -1,53 +1,8 @@
|
||||||
Here are some vocabulary and terms so that you know the proper spelling and translation.
|
Here are some vocabulary and terms so that you know the proper spelling and translation.
|
||||||
```
|
```
|
||||||
# Game Characters
|
# Game Characters
|
||||||
朱雀 (Suzuku) - Female
|
ラピスフィリア (Lapis Philia) - Female\n
|
||||||
紅 (Akane) - Female
|
水奈月 瑠璃 (Mizunazuki Ruri) - Female\n
|
||||||
エージェントシリウス (Agent Sirius) - Female
|
|
||||||
白虎 (Shiratora) - Female
|
|
||||||
撫子 (Nadeshiko) - Female
|
|
||||||
鬼塚 (Onizuka) - Female
|
|
||||||
百合花 (Yurika) - Female
|
|
||||||
犬飼 (Inukai) - Female
|
|
||||||
アンナ (Anna) - Female
|
|
||||||
メープル (Maple) - Female
|
|
||||||
鈴懸 (Suzukake) - Female
|
|
||||||
いるか (Iruka) - Female
|
|
||||||
安知理 (Ajiri) - Female
|
|
||||||
結 (Yuu) - Female
|
|
||||||
綾香 (Ayaka) - Female
|
|
||||||
鳥居 (Tori) - Female
|
|
||||||
鈴蘭 (Suzuran) - Female
|
|
||||||
宇宙 (Sora) - Female
|
|
||||||
青龍 (Aotatsu) - Female
|
|
||||||
桔梗 (Kikyo) - Female
|
|
||||||
獅堂 (Shidou) - Female
|
|
||||||
向日葵 (Himawari) - Female
|
|
||||||
大紫 (Omurasaki) - Female
|
|
||||||
菫 (Sumire) - Female
|
|
||||||
亀神 (Kamegami) - Female
|
|
||||||
柊 (Shu) - Female
|
|
||||||
鷲尾 (Washio) - Male
|
|
||||||
菊一 (Kikuichi) - Male
|
|
||||||
花村 (Hanamura) - Female
|
|
||||||
咲夜 (Sakuya) - Female
|
|
||||||
曽我井 (Sogai) - Male
|
|
||||||
四海 (Shikai) - Male
|
|
||||||
志倉 綿 (Shikura Wata) - Female
|
|
||||||
皐月 亜麻 (Satsuki Ama) - Female
|
|
||||||
安知理 結 (Ajiri Yuu) - Female
|
|
||||||
栗山 五十木 (Kuriyama Itsuki) - Male
|
|
||||||
天狐 橙 (Tenkou Daidai) - Female
|
|
||||||
天狐 蜜柑 (Tenkou Mikan) - Female
|
|
||||||
鷹本 椿 (Takamoto Tsubaki) - Female
|
|
||||||
青龍 桃葉 (Aotatsu Momoba) - Female
|
|
||||||
雨宮 星羅 (Amamiya Seira) - Female
|
|
||||||
山内 紫苑 (Yamauchi Shion) - Female
|
|
||||||
野沢 林檎 (Nozawa Ringo) - Female
|
|
||||||
城ヶ峰 柳 (Jougamine Yanagi) - Female
|
|
||||||
山角 翠 (Yamakaku Midori) - Female
|
|
||||||
来杉馬来 (Kisugiba Rai) - Male
|
|
||||||
狼煙蓮 (Noroshi Ren) - Male
|
|
||||||
|
|
||||||
# Lewd Terms
|
# Lewd Terms
|
||||||
マンコ (pussy)
|
マンコ (pussy)
|
||||||
|
|
@ -116,10 +71,4 @@ ME 音量 (ME Volume)
|
||||||
堕天使 (Fallen Angel)
|
堕天使 (Fallen Angel)
|
||||||
鬼 (Oni)
|
鬼 (Oni)
|
||||||
ローバー (Roper)
|
ローバー (Roper)
|
||||||
|
|
||||||
# Skills
|
|
||||||
Highest Repeat Rate No.1 Girl
|
|
||||||
Veteran Courtesan
|
|
||||||
Vital Point Thrust
|
|
||||||
Majikite
|
|
||||||
```
|
```
|
||||||
Loading…
Reference in a new issue