Pyrdacor/Ambermoon

Translation

Opened this issue · 25 comments

galon3 commented

Hi
I wanted to try translation, but I have a problem with the tools.

Tools v1.12, Amiga versions 1.18

d:\GAMES\AmbermoonTools-Windows>ambermoontextimport -e "d:\GAMES\Amiga\Dyski\dh0\AMBERM\Amberfiles" Text.amb "d:\GAMES\Ambertekst"
Reading texts from sub-file 1 ... failed
Unable to read text data.

So I tried importing from EnglishTextOutput1.14.7z (after unpacking)

d:\GAMES\AmbermoonTools-Windows>ambermoontextimport -i "d:\GAMES\Amiga\Dyski\dh0\AMBERM\Amberfiles" Text.amb "d:\GAMES\Ambertekst"
Looking for text data in 'd:\GAMES\Ambertekst\Text.amb' ... failed
No text files with the right names exist so the resulting data file will be empty!
Do you want to continue (Y/N)? n
No text files found.

What am I doing wrong?
And one more question. Does the font used in the game have Polish characters (ąćęłóńśżź)?
Thanks for your work.

Sorry I forgot to update the tools. There is a new tool which eases text export and import. I will try to provide the tool as soon as possible. But I am not home right now.

The game has no polish characters unfortunately. For the remake I could add them. For the Amiga version we might use replacements like s for ś etc or create a new glyph mapping etc. I can work on that in the future. Make sure to use the polish characters in the texts anyway. In worst case I can adjust the tools to replace those characters with replacements for Amiga but support the right characters in the remake.

If you would use replacements like s in the translations it would be much harder to replace them by the right polish characters later.

galon3 commented

Thanks for the information. No rush, using the Amiga version and tools I wanted to see if it would work. Now that I know it can be done, I'll look into the texts in the Ambermoon/Translations/ directory. Is it possible to merge the text from Ambermoon-Advanced/english with them? Or is it better to keep them separate?
Greetings

I would not merge them as some texts were changed or extended and thus you won't have the correct texts in the normal version anymore. So keep them separate.

I updated the tools. There is version 1.14 now available which includes the tool AmbermoonTextManager. Please give it a try.

galon3 commented

Thanks for the new tool, but I continue to have problems with it.
All _data files generate an error, dict gives an empty result (I tested them one by one).
d:\GAMES\AmbermoonTools-Windows>AmbermoonTextManager -e "d:\GAMES\Amiga\Dyski\dh0\AMBERM\Amberfiles" "d:\GAMES\Ambertekst" Writing 0 dictionary entries. Writing all texts from Text.amb. Unhandled exception. System.IO.EndOfStreamException: Read beyond the data size. at Ambermoon.Data.Legacy.Serialization.DataReader.CheckOutOfRange(Int32 sizeToRead) at Ambermoon.Data.Legacy.Serialization.DataReader.ReadWord() at Ambermoon.Data.Legacy.Serialization.PlacesReader.ReadPlaces(Places places, IDataReader dataReader) at Ambermoon.Data.Places.Load(IPlacesReader placesReader, IDataReader dataReader) at AmbermoonTextImport.Program.Export(String gameDataPath, String outputPath, List1 options, List1 files) at AmbermoonTextImport.Program.Main(String[] args)
amber
I packed the translated Text.amb and it works, (the program itself substituted Polish characters).

Can you send me the Amberfiles directory (zipped) that you are using with the tool? Or attach it here if you like.

I will have a look at it tomorrow then.

Nice to see Polish texts in Ambermoon already!

Can you try v1.15?

galon3 commented
galon3 commented

Export works, import generates an error:
Reading all texts from Text.amb. Looking for text data in 'd:\test\tekst\Text.amb\Messages' ... done Looking for text data in 'd:\test\tekst\Text.amb\WorldNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\FormatMessages' ... done Looking for text data in 'd:\test\tekst\Text.amb\AutomapTypeNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\OptionNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\MusicNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SpellClassNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SpellNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\LanguageNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\ClassNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\RaceNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SkillNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\AttributeNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SkillShortNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\AttributeShortNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\ItemTypeNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\ConditionNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\UITexts' ... done Looking for text data in 'd:\test\tekst\Text.amb\DateAndLanguageString' ... done Looking for text data in 'd:\test\tekst\Text.amb\VersionString' ... done Looking for text data in 'd:\test\tekst\Monster_char.amb' ... failed

ambermoon_english_1.18_extracted.zip has German files in the folder 3Map_data.amb\343\

