Good news, folks! The SGO file format can be fully modified by converting to JSON. For too long I've wanted to share that SGO files have been figured out thanks to unrelated modding work on another of Sandlot's games:
Earth Defense Force 4.1. That PC/PS4 game uses many of the same file formats as Reginleiv, so the "SGO Transformation Tool" made for EDF4.1 works with the decompressed SGO files of ZNR.
Oh, disclaimer: I have no relation to the development of any of these tools. My only isolated role was discovering ZNR uses the same SGO files as EDF4.
The "SGO Transformation Tool" can be found here:
https://github.com/zeddidragon/sgott
The "releases" section has "sgott.zip" under "First official release of balance changes", which contains the only executable you need to convert SGO files to JSON format and back. It works like a Command Prompt program, but you can't just run the exe to return its functions. It doesn't have many important ones, but you can see them in the GitHub's readme. Here's an example to convert an SGO file:
Code:
sgott.exe inputfile.sgo outputfile.json
And of course, it works the other way around as well. If it gives an error when converting from JSON to SGO, it's probably because of a formatting error. The JSON format is always very touchy; watch those commas and brackets.
The Japanese text is in one of the UTF-18 encodings. Notepad++ calls it "UTF-8 without BOM", which seems to work 99% of the time (I've had it ruin end quotations a few times, but they may have been me choosing the wrong encoding when I first started).
You may notice a "meta" section at the bottom of the output JSON. You can safely ignore it, it does not affect the output SGO. This section is only used for Zeddy's specific mod compiler for EDF4.1 to help simplify the process of editing EDF's weapons.
That's the major stuff. The following is a recap on the game's compression as a refresher, but the very bottom holds a fully translated "option.sgo" I made to prove this works.
I've not seen anyone have trouble with this, but the game's files can be decompressed with WWCXTool from the wwPacker toolset. That is, after you remove the file's SCF header yourself. The game uses 0x10 type LZ77 compression for most, if not all, its files, and this was the only tool that would work with that compression. Even though the game uses 0x10, injecting the options file with 0x11 compression worked just as well and took up less space. The files don't need the footer padding, so add /p as an option. Here's what I used when compressing my option.sgo:
Code:
wwcxtool /c1 /p option.sgo option!comp.sgo
I believe this is where I found the tool:
https://gbatemp.net/threads/wwpacker.95479/
For an explanation of the SCF header, the post here should suffice:
https://gbatemp.net/threads/zangeki-no-reginleiv-translation.209828/page-2#post-4073278
You don't even need a calculator for the uncompressed file size since the second through fifth bytes of the LZ77 compression are exactly what you need for the SCF.
This is what I believe the process is to finalize an edit:
Use SGOTT to convert the JSON to SGO
Use WWCXTool to compress SGO without padding
Use hex editor to add the SCF header
Of course, the game can work with uncompressed files, so you can test your edits quickly by building the SGO and injecting just that.
The image at the bottom of this post is a screenshot of my translated option.sgo. While I admit that I know almost no Japanese, I assure you that I'm a native English speaker and am very thorough about my "translating". On top of playing the game itself and knowing other Sandlot games, I dissect the sentences until I gain an understanding of what the Japanese line is trying to say. For the options menu, it was very easy. As for the mission descriptions, those are much more difficult. While the two dozen mission descriptions I've translated read nicely and convey the happenings well enough, I do not trust it is an accurate translation due to the higher complexity. It could be acceptable, but I'd prefer someone who actually knows Japanese. Who knows how many entry level mistakes I've made?
(That being said, I highly recommend the big river be called the "Lyne". The Japanese text seems to refer to it as a "river line", then uses the katakana for "line" as its proper name, and considering why the characters cross the river, it's probably meant to be an R/L pun, thus intended to be called the "Rhine"...which I think sounds ridiculous in English. But, maybe that's just me. Besides that, the names are really weird overall. Midgard into Mizgard, Audhumbla into Auzunbla... Well, l thought they were messing with the names for the sake of identity, but it turns out the odd spellings are from the writers translating the original Nordic names into Japanese.)
Anyway, I'm confident my options menu translation is highly acceptable. Its location on the disk is "*\layout\option.sgo", or inside the "layout" folder. I only translated the single-player version of it, not the online version, which may have a few different options. I cannot test online. I did a few of the "tester" options, but I can't access those either and they don't function when taken outside of their natural habitat.
l have the .zip attached to this post, but here's a download mirror on Discord just for fun:
https://cdn.discordapp.com/attachments/243267327586598912/596132647378354176/ZNR_option.zip