Pyrdacor/Ambermoon

Spider book in Grandfather House correction of "WHO HAS AN .OR.H"

Closed this issue · 22 comments

It should be "WHO HAS A .OR.H" (AN -> A)
WinUAE Screenshot 2022 08 24 - 17 38 08 84

@Pyrdacor
BTW, how is text.amb compressed and how do I un/repack it? Tried with Amiga tool ExtractAMB but says it's not an AMB...
Where can I find Amiga tools for JH etc. formats?

Here on my GitHub page. Download the tools zip.

The easiest way is to use the tool AmbermoonTextImport.

Windows:
AmbermoonTextImport.exe -e . 2Map_texts.amb Output\Folder\Path

Linux:
./AmbermoonTextImport -e . 2Map_texts.amb ./output/folder/path

This way for each map a sub-folder is created and each text file within is a map text.

Also works for NPC texts, Party texts and Object texts.

You can later use -i instead of -e to reimport the texts into the amb files. If you create new text files, you should use the right encoding. Best copy an extracted text file and rename and edit it.

Ok, can't someone provide AmigaOS 3.x+ binaries too?

Windows output (Text.amb from 1.16 Amiga ver):

C:\Users\Luca\Downloads\AmbermoonTools-Windows>AmbermoonTextImport.exe -e Text.amb out\
Failure processing application bundle.
Bundle header version compatibility check failed.
A fatal error occured while processing application bundle

Those tools won't run on AmigaOS.

You will need to download the NET6 Runtime to be able to run it.

a1exh commented

You don't have the Amiga tools anymore? I can send them if you prefer them

You don't have the Amiga tools anymore? I can send them if you prefer them

Found them but can't uncompress JH files AFAIK...

a1exh commented

Decrypt JH files using amcode on aminet?

Partially working but still leaves some bytes at the beginning:

image

a1exh commented

You've decrypted. Now you need to decompress with xfd? I'm not sure you're using the tools correctly. The tools from Metallic decrypt split (join and encrypt) and xfd (or LOB) to decompress. Amcode will also decrypt but I'm not sure you need it. Maybe for saves?

Yes I use xfddecrunch for LOB files, but in this case won't work if I don't remove the header "JH+2 bytes". Moreover once xfddecrunched, after I remove the bytes, it won't extract sub-files (it seems there are at least 4 different sub-files in it).

I don't think JH compression was used in the original game... so there are no native tools to handle these Ambermoon files under AmigaOS.

JH was used often in Ambermoon.

Do you know JH tools for the Amiga? I see original game files for Amiga have only files with header AMB, AMNC, or LOB compressed, didn't see JH before.
Can't handle current text.amb file under AmigaOS.

JH is also used in some container formats like AMNC or AMNP. The savegames use JH as well. And I think stuff like the dictionary etc.

See here: https://github.com/Pyrdacor/Ambermoon/blob/master/Files/FileTypes.md

I could write some tools for the Amiga if needed.

Ok, thanks. Because with Amcode and ExtractAMB, InsertAMB on the Amiga I was able to decrunch/extract/reinsert modified files with the original game, but can't handle now files like text.amb which is a JH stand alone.

Would be great a small tool for Amiga too thanks! :)

Text.amb and others use JH+LOB. First decrypt, then skip the header and UnLOB.

This is used for non-container files which only represent one file.

AMNP is a container which uses JH+LOB the same way but for each subfile.

text.amb
I did:

  • amcode text.amb -> text_unc.amb: it worked but leaves some JH+2bytes in the header
  • removed the 4bytes and xfddecrunched text_unc.amb: it worked but it seems to me there are more than 1 file merged in a single file so I don't know how to extract the single parts...

A straightforward JHdec tool would help IMHO for files like text.amb on the Amiga.

Patching the original game I remember I had to do a simple xfddecrunch on files + ExtractAMB/InsertAMB, never found a JH container stand alone.

Text.amb and others use JH+LOB. First decrypt, then skip the header and UnLOB.

This is used for non-container files which only represent one file.

AMNP is a container which uses JH+LOB the same way but for each subfile.

Ok, so pass 1 & 2 described above is enough and there's nothing more to do on text.amb (annoying the manual editing to remove the JH 4 bytes in the header anyway)?

a1exh commented

What you're describing must be new. A consequence of @Pyrdacor extracting all the text from the exe to aid in localisation

Text.amb is not a "normal" text container which can be simply extracted to text data files. It is a custom format I invented to store all the exe strings. So in your case you end up with a single binary file of that format. I have a tool to extract the texts. But not for Amiga yet.

But what do you want to do with those exe texts? I guess you want the map or NPC texts instead.

About the JH header. Yeah it's annoying. The tool should consider optional LOBs inside JHs as this is used in Ambermoon.

I plan to port my tools (at least those with a CLI) to the Amiga as well in the near future.

Fixed in 8dfd5b4