Translating the Big Ones - FCOM, MMM and the like

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

In this article we will try to recompile all scripts after translating a plugin into some language - "Mart's Monster Mod for OOO.esp" file from MMM will be used as an example.

Note: 
This tutorial is useful almost only for inter-mod "patches", like 'MMM for OOO' or FCOM plugins, when there is a need to clear duplicated forms created by Construction Set. For most of "standard" plugins there is no need to remove a master nor clean a plugin. However all scripts has to be recompiled and for this one can follow appropriate steps described below (CSE can compile all active scripts).


Tools[edit | edit source]

Here are some tools used in the translation workflow:


So let's begin[edit | edit source]

After all the texts were extracted from the ESP file (in CS main menu: File -> Export), translated into some language, the only thing remains is to import those texts back to the ESP file (again in CS main menu: File -> Import), recompile all scripts, save the ESP in CS, and then get rid of all unnecessary things that might be added by Construction Set. So once again:


steps already done:

  1. we have an ESP file to translate into some language
  2. we loaded this file in CS (or CSE)
  3. all the texts were extracted
  4. all extracted texts were translated


steps to do:

  1. import translated texts back to ESP file
  2. recompile the scripts
  3. save translated plugin
  4. clean the plugin
Note: 
REMEMBER TO MAKE BACKUPS if do not want to lose any data and start every step all over and over again. It is very important to make backups.


Cut ESP Masters out[edit | edit source]

File:TransBig1 01.png
pic. 01: MMM Master Files list

First let's see what Master Files the "Mart's Monster Mod for OOO.esp" file is using: open TES4Edit and look at Masters List for the plugin file in its Header (pic. 01).


As we can see, there is an ESP (a plugin, not a master) applied to our MMM for OOO.esp.


Why it is so important and why we should be concerned? When we translate a plugin and import translated texts to that plugin after loading it in CS, a lot of errors and error messages may appear. ESM as masters are OK for us, but ESP as a master could mean many many unnecessary changes to our translated plugin. The less loaded ESPs, the better. That is why we should get rid of ESP-masters, if we can. Well, sometimes we cannot throw them out from here that easy as we will do in a second: for instance in case of the "Mart's Monster Mod for OOO - Knights.esp" file, which has Knights.esp listed as a master, it is not easy to get rid of this Knights.esp from Masters List, and actually it is not wise to do so. OK, but for now lets back to our current issue - we will try to erase ESP file from Masters.

File:TransBig1 02.png
pic. 02: Clean Masters


In TES4Edit window to the left, right click on the "Mart's Monster Mod for OOO.esp" and choose the Clean Masters function (pic. 02)


After this action, left click on the Header and look again at Masters List for our file - it should appear that "Oscuro's_Oblivion_Overhaul.esp" has disappeared (pic. 03). That's great, because now it will be easier to handle our file in CS.

File:TransBig1 03.png
pic. 03: ESP Master is no more


This operation of removing an ESP file from Masters was safe, because TES4Edit allowed us to do it. However sometimes TES4Edit will not allow to remove the Master: for instance "Mart's Monster Mod for OOO - Knights.esp" file has the Knights.esp as a Master and it should remain as a Master, we cannot change it, TES4Edit's Clean Masters function cannot change it too - for now let's say the connection between them it too strong to remove a Master File.


Close TES4Edit - the program will ask about saving changed files: confirm it. At this stage we must remember to revert this change in the end.


Recompile the scripts[edit | edit source]

File:TransBig1 04.png
pic. 4: CSE Console logs

OK, we are good to go and load our ESP file in CSE (or CS) to import translated texts. Let's do it: open CSE and load the data (our plugin as active file). In the CSE Console window may appear a lot of error messages and warnings (pic. 04).

Note: 
If using CS without CSE then all these messages will be written to the "Editor Warnings.txt" file in \My Documents\ My Games\Oblivion

It is important to know that some of these messages actually mean that CS has made some changes to our file! OK, so which are which:


[1] Editor ID XXX is not unique, previous object YYY is type ZZZ. Editor ID will be set to 'XXXDUPLICATE000'

- this one is not good, because it means that CS has modified Editor ID of an object. We must copy that kind of messages and save to revert them at the end.

[2] Unable to find Leveled Object Form...
[3] Non-parent form XXX exists in both file Y and Z

- these ones are not important for us, we can leave them unhandled.


So for "Mart's Monster Mod for OOO.esp" there can be the following objects to verification later on:

