Home Gothic Gothic II Gothic 3 Downloads Forums
World of Gothic
 

   
official Release Date for Gothic 3: 2006
World of Gothic
World of Gothic
 - Home
 - News Archive
 - Poll Archive
 - Forums
 - Image Hosting
 - Gothic Shop
 - Gothic Fanart
 - Official Site (ger.)
 - Official Site (eng.)
 - To Gothic Zone
 - To Gothic II Zone
 - To Gothic 3 Zone
 - Gothic II Database

 
Contents:
To the index

Nur ein Anker How do I modify Gothic?

Most of the Gothic data are stored in VDF-files in the directory /data/ . Exceptions are the script-files and (due to technical reasons) videos and music data.

The actual data-directory of Gothic is /_work/data/ (from now on referred to as [GDATA]); do not confuse it with /data/, in which the VDF-files are stored. VDF-files contain the complete directory structure in "[GDATA]/" ... therefore they are virtual likenesses of this directory (tree).

The program \VDFS-Tool\GothicVDFS.exe can be used to display or to extract the contents of VDF-files. Before you can change those data files, which are stored inside VDF-files, you need to extract them first.

It is therefore possible to extract the contents of a VDF-file into "[GDATA]/" and then delete that VDF-file. Gothic will not be able to find these files in the VDF-System (VDFS) now, but it will search in corresponding directories on the hard disk, only needing a bit more time.

Almost every data-format of Gothic is present in a compiled form. The following sections deal with individual data-formats in more detail. At this point it needs to be mentioned only that compiled data is stored in each case in the appropriate COMPILE directory.

Warning: In SYSTEM-directory there is also a file named paths.d, which specifies some particularly important directories. This file must not be changed, otherwise Gothic may not be guaranteed to work anymore.

Nur ein AnkerTextures

Directories for textures:

  • general: [GDATA]/textures
  • compiled textures (*.TEX): [GDATA]/textures/_compiled
The textures of Gothic are stored in the TEX format. This format can be produced by Gothic automatically. The TGA format serves as output format. Gothic searches for TGAs throughout the subdirectories. Identical texture names should be thus avoided, even if the textures are in different directories.

Nur ein AnkerConverting textures

Gothic will automatically recognize and convert new textures in TGA-format. The converted textures in TEX-format are placed in COMPILED-directory. When you change existing textures, you must use GothicStarter.exe (Advanced-Options: convert textures) for converting them.

Nur ein AnkerSounds

Directories for sounds:

  • general: [GDATA]/sounds
Sounds are treated in the same way as textures: Gothic searches for them throughout all subdirectories. Identical filenames should also be avoided here. The sounds must be in WAV-format for direct use. Therefore no converting takes place.

Nur ein AnkerWorlds/Levels

Directories for levels:

  • general: [GDATA]/worlds
Levels are saved as ZEN-files. Here is a short overview for building such a ZEN-file:

  1. Load a levelmesh (3DS-format) into Spacer
  2. For texturing, compile in Editor-Mode (pay attention to Indoor/Outdoor!)
    • do texturing (set textures of objects)
  3. For object-building (Objektieren), compile without Editor-Mode (pay attention to Indoor/Outdoor!)
    • set default zones (DefaultFogZone and DefaultMusicZone)
    • insert (physical) objects: trees, items (no NPCs!)
    • illuminate and dub: (insert) light- and sound-objects
    • build puzzles
    • ...
  4. Compile light
  5. Save level as ZEN-file
Further informations for level-editing are in following docs:

  • (Tutorial: Outdoor-Level)?

Nur ein AnkerScripts

Directories for scripts:

  • general: [GDATA]/scripts
  • compiled (*.DAT): [GDATA]/scripts/_compiled
  • Content (*.D, *.SRC): [GDATA]/scripts/content
  • System (*.D, *.SRC): [GDATA]/scripts/system
Content-scripts are all those scripts, which have something to do with content of the game: NPCs, items, quests, AI. System-scripts describe menus, effects etc.

