User Tools

Site Tools


modding:automatic_file_mapping_in_pk3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
modding:automatic_file_mapping_in_pk3 [2017-03-19 20:40] – ↷ Links adapted because of a move operation skyjakemodding:automatic_file_mapping_in_pk3 [2017-03-20 20:21] (current) – ↷ Links adapted because of a move operation skyjake
Line 1: Line 1:
 +====== Automatic file mapping in PK3 ======
 +
 +Doomsday's [[:pk3]] reader supports several "shortcuts" that can be used to simplify the [[fs:virtual directory stucture]] within a PK3. These automatic mappings allow for easy use of Doomsday's folder structure when making addons.
 +
 +
 +===== Automatic relocation by resource class =====
 +
 +
 +Files in the root direction of a PK3 are subject to automatic relocation according to the associated [[modding:resource class]].
 +
 +Files with the following extensions are automatically mapped to //data\<gamecomponent>\auto\//
 +
 +  *  [[:pk3]]/[[:zip]]
 +  *  [[modding:lmp]] (Lump)
 +  *  [[:wad]]
 +  *  [[:deh]] {{:veradd|1.9.0-beta1}}
 +
 +[[:ded]] definitions are automatically mapped to //defs\<gamecomponent>\auto\//
 +
 +**Note**: Automatically relocated root files are mapped to the same (virtual) directory appropriate for that class of resource. For example, given two archives "a.pk3" and "b.pk3" each containing the root file "myded.ded" only the [[:load_order|last loaded]] definition file will be read (the //later// file overrides the earlier one).
 +
 +
 +===== Shortcut folders (1.9.x) =====
 +
 +
 +All files in the following virtual folders of a PK3 (including subfolders) are automatically moved to the correct (virtual) location in the file hierarchy by Doomsday. These shortcuts allow you to greatly simplify the folder structure of your mod/addon. For example instead of the virtual folder //data/jdoom/textures/// you only need a folder named //textures///.
 +
 +  *  flats/
 +  *  fonts/
 +  *  lightmaps/
 +  *  models/ (1.9.7+)
 +  *  music/
 +  *  patches/
 +  *  sfx/ (1.9.7+)
 +  *  textures/
 +
 +
 +===== Manual "Auto" directory mapping =====
 +
 +
 +It is also possible to request the mapping of entire directories manually by adding a special prefix character to the name of a directory in the root of a PK3.
 +
 +
 +
 +^ Prefix^ ^ Virtual Directory |
 +| # (hash)| ⇒| data/[[:game_component|<gamecomponent>]]/auto/ |
 +| @ (at)| ⇒| defs/[[:game_component|<gamecomponent>]]/auto/ |
 +
 +
 +
 +
 +
 +==== Examples ====
 +
 +
 +
 +Layout of //myaddon.pk3// when loaded with the [[:game_component|doom]] game component:
 +
 +^ PK3 Directory^ ^ Virtual Directory |
 +| #CoolStuff/| ⇒| data/[[:game_component|doom]]/auto/CoolStuff/ |
 +| @CoolStuff/| ⇒| defs/[[:game_component|doom]]/auto/CoolStuff/ |
 +
 +
 +
 +
 +
 +===== Examples =====
 +
 +
 +Addon example for a mod for Doom that makes use of the available virtual directory shortcuts to simplify the structure.
 +
 +  *  MyCoolLevel.PK3
 +    *  textures/
 +      *  Bigdoor1.png
 +      *  Brick1.png
 +    *  music/
 +      *  romero.mp3
 +    *  mycoolwad.wad
 +    *  myded.ded
 +
 +
 +===== See also =====
 +
 +  *  [[:auto_folders]]
 +
 +
 +
  
modding/automatic_file_mapping_in_pk3.txt · Last modified: 2017-03-20 20:21 by skyjake