News: 11 March 2016 - Forum Rules

Author Topic: noisecross "FF5e Text Editor" distorting one specific text entry when used  (Read 399 times)

romhacking_username

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
I'm really confused about this issue, because it seems like multiple successful FF5 hacks (such as LOTC and GBA Script Port) have used the noisecross FF5e Text Editor in order to create their script hacks. It makes me think this must be something I'm doing wrong, because otherwise, someone else would have noticed this by now, right?

I'm confused because I believe I'm using the correct version of the ROM.

As the documentation (found at https://github.com/noisecross/FF5e_Text_Editor) states, the editor is meant to edit the RPGe Translation of the game, and derivatives from that. So, even though many FF5 hacks on ROMHacking.net use the FF5 JP ROM as the base, I know that's not the correct version in this case (further reinforced by the fact the editor spits errors if you try to "Get template" with the JP ROM open).

I'm using the version of the noisecross editor posted here: https://www.ff6hacking.com/ff5wiki/index.php/Main_Page#Utility

I'm using BSNES v1.15 as my emulator.

I'm editing and saving the .csv using just Windows Notepad, as the documentation suggests.

And I'm using what I think is a "clean" FF5 RPGe 1.10 ROM:

Code: [Select]
CRC32: 17444605
MD5: 5245a6ed780d896f416cc8824aa36182
SHA1: 8d5a83770c3d6f2b29b7825b5a17434616ec1c60

...and nearly every other aspect of the editor seems to work without any issues (tested and verified in-game many times).

But if I make any modifications to the "Battle Msg." text, it breaks a specific portion of the ROM.

Usually, after a battle in FF5, the game will display two successive lines to indicate Gil obtained and EXP obtained. For example:

Code: [Select]
20 Gil
6 EXP!

However, if I "Inject" any "Battle Messages" template into the noisecross editor, instead the after-battle display becomes (using the same example):

Code: [Select]
206 EXP!
6 EXP!

This occurs even if I do nothing else to the ROM, for example:

1. Start with "clean" FF5 RPGE 1.10 ROM.
2. Open in noisecross FF5e Text Editor.
3. Go directly to "Battle Msg." section under "Variable sized tables".
4. Select "Get template".
5. Make no changes to the .csv file that the editor creates. Don't even open it. (ie, there's no way it could be modified at all)
6. Immediately "Inject" that same template back in (so you're basically making no changes at all).
7. Start the RPGe 1.10 ROM, with absolutely no cheats or other modifications enabled, selected, or even entered in the emulator.
8. The first battle will immediately display the same error.

...so it seems like something fundamental with the editor itself, not the ROM or the edits I'm making.

But, if that was the case, someone else would have noticed something this obvious by now — that seems all-but-certain, especially in a community as detail-oriented as ROM-hacking.

I'm a complete amateur at this, so I'm in "way over my head", and after investigating and adjusting everything I could manage on my own, I decided to just ask if anyone else knows what's going on, or what I'm doing wrong.

Thank you to anyone that reads this and can offer any insight!




FAST6191

  • Hero Member
  • *****
  • Posts: 3554
    • View Profile
I have no particular insight into the specific problem but I will note such things are using a variable (you get different money and experience depending upon number/type/possibly character level...) and messing those around could see such things as you describe (even if crashing is the more expected occurrence). Indeed if it smooshes the two values together like that then it would speak to something happening* when it parses them back out.

Solution if I was doing it for something as small as this. Edit it with the editor, just that section, do a file compare between the "stock" ROM (in this case the translated base version) and your newly modified version. Can make things longer if you want (hopefully it is just pointers) but might stick to same length for the time being.
Gets very tedious if it is going to be every line in the game but for something you can drag across the line manually then makes sense.

As far as finding it before. Not so many go in for FF5 (pity as it is the best pre 7 game for my money) and [number] gil (gil being a proper noun) and [number] exp is if not common to all languages anybody around here is likely to have messed with or taken bug reports from then common enough as a gaming term it might not have been encountered.

*or indeed not happening. Seeing values get concatenated makes me wonder if there is not a variable start and variable end value with the latter missing.

4lorn

  • Full Member
  • ***
  • Posts: 201
    • View Profile
    • Blunt Bit
It doesn't help that pre-patched ROMs circulating the net for decades can have minute, undocumented differences between them (I still remember the first ROM hack I ever encountered: Final Fantasy 1, with the only change being party members were Moogles instead, and there was no documentation or even a silly title screen remark about this), or that RPGE's patch hosted here doesn't even seem to work with a nointro release. I found one pre-patched FFV ROM, which works in bsnes, but that editor utterly refuses to extract any *.csv file from it.

Regardless, I'm not interested in anything FF-related but a quick search reveals someone had a similar, unresolved issue. The way it's presented, it could be a number of things: the editor looking at the wrong place, at the right place but inserting data in the wrong place, a bad ROM, etc. It's not uncommon for translations, official or otherwise, to produce changes that shift large portions of a ROM bank a single byte forward or backward, which is enough for an editor expecting a specific byte count to throw up errors - or worse, not throw up any and produce a defective end result.


KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7434
  • *sigh* A changed avatar. Big deal.
    • View Profile
RPGE's patch hosted here doesn't even seem to work with a nointro release.

Could the editor be expecting a headered ROM?
https://www.romhacking.net/faq/?page=faq#question4
"My watch says 30 chickens" Google, 2018

romhacking_username

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
Thank you for taking the time to read and reply to my issue here.

These thoughts are all logical, let me respond to some of them:

After considering the possibility of a bad patch as you brought up, I tried multiple sources of the RPGe v1.10 ROM, and then also manually patching the JP version myself... in all cases the checksums ended up the same for the final patched ROM. And then the error still happened.

As far as headering, I am not well-educated on the technical details of this kind of work, but my first thought is: If the editor was expecting a headered ROM, wouldn't that cause everything to be slightly 'misaligned' all the way through, rather than one specific detail? The editor exports/injects perfectly for me in all other categories.

I have no particular insight into the specific problem but I will note such things are using a variable (you get different money and experience depending upon number/type/possibly character level...)
Yeah! I only know enough to know that the editor seems to use [10] to refer to that variable, with the bracket notation being something proprietary that noisecross used to reference parts of the TBL file.

The specific section of the exported text is:
Code: [Select]
[10]
[10][EOL][96]EXP!
[10][Bartz][96]ABP!!

which should appear in-game as:
Code: [Select]
(number) Gil
(number) EXP!
(number) ABP!

[96] and [Bartz], in this case, just refer to TBL points that get parsed as various-sized blank spaces.

It's not a typo or error that it says [10] in every line. Somehow, that single character-byte-thing dynamically becomes all the correct variables in actual play. It shows up all over the place in the various exported .csv files for menus, combat results, etc.

The other weird thing is that you need to manually write "EXP!" and "ABP!", but not "Gil". It just magically adds "Gil" without needing to be told. In fact, if you try to write-in "Gil!" in an attempt to be helpful, then the in-game display becomes something like:

Code: [Select]
(number) GilGil!
(number) EXP!
(number) ABP!

I know this because the "online FF6 editor" (https://everything8215.github.io/ff6tools/ff6tools.html) can open and edit FF5 ROMs. It's extremely tedious to use compared to the noisecross editor, but it can edit the Gil message (and any other Battle Message) without breaking the Gil/EXP display.

Quote
As far as finding it before. Not so many go in for FF5 (pity as it is the best pre 7 game for my money) and [number] gil (gil being a proper noun) and [number] exp is if not common to all languages anybody around here is likely to have messed with or taken bug reports from then common enough as a gaming term it might not have been encountered.

I think I get what you're saying: "No one noticed this because no one had any reason to modify 'Gil' and 'EXP' lines."

That's logical, but the way the noisecross editor works is that you have to edit in 'categories', rather than specific lines. So for example, to edit any Battle Message, you have to export a .csv file with 83 lines of text, one line for each Battle Message displayed in the game.

Then, to apply the edit, you have to 'inject' that entire 83-line .csv file back into the game using the editor's "Inject" function.

That is where my confusion comes from: even if I don't make any modifications to the "Gil" or "EXP" lines, re-injecting the file causes the Gil/EXP display to break... Even on a fresh ROM with no other modifications.

Quote
*or indeed not happening. Seeing values get concatenated makes me wonder if there is not a variable start and variable end value with the latter missing.
That is actually a really interesting idea... I don't understand a lot about this, but I can imagine what you're suggesting based on the understanding that I do have: somehow, a 'pointer value' could be getting lopped off on only one side, causing a different value to bleed in. Or something like that?


4lorn

  • Full Member
  • ***
  • Posts: 201
    • View Profile
    • Blunt Bit
Could the editor be expecting a headered ROM?
https://www.romhacking.net/faq/?page=faq#question4

Good point, but I can't tell because the editor can't seem to extract any data from a ROM, whether a header is present or not.

T29

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Take in mind that some texts on Noisecross' editor get corrupted because of double characters when importing .csv files. (BlackMage displayed as "BlkMage").
It's better that you manually hex-edit them (It's easier than you may think). :thumbsup: :thumbsup: :thumbsup: