Difference between revisions of "3D Packs"

From Wurmpedia
Jump to navigation Jump to search
m (infobox/clarification)
Line 35: Line 35:
 
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.
 
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.
  
[[Category:Technical Details]]
+
[[Category:Technical Details]][[Category:Babel/3]]

Revision as of 18:02, 9 June 2007

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.

Information icon.png
Please note that using modified pack files is a bannable offence.
The information on this page is provided for viewing/educational purposes only.

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/Windows Vista 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.