Adding abcde Parser to XML for Lauren's file

This commit is contained in:
fortiersteven
2022-02-11 23:18:43 -05:00
parent 845616eaa1
commit 2390538739
16 changed files with 13204 additions and 9 deletions

View File

@@ -88,9 +88,17 @@
"Text_Start": 1213752,
"Text_End": 1222206
},
{
"Section": "Locations 1",
"Pointer_Offset_Start": 1082240,
"Nb_Per_Block": 3,
"Step": 44,
"Text_Start": 1222208,
"Text_End": 1227470
},
{
"Section": "Cooking",
"Pointer_Offset_Start": 1094844,
"Pointer_Offset_Start": 1093592,
"Nb_Per_Block": 1,
"Step": 0,
"Text_Start": 1236128,

View File

@@ -8,6 +8,7 @@ import string
import pandas as pd
import json
import os
import lxml.etree as etree
tool = ToolsTOR.ToolsTOR("tbl")
@@ -37,13 +38,14 @@ for path, subdirs, files in os.walk(myDir):
tool.bytes_to_text_with_offset("../Data/TOR/Disc/Original/SLPS_254.50", 0x0)
list_files = os.listdir("abcde_lauren")
for file in list_files:
tool.extract_abcde_text("abcde_lauren/" + file)
tool.insert_Menu_File("../Data/TOR/Disc/Original/SLPS_254.50")
with open("00013.pak3", "rb") as f:
data = f.read()
t = tool.get_pak_type(data)

View File

@@ -125,7 +125,6 @@ class ToolsTOR(ToolsTales):
return pointers_offset, texts_offset
# Extract THEIRSCE to XML
def extractTheirSceXML(self, scpkFileName):

View File

@@ -587,6 +587,55 @@ class ToolsTales:
cwd= self.basePath,
)
def extract_abcde_text(self, filename, modify_xml = True):
with open(filename, "r", encoding="utf-8") as f:
lines = f.readlines()
final_list = []
pointer_offset = 0
text = ""
start=0
end=0
lines = [line for line in lines if "//" not in line]
for index,line in enumerate(lines):
if "#WRITE" in line or "#W32" in line:
pointer_offset = int(re.findall("\$(\w+)", line)[0],16)
start = index+1
if "[END]" in line:
end = index
text = "".join(lines[start:(end+1)])
text = text.replace("[LINE]","").replace("[END]\n","")
final_list.append([pointer_offset, text])
xml_file_name = "../Data/TOR/Menu/XML/SLPS_254.xml"
tree = etree.parse(xml_file_name)
root = tree.getroot()
for pointer_offset,text in final_list:
ele_found = [element for element in root.iter("Entry") if str(pointer_offset) in element.find("PointerOffset").text]
if len(ele_found) > 0:
ele_found[0].find("EnglishText").text = text
ele_found[0].find("Status").text = "Done"
if modify_xml:
txt=etree.tostring(root, encoding="UTF-8", pretty_print=True)
with open(xml_file_name, "wb") as xmlFile:
xmlFile.write(txt)
return final_list
#start_offset : where the pointers start for the section
# nb_per_block : number of pointers per block before adding step
# step : number of bytes before the next block

Binary file not shown.

1218
abcde_lauren/Cooking.txt Normal file

File diff suppressed because it is too large Load Diff

1899
abcde_lauren/Locations.txt Normal file

File diff suppressed because it is too large Load Diff

