[Discussion] [DFUnity] Translation of Daggerfall

Discuss translation of Daggerfall Unity and the required Daggerfall installation. Help other communities learn how to translate Daggerfall using any available tools and processes.
CrazyCyrodilicCat
Posts: 21
Joined: Wed Jun 06, 2018 9:59 am

Re: [Discussion] Translation of Daggerfall (DFUnity)

Post by CrazyCyrodilicCat »

Jay_H wrote: Thu Jun 07, 2018 12:41 pm Much translation is possible now. The Spanish version has most of its work done. The majority of DFU's text is found in .txt files which can be replaced with specific language versions when the time comes. You could begin by translating quest files or character info images, since they are both immediately moddable.
OK, thx.

CrazyCyrodilicCat
Posts: 21
Joined: Wed Jun 06, 2018 9:59 am

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by CrazyCyrodilicCat »

Well, I'm not dead yet.

Did I say I'd translate this game into Russian? I was wrong, because the biggest pain in the ass are fonts that are unknown to any editor I know, and the translation itself is not that big a deal, given that I'm going to base my translation on Vortex's work.

I think I can start working on it, so don't write me off the bill prematurely, if you remember me at all :)

User avatar
Daneel53
Posts: 103
Joined: Wed Jul 15, 2020 11:15 pm
Contact:

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by Daneel53 »

Hello guys !

Maybe it's time to try to summerize where we are for localisation of Daggerfall Unity.

In July 2020, through the new topic Daggerfall Unity Localization Preview, Interkarma gave the first steps to generate the future localisation mods. Because, yes, the localisation shall be a mod and not only a set of external text files. Last week I decided to follow these steps in order to do what is described into Interkarma's topic and see if I will be able to produce the French localisation mod when everything will be ready. Let's say that it was not as straight as described into the topic, the process is not as easy at it seems.

First you must obtain on your computer a working Unity editor with the recommended version of Unity (2019.4.10). You'll have to take the time to struggle with the Unity Hub in order to acheave this. When you think it's done, by launching the editor you discover that you must have a valid licence of Unity in order for it to work. So, second step, you have to obtain a valid licence, to install it and to make it available for Unity Hub. Here again, not THAT evident to do: you have create an Unity account and all what come with this process, choose which licence, obtain the related file and install it. But okay, you will finally succeed with this step. Third, you must download the Daggerfall Unity code and put it somewhere into your computer. This is the easiest step, just take the link toward the right GitHub into Interkarma's topic and download the archive by clicking on the big green button Code, then decompress it somewhere. I decided to put all my trials the same place, a folder D:\Unity in which I have a folder with the sources D:\Unity\daggerfall-unity-0.11.0-beta and besides there will be the folder to store the build of the game D:\Unity\Daggerfall-Build.

Because, yes, even before thinking to prepare the localisation, the next step consists to be able to generate a working build of the game. So you launch the editor, Unity Hub opens, you click on the project daggerfall-unity-0.11.0-beta, the editor is ready. How to build ? No Build button... Select the entry File in the menu bar, select Build settings..., the windows Build Settings appear, check the parameters, clic on Build and Run, choose the folder where the build will be generated (D:\Unity\Daggerfall-Build), look at the build been constructed and finally Dggerfall Unity opens, YOUR very own DFU generated by yourself! Once there, you feel you have accomplished something.

Then comes the time to follow the specific instructions given by Interkarma into his file Localization Tutorial 1 - Creating a Translation Mod. The explanations given into this document are very clear, to follow them is easy... but when you comes to the end, you realize that the process is not complete: In the next tutorial, we’ll look at importing default text to our empty tables, and using legacy translated TEXT.RSC files with character remappings.

OK, the structures are ready but they are void and so, useless. Moreover, when you regenerate a build following what you've just done, the game now displays an unfinite list of "LocaleText-NotFound" and the game is not anymore playable. Huh, not what expected...

So, let's summerize. If you never installed Unity 2019.4.10 and its editor before, it will take you one or two hours of careful efforts to obtain the possibility to generate by yourself a working build of DFU, but you should achieve this goal. Then you have to stop because, for the moment, the localisation process does not permit to generate a single table structure with texts in another language and moreover, if you follow Interkarma's document, you won't be able anymore to build a working DFU without localisation errors. I suppose that we have to change some options in the editor to forbid the generation of the void tables but we don't know how, and moreover I did not see in the game a way to indicate what language we would like to use, so it is impossible to select English to go back to a game in English without localisation errors.

This is where we are today. I perfectly understand that Interkarma has more important things to do and that the localisation will have to wait another set of months. It's just that we don't know when all this could be done and, besides from this, it would be nice if people used with the Unity Editor could tell to those like me who followed Tutorial 1 how it would be possible to come back to a working build without the LocaleText-NotFound errors.

