.CON Introduction v3-27-2002 Release 2 © RTCM Corvin
Doc Info | Introduction | CON Syntax | CON
Process and Safety Resources The following information pertains to any BUILD game using Todd Replogle's CON
Script System. Developed at 3DR while working on Duke3D. The supported games are listed in categories. Games that share the same line have very similar CONs:
Compatibility: Although CONs are included with each game, there are differences with the scripts, with that said. This Document mainly focuses on the Duke v1.3/v1.5 category, as listed above. There is support for the other games listed.
For Completeness here are the Copyrights and Authors of the original CONs that come with each game, the primary CON names are also listed:
Introduction to CON files.
The CON files are plain text files that contain a form of C/C++ (a popular programming language) , a tad bit of Pascal and other programming experiences that where needed as the game was developed. The overall reference to this script language is generally known as 'CON Scripts' , 'CONstructed Scripts' , 'DukeC Script' or the traditional 'CONtrol Scripts' There are three .CON files that come with Duke3D(4 to 5 usually come with other BUILD games, which will be covered later) The ones in Duke3D are the USER.CON, DEFS.CON and GAME.CON The GAME.CON is the primary con file to which all others are included and loaded. (Note: other BUILD games may have there primary con file named something different. This is normal and I'll explain why later.) As you read on you will discover that the GAME.CON is the most powerful of the bunch, since it contains most and eventually all the scripted routines and executions. Beginners should stay away from the GAME.CON to ensure that it does not discourage you. The USER.CON and DEFS.CON are simply two forms of files that provide definitions for the GAME.CON to refer to. Depending on your style of coding or organization you have other possibilities of how many CONs are actually used. You can place all the code into the GAME.CON if the scripts are placed in proper order, everything must be defined prior to using them in code. This is really a poor method of coding and much harder to work with but it may be necessary time to time. Its much better to use all three CONs or create your own CONs in order to keep things easy to reference to. Each of these files will contain scripted code. A script language is different than a true compiled language ('an executable' such as duke3d.exe) A true compiled language runs at actual machine level (object code linked directly with the computer), while a scripted code is interpreted by the executable(duke3d.exe.) That is, the game reads from a script(CONs) to gather and execute all functions, variables and data referred, CONtrolling certain aspects of the game. However before the interpreter can use a scripted code, it must compile it first. Read on. When you start up your game you always see the script being compiled and checked for errors, mostly Syntax and structure. The three files are parsed (combined) into a single .CON file, the primary (which is still the GAME.CON but the USER.CON and DEFS.CON are included / combined with it.) The compiled code eventually becomes part of a temporary file for the game to access. For the most part during the compiling phase many of the words become digits (numerical values) and spaces are removed, compacting the CONs into an external 'executable,' and made 'part of' the interpreter for faster code retrieval. (instead of having the game compile the code during the game, for each function it is served. The possibilities of altering the game to behave the way you want is one of the major reasons Duke3D outlived Shadow Warrior even with a tweaked BUILD engine that Shadow Warrior has. Shadow Warrior use internal assemble code (mathematical language) for its 'scripts' that actually allowed the game to execute faster and smoother. Compare the two games on your system. You will see what I mean. Please note Shadow Warriors has no CONs but this site provides a bunch of tools to edit and patch Shadow Warriors internal hardcoded variables to produce a greater customized add-on for it. I do know of one person that has made a handful, hats off to him. Although there is more possibilities for patch's. If you hex edit exe's, try to come up with some new 'Temp Patchers' to increase the editing abilities for Shadow Warrior. Just remember you can not distribute any register files. On the bright side the second release of Duke3D(v1.5) includes more options to alter the game, additional primitives and functions where added. These include the ability to add completely new actors. This was one of two major sellers for v1.5 (The #1 major seller was its new bots, by Ken Silverman-these are hardcoded) NAM and WWII GI are essentially Duke3D v1.5 under the hood, and share these 'bonuses' as well. On top of that, NAM itself includes a modified-hardcoded weapon system. Making the Weapon system more ideal for custom made weapons. (required for NAM conventional weapons) WWIIGI advanced on that idea and has moved nearly all of the weapon system out to the CONs, giving you precise control over weapons and ammo. WWIIGI also introduced a real Variable system and introduced control over key events. Of course many more CON features. BTW - Yes you can interchange just about every file with each other between the BUILD Games, more than likely you will end up converting .CONs, .ART tile parameters, maps (maps will need to be filled again after conversion.) However since the games are so close in design, it shouldn't take to long. Alright now, to edit a con file you do not really need allot of knowledge of programming, in some cases you won't need any. So don't hesitate in trying. To open the cons, use any plain text editor (such as Wordpad, Notebook or the DOS editor) At first glance they may seem a bit complex, but skim through the con files one at at time and try to associate terms in the script to monsters or items etc with things you have seen in the game. You may find out that some of the stuff makes sense to you. After your all done, take a break, then review them again. Now think of something you would like to change in the CONs. Read as many FAQ's and documents you can to help you understand enough of the scripts that the information will lead you to the answers you seek. Keep in mind that the easiest and effective CON to modify for beginners is the USER.CON See the RTCM document "con-user-con" for further information. For a large array of information on other CONs, see the corresponding documents. The "con-primitive-declarations" document that explains some of the more complex and unusual forms of scripting. The information below, CON Syntax and the sections following are knowledge all users should examine for general handling of the CONs. once you understand the handling processes I would suggest you further indulge into modifying the existing script code that the game developers have written for the game. Over time you will see the results of your tinkering improve. If you need further explanation about anything, notify Corvin and he will update the docs for you. The WWIIGI section of this CON guide was derived directly from Matt's Duke3D Insider / WWII GI Enhancements and Matt's WWII GI Enhancements. Some EDuke Material was also reviewed for inclusion in this document.
CON Syntax
As with any programming language or script, there are syntax rules you need to follow to prevent compiling errors. In Duke3D and other .CON based BUILD Games, those errors are almost always fatal. You will know if you have a syntax/structural errors as soon as the game compiles the .CONs. Ultimately, if errors are found you will be presented a question from the compiler "Do you want to use the internal defaults (Y/N)?". When you answer yes to this question, Duke3D will then automatically load the standard set of CON files directly from the master .GRP file, by-passing your cons located externally in the game directory. The game will run normal. Using a text editor with lines numbers would benefit you here as part of the compile errors include the line numbers of the errors. -CON Syntax Rules
CON Process and Safety resources.
We really covered the process in which your game handles the original CON files above in the introduction above. I suggest you reread it, should be the second paragraph in. Now I will list and explain to you the 'Safety features' to protect the games original CON files from damaging your purchased game permanently. Don't let the word "damaging" scare you since this is far from anything devastating. Read on.
Restoring the Original commercial CON files.
To bring back or restore the Register CDs original CON files, you'll have four immediate options. Read on.
Methods 3 and 4 may never be needed, since the game by itself has not / not capable of corrupting the .GRP
Using Hacked Con's (CON files that others have modified and you have obtained)
Lets start off with downloading and obtaining pre-modified CON files. Go check out the CON Download page and pick out something simple but interesting. Once you have downloaded the compressed archive, read on.
Using Hacked Con's in MULTIPLAY
There are some rules that need to be obeyed with multiplay. Ensure to read and practice them at all times to ensure smooth and error free gaming.
If you have a slow machine or are using unusually large files, especially demanding sounds and pixel .art. You can typically throw the entire game off. To ensure you are running at best performance See the Online / Multiplayer Documents for tips and tweaks.
|