Go to QuArK Web Site
QuArK Conversion Tools
Updated 29 Aug 2020
Upper levels:
QuArK Information Base
3. Advanced customization

 3.2. QuArK Conversion Tools

 [ Prev - Up - Next ] 

There are three conversion tools in QuArK:

All of these tools will convert other files into .qrk files that QuArK can use for game Add-Ons files that provide specific elements to work with in the QuArK Map Editor.

But the QERadiant and Worldcraft tools will only make one of the needed files, the entities.qrk file. The Conversion Tool can make one or all of the needed files.

The reasoning behind the above structure is that in the OLD days when games were small it didn't matter...
so everything was purtty much thrown into one file.... that's just the way it was done....
But now that games are 10 times bigger (and all their editing items) that way just doesn't work anymore.
Try updating just the entities in a file that has all of that other different stuff in it..... and you will see what I mean. ???
(what a mess!) ....makes your hair stand on end....!

Now, the above individual files (for a basic game like HL2) are added to the "AddOns" in the "(gamename):config =" section of the Defaults.qrk file so they get registered and loaded right out of the box..... which also makes it easer for the end user. Other addons for that game are registered by the user as desired.
See how all of that works together now? It keeps things simple, more directly related and easer to update a single component of a games editing item individually without having to thrash through a bunch of different formatted code for other items.


 Index


 Conversion Tool

cdunde - 29 Aug 2020   [ Top ] 

This tool is the most detailed of the three because it can create any of the types of .qrk files that QuArK uses (mouse over each input displays its instructions).
Folders and their files that are going to be used by this tool must be extracted from the games pak files in the same order that they are in those pak files.

Holding the mouse cursor over any bold title will cause some general instructions to be displayed.
This is also true for any of the non-bold items and their related input boxes to act as a step-by-step guide.

Game Files Location : Here you select the folder that the actual game files are in, like the .pk3 files.
Pak file type : Here you click on the ... button to select one of those .pk3 files using a file selection window.
Game Name : Type in a short name that the addons folder and files will use, ex: Quake3 for Quake 3 Arena.
Game Engine type : Clicking on the down arrow gives a list to choose from that is closest to your game type.

Entities folder path : Here you select the folder that the definition file(s) are in, like the .def or .cpp files.
Entities file type : Here you click on the ... button to select any one of those files using a file selection window.
Shaders folder path : Here you select the folder that the shader file(s) are in, like the .shader or .mat files.
Shaders file type : Here you click on the ... button to select any one of those files using a file selection window.
Textures folder path : Here you select the folder that the texture file(s) are in, like .jpg or multipal file types.
Textures file type : Here you click on the ... button to select any one of those files using a file selection window.
Model folder path : Here you select the folder that the model file(s) are in, like the .md2 or .md3 files.
Model file type : Here you click on the ... button to select any one of those files using a file selection window.
Sound folder path : Here you select the folder that the sound file(s) are in, like .wav or multipal file types.
Sound file type : Here you click on the ... button to select any one of those files using a file selection window.
Music folder path : Here you select the folder that the music file(s) are in, like .ogg or multipal file types.
Music file type : Here you click on the ... button to select any one of those files using a file selection window.

Holding the mouse cursor over any bold title will cause some general instructions to be displayed.

Make Data file : Check this box to make the Data(gamename).qrk file.
Make UserData file : Check this box to make the UserData (gamename).qrk file.
Make Entities file : Check this box to make the (gamename)Entities.qrk file.
Make Shaders file : Check this box to make the (gamename)Shaders.qrk file.
Make Textures file : Check this box to make the (gamename)Textures.qrk file.
Make Mdl Entity file : Check this box to make the (gamename)ModelEntities.qrk file.
Mdl Entity folder path : Here you select the folder that the Mdl Entity files are in, like .lst (text script) files.
Mdl Entity file type : Here you click on the ... button to select one of those files using a file selection window.
Make List file : Check this box to make the (gamename)(special)Lists.qrk file.
List File folder path : Here you select the folder that the List files are in, this can be any set of files.
List file type : Here you click on the ... button to select one of those files using a file selection window.

Make .qrk files : Starts the creation process for the above selected .qrk files. As the individual files are
      created other dialogs may open for additional selections depending on the files to make you checked.
Close this dialog : Closes the dialog, canceling the process.