Talking about the build process, there is into the Build Settings window of the Unity Editor an option called "Create Visual Studio Solution". If you select this option and build into another folder, let's say D:\Unity\Daggerfall-Build-VS, you will find into this folder a file "Daggerfall Unity.sln" that will permit you to open the project with Visual Studio 2019. This is what I did too and then you can launch the game with the usual VS way. This may be more convenient for those used to Visual Studio but here also the result is plaeged with all the LocaleText-NotFound errors and no apparent way to come back to a pure English game. Side question is: is there a special interest to open the VS project compared to stay into the Unity Editor world?

My goal with this long post was to share the experience I had to try to begin to localise DFU, but also to ask: do you need help? Is there something we can do to accelerate or do only the usual development team that is perfectly used with the game structure and tables is capable to end the process? Is it possible at least to have soon the end of the tutorial with TEXT.RSC so that we can generate a mod partially in a foreign language? How to switch into the Unity Editor between a localised and a non-localised build?

Thanks for reading.
In charge of Project French Daggerfall and DaggerfallSetup, dev. of DFTools in English.
French translator for many Warband mods and Bannerlord.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by pango »

(As mentioned with you on Discord, Interkarma announced just 2 days ago that he's working again on localization support, perfect timing :) )
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Daneel53
Posts: 103
Joined: Wed Jul 15, 2020 11:15 pm
Contact:

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by Daneel53 »

Yes, just the week I decided to give a try to DFU generation. Life is strange... :)
In charge of Project French Daggerfall and DaggerfallSetup, dev. of DFTools in English.
French translator for many Warband mods and Bannerlord.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by Interkarma »

Hey Daneel53! :) You're hitting a wall because I haven't given you enough information yet. That's my failing, I'm sorry. And if you're unfamiliar with the Unity Editor and modding DFU, then you'll struggle further to get up and running. This does not mean the localization in DFU isn't functional (it is), it just means you don't know how to use it yet. I will seek to remedy that situation for you in very near future. :)

I'll cover this in more detail through revised tutorials, but here's a really high level overview of creating a translation mod ready for distribution. This might be helpful grounding for the tutorials so you know what to expect.
  1. Prepare your environment. Translation mods are delivered by .dfmod package, so you'll need Unity and source to build everything. This is the same as any other DFU mod - just think of Unity Editor as the Creation Kit for DFU.
  2. Create new locales matching the languages you want to add.
  3. Create new string table localization assets to house translated text.
  4. Use TextManager editor tools to populate your string tables. If a classic TEXT.RSC matching your region code is available then text will be imported from there, with character conversion if provided. Anything else will be copied from English to fully populate new string tables.
  5. Use Unity Editor's localization string table editor to enter translated text as required.
  6. Use Unity Editor's font asset creator to make a TextMeshPro font asset containing glyphs for your language codes. DFU's default fonts have a full complement of Latin characters.
  7. Create built addressables containing your string table assets.
  8. In your mod startup script, assign translated string tables to Live String Tables and assign any TextMeshPro fonts to their locales.
  9. Create any image asset replacements (e.g. for UI). I won't cover this in detail as image replacements are generally well understood and covered by main modding tutorials. Note that image replacements are not locale-aware at this time.
  10. Build mod including your image assets, scripts, built addressables, etc.
  11. Distribute mod via Nexus and end users can install as normal.
It looks complex on the surface, and in places it can be. There's a lot happening within the Unity editor itself which is challenging if you're unfamiliar with Unity. But most of this is just setup work to get your mod project ready. From there it's all about translating text and building the mod, which you can do iteratively. You might also need to update text and rebuild mod to match future localization changes.

The above is all working as of 0.10.26, only not very well documented. I've created test translation mods in my environment using French, German, English (i.e. custom English text), and successfully distributed those translations to my test PCs.

I haven't visited this process in several months, so it's always possible something has broken due to other code changes. I'll be stepping through everything again as part of writing new tutorials and will fix any problems uncovered along the way.

I want to apologise for not covering all of this sooner. I lost considerable time last year thanks to some personal issues, not to mention covid upending my entire working and home life. What little time I had was spent just trying to get everything ready for beta. Thankfully, my life has settled down somewhat. I'm feeling happier and more confident about everything once again. Maybe not so much as before 2020, but much improved. :)

User avatar
Daneel53
Posts: 103
Joined: Wed Jul 15, 2020 11:15 pm
Contact:

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by Daneel53 »

Hi Interkarma !

Don't apologize, you already did so much, and I perfectly understand that to keep on working on such a huge project is time consuming and difficult. Hope you did not take badly my words, I did not want to complain, just to state that, for now, we can't go further with localisation.