Ok thanks. I will check on that next week.

Should work now with 1.16

galon3 commented

Export works, import generates an error:
d:\GAMES\AmbermoonTools-Windows>AmbermoonTextManager -i "d:\test\Amberfiles" "d:\test\tekst" Looking for text data in 'd:\test\tekst\Dict.amb' ... done Reading all texts from Text.amb. Looking for text data in 'd:\test\tekst\Text.amb\Messages' ... done Looking for text data in 'd:\test\tekst\Text.amb\WorldNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\FormatMessages' ... done Looking for text data in 'd:\test\tekst\Text.amb\AutomapTypeNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\OptionNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\MusicNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SpellClassNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SpellNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\LanguageNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\ClassNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\RaceNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SkillNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\AttributeNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\SkillShortNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\AttributeShortNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\ItemTypeNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\ConditionNames' ... done Looking for text data in 'd:\test\tekst\Text.amb\UITexts' ... done Looking for text data in 'd:\test\tekst\Text.amb\DateAndLanguageString' ... done Looking for text data in 'd:\test\tekst\Text.amb\VersionString' ... done Looking for text data in 'd:\test\tekst\Monster_char.amb' ... done Looking for text data in 'd:\test\tekst\Save.00/Party_char.amb' ... done Looking for text data in 'd:\test\tekst\NPC_char.amb' ... done Looking for text data in 'd:\test\tekst\Place_data' ... done Looking for text data in 'd:\test\tekst\Objects.amb' ... done Looking for text data in 'd:\test\tekst\2Map_data.amb\263' ... done Looking for text data in 'd:\test\tekst\2Map_data.amb\265' ... done Looking for text data in 'd:\test\tekst\2Map_data.amb\285' ... done Looking for text data in 'd:\test\tekst\2Map_data.amb\416' ... done Looking for text data in 'd:\test\tekst\2Map_data.amb\420' ... done Looking for text data in 'd:\test\tekst\2Map_data.amb\425' ... done Looking for text data in 'd:\test\tekst\2Map_data.amb\441' ... done failed

I have about 40% of the translation finished and one question for now.
Some messages start with "'s" . Won't it cause problems to replace this string with ","?
As I understand, a name will be inserted at the beginning of the message.
The English message "Thalion's attack failed!" in Polish should become "Atak Thaliona zawiódł!" or less elegantly, but still grammatically correct "Thalion, atak zawiódł!" ("Thalion, the attack failed!").

Strange error. It worked for me. Do you extract the English data?

It is no problem to use a ',' as long as the result is valid. As you said, the name is inserted before. The comma is a valid character, so this should be fine. Unfortunately you can't change the order of the words that easy. For example place the name somewhere else.

galon3 commented

I tried with different versions (english), 1.18, 1.19, Advanced 1.03.
They extract, but when trying to pack back an error.
I tried to pack the translated files, also got an error, although different:
Looking for text data in 'd:\test\tekst\Monster_char.amb' ... Failed to load game data: The given key 'AM2_CPU' was not present in the dictionary.
I attach the packed translation (as much as I finished), if you find some time try to pack them, I could start testing if there are any big errors
Ambertekst pl.zip

a1exh commented

Well the second error is just about tooling. It will be gone if you add all the other files like AM2_CPU etc to the folder. There is a general routine to load game data which loads all the files of the game. This is used in the tool to patch the texts in an easier way. I think I have to refactor this so only the text-related files are needed.

For the other error I have to investigate. Hopefully find the time for it today.

Version 1.17 should fix the remaining issues hopefully. You also won't have to provide all the files like AM2_CPU anymore. You can even skip some text-related files. In this case a warning is shown. Let me know if it works.

galon3 commented

Thanks, I finally managed to pack all the files.
At the moment the errors appear only in certain cases:
Amberfiles empty or missing files
Looking for text data in 'd:\test\tekst\Monster_char.amb' ... Failed to load game data: Object reference not set to an instance of an object.
missing file to be packed
Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path 'd:\test\tekst\2Map_data.amb'. at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator1.Init() at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions)
at AmbermoonTextImport.Program.<>c__DisplayClass11_0.g__ProcessFiles|8(String containerFile, Func2 processor, Boolean zeroBased, Boolean withMultipleTextsForSubFiles) at AmbermoonTextImport.Program.<>c__DisplayClass11_0.<Import>g__ProcessAndWriteFiles|7(String containerFile, Func2 processor, Boolean zeroBased, Boolean withMultipleTextsForSubFiles)
at AmbermoonTextImport.Program.<>c__DisplayClass11_0.g__ReadGotoPointNames|12(String filename)
at AmbermoonTextImport.Program.<>c__DisplayClass11_0.g__CheckAndRead|13(String file, Action1 reader) at AmbermoonTextImport.Program.Import(String gameDataPath, String inputPath, List1 options, List1 files) at AmbermoonTextImport.Program.Main(String[] args)

