| QuArK Conversion Tools Updated 25 Jul 2009 | Upper levels: - QuArK Information Base - 3. Advanced customization

3.2. QuArK Conversion Tools | [ Prev - Up - Next ]

There are three conversion tools in QuArK: Conversion Tool (makes multiple types of .qrk files) QERadiant .def file (only works with this type of file) Worldcraft .fgd file (only works with this type of file) 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. Data(gamename).qrk Used to setup basic things such as the default room for NewMap, UserData (gamename).qrk Used to setup items for the QuArK Userdata panel and the Games menu items. (gamename)Entities.qrk Used to create the games entities and entities :form sections. (gamename)Textures.qrk Used to setup the games textures to be displayed in the QuArK Texture Browser. (gamename)Shaders.qrk Used to setup the games shaders, scrips, materials (if used) to be displayed in the QuArK Texture Browser. (gamename)ModelEntities.qrk Used to setup special model entities if the game has these. (gamename)(special)Lists.qrk Used to setup other special lists of items that the game uses. 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 (25 Apr 2008)
- - QERadiant .def file (27 Apr 2008)
- - Worldcraft .fgd file (27 Apr 2008)
- - Conversion Tool System (25 Jul 2009)

Conversion Tool | cdunde - 25 Apr 2008 | [ 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 Loacation : 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 - 27 Apr 2008 | [ 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 - 27 Apr 2008 | [ 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 - 25 Jul 2009 | [ 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. Other wise it will reset the entire system and clear all selections. 2nd Level Hierarchy : ConvertToolQ3typeEnts.py : This creates the (gamename)Entities.qrk file for a Quake 3 type game engine. It can use .def, .cpp or any other entity definition file that uses the keyword /*Quaked to designate a new entity. It also produces its own dialog input for selection of aditional items to include in that .qrk file. It then calls on the AddSpecificsList.py and entdef2qrk.py 3rd level files below to add the entity Specifics detail data as well as create its own Color Setting and Selection Lists code for such things as Game Models, Game Sounds and Game Music if those items are seleced from its dialog to be included in the .qrk file. ConvertToolD3typeEnts.py : This creates the (gamename)Entities.qrk file for a Doom 3 type game engine. It can use .def, .cpp or any other entity definition file that uses the keyword entityDef to designate a new entity. It also produces its own dialog input for selection of aditional items to include in that .qrk file. It then calls on the ConvertToolGet_tokens.py 3rd level file below to assist in creating the entity Specifics detail data as well as create its own Color Setting and Selection Lists code for such things as Game Models, Game Sounds and Game Music if those items are seleced from its dialog to be included in the .qrk file. 3rd Level Hierarchy : AddModelEnts.py : This file is called on directly by the ent1conversiontools.py file to make the (gamename)ModelEntities.qrk file. AddShaderList.py : This file is called on directly by the ent1conversiontools.py file to make the (gamename)Shaders.qrk file. AddSpecificsList.py : This file is used by the ConvertToolQ3typeEnts.py file and works in conjunction with the entdef2qrk.py file below to create the final(gamename)Entities.qrk file for a Quake 3 type game engine. AddTextureList.py : This file is called on directly by the ent1conversiontools.py to make the (gamename)Textures.qrk file. ConvertToolGet_tokens.py : This file is Tool file used by both the ConvertToolD3typeEnts.py and AddShaderList.py files above for data processing. entdef2qrk.py : This file is used by the ConvertToolQ3typeEnts.py file before the AddSpecificsList.py file above to create a temporary .qrk file that it uses to merge all of the collected entity Specific items detail data with to create the final (gamename)Entities.qrk file. 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) 2009, GNU General Public License by The QuArK (Quake Army Knife) Community - http://quark.sourceforge.net/ | [ Prev - Top - Next ]