
            Quake Army Knife

                 QuArK

          Technical Information


This document holds technical details that should be useful to people
trying to customize QuArK.

See QUARKX.DOC for detailled information about Python.


******* General information about the ".qrk" text file format ********

  "//"   means "Comments"
  "{"    means "start of an object"
  "}"    means "end of an object"

Spaces, indentation, and end-of-lines are ignored, they are just
 here to make it more clear.

Think to objects as "groups". Each object can have any number
 of Specific/Args and sub-objects.

The syntax for a sub-object is :
 <sub-object-name-and-type> = { <sub-object-data> }

The syntax for a Specific/Arg pair is :
 <Specific-name> = <Arg-data>
where <Arg-data> is any sequence of text and/or binary data.
Each text sequence must be put within quotes   ( "example" )
Each binary data begins with a "$" followed by hexadecimal characters.
Alternatively, an Arg can be a sequence of real-valued numbers;
 in this case, enclose the numbers within single-quotes ( ' ) instead of
 double-quotes ( " ).

Note: this format applies to ".qrk", ".qkm" and ".qkl" files only,
 and files with this extension may also be saved in a compact form.
 The first 8 characters of the file must be "QQRKSRC1" for a text-
 formatted .qrk or .qkm file. In this release of QuArK, most files
 are in text format instead of compact format to let you more
 easily see how this all works. With QuArK, to switch between text
 and compact formats, change the file type in the "Save" dialog box.
 The compact file format is not only smaller, but it also lets QuArK
 do "delayed loading" : only the parts of the file that you actually
 need are loaded when required. This is how QuArK can handle very
 large files (e.g. .pak files) without having first to load them
 completely.


******* List of internal message codes ********

These codes are used when building Toolbars and Menus.
They can also be used in Python code calling macros, although some
of these macros - mostly the ones related to the map editor - are no
longer relevant.

 TEX    choose texture
 SUBP   polyhedron subtraction
 INTR   intersect polyhedrons
 MAKR   make room in polyhedrons
 FGRD   force to grid                (*)
 FGRY   force everything to grid     (*)
 PASF   paste face and cut in two    (*)

 3DED   open the 3D editor
 3DCL   close the 3D editor
 3DFR   free the 3D editor (lets Quake access the 3DFX card)
 QTEX   prepare used textures
 QTXD   prepare used textures and inform the user
 WRMP   write .map file in tmpQuArK

 TNMF   Toolbox New Main Folder
 TNSF   Toolbox New Sub-Folder
 TDF    Toolbox Delete Folder
 TREL   Toolbox Reload Folders

 FNEW   file/new
 FOPN   file/open 
 FSAV   file/save
 FSAN   file/save in QuArK Explorer
 FSAA   file/save as
 FSAL   file/save all
 UNDO   edit/undo
 REDO   edit/redo
 MURD   multiple undo/redo box
 CUT    edit/cut
 COPY   edit/copy
 PAST   edit/paste
 PASG   paste into group (*)
 DEL    edit/delete
 PSTO   edit/paste special (*)
 OPEN   edit/open selection
 EXTE   edit/external editor
 PROP   edit/properties
 CFGD   configuration dialog
 ADDO   Display/Edit Registered Add-ons
 OUTP   Output Directories...
 EXIT   close window
 FREE   free as much memory as possible (not including the 3D editor, see 3DFR)
 GAMx   switches to game x (1, 2 or 3 - see Defaults.qrk)

 VPAL   view palette (for images and textures)
 RSZT   resize texture
 OPNW   open a new copy of the selected object

 PAKX   extract pak folder to disk

(commands have not been extensively tested yet, please report bugs)

(*) not implemented yet