LK0WildernessSwampNormalSpiderDUPLICATE000
LL0NPCWeaponLongsword100AKMREFDUPLICATE000
LL0NPCWeapon0MagicBow100at35dDUPLICATE000
LL0NPCWeapon0MagicBow100at30eDUPLICATE000
LL0NPCWeapon0MagicClaymore100at35dDUPLICATE000
LL0NPCWeapon0MagicClaymore100at30eDUPLICATE000
LL0NPCWeapon0MagicDagger100at35dDUPLICATE000
LL0NPCWeapon0MagicDagger100at30eDUPLICATE000
LL0NPCWeapon0MagicLongsword100at35dDUPLICATE000
LL0NPCWeapon0MagicLongsword100at30eDUPLICATE000
LL0NPCWeapon0MagicMace100at35dDUPLICATE000
LL0NPCWeapon0MagicMace100at30eDUPLICATE000
LL0NPCWeapon0MagicShortsword100at35dDUPLICATE000
LL0NPCWeapon0MagicShortsword100at30DUPLICATE000
LL0NPCWeapon0MagicShortsword100at30eDUPLICATE000
LL0NPCWeapon0MagicWaraxe100at35dDUPLICATE000
LL0NPCWeapon0MagicWaraxe100at30eDUPLICATE000
LL0NPCWeapon0MagicWarhammer100at35DUPLICATE000
LL0NPCWeapon0MagicWarhammer100at35dDUPLICATE000
LL0NPCWeapon0MagicWarhammer100at30eDUPLICATE000
LL0NPCWeapon0MagicWarhammer100at30DUPLICATE000
LL0NPCWeapon0MagicWarhammer100at25DUPLICATE000
LL0NPCWeapon0MagicWarhammer100at20DUPLICATE000
LL0NPCWeapon0MagicWarhammer100at15DUPLICATE000
LL0NPCWeapon0MagicWarhammer100at10DUPLICATE000
BanditBossFemale4DUPLICATE000
BanditBossMale4DUPLICATE000
LK0WildernessSwampNormalSpiderDUPLICATE000
LL1DaedraLvl100OscuroDUPLICATE000
LL1GoblinLvl100OscuroDUPLICATE000
LL0NPCClothingMagicCombat100DUPLICATE000


Note:
We can copy messages to MS Excel, in Data use the Text to Columns and Sort the data to get only the messages that are important.

Now let's import all translated texts to our active file in CS.


We will focus on scripts, as it is the hardest part. Well, to tell the truth, importing books sometimes is hard too, all those formats etc., but that's different story and actually they are no so hard, as could be annoying - just check translated books in the game after importing them to a plugin and verify if there is anything wrong with them.

Note:
If using CSE (highly recommended) and there were no errors while loading the data, it is good to clean the console window after loading the data: right click in the console window and clean it. This way we will have a clean picture of what can possibly go wrong.
File:TransBig1 05.png
pic. 05: Recompile Active Scripts

Now there are two different ways to know about:

  1. if using CSE:
    • open the CSE Script Editor and click on the Recompile Active Scripts button (pic. 05)
    • close the Script Editor
  1. if using CS without CSE:
    • open the Script Editor
    • search for every script name that was marked with an asterisk - these are active scripts
    • open each of active scripts and compile


If using CS without Extender, there is no shortcut. We must open every one of active scripts and compile: open script - compile, next active script - compile, next - compile etc. That is because the Compile All doesn't work - oh, well, it kind of works, only that it will recompile every script, not only active scripts, but every script loaded as a data - and that is a lot of mess, very Bad Thing. We should compile only active scripts of active plugin.


OK, after recompiling the scripts, save the plugin and close the CSE (or CS).

Note:
If there are any errors while recompiling the scripts, they all must handled right away. If you do not know how, please write your worries on the forums or in the discussion tab for this article.


Clean the file[edit | edit source]

We go back to TES4Edit and load all our files. In the upper left corner of the main window there are two small fields for searching: by Form ID, and by Editor ID. We have our list of duplicated objects, so it is time to change them back to original ones.

Note:
The first use of search function in TES4Edit can take a while, we must wait a bit, but after that all the others will go very fast.
File:TransBig1 06.png
pic. 06: Searching for duplicate
File:TransBig1 07.png
pic. 07: Edit duplicated Editor ID

So here we go - look at pic. 06.


TES4Edit has found a duplicated Editor ID, and it is in our translated plugin: click on the EDITOR ID record and edit it and erase the "DUPLICATE000" text - pic. 07. Hit DELETE button, then ENTER and repeat the process until all duplicated objects were handled this way.


Do it only for our active translated plugin and only for the duplicated objects which were changed by CS as we discussed earlier. In some cases the program cannot find a duplicate we entered for searching - if so then that is OK, we go to next duplicate.


Close the TES4Edit and save our translated file.


Additional notes[edit | edit source]

Adding ESP as a master file[edit | edit source]

With Wrye Bash:

Open the program, right click on our translated file and Add Master: in this case, for "Mart's Monster Mod for OOO.esp" we choose "Oscuro's_Oblivion_Overhaul.esp" as a master.


Translating the ESM file[edit | edit source]

With Wrye Bash:

Open the program, right click on the master file to be translated and Copy to ESP. Do the translation job and at the end remember to change ESP back to orignal ESM format.


Final note, but very important:
When translating a plugin, we only translate, we cannot make any other changes in data.