| Add-Ons Updated 12 Mar 2001 | Upper levels: - QuArK Information Base - 3. Advanced customization

3.3. Add-Ons | [ Prev - Up - Next ]

There is old but still up-to-date information about this topic at this page.

Index

- - Elements of an add-on (unfinished) (15 Feb 2001)
- - Add-on standards for new supported games (15 Feb 2001)
- - Using the entity extractor. (12 Mar 2001)

Elements of an add-on (unfinished) | Decker - 15 Feb 2001 | [ Top ]

    QQRKSRC1
    {
      QuArKProtected = "1"
      Description = "add-on name "

      gamename  setup.qctx =
      {
        Game = "gamename "
        HTML = "help\index.html"
        ...misc other things
      }

      ...other .qtx structures
      ...other .qctx structures
    }
A add-on which contain new entities, must have these two .qtx and .qctx structures:
    // Structure which declares what entities are available
    gamename Entities.qtx =
    {
      ToolBox = "New map items..."
      Root = "gamename  Entities.qtxfolder"

      gamename  Entities.qtxfolder =
      {
        ;desc = "short one-line description for this folder "

        foldername .qtxfolder =
        {
          // point-entity
          classname :e =
          {
            ;desc = "short one-line description of the entity "
            origin = "0 0 0" // If the point-entity uses a origin-point, this must be present.
            angle = "360" // If the point-entity uses an angle, this must be present.
            ...other initial spec/arg values
          }

          // brush-entity
          classname :b =
          {
            ;desc = "short one-line description of the entity "
            ;incl = "defpoly" // This instructs QuArK that a default-polygon is to be created too.
            angle = "360" // If the brush-entity uses an angle, this must be present.
            // A brush-entity does not uses an 'origin' specific.
            ...other initial spec/arg values
          }

          ...more entity declarations
        }

        ...more folders containing entities
      }
    }

    // Structure which defines the contents of available entities
    Entity forms.qctx =
    {
      // Every entity declared above, must have a :form too,
      // which defines what the entity will show in QuArK's spec/arg-view.
      classname :form =
      {
        help = "general help description for this entity "
        html = "URL statement " // Activates the default browser, which this link
        bbox = 'x1 y1 z1  x2 y2 z2 ' // If the point-entity has a bounding-box (Only point-entities)

        // Specifics with possible argument-values
        specificname : = // Notice the specific-name is suffixed with a colon ':'. This is important!
        {
          ...specific control statements
        }

        // Example
        targetname: = // Notice the specific-name is suffixed with a colon ':'. This is important!
        {
          typ = "E" // What type of control should be used in the spec/arg-view. E = Editcontrol.
          txt = "&" // What is the leading text. & = use the specificname.
          hint = "The targetname of this entity, so others can trigger it" // Flyover-hint
        }

        ...more specific definitions for this entity
      }

      ...more :form definitions
    }

Add-on standards for new supported games | Decker - 15 Feb 2001 | [ Top ]

If you create a new add-on for a new game that is going to be supported by QuArK, there are some basic standards you must include in the add-on: The Default Room Grouping of Entities Grouping of Textures A Nice Layout in the Add-on Data*.QRK File The Default Room Make sure the add-on contains a default room. You know, the one that appears when the user wants to create a new map. The default room must be made of 4 walls, one floor and one sky/ceiling. It must also have a one spawn-point for the player and a single white light in the center of the room. It is utterly important that you remember to place the player spawn-point correctly. Its bounding-box must not intersect any of the brushes that the room is made of. Else when the user tries to play the default room, he will be stuck to the floor upon spawning, and we don't want that. Grouping of Entities Try to place the game's entities, into folders of identical behaviour. For instance, place weapons and ammo into an Weapons & Ammo Entities folder, and trigger entities into an Trigger_ Entities folder. Take a look at the existing add-ons for the other supported games, and get inspired. Grouping of Textures Placing textures into sub-folders in the texture-browser, is something that takes lot of time, and you won't always create a perfect grouping of textures. A good suggestion would be, that if the game itself already have placed its textures into sub-directories (in a PAK file or similar), then try to follow that structure too. You may need to sort and group the textures, directly in the add-on .QRK text-file, this will usually be a little bit faster, if you have all the texture filenames ready at hand. A Nice Layout in the Add-on Data*.QRK File Since add-on .QRK files need to be modified now and then, when bug-fixes and other relevant information about the game becomes available, you should keep a nice layout in the add-on file. By this, I mean you should keep the indent-levels and try to place the information into columns. Take for instance this structure:
    Valve Textures.qtxfolder =
    {
      Spraypaing.txlist =
      {
        8BALL1.wl =
        {
          s = "valve"
          d = "spraypaint"
          h = "C"
        }
        ANDRE.wl =
        {
          s = "valve"
          d = "spraypaint"
          h = "C"
        }
        CAMP1.wl =
        {
          s = "valve"
          d = "spraypaint"
          h = "C"
        }
    ..etc..
      }
    }
It can be made much more readable and smaller, if you put one texture-link on one line, and also use the ':incl' feature. Notice also that I've put some of the information into columns, so it will be easier to sort or block-mark if you have a text-editor thats capable of block-column-marking:
    t_spraypaint:incl = { s = "valve" d = "spraypaint" h = "C" }

    Valve Textures.qtxfolder =
    {
      Spraypaint.txlist =
      {
        8BALL1.wl = { t_spraypaint = ! }
        ANDRE.wl =  { t_spraypaint = ! }
        CAMP1.wl =  { t_spraypaint = ! }
    ..etc..
      }
    }

Using the entity extractor. | Andy - 12 Mar 2001 | [ Top ]

The easiest & probably the quickest way to create a QuArK addon for an existing mod is to use the entity extractor. This basically searches thourgh the existing .bsp files and creates an addon based upon any new entities found. It is best to use a "Game Context" which tell QuArK which game the addon if for and which directories to look in for game files. To create on of these, first create a new file 'File -> New File', then create a "Game Context", 'Toolboxes -> New Files...' and double click on "Game Context". Your QuArK window should look something like this: Next, you need to specify the game and mod directories you want (for example, Game: Quake 1, Source Dir: Slide, Game Dir: Slide). Then click the "Get entities for this game" button. The new entities will then be found, and some texture links made. Note: this may take a long time depending on the mod's size and the number of .bsp files found. 'Toolboxes -> New map items...' to see the new items:

GNU General Public License by The QuArK (Quake Army Knife) Community - http://www.planetquake.com/quark | [ Prev - Top - Next ]