In our scripting system there are three different kinds of files:

  • D-scripts (ending in ".d") are the actual scripts, which will be compiled by Gothic-parser. They are written in a language which (remotely) looks like C. There are conditional IF-sentences, logical expressions, variables and types, and of course functions. Additionally, a (quite simple) concept of classes and instances is implemented. For detailed informations about scripting language please see the corresponding document.
  • SRC-lists (ending in ".src") are simple lists of D-scripts and (other) SRC-lists and can perhaps be compared to INCLUDE-blocks: the listed files (wildcards are allowed) will be compiled with Parser into a DAT-file.
  • DAT-files (ending in ".dat") are compiled versions of SRC-lists.
Nur ein AnkerCompiling and testing scripts
To compile changed scripts into an up-to-date DAT-file, you may use parameter -zreparse when starting Gothic. GothicStarter.exe can also do that (Advanced-Options: reparse all scripts).

Then, all scripts in scripts-directory will be parsed anew and made into up-to-date DAT-files.

You can find more about scripts and the way they work in the following documents:

Nur ein AnkerHow does Gothic find my files?

The procedure is actually very simple:

  • Gothic checks, whether the requested file can be found in one of VDF-files
  • if the file is found in exactly one VDF-file, then this single instance will be used
  • if the file is found in more than one VDF-file, then the instance from the most recent VDF-file will be used (patches are made possible this way)
  • if the file is not found in any VDF-file, then Gothic seeks it in the corresponding directory on the hard disk
  • if this also fails, then an error is reported
This naturally leads to a problem:
A file, which already exists in a VDF-file, will never be read from the hard disk. This naturally makes testing of changed files (textures, for example) harder.

But let's go step by step:

  1. New files, as for example a new level or the textures, sounds etc. that new level references, will not be found in any VDF-file, therefore Gothic will seek them on the hard disk. Wonderful!
  2. Files, changed by you, which also exist in the official VDFs (of the original game), will be taken from VDFs and the version on the hard disk will be ignored. Possible solutions of this problem:
    1. Always make your own VDF (the GothicMOD-VDF, see next chapter) and test with it.
    2. Use the new option vdfs:physicalfirst . There is an option in GothicStarter for this (physicalfirst). With it you can force Gothic to look for files on the hard disk first.
    3. Work with unpacked VDFs: unpack the individual files from a VDF-file into "[GDATA]/" and delete (or rename) VDF-file.
This was a short description of all things that can be created or changed in a MOD. Before you begin making your own MOD, please read also the detailed documentation for scripting language, for ZenGin and the tutorials.

Nur ein AnkerHow do I create a GothicMOD?

Nur ein AnkerContents of a GothicMOD

This section will explain, how to assemble changed data into a MOD, that can be passed to others. So I talk less about the individual data, but more about how can be data now packed into a GothicMOD.

A GothicMOD usually consists of two files:

./system/modname.ini
./data/modvdf/modname.mod

  • GothicMOD-INI
To each GothicMOD belongs a file modname.ini, which contains various filenames and settings. These INI-files (of GothicMODs) are expected to reside in SYSTEM-directory. You can find a precise description of all entries in an INI-file in document (GothicMOD-INI)?
  • GothicMOD-VDF
The actual data of a MOD (sounds, textures, levels, script files) are packed in a VDF-file. But contrary to the other VDF-files, accompanying Gothic, this file does not have ending .VDF, but the ending .MOD and is saved in a different directory (/data/modvdf/). Every MOD should consist only of one such GothicMOD-VDF.
For creating a GothicMOD-VDF you need the program \VDFS-Tool\GothicVDFS.exe (GothicVDFS)?

With this program, you must pack into a VDF-file (.mod) only all changed or new data that belongs to your MOD. For this, you need only compiled data, for example, regarding scripts, only the DAT-files, not the individual scripts (.d)!

  • In the section "Exceptions" you'll find instructions for using your own music and videos, which should not be packed into a GothicMOD-VDF.

Nur ein AnkerExceptions

Some files of Gothic do not reside in the VDF-files. (Compiled) script files (DAT-files) which belong to your MOD, should by all means be stored in your GothicMOD-VDF; but videos and music files for DirectMusic (DirectX) cannot be stored in a VDF-file, due to technical reasons. If you have prepared music and videos for including in your MOD, you need to include them into MOD-package as individual files:

