Blog Archives

Server Query Tool

Here is a little tool I created to send custom queries to other servers from inside Rune. You can access Server Query Tool from the Mods menu in the game. Only works with versions 1.07 and above.

DOWNLOAD:
ServerQueryTool.zip | ServerQueryToolSrc.zip

With this tool you can get all kind of information from a server:

– which players are on the server
– which mutators the server is using
– what is name of the current map
– information about players on the server
– much, much more…

Read more about which queries you can use here:

http://wiki.beyondunreal.com/Legacy:UT_Server_Query

Some interesting ones are:

\level_property\
\game_property\
\player_property\

As an example, sending \level_property\computername would return the computer name of the server.

\level_property\hour would return the current hour of the server, this way you could get an idea of where the server is located, in which time zone.

\player_property\location would get the location of every player on the server.

As you can see, you can have a lot of fun with this. Just look through the right classes to see which variables you can get. And if you find some interesting queries please leave a comment.

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: