Difference between revisions of "3D Packs"

From Wurmpedia
Jump to navigation Jump to search
(Imported from google cached page)
 
m (Added links)
Line 5: Line 5:
 
==Using Pack Files==
 
==Using Pack Files==
  
Pack files can be opened and edited with any ZIP archive manager like WinZip, WinRAR, 7Zip, TugZIP, and even the Windows XP compressed folder extension.
+
Pack files can be opened and edited with any ZIP archive manager like [http://www.winzip.com/ WinZip], [http://www.rarlab.com/ WinRAR], [http://www.7-zip.org/ 7Zip], [http://www.tugzip.com/ TUGZip] and even the Windows XP compressed folder extension.
  
 
==Pack Layout==
 
==Pack Layout==

Revision as of 18:29, 15 May 2006

Overview

Models, textures and sounds are all stored in pack files, held under the wurm/packs directory. These are the material that are automatically downloaded to make Wurm look nice when you start the client. The pack file format is a JAR file which is basically a ZIP file with some extra meta-data.

Using Pack Files

Pack files can be opened and edited with any ZIP archive manager like WinZip, WinRAR, 7Zip, TUGZip and even the Windows XP compressed folder extension.

Pack Layout

For a JAR/ZIP file to become a pack file, it needs the following mandatory descriptors in the root directory of the archive. If any of these files are not present in the correct location, the pack won't work and might even crash the client.

Although you could put all files into the root directory of a pack, it is recommended that you create different folders for at least textures, sounds, models and misc resources to keep your packs organized.

packs.txt

This file contains the "pack descriptor" which specifies an (currently unused) type, human-readable name and source URL for the pack. For example, the pack descriptor for the base pack looks like this:

type = basepack
description = Official base pack
url = http://www.wurmonline.com/packs/base.jar

mappings.txt

This is the "registry" of each pack where the resource names used by the client are mapped to actual files in the pack. Every resource (texture, model, sound, ...) is given a unique identifier by the game and the mappings tell the client what file to load for each identifier.

For example, "img.texture.house.wall.solid" is the unique identifier for your average solid wooden house wall; as of this writing, it maps to the file "texture/house/wood.png" in the base pack by the following mapping:

img.texture.house.wall.solid = texture/house/wood.png

Any white space before or after the identifier or file name is ignored and all paths have to be relative to the root of the pack file.

If a unique identifier is not found, the client steps back to the next broader identifier, i.e. "img.texture.house.wall.solid" becomes "img.texture.house.wall", then "img.texture.house", "img.texture" and finally "img". This stepping-back continues as long as the client has either found a resource or reached the top of this "resource chain" -- in that case it will use either a dummy texture (red X on white square) or the famous question mark bag.

Testing Custom Packs

To test custom packs made by you or others, just rename them so they start with "dev_" and move them into the wurm/packs directory. The client will automatically make use of the new packs when it is started the next time. This feature may not be available in future releases of the client.