Exemplary content of modname.exe (for example a ZIP- or RAR-EXE):
./system/modname.ini
./data/modvdf/modname.mod
./_work/data/music/modname/file1.sgt
./_work/data/music/modname/file2.dls
./_work/data/videos/modname/video1.bik
./_work/data/videos/modname/video2.bik

Once more: All files for a MOD belong in the GothicMOD-VDF with name modname.mod. Exceptions are only music files and videos.

Nur ein AnkerCreating GothicMOD-EXE

betrifft nur G1:
A GothicMOD is ideally a self-extracting archive:

Content of modname.exe (a ZIP- or RAR-EXE):
./system/modname.ini
./data/modvdf/modname.mod
This self-extracting EXE-file should contain only relative paths (relative to the Gothic-directory).

Nur ein AnkerIt goes as follows:

Create a small directory structure, which is going to contain ONLY the final files for your MOD (that is: one INI-file, one MOD-file and optionally some video and music files).

An example follows:
c:/mymod/system/mymod.ini
c:/mymod/data/modvdf/mymod.mod
Now you need to create a self-extracting archive. (Warning, the standard way with WinZIP/WinRAR does not produce the expected result!)

Nur ein AnkerWhen using WinZIP:

  1. Start WinZIP
  2. Create a new archive with the filename modname.zip
  3. Make sure that the option "Store full path info" is not activated.
  4. Navigate into (!) the just created directory (for example c:/mymod/)
  5. Mark the subdirectories system/ and data/ (and of course _work/ , if you stored videos and music there) and hit the ADD-Button
  6. The GothicMOD-VDF and the GothicMOD-INI should now appear in the WinZIP window. Now look at the column "path" and make sure the paths there are correct (data\modfvdf\ and system\)
  7. With the menu option "ACTIONS/MAKE .EXE FILE" make a self-extracting archive.
  8. Enter as "Default 'Unzip To' folder" the following: "./" (without quotes)
  9. It is finished! You should test the resulting EXE-file with the name modname.exe. See also the section "Installing a GothicMOD" here.
Nur ein AnkerWhen using WinRAR:

  1. Start WinRAR
  2. Navigate with WinRAR into the just created directory (c:/mymod/)
  3. Mark the subdirectories system/ and data/
  4. Hit the ADD-Button in the toolbar
  5. Make sure that the option "File paths" on the dialog page "FILES" is set to "Store relative paths".
  6. Give the archive the name modname.rar and choose the option "Create SFX archive" (modname.rar will become modname.exe)
  7. Confirm with OK to make the EXE-file. Do not forget to test :-) See also the section "Installing a GothicMOD"

Nur ein AnkerInstalling a GothicMOD

With a correctly made GothicMOD-EXE, as described above, it is now very easy to install the MOD.

  1. Copy the GothicMOD-EXE in the main directory of Gothic
  2. Run the EXE-file
This will copy all files from the archive into their proper directories.

betrifft nur G2:
see (NSIS)?


Nur ein AnkerPlaying a GothicMOD

After correctly installing a GothicMOD, you can use the program GothicStarter.exe to run it. This program shows all existing (installed) MODs in a list and also offers additional functions. When you use GOTHIC-MODs, you should use only this program to start Gothic. For it I also recommend the GothicStarter documentation.


End.
So long, and thanks for all the fish

Translated to English from a German text based on the G1MDK documentation (Copyright © [Piranha Bytes])
IN NO EVENT SHALL PIRANHA BYTES BE LIABLE FOR ANY FAULT IN THE TRANSLATION OF THIS DOCUMENT INCLUDING, BUT NOT LIMITED TO, ACCURACY AND COMPLETENESS.


 
- Our offers
 
Legal Notice | Link Us
World of Gothic and all Content is © by World of Gothic Team || Gothic, Gothic II ans Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD, all rights reserved worldwide
All materials contained on this site are protected by copyright law and may not be reproduced, distributed, transmitted, displayed, published or broadcast without the prior written permission of the WoG staff.