2035
abcde_lauren/Skills_dump.txt Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,146 @@
//GAME NAME: Tales of Rebirth
// Define required TABLE variables and load the corresponding tables
#VAR(Table_0, TABLE)
#ADDTBL("C:\Users\Lauren\Downloads\abcde_Secret_Training\ToR.tbl", Table_0)
//BLOCK #000 NAME: Button_Bars
#ACTIVETBL(Table_0) // Activate this block's starting TABLE
#JMP($112850, $112A2A) // Jump to insertion point
#HDR($-FF000) // Difference between ROM and RAM addresses for pointer value calculations
//POINTER #0 @ $E6D20 - STRING #0 @ $112A20
#W32($E6D20)
[Circle_ani] Enter[END]
// current address: $112A2B
//POINTER #1 @ $E6D24 - STRING #1 @ $112A10
#W32($E6D24)
[Circle_ani] Talk[END]
// current address: $112A1B
//POINTER #2 @ $E6D28 - STRING #2 @ $1129F8
#W32($E6D28)
[Circle_ani] Leave [TAG_015][END]
// current address: $112A0A
//POINTER #3 @ $E6D2C - STRING #3 @ $1129E8
#W32($E6D2C)
[Circle_ani] Shop[END]
// current address: $1129F7
//POINTER #4 @ $E6D30 - STRING #4 @ $1129D8
#W32($E6D30)
[Circle_ani] Inspect[END]
// current address: $1129E5
//POINTER #5 @ $E6D34 - STRING #5 @ $1129C8
#W32($E6D34)
[Circle_ani] Open[END]
// current address: $1129D5
//POINTER #6 @ $E6D38 - STRING #6 @ $1129B8
#W32($E6D38)
[Circle_ani] Push[END]
// current address: $1129C3
//POINTER #7 @ $E6D3C - STRING #7 @ $1129A8
#W32($E6D3C)
[Circle_ani] Pull[END]
// current address: $1129B3
//POINTER #8 @ $E6D40 - STRING #8 @ $112998
#W32($E6D40)
[Circle_ani] Operate[END]
// current address: $1129A3
//POINTER #9 @ $E6D44 - STRING #9 @ $112988
#W32($E6D44)
[Circle_ani] Switch[END]
// current address: $112997
//POINTER #10 @ $E6D48 - STRING #10 @ $112978
#W32($E6D48)
[Circle_ani] Go Up[END]
// current address: $112985
//POINTER #11 @ $E6D4C - STRING #11 @ $112968
#W32($E6D4C)
[Circle_ani] Go Down[END]
// current address: $112975
//POINTER #12 @ $E6D50 - STRING #12 @ $112958
#W32($E6D50)
[Circle_ani] Jump[END]
// current address: $112967
//POINTER #13 @ $E6D54 - STRING #13 @ $112948
#W32($E6D54)
[Circle_ani] Hit[END]
// current address: $112955
//POINTER #14 @ $E6D58 - STRING #14 @ $112938
#W32($E6D58)
[Circle_ani] Read[END]
// current address: $112943
//POINTER #15 @ $E6D5C - STRING #15 @ $112928
#W32($E6D5C)
[Circle_ani] Rest[END]
// current address: $112933
//POINTER #16 @ $E6D60 - STRING #16 @ $112918
#W32($E6D60)
[Circle_ani] Eat[END]
// current address: $112925
//POINTER #17 @ $E6D64 - STRING #17 @ $112908
#W32($E6D64)
[Circle_ani] Leave[END]
// current address: $112913
//POINTER #18 @ $E6D68 - STRING #18 @ $1128F8
#W32($E6D68)
[Circle_ani] Move[END]
// current address: $112905
//POINTER #19 @ $E6D6C - STRING #19 @ $1128E8
#W32($E6D6C)
[Circle_ani] Grab[END]
// current address: $1128F5
//POINTER #20 @ $E6D70 - STRING #20 @ $1128D8
#W32($E6D70)
[Circle_ani] ???[END]
// current address: $1128E5
//POINTER #21 @ $E6D74 - STRING #21 @ $1128C8
#W32($E6D74)
[Circle_ani] !!![END]
// current address: $1128D5
//POINTER #22 @ $E6D78 - STRING #22 @ $1128B8
#W32($E6D78)
[Circle_ani] Save[END]
// current address: $1128C5
//POINTER #23 @ $E6D7C - STRING #23 @ $1128A8
#W32($E6D7C)
[Circle_ani] Warp[END]
// current address: $1128B5
//POINTER #24 @ $E6D80 - STRING #24 @ $112898
#W32($E6D80)
[Circle_ani] Next[END]
// current address: $1128A3
//POINTER #25 @ $E6D84 - STRING #25 @ $112868
#W32($E6D84)
[Up+Down_blink] Select [Circle_ani] Confirm [Cross_ani] Cancel[END]
// current address: $112891
//POINTER #26 @ $E6D88 - STRING #26 @ $112850
#W32($E6D88)
[Up+Down_blink] Select [Circle_ani] Confirm[END]
// current address: $112867

File diff suppressed because it is too large Load Diff

336
abcde_lauren/jewel.txt Normal file
View File

