PDA

View Full Version : Organizing & Packing your Custom Resources for Levels



AE-on
04-29-2004, 09:47 AM
I recently played the nice 'remake' of Training, called Level1. Looking at the already quite large number of files (voice, layers, sequences), it occurred to me to test how all these files could better be organized for distribution. A while back Timur mentioned that you could basically pack everything, using the custom map

"Far Cry\Levels\Level1\"

as an example, here are some suggestions:


1. In your "Levels\Level1\" folder don't forget to delete the .bak files. These are backup files for your .cry level, and are NOT needed for distribution. In this example, a waste of more than 5.8 MB unpacked.


2. It may well be a good idea to collect all your custom files in seperate .pak (= ZIP) files, e.g. place all the voice acting .wav files in "Levels\Level1_voices.pak". Here some suggestions for possible naming conventions:

<pre class="ip-ubbcode-code-pre">Level1_sequences.pak (.seq, .sfk)
Level1_layers.pak (.lay)
Level1_voices.pak (.wav)
Level1_textures.pak
Level1_shaders.pak
Level1_scripts.pak
Level1_music.pak
Level1_objects.pak
Level1_sounds.pak (.wav)
Level1_effects.pak</pre>

Note: In your case you will use the name of your map instead of Level1 obviously. E.g. "Levels\mp_mymap" -> "Levels\mp_mymap\mp_mymap_voices.pak".

Note: You could probably also drop the map name as a .pak file prefix -> "Levels\mp_mymap\voices.pak", but that might lead to file name conflicts, at some point.


3. Alternative, place your new custom resources in separate sub-folders, e.g. "Levels\Level1\voices\*.wav". You could then pack those folders recursively, so that "Levels\Level1\Level1.pak" contains "Level1.pak\voices\foo.wav" etc.

Note: For an existing level, you can't simply move resources into a sub-folder. If you do, you will need to update the references in the level via Sandbox. The *relative paths* to resources must always be *preserved*.


4. Personally I would recommend the 3rd alternative:

Pack ALL custom files in your "Levels\Level1\" folder into one .pak file, e.g. named "Levels\Level1\Level1.pak", but do NOT include:

<pre class="ip-ubbcode-code-pre">level.pak
levellm.pak
loadscreen_level1.dds</pre>

This has the following reasons: You *can't* place pak files in pak files. And if the loadscreen dds is placed in the Level1.pak, Far Cry will ignore it, and not use your custom loadscreen. But everything else, i.e. Level1.cry, can conveniently be placed in *one* pack file.

In other words: You are NOT able to simply pack everything in "Levels\Level1\" into one pak file e.g. "\Levels\Level1\Level1.pak", because this results in a load error.


Misc comments:

- Sandbox will not be able to access the files in the .pak files, e.g. the Level1.cry map file, should that be packed in Level1.pak. So for editing purposes you will need to unpack the Level1.pak file.

- Why pack resources?

To keep the folder neat and tidy http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif, to avoid harddisk fragmentation for all the users out there, avoid changing a local resource by accident (change one file, and your local version will differ from the 'server' version, and you will no longer be able to play that map online), and finally avoid the tapering of maps.

Quake3Arena does a checksum on the complete map *pak* files, so no-one can manipulate local Multiplayer maps for cheats. Placing everything in a pak file should thus, help against cheating. (Just a speculation on my part, I don't know how Punkbuster handles custom resources).


Hope that helps.

AEon Check the Far Cry Editing FAQ by Swoop/AEon (http://forums.ubi.com/eve/forums?a=tpc&s=400102&f=273109392&m=292101473)

[This message was edited by AE-on on Thu April 29 2004 at 10:14 AM.]

AE-on
04-29-2004, 09:47 AM
I recently played the nice 'remake' of Training, called Level1. Looking at the already quite large number of files (voice, layers, sequences), it occurred to me to test how all these files could better be organized for distribution. A while back Timur mentioned that you could basically pack everything, using the custom map

"Far Cry\Levels\Level1\"

as an example, here are some suggestions:


1. In your "Levels\Level1\" folder don't forget to delete the .bak files. These are backup files for your .cry level, and are NOT needed for distribution. In this example, a waste of more than 5.8 MB unpacked.


2. It may well be a good idea to collect all your custom files in seperate .pak (= ZIP) files, e.g. place all the voice acting .wav files in "Levels\Level1_voices.pak". Here some suggestions for possible naming conventions:

<pre class="ip-ubbcode-code-pre">Level1_sequences.pak (.seq, .sfk)
Level1_layers.pak (.lay)
Level1_voices.pak (.wav)
Level1_textures.pak
Level1_shaders.pak
Level1_scripts.pak
Level1_music.pak
Level1_objects.pak
Level1_sounds.pak (.wav)
Level1_effects.pak</pre>

Note: In your case you will use the name of your map instead of Level1 obviously. E.g. "Levels\mp_mymap" -&gt; "Levels\mp_mymap\mp_mymap_voices.pak".

Note: You could probably also drop the map name as a .pak file prefix -&gt; "Levels\mp_mymap\voices.pak", but that might lead to file name conflicts, at some point.


3. Alternative, place your new custom resources in separate sub-folders, e.g. "Levels\Level1\voices\*.wav". You could then pack those folders recursively, so that "Levels\Level1\Level1.pak" contains "Level1.pak\voices\foo.wav" etc.

Note: For an existing level, you can't simply move resources into a sub-folder. If you do, you will need to update the references in the level via Sandbox. The *relative paths* to resources must always be *preserved*.


4. Personally I would recommend the 3rd alternative:

Pack ALL custom files in your "Levels\Level1\" folder into one .pak file, e.g. named "Levels\Level1\Level1.pak", but do NOT include:

<pre class="ip-ubbcode-code-pre">level.pak
levellm.pak
loadscreen_level1.dds</pre>

This has the following reasons: You *can't* place pak files in pak files. And if the loadscreen dds is placed in the Level1.pak, Far Cry will ignore it, and not use your custom loadscreen. But everything else, i.e. Level1.cry, can conveniently be placed in *one* pack file.

In other words: You are NOT able to simply pack everything in "Levels\Level1\" into one pak file e.g. "\Levels\Level1\Level1.pak", because this results in a load error.


Misc comments:

- Sandbox will not be able to access the files in the .pak files, e.g. the Level1.cry map file, should that be packed in Level1.pak. So for editing purposes you will need to unpack the Level1.pak file.

- Why pack resources?

To keep the folder neat and tidy http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif, to avoid harddisk fragmentation for all the users out there, avoid changing a local resource by accident (change one file, and your local version will differ from the 'server' version, and you will no longer be able to play that map online), and finally avoid the tapering of maps.

Quake3Arena does a checksum on the complete map *pak* files, so no-one can manipulate local Multiplayer maps for cheats. Placing everything in a pak file should thus, help against cheating. (Just a speculation on my part, I don't know how Punkbuster handles custom resources).


Hope that helps.

AEon Check the Far Cry Editing FAQ by Swoop/AEon (http://forums.ubi.com/eve/forums?a=tpc&s=400102&f=273109392&m=292101473)

[This message was edited by AE-on on Thu April 29 2004 at 10:14 AM.]