I agree that that I'm not a modder, just a translator that had, up to now, just to edit files in order to realize a translation. Fortunately I'm too a software developer, so I was able to modify the Russian DFTools to translate Daggerfall's files, and to develop my own translation tool for Warband files and now Bannerlord files. To do this I had to use C++ Builder and Visual Studio, so I know how to use an IDE to generate software. The Unity Editor seems to be just another development environment, but it look strange to me because it plays with graphics that is a software domain with which I'm not used. Anyway, there's no reason for me not to be able to use it.

Do what you can. I just wanted to say that things are ready on my PC to be able to generate the French localisation mod starting from the translated files that are into the PFD. Just have to wait for the next tutorials in order to pursue the process up to the end. And once again, if you feel that I could help you in any way to realize or test the localisation tutorials, don't hesitate to contact me.

Take good care of yourself. :)
In charge of Project French Daggerfall and DaggerfallSetup, dev. of DFTools in English.
French translator for many Warband mods and Bannerlord.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by Interkarma »

Thank you! No, I didn't take your words badly. :) I only have myself to blame for not having better tutorials available for you by now.

As the new tutorial series rolls out, please don't hesitate to let me know if anything needs more explanation. If things goes to plan, I'll have this tutorial series completed by end of February. Keep an eye on dfworkshop.net over next few weeks.

All the best. :)

User avatar
Daneel53
Posts: 103
Joined: Wed Jul 15, 2020 11:15 pm
Contact:

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by Daneel53 »

Now that you're back on the deck, I'll keep an eye wide open on this forum ! ;)
In charge of Project French Daggerfall and DaggerfallSetup, dev. of DFTools in English.
French translator for many Warband mods and Bannerlord.

User avatar
Ultima_Thule
Posts: 1
Joined: Wed Feb 03, 2021 5:32 pm

Re: [Discussion] [DFUnity] Translation of Daggerfall

Post by Ultima_Thule »

Daneel53 wrote: Sat Jan 30, 2021 4:01 pm This is where we are today. I perfectly understand that Interkarma has more important things to do and that the localisation will have to wait another set of months. It's just that we don't know when all this could be done and, besides from this, it would be nice if people used with the Unity Editor could tell to those like me who followed Tutorial 1 how it would be possible to come back to a working build without the LocaleText-NotFound errors.
Hi Daneel53! I also ran into this error. But I think I found a solution. Perhaps it will help you.

This is where you really need to learn Unity. It's worth starting by looking at how the DaggerfallUnityStartup scene works. Among the objects that are there, we are interested in the TextManager.

If I understand correctly, this object is designed to output text from localization tables. Having chosen this object, carefully study its construction.

This object contains a Text Manager script with two public blocks:

Live String Tables - three public fields that contain localization tables that are used during the game.
Copy String Tables - three public fields, which contain localization tables, in which you need to write data from the tables built into DFU

So, in the lesson that Interkarma gave, we created empty tables. This concludes the lesson. Okay, let's fill our tables with data from the tables already included in the game (Internal_Strings and Internal_RSC). I will take Russian as an example.
In the screenshot, you can see the order of actions. In the Copy String Tables block, enter the names of your tables, and then click Copy All. Great, my Russian_Strings table is filled with data from the Internal_Strings table. Russian_RSC is filled with data from the Internal_RSC table (if TEXT.RSC is present, the data will be transferred from this file).
3.png
3.png (155.1 KiB) Viewed 5241 times
Now you need to pay attention to the next detail. If we start the DaggerfallUnityStartup scene and click Play in it, then another scene will start - DaggerfallUnityGame.
This scene also has a TextManager object. So, we can already test the performance of our table in action. Launch DaggerfallUnityStartup, press Play, the DaggerfallUnityGame scene starts. In it, select the TextManager object and enter the names of our tables in the Live String Tables block (in my case, these are Russian_Strings and Russian_RSC).
There are no more "LocaleText-NotFound" errors, TextManager correctly translates the text from our table. You can even experiment by changing some text. For example, I chose the description for the Strength parameter. The screenshot shows that the changes are being made correctly.

At this stage, you can already work with tables.
5.png
5.png (361.98 KiB) Viewed 5241 times
Then I got stuck. :? I have created fonts that support Cyrillic, but do not understand how to apply them in the game. If I understand correctly, you need to write a script that:
1) From the start, DaggerfallUnityGame will replace the Live String Tables block, automatically adding Russian tables there
2) Get the necessary fonts for the correct display of text that differs from the Latin alphabet

Hope I could help you with something! We will wait for further instructions from Interkarma!

Post Reply