@@ -0,0 +1,336 @@
//GAME NAME: Tales of Rebirth
// Define required TABLE variables and load the corresponding tables
#VAR(Table_0, TABLE)
#ADDTBL("C:\Users\Lauren\Downloads\abcde_Secret_Training\ToR.tbl", Table_0)
//BLOCK #000 NAME: Names
#ACTIVETBL(Table_0) // Activate this block's starting TABLE
#JMP($127720, $127aa9) // Jump to insertion point
#HDR($-FF000) // Difference between ROM and RAM addresses for pointer value calculations
//Text $127AA0
#W32($10692C)
//フィート[END]
Feat [END]
// current address: $127AA9
//Text $127A80
#W32($106930)
//斬撃攻撃力を上昇させる宝石。[LINE]
//[END]
A Gem that increases Slash ATK.[LINE]
[END]
// current address: $127A9E
//Text $127A70
#W32($106940)
//マッスル[END]
Muscle [END]
// current address: $127A79
//Text $127A50
#W32($106944)
//打撃攻撃力を上昇させる宝石。[LINE]
//[END]
A Gem that increases Blow ATK.[LINE]
[END]
// current address: $127A6E
//Text $127A40
#W32($106954)
//シールド[END]
Shield [END]
// current address: $127A49
//Text $127A20
#W32($106958)
//斬撃防御力を上昇させる宝石。[LINE]
//[END]
A Gem that increases Slash DEF.[LINE]
[END]
// current address: $127A3E
//Text $127A10
#W32($106968)
//プロテクト[END]
Protect [END]
// current address: $127A1B
//Text $1279F0
#W32($10696C)
//打撃防御力を上昇させる宝石。[LINE]
//[END]
A Gem that increases Blow DEF.[LINE]
[END]
// current address: $127A0E
//Text $1279E0
#W32($10697C)
//マインド[END]
Mind [END]
// current address: $1279E9
//Text $1279C0
#W32($106980)
//術攻撃力を上昇させる宝石。[LINE]
//[END]
A Gem that increases Spirit ATK.[LINE]
[END]
// current address: $1279DC
//Text $1279B0
#W32($106990)
//レジスト[END]
Resist [END]
// current address: $1279B9
//Text $127990
#W32($106994)
//術防御力を上昇させる宝石。[LINE]
//[END]
A Gem that increases Spirit DEF.[LINE]
[END]
// current address: $1279AC
//Text $127988
#W32($1069A4)
//ヒール[END]
Heal [END]
// current address: $12798F
//Text $127968
#W32($1069A8)
//HP回復力を上昇させる宝石。[LINE]
//[END]
A Gem that increases HP Regen.[LINE]
[END]
// current address: $127986
//Text $127958
#W32($1069B8)
//フォルス[END]
Force [END]
// current address: $127961
//Text $127938
#W32($1069BC)
//FG回復力を上昇させる宝石。[LINE]
//[END]
A Gem that increases FG Regen.[LINE]
[END]
// current address: $127956
//Text $127930
#W32($1069CC)
//ライフ[END]
Life [END]
// current address: $127937
//Text $127910
#W32($1069D0)
//最大HPを上昇させる宝石。[LINE]
//[END]
A Gem that increases Max HP.[LINE]
[END]
// current address: $12792C
//Text $127900
#W32($1069E0)
//ネイチャー[END]
Nature [END]
// current address: $12790B
//Text $1278D0
#W32($1069E4)
//通常攻撃によるFG回復量を上昇させる宝石。[LINE]
//[END]
A Gem that increases FG regained[LINE]
from basic attacks.[END]
// current address: $1278FC
//Text $1278C0
#W32($1069F4)
//メディカル[END]
Medical [END]
// current address: $1278CB
//Text $127898
#W32($1069F8)
//敵撃破時のHP回復量を上昇させる宝石。[LINE]
//[END]
A Gem that increases HP regained[LINE]
after defeating an enemy.[END]
// current address: $1278C0
//Text $127888
#W32($106A08)
//メンタル[END]
Mental [END]
// current address: $127891
//Text $127860
#W32($106A0C)
//敵撃破時のFG回復量を上昇させる宝石。[LINE]
//[END]
A Gem that increases FG regained[LINE]
after defeating an enemy.[END]
// current address: $127888
//Text $127850
#W32($106A1C)
//ブレイク[END]
Break [END]
// current address: $127859
//Text $127820
#W32($106A20)
//ガードさせたときに追加でRGを減らす宝石。[LINE]
//[END]
A Gem that increases RG reduction[LINE]
when attacking guarding enemies.[END]
// current address: $12784C
//Text $127810
#W32($106A30)
//マイティ[END]
Mighty [END]
// current address: $127819
//Text $1277E8
#W32($106A34)
//上昇効果継続時間を上昇させる宝石。[LINE]
//[END]
A Gem that increases Buff duration.[LINE]
[END]
// current address: $12780C
//Text $1277D8
#W32($106A44)
//リカバー[END]
Recover [END]
// current address: $1277E1
//Text $1277B0
#W32($106A48)
//減少効果継続時間を減少させる宝石。[LINE]
//[END]
A Gem that lowers Debuff duration.[LINE]
[END]
// current address: $1277D4
//Text $1277A0
#W32($106A58)
//チャージ[END]
Charge [END]
// current address: $1277A9
//Text $127780
#W32($106A5C)
//チャージ速度を上昇させる宝石。[LINE]
//[END]
A Gem that speeds up RG charge.[LINE]
// current address: $1277A0
//Text $127770
#W32($106A6C)
//ミスティ[END]
Misty [END]
// current address: $127779
//Text $127750
#W32($106A70)
//詠唱時間を減少させる宝石。[LINE]
//[END]
A Gem that lowers casting time.[LINE]
[END]
// current address: $12776C
//Text $127740
#W32($106A80)
//ピヨハン[END]
Dizzy [END]
// current address: $127749
//Text $127720
#W32($106A84)
//気絶時間を減少させる宝石。[LINE]
//[END]
A Gem that lowers dizzy duration.[LINE]
[END]
// current address: $12773C

1058
abcde_lauren/status.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
アイテムいろいろ
クリームスープ