Version 1.17 should fix the remaining issues hopefully. You also won't have to provide all the files like AM2_CPU anymore. You can even skip some text-related files. In this case a warning is shown. Let me know if it works.

Hello, I want to translate Ambermoon into Chinese. I know you have limited time. Could you please describe more about the instructions related to translation in the readme? I tried to translate it, but I don't know how to replace it into the game. For example, how to unpack it at the beginning, how to package it, how to replace it into the current project, etc. After reading the related projects and files, the description is too scattered, and now I have no clue.

Hi. I am on a vacation right now. Is it ok if I help you from 15th of April onwards when I am back? Please remind me again then if I am not responding. I will help you with all the details then.

Hi. I am on a vacation right now. Is it ok if I help you from 15th of April onwards when I am back? Please remind me again then if I am not responding. I will help you with all the details then.

Thank you for your reply, Pyrdacor. Just according to your time. I'm not in a hurry。

Sorry for the late reply. Chinese will be pretty tricky to be honest. The original Amiga game uses a limited amount of glyphs (around 100 currently) which includes letters, numbers and symbols. Moreover you have runes which encode letters. Not sure if this is even possible in Chinese. As far as my Chinese knowledge is, every Chinese symbol represents a word.

The next problem is that the normal font has a size of 5x6 pixels per glyph. You won't be able to display Chinese with it. So I guess it is impossible for the original game.

For the remake we have a few more options. For languages with diacritics like french I already increased the glyph size to 10x12 (double size, half pixel resolution). This is still not enough for Chinese but maybe I could extend it further which means a bit effort on my end.

I only want to make sure it is technically possible so you won't waste time translating and we can't integrate it into the game later.

As there are quite many Chinese symbols, we would need some large mapping table from letter to glyph.

I would suggest we start with some example texts and I try to render the glyphs in the remake somehow.

But to be honest, my time is currently (and actually since almost 4 years) very limited and my to-do list is huge. But I also need some side tasks to keep me motivated.

But honestly speaking, adding Chinese seems to be a huge effort and I am not even sure if we can make it. Which does not mean that I don't want to try it. ;)

So if you are patient, we can try to approach this step by step and I will try to find some time to investigate the Chinese language integration from a technical perspective.

English To Chinese,such as: Grandpa -> 爷爷
I'm also a C# programmer, and now I'm learning your project. It'll be a long way for me, because I have two kids, time is also limited.
Could you please describe more about the instructions related to translation in the readme? such as how to translate english to french? I really want to know the details。

Thanks to the work of Pyradcor it is much easier to translate the game because all text have been extracted and now live in their own files.

Start here :

https://github.com/Pyrdacor/Ambermoon/tree/master/Disks/Bugfixing

You'll see separate directories for English, German, French, Polish and Czech.

Inside each is a directory called "AllTexts" and inside subdirectories corresponding to the original filenames, sub-file and sub-msg.

Embedded within each text string there can be markup which is described briefly in the translation readme.

https://github.com/Pyrdacor/Ambermoon/tree/master/Translations

Yeah basically what Alex said. The linked readme should be sufficient to translate the intro, the extro and all other remake-related texts.

Beside that you need to translate all other in-game texts. You can just use the English texts in https://github.com/Pyrdacor/Ambermoon/tree/master/Disks/Bugfixing/English/AllTexts and translate them all to do so. The problem is that those texts are stored in the original Ambermoon container format and it expects an encoding which has only one byte per character. It has no support for multibyte character sets.

However you won't be able to test your translations in-game until I support Chinese glyphs. This is what I meant in my previous message. You can translate everything, but you will need glyph graphics, a mapping from letters/words to glyphs and some other stuff. And the current formats won't even allow more than 225 characters/symbols in total.

I doubt that we can ever support Chinese for the Amiga version. For the remake it might work. But it will be some effort and most likely involves a new text container format. The latter is not a problem per se. I also invented a new text container for intro and extro texts for the polish and czech versions. So this can be done with some effort. But of course remake-only then.

If you are interested in the technical part we can talk about it of course.