| Add-Ons Updated 29 Aug 2020 | Upper levels: - QuArK Information Base - 3. Advanced customization

3.4. 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) (05 Apr 2018)
- - Add-on standards for new supported games (05 Apr 2018)
- - Using the entity extractor (29 Aug 2020)

Elements of an add-on (unfinished) | Decker - 05 Apr 2018 | [ Top ]

Also see the '.Qrk files'-section in 'Introducing QuArK development' for more info.
    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
    }
An add-on which contains 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 - 05 Apr 2018 | [ 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 Access of Mod & Custom 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 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. Access of Mod & Custom Textures Another way of setting up access to textures for Mods and Custom Textures is to use the blanket command name "build" with a value of "1" setting. This is covered in detail in the Game Data Addons section. Basically what this does is tell QuArK to search the given path folder for all texture folders and files in all .pak files, no matter what their name is, and folders that have been named "textures" and, if the game supports them, "scripts" which are shader texture files like the ones used in Quake 3. In addition, any custom textures and shader files will also be included that are placed in the "textures" and "scripts" folders or in their own sub-folder placed in these folders, with any name you wish to give them. These custom sub-folders can also have sub-folder within them as well for a better grouping of files. All of the folders will then be grouped in the Texture Browser under the caption "Directories" and will be displayed by their individual folder and sub-folder names. 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 - 29 Aug 2020 | [ 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 through 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 one 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:

Copyright (c) 2021, GNU General Public License by The QuArK (Quake Army Knife) Community - http://quark.sourceforge.net/ | [ Prev - Top - Next ]