|
Inside 3D Main Page - |
Introduction
- HexenC is a programming language based on QuakeC developed by John Carmack
expressly for use with Quake. HexenC is used for Hexen 2. The semantics of the
language itself resemble a stripped down version of C. Some examples of HexenC
modifications are new weapons, monsters, player skins, the possibilities are
endless. HexenC is everyone Hexen2 Players dream come true...
What Do I Need To Get Started?
- The first step is to download the HexenC source codes and a compiler. The official way would be to download the Hexen2 Utilities from
ftp.cdrom.com or its mirrors (The file is H2_UTILS.EXE and sized 3mb), but it contains also the level editing utilities
so it would be a waste of time.
What Do I Need To Edit?
- When you come to the part where you should edit a .hc file, you can do this in a normat text editor. You can use DOS EDIT or WORD PAD. The only Text editor I know of
that does't work, is NOTE PAD since it can only handle 64k files. (Only client.hc is actually bigger, but it is a very important HexenC file..).
Setting Up
- After you have edited a .hc file, and you have executed hcc.exe IN the src dir, you will find a file named PROGS.DAT In the /hexen2/mygame/ directory. You can
then exit to the root Hexen2 dir, and run Hexen2 with the -game mygame line, which will cause Hexen2 to look for data in the mygame directory before falling back to data1.
You can then play with your patch.
Your Directory Structure
- Your directory structure should then look like this..
Comments
- Comments are little notes used by a programmer in order to help others to understand his code. They do not affect the program at all if written correctly. There are two ways to denote comments in HexenC. One way is with doubles slashes (//). The double slash comment only works behind the slashes and on the same line. With every new line that you want a comment on you must include double slashes.
Operators and IF Statements - Operators are the little signs we usually find in IF statements. Signs like ==,>=,<, etc. here is a table of the important operators in HexenC:
The basic structure of an IF statement is as follows:
if (condition)
{
True-part;
}
else
{
False-part;
}
|
Variables to Know
- Here is a table of the important variables to know in HexenC and what they are:
| .health | the health of an entity (must have prefix like "self") |
| .classname | the classname of an entity (must have prefix like "self") |
| .origin | the origin of an entity (must have prefix like "self") |
HexenC is very similar to QuakeC. If you know QuakeC, you will have no
problems with HexenC.