Blog Archives

Translating Rune

Have you ever wanted to play Rune in your own language? Well you can, if you are willing to do a little work first.

Rune use the same system as most other Unreal 1 engine games for loading text into the game. Text are stored in normal text files which have an extension based on the language (locale) you are using.

To translate the game, all you need to do is take all the English .int files and translate them, save the files with the correct extension, and then change the language variable in Rune.ini to that of your new language.

1. Extract English text

You already have some of the .int files in the system folder, but not all. To get the English text from the maps you need to use RuneEd to extract them.

Start RuneEd and open the log window (Top Menu->Window->Log), once it is open you can use the command “dumpint” to extract text from the maps. Write the command in the log window like this:

dumpint ragnarvillage.run

That will place a ragnarvillage.int text file in the system folder with all the text from that particular map.

Do this for all maps to get all the English text.

2. Translate

After you have all the English int files you can start translating them. The int files will look something like this:

[GameInfo]
SwitchLevelMessage=Switching Levels
DefaultPlayerName=Player
LeftMessage=" left the game."

Of course you should only translate the things after the “=”. Not the first part, and not the thing between [ and ] either.

When you are done you should save the text files with the correct file extension for you language, a two-letter code followed by a “t”. You can look at this list for the two-letter code for your language:

http://www.science.co.il/language/Codes.asp

So if I made a translation for Japanese, the two-letter code is “jp”, and if I add a “t” the extension for the japanese translation will be “.jpt”. RuneI.jpt, RMenu.jpt, ragnarvillage.jpt and so on.

Polish = pl + t -> .plt
German = de + t -> .det
French = fr + t -> .frt

3. Change the language

To change which language Rune use you open Rune.ini and look for the following line:

[Engine.Engine]
'GameRenderDevice=OpenGLDrv.OpenGLRenderDevice
GameRenderDevice=D3DDrv.D3DRenderDevice
'GameRenderDevice=GlideDrv.GlideRenderDevice
'GameRenderDevice=SoftDrv.SoftwareRenderDevice
AudioDevice=Galaxy.GalaxyAudioSubsystem
NetworkDevice=IpDrv.TcpNetDriver
DemoRecordingDevice=Engine.DemoRecDriver
Console=RMenu.RuneConsole
Language=int

Change it from “int” to your new language code and you are all set. Now the game should load your own texts instead of the old ones.

4. Record new audio (?)

That was all for the translation of the text. Of course it is also possible to make translations of the audio. I have not tried this myself but the audio files that need to translated are these:

CreaturesSnd.uax
VoiceOverSnd.uax

You might have to extract the original .wav files to get an idea of what the sounds should sound like. Then just read the text you have created and record. When you are done recording just import the audio with RuneEd and name the files with language code in the extension:

CreaturesSnd.jpt_uax
VoiceOverSnd.jpt_uax

Yeah, so that is it. You might think it is too much work to translate all of Rune but there really is not much text in the maps, and most of the other int files in the system folder don’t have much text either. I will try to get all the English int files and upload them somewhere and the place a link here later so they don’t need to be extracted.

Edit: Download all English int files HERE.

Note: Rune is already fully translated into English, German, French, Italian, Spanish and Russian. You can get any of these languages when you buy the steam version of Rune.

Advertisements

Changing Font (text) Of Rune

This does not work for versions 1.00-1.02. There are ways to change the fonts there too, I will write more about that later.

To change the fonts of Rune you need to make a new FontInfo class and a new RuneRootWindow class, and then tell Rune to use these new classes. Here is how to do it:

1. New package setup

Make a new folder in your game System folder. Choose a suitable name for your package, I named my folder “FontChange”. Inside this folder make a new folder with the name “Classes”. Inside this folder make two new files, “FontChangeFontInfo.uc” and “FontChangeRootWindow”.

You should now have these two files:

C:\Rune\FontChange\Classes\FontChangeFontInfo.uc
C:\Rune\FontChange\Classes\FontChangeRootWindow.uc

Now we need to add some code to these new classes. Open up FontChangeFontInfo.uc in a text editor and add:

//=========================
// FontChangeFontInfo.uc
//=========================
Class FontChangeFontInfo extends FontInfo;

// Debugging, Scoreboard ping
static function font GetStaticSmallFont()
{
	//return Font'SmallFont';
	return Font(DynamicLoadObject("NewFonts.Font16", class'Font'));
}

// Scoreboard, Pause message
static function font GetStaticMedFont()
{
	//return Font'MedFont';
	return Font(DynamicLoadObject("NewFonts.Font16", class'Font'));
}

// Chat messages
static function font GetStaticBigFont()
{
	//return Font'Haettenschweiler16';
	return Font(DynamicLoadObject("NewFonts.Font26", class'Font'));
}

// Progress messages
static function font GetStaticLargeFont()
{
	return Font'RuneLarge';
	//return Font(DynamicLoadObject("NewFonts.Font24", class'Font'));
}

// Not used
static function font GetStaticRuneMedFont()
{
	return Font'RuneMed';
	//return Font(DynamicLoadObject("NewFonts.Font30", class'Font'));
}

