Ambermoon
Ambermoon copied to clipboard
NPC_texts update
Addresses issue Pyrdacor/Ambermoon#28 : changes "CELLAR" --> "CELL" in NPC Clementine's text.
Would appreciate a close double-check, since this is my first try at this.
Something isn't quite right. I can extract the sub-files from inside NPC_texts.amb but they are malformed. 001.amb is a packed file with the LOB header but if I depack I get the error : buffer truncated (which typically means file is wrong size) The following sub-files 002.amb etc. are garbage.
Can you tell us the process you went through to make your edit?
@iancrossfield A good test is to extract again and see if all fits (like Alex did) or even test the file inside the game if you know where the text is used.
Apologies. I can successfully export and import with AmbermoonTextImport, but it seems to throw an error when I try to export my newly-imported AMB file (even if I edit no text files). Suggestions welcome!
For example:
Successfully Export the original AMB file:
./AmbermoonTextImport -e /path/to/Amberfiles NPC_texts.amb ~/temp/nt2/
Reading texts from sub-file 1 ... done Writing texts to '.../temp/nt2/NPC_texts.amb/001' ... done Reading texts from sub-file 2 ... done Writing texts to '.../temp/nt2/NPC_texts.amb/002' ... done ... [usw.] ... Reading texts from sub-file 70 ... done Writing texts to '.../temp/nt2/NPC_texts.amb/070' ... done
Successfully re-import the exported files:
./AmbermoonTextImport -i path/to/Amberfiles NPC_texts.amb ~/temp/nt2/
Looking for text data in '.../temp/nt2/NPC_texts.amb' ... done Found 454 texts in 70 filled sub-directories. Collecting text data ... done Writing data to '/path/to/Amberfiles/NPC_texts.amb' ... done
But then the second export (to a new directory) fails:
./AmbermoonTextImport -e /path/to/Amberfiles NPC_texts.amb ~/temp/nt3/
Failed to load game data: Index was outside the bounds of the array.
Try an earlier release of the tools? Definitely worked with earlier version.
I only ever tried the windows version of the tools
As Alex suggested, try with 1.0.9 please. I will check this tomorrow.
The errors I described above were using my own compiled versions of AmbermoonTextImport. When I download the precompiled v1.0.9 Linux tools, I get the same result as described above. When I use the v1.0.12 Linux tools, I instead get the error that:
$ ./AmbermoonTextImport
The required library /usr/share/dotnet/host/fxr/3.1.22/libhostfxr.so does not support single-file apps. _ To run this application, you need to install a newer version of .NET Core.
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.20.04-x64&apphost_version=6.0.0
... even though .NET is definitely installed and at v6.0.102:
$ dotnet --version
6.0.102
I'll try to look into this more during the upcoming week, time permitting -- it sounds like you both are using Windows, so maybe this is all just the usual "own goal" that comes from using Linux. ; )
I had a look on ubuntu 20.04. I can use the most recent tools when dotnet 6.0.2 is installed via apt. Best use these instructions: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
However I encounter the same issue when using the tool. This is pretty strange as the tools work on Windows and they obviously use the same code. I think the LOB compression is somehow broken on Linux but all the operations should work the same on Linux. There is no special stuff in there. So either this is a bug in some .NET stuff for Linux or I am blind. For now I couldn't find a reason for this unfortunately.
The AmbermoonPack tool seems to work. At least in my test case with 1Map_texts.amb. I did not use the AmbermoonTextImport there but only a simple unpack and pack as AMNP again. This worked and the file was the same after re-compression. But maybe there was no LOB involved as the texts are rather short. Or it was only bad luck with NPC_texts.amb?
v1.0.11 AmbermoonTextImport.exe for Windows 64 doesn't work. If I execute I get the following error
Failure processing application bundle. Bundle header version compatibility check failed. A fatal error occured while processing application bundle
Release v1.0.9 for Windows64 works as expected. I am able to extract all texts from NPC_texts.amb edit 006/006.txt change CELLAR to CELL and then re-insert. Then unpack using the alternate Amiga tools by Vitaly Grebennik and everything is good.
v1.0.11 AmbermoonTextImport.exe for Windows 64 doesn't work.
Sorry user error. I had not installed .NET 6 runtime for Windows. v1.0.11 for Windows 64 works fine too. I can extract, edit, insert and then open the new files with the Amiga tools.
@Pyrdacor Memo to myself. Have a look at this later.
All the text files are now available in this repository so they can be edited directly. No more need for using the tools.