Notes :
           1) You should always leave this dialog open until you test the files it creates to avoid having to re-select everything if a change is needed.
           2) If so, individual fines can be re-created by leaving only those files to make checked in Step 2 and clicking the Make .qrk files button again.
           3) Also see the Conversion Tool System section below for more info as to how this system is structured and can be improved and\or expanded upon.


 QERadiant .def file

cdunde - 05 Apr 2018   [ Top ] 

This tool only works with .def files that come with different versions of QERadiant, another map editor, or sometimes a game may contain its own .def file(s).

Also, it will only work with one of these files at a time and it will not setup any of the entity’s Specifics, optional items to set for an entity. Those would need to be done by hand or by using the Conversion Tool above.

When its menu item is selected, a file selection window will open that is used to navigate to the .def file location and select it. This will start the conversion and give further instructions.

Another tool that exist in QuArK is the Entity Extractor which will search through a game's .bsp files to get the entities.


 Worldcraft .fgd file

cdunde - 05 Apr 2018   [ Top ] 

This tool only works with .fgd files that come with different versions of Worldcraft, another map editor.

Also, it will only work with one of these files at a time and it will not setup any of the entity’s Specifics, optional items to set for an entity. Those would need to be done by hand. At this time, the Conversion Tool above does not process these types of files.

When its menu item is selected, a file selection window will open that is used to navigate to the .fgd file location and select it. This will start the conversion and give further instructions.

Another tool that exist in QuArK is the Entity Extractor which will search through a game's .bsp files to get the entities.


 Conversion Tool System

cdunde - 05 Apr 2018   [ Top ] 

The Conversion Tool is the most detailed and flexible of the three tools above because it not only can use the other two, it also is completely modular to allow individual module component updates and new modules to be added. Here we will cover the structure of this system to encourage further development of it.

System Hierarchy : As shown in the image to the right, all of this systems files are located in the QuArK\plugins folder at its current development stage.

The only two exceptions to this is the QuArK\quarkpy\qmacro.py file which is used to place the Conversion Tool on QuArK's Explorer Main Files menu. Comparing version 1.27 and 1.28 of this file will disclose the first part of the changes needed to do so. The second part is in the plugins\ent1conversiontools.py file at the very bottom

The other file is the QuArK\quarkpy\qentbase.py file that did not require any changes and is only used at the same location in the plugins\ent1conversiontools.py file to pass the menu item to the qmacro.py file.

1st Level Hierarchy :

  • ent1conversiontools.py : This is the main control file. It has 4 major functions: 1) It produces the main dialog where all of the core selections are made at the very beginning (shown above).
    2) It processes these selections to trim and provide only that part of the input as needed.
    3) First it will create a new game folder in QuArK's main directory folder to handle temporary work files (that are removed later, if all goes well)
         and place the new .qrk files into.
         If something should go wrong, the temporary work files remain in the new game folder as a means to help track down the problem and rectify it.
         It then steps through each files to make selection of code creating the more simple type of .qrk files, the Data(gamename).qrk and
         UserData (gamename).qrk files, which are copies of the selected Game Engine type: files that was chosen in its main dialog.
         It also produces its own Secondary Dialog for the selection of the Default Room Textures to be used in the Data(gamename).qrk file.
         As these files are copied things such as the game name and type of Pak file it uses are exchanged in the file's copy.
    4) It calls on the 2nd & 3rd Level files and passes the input data to those modular sections for creation of the particular .qrk file that they deal with.
         Each time a 2nd or 3rd Level file has complete crating its .qrk file the processing returns to the ent1conversiontools.py control file to continue
         on to the next step until it reaches the end where it displays a message that all of the selected files have been created successfully.
         If a problem does exist with one or more of the files due to a selection in the main dialog, those selections can be changed
         and the individual files re-created as long as the main dialog has not been closed. Otherwise it will reset the entire system and clear all selections.

2nd Level Hierarchy :

3rd Level Hierarchy :

As you can see, all of these modular files, including the control file, can be updated, improved upon or added to for any future QuArK game file support needs.

In addition, the code has been written to process multiple levels of folders and their sub-folders as well as allowing the input for multiple texture and sound type files in the dialogs. All of this is displayed to the user as they move along, in the way of individual Hints for each input to act as a guide and assist them.



Copyright (c) 2022, GNU General Public License by The QuArK (Quake Army Knife) Community - https://quark.sourceforge.io/

 [ Prev - Top - Next ]