// Not used
static function font GetStaticCreditsFont()
{
	return Font'RuneCred';
	//return Font(DynamicLoadObject("NewFonts.Font30", class'Font'));
}

// Not used
static function font GetStaticButtonFont()
{
	return Font'RuneButton';
	//return Font(DynamicLoadObject("NewFonts.Font30", class'Font'));
}

As you can see we are just telling the game to load our own fonts instead of the default ones. Some of the fonts defined there are not used for anything.

Then open FontChangeRootWindow.uc and add:

//=========================
// FontChangeRootWindow.uc
//=========================
Class FontChangeRootWindow extends RuneRootWindow;

// These are for the GUI menus
function SetupFonts()
{
    // Window text, console text, game version text
    Fonts[F_Normal] = 	  	Font(DynamicLoadObject("NewFonts.Font14", class'Font'));

    // Window titles, selected tabs
    Fonts[F_Bold] = 	  	Font(DynamicLoadObject("NewFonts.Font14", class'Font'));

    // Big menu buttons
    Fonts[F_RuneButton] = 	Font(DynamicLoadObject("NewFonts.Font30", class'Font'));

    // Not used
    Fonts[F_Large] = 	  	Font(DynamicLoadObject("NewFonts.Font10", class'Font'));
    Fonts[F_LargeBold] =  	Font(DynamicLoadObject("NewFonts.Font10", class'Font'));
    Fonts[F_RuneMedium] = 	Font(DynamicLoadObject("NewFonts.Font10", class'Font'));
    Fonts[F_RuneBig] = 	  	Font(DynamicLoadObject("NewFonts.Font10", class'Font'));
    Fonts[F_RuneLarge] =  	Font(DynamicLoadObject("NewFonts.Font10", class'Font'));
}

Save both files.

2. Compiling the code

First open Rune.ini and search find the list with all the “EditPackages=”. At the end of this list, after all other EditPackages add:

EditPackages=FontChange

Save the file and exit.

Next open up a command prompt (Start Menu–>Run–>cmd or something) and navigate to the Rune system folder. Then write this in the command prompt window:

ucc make

This should compile the code from the two new classes into a package called FontChange.u. Close the command prompt.

3. Importing the new font

Now you need to find a font you want to use in the game, for this example I am using some font I downloaded for free from the internet called “BadaBoom BB”. You can use any true type font really, just search with google and find something you like.

If you use a font from the internet you must install it in Windows before you import it to Rune! Go to the control panel or something and and find the place where you install fonts.

After you got your font create a text with the following content:

new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font8 FontName="BadaBoom BB" Height=8 AntiAlias=1 CharactersPerPage=64
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font10 FontName="BadaBoom BB" Height=10 AntiAlias=1 CharactersPerPage=64
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font12 FontName="BadaBoom BB" Height=12 AntiAlias=1 CharactersPerPage=64
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font14 FontName="BadaBoom BB" Height=14 AntiAlias=1 CharactersPerPage=64
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font16 FontName="BadaBoom BB" Height=16 AntiAlias=1 CharactersPerPage=64
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font18 FontName="BadaBoom BB" Height=18 AntiAlias=1 CharactersPerPage=16
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font20 FontName="BadaBoom BB" Height=20 AntiAlias=1 CharactersPerPage=16
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font24 FontName="BadaBoom BB" Height=24 AntiAlias=1 CharactersPerPage=16
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font26 FontName="BadaBoom BB" Height=26 AntiAlias=1 CharactersPerPage=16
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font30 FontName="BadaBoom BB" Height=30 AntiAlias=1 CharactersPerPage=16
new TrueTypeFontFactory PACKAGE="NewFonts" Name=Font36 FontName="BadaBoom BB" Height=36 AntiAlias=1 CharactersPerPage=8
OBJ SAVEPACKAGE PACKAGE="NewFonts" FILE="..\Textures\NewFonts.utx"

Replace BadaBoom BB with the name of your own font. Save the file as “import.txt” in your Rune system folder.

Open up the map editor RuneEd, then from the top menu open the log window (Top Menu->Window->Log). You can write commands in this window, and from here we will import the new fonts with the text file we just created. In the log window write this command:

exec import.txt

Now you will see many messages, and when you see Moving ‘..\Textures\Save.tmp’ to ‘..\Textures\NewFonts.utx’ you can close RuneEd.

You have now created the texture file containing the new font.

4. Changing the ini files

Now you have all the files you need, all that is left to do is to tell Rune to use these new packages and classes.

Open Rune.ini and add at the bottom:

[RuneI.RuneScoreboard]
FontInfoClass=FontChange.FontChangeFontInfo

[RMenu.RuneConsole]
RootWindow=FontChange.FontChangeRootWindow
MouseScale=0.400000
ShowDesktop=False
bShowConsole=False
MenuTranslucency=1.000000
UWindowKey=IK_None

Open User.ini and add at the bottom:

[RuneI.RuneHUD]
FontInfoClass=FontChange.FontChangeFontInfo

That is all. Save both ini files and start up the game. You should now see the new fonts wherever you enabled it.

The new font and the old one in comparison: