Skip to content
Permalink
Browse files
textinsert: fix bug preventing editing of helplib, pc, and foodarea
  • Loading branch information
dackst committed Jan 26, 2021
1 parent 0d30f8d commit cac356fb125313efc85f98e305ef3c382745d863
Showing with 11 additions and 14 deletions.
  1. +1 −1 notes.md
  2. +0 −1 readme.md
  3. +3 −3 text/input/helplib.tsv
  4. BIN text/output/foodarea.tbb
  5. +7 −9 text/textinsert.py
@@ -608,7 +608,7 @@ If you want to do a actual, proper retranslation of this game yourself and you'r
* Switching to [Flame's earlier Python 2 script inserter](https://pastebin.com/vtVwq338) released in 2015 seemed to fix this, but it had its own problems. But looking through it, I noticed there was a special case that applied only to these particular problematic textboxes
* changing a 1 to a 3 in for the `0xC1` entry in the dictionary defined in the beginning of the Python 3 inserter fixed #1 without introducing any other problems. The inserter in this repo should include this change.
2. Only Japanese text in places (no English): copying `PSP_GAME/USRDIR/pack` folder from the 4.15 translation solved the Japanese appearing for the `noi` and `system` files. To me, this seemed to indicate something is wrong with the `copy_*.py` files. Along with copying your new files to the extracted ISO, they also are intended to modify the files in the `pack` folder so that your new files are read instead of a compressed Japanese version. This doesn't seem to actually be done for those files. At least, this isn't done successfully.
* However, any changes made in `pc`, `foodarea` and `helplib` are still not reflected. I'm not entirely sure how to fix this. Currently I'm stuck using the versions of these files originating from flame's fantranslation. `foodarea.bin` and `pc.bin` seem to be easily modifiable with a hex editor.
* However, any changes made in `pc`, `foodarea` and `helplib` were still not reflected after this. This was fixed by modifying how `textinsert.py` chose to skip lines that were too short, as `pc`, `foodarea` and `helplib` has less rows than all the other `text` files.
3. Chapter titles: like with #2, I copied the files from the 4.15 ISO, in this case from `PSP_GAME/USRDIR/visual/event`. While other translated graphics are included with flame's tools, but for some reason the chapter start/end graphics aren't.
4. the correct objective text will be used if the story is continued to the next objective. It appears this is not at all the fault of the tools, and the text for the current objective is loaded directly from your savefile.
5. The Mishy issue was also not entirely the fault of the tools. For some reason, Mishy's internal name ("Michy") was exposed in `chr_names.tsv` as well as his name that is displayed above his textboxes (originally "Michey"). For comparison, Mensa was called "Mrs. Mensa" in the original translation, and has an internal name of "Mensa", but only appeared once in `chr_names.tsv` (as "Mrs. Mensa"). I've also been able to break shopkeepers by changing the wrong names in `chr_names.tsv`, so just make sure you only change the right one? I recommend not changing any character names that appear to already be in English in the jp dump.
@@ -73,7 +73,6 @@ You should have access to a clean Nayuta no Kiseki iso. Some of my [workarounds]
1. Drag your iso over `_extract_new.bat`, or run `python extract.py nayuta.iso ISO`, where `nayuta.iso` is the name of your file.
2. Run `setup.py`
2. Copy the `PSP_GAME/USRDIR/pack` and `PSP_GAME/USRDIR/visual/event` from within the 4.15 patched ISO and replace their equivalents within the `ISO` folder in the environment set up from the previous step. Open the patched 4.15 ISO by mounting it with your OS or file explorer, or with UMDGen, 7-Zip, or anything else that works, really.
* Also copy over `pc.tbb` and `helplib.tbb` from `PSP_GAME/USRDIR/text/`
3. Copy and overwrite the files in this repository into the environment. Overwrite files if necessary. Modify text or images to your liking.
4. Reinsert text by running using the insertion Python scripts from within each respective folder. With my changes, the dump scripts must be run at least once beforehand.
5. Copy the new files to their correct locations. I would avoid using flame's `copy_text` script, since it led to part of one of the issues I describe [here](./notes.md#why-not-just-use-flames-tools-directly). You can use `copy_all.py` if you don't want to do it manually.
@@ -14,8 +14,8 @@
0x210 World Map ②
0x238 World Map ③
0x260 Stage Results
0x288 Four Season Magic ①
0x2b0 Four Season Magic ②
0x288 4 Season Magic ①
0x2b0 4 Season Magic ②
0x2d8 Gear Crafts ①
0x300 Gear Crafts ②
0x328 Gear Crafts ③
@@ -30,4 +30,4 @@
0x490 Mastery/Guarding
0x4b8 Mastery/Evasion
0x4e0 Mastery/CHAIN
0x508 Mastery/Magic Charge
0x508 Mastery/MagicCharge
Binary file not shown.
@@ -21,7 +21,7 @@ def insert(filename, insert_col, compression_offset, length_limits = None):
with open(os.path.join(INPUT_FOLDER, filename + '.tsv'), 'r', encoding = 'utf-8') as f:
for line in f:
line = line.rstrip('\r\n').split('\t')
if len(line) < 3: #skip line at EOF
if len(line) < insert_col + 1: #skip line at EOF
continue
if line[insert_col] == '': #skip blanks
continue
@@ -76,14 +76,12 @@ def insert(filename, insert_col, compression_offset, length_limits = None):
length_limits = {'mon name': 31, 'line': 31})
insert('questlib', insert_col = 2, compression_offset = 0x1F,
length_limits = {'quest name': 47, 'client': 31, 'line': 51})
# the following three insertions don't seem to work, the output
# ends up the same as the input
#insert('foodarea', insert_col = 1, compression_offset = 0x1F,
# length_limits = 25)
#insert('helplib', insert_col = 1, compression_offset = 0x1F,
# length_limits = 31)
#insert('pc', insert_col = 1, compression_offset = 0x23,
# length_limits = 15)
insert('foodarea', insert_col = 1, compression_offset = 0x1F,
length_limits = 25)
insert('helplib', insert_col = 1, compression_offset = 0x1F,
length_limits = 31)
insert('pc', insert_col = 1, compression_offset = 0x23,
length_limits = 15)
#has description:
#fldlist[0123], item, monslib, questlib
#no description:

0 comments on commit cac356f

Please sign in to comment.