Search/Browse Tutorials Click Here For Tutorial Search Instructions
Search For:

Including Imported Textures With Maps
Author: Twofer
Last Updated: February 13, 2002 at 08:27:24 AM

You need to know:
- The basics of Rune ED (or Unreal ED 1)
- Some basic knowledge of graphic formats (paletted)

----- The MyLevel package -----

The MyLevel package in Rune and Unreal based games is just like any other package, except that it gets included into the map files. It's an easy way to include textures along with a map, so that people don't have to worry about getting texture packages in the right folders and it also makes it easier to run maps on a server. (with and without downloads enabled)

Now, it is not always necessary to use the MyLevel package. If your map does not have any custom textures, or custom scripts, you do not need to worry about it.

Suppose that you are a mapper and you have created six maps and custom textures for them. If some of the textures are being shared, it would be better to have a separate package. (that way the textures are not taking up file size in each map) But if you are only releasing one map, it's better to have the textures included with the map, so it's one complete deal.

Also, if you downloaded some custom texture packs, and you only want to use a few textures out of the pack, you can export the textures, then import them into your MyLevel so that there is no wasted file size. (considering that textures packages can be quite large)

----- Importing a texture into Rune ED -----

Step 1: Pull up the "Textures" panel in the Browser on the right. At the bottom there should be an "Import" button.

Step 2: Pick the texture you want. [Example Texture] For this example I used a pic that I made for a signature on the message boards. With a little editing, it was ready for Rune. [Screenshot]

Note: Any textures you want to import need to have a few things.
1. The graphic's dimensions have to be a power of 2. (Example: 16,32,64,96,128,256) For my graphic, I made it 256x128.

2. The graphic must be Indexed Color, and 255 colors. If you want a Masked textures, the last color is what becomes transparent. (you are supposed to manually set the 256'th color)

3. The graphics must be either PCX format or BMP. I always go with PCX.

Step 3: [Screenshot] Pick your options. Since I want to make a wall decal, with my transparent texture I imported this texture and clicked "Masked". The way to get the textures to go with the MyLevel package, is to specify that when you import it. So in the "Package Name" field, input "MyLevel" (capital letters matter, so get it right) Also notice that "Generate Mipmaps" is also checked. This just keeps lower rez versions of the texture for use at long distances. Rune automatically handles this, so just leave it checked, smile and nod.

And that's all it takes to import a texture into the MyLevel package. [Screenshot]

Note: To get anything to stay in the MyLevel package, it has to be used somewhere in the level. If a texture or script class is in the MyLevel package, but isn't in a level, then it will not get saved with the level and will be discarded. If you want to import all the textures or classes you plan to use at once, make a little room off in the corner of your map where you can put an "instance" of each thing you import. If you import a texture, and forget to use it, it does not get saved with the MyLevel package.

If you are working with a regular texture, don't check "Masked" when you import it. Masked and regular textures are imported just the same way.

----- Putting my decal on a wall -----

If you want to make a simple sign, using a texture of a certain size. Just make a 2d sheet, the size of your texture. (256x128 in my case) Use the "Add Special" button and make it a "Regular Brush", "2-Sided" and "Non-Solid". Apply the texture to the 2d sheet, then move it close to the wall. Right click somewhere on the editor's grid, and select "Grid" - "1 unit". Move the 2d sheet 1 unit away from the wall, the set your grid size back to the default of 16 units.

Nice shameless promotion eh? [Screenshot]

----- Including script code in levels -----

It's the same thing when you want to include script code into levels. Just remember, whenever the editor asks what package you want your script to go into, type in "MyLevel". Make sure you DO NOT USE "RuneI", adding code to your RuneI makes it incompatible with everything else. Which is bad.

Once you have added something, go to the "Script" menu at the top of the screen. (along side File and Edit) Select "Compile Changed Scripts" to make the new code part of your MyLevel package, and part of your level.

Then drop in an instance of whatever you made, and it will be included with the map.

----- Exporting textures and reimporting them into MyLevel -----

Say there is a texture package which has the one texture you always wanted, and you want it in your level. What you can do is export the texture as a PCX file, the import it into your MyLevel so that you don't have to worry about all the unused textures.

To export a texture, select it in the Browser and click "Export". Specify a file name if you want to. Then, click "Import" and find that texture. Add it to the "MyLevel" package, just like mentioned above.

Just make sure to get the creator credit, when you write up the Readme.txt for your level.

----- Important things about MyLevel -----

First thing, if something is imported, and isn't used, it gets discarded. If you want to use an imported texture, you have to use it in the level. Same thing for code.

Second, make sure you get "MyLevel" right. Capital letters and spelling count.

Third, whatever you import is getting stored with your level. A 256x256 texture takes up 65k of file space. Your map will instantly become 65k larger. The number of times you use that texture does not effect the size. It's 65k if you used it one time, or one thousand times.

----- Getting stuff OUT of the MyLevel package -----

Say there's a texture you that you imported, but no longer need. To get rid of it, you have to make sure it is not in your level anywhere. Here's my quick and easy way to get rid of textures.

1. Click on any wall. Set it's texture to the one you want to get rid of.

2. Right click on the wall, and pick "Select - Select Matching Texture" or press Shift + T

3. Set the selected wall's texture to a stock texture.

4. Rebuild the map.

Now, the texture is OUT of the map, but it's still in the MyLevel package ONLY in the editor. Once you restart Rune ED or go and "Delete" the texture in the texture browser, the texture will be gone from the editor's MyLevel.

Same thing for code, just make an instance of the class, then right click on it and pick "Select all [Something] Actors". Once they're selected, delete them.

----- "Starter" Level idea -----

When you load a level, it loads all the textures with it. So if you loaded a map, the stuff in the MyLevel package would be loaded, even if you loaded another map in the editor, or started a new one.

That way you could make a "starter" map that has some textures and custom classes. For example, some of my neato Grouped Lights. (check the tutorial list) As long as you place an instance of the class, or texture somewhere in the new level, the class or texture will get saved in the new level's MyLevel package.

I've never really tried this, but the theory is sound. I'm pretty sure it works for textures. Might just be a better idea to import the stuff you need when you need it.

----- Conclusion -----

Good luck with it, and remember it's much easier to download a map, and not have to worry about any texture packages.


[ Click here for printable version ]


Current Comments on this article:

No User comments added.

Post New Thread
This comment system uses the official Forum as its verification. To post a comment, please register on the main Forum using the "Want to register?" link below.

Your UserName:    Want to register?
Your Password:   Forgotten your password?
Copyright ©2001