main
news
tutorials
runes
files
bulletin board
(Talk to the sctf developers)
models
Rewritten Rune tutorial with source code!
Contacts:
dataspel2000@yahoo.com
neophyte@sctf.net
Websites:
HL-SCTF: HL-SCTF
Quake1 SCTF: www.sctf.net
TOOLS:
pakexpl.exe
This is the tool you use to explore pak files, to extract models, sprites,
sounds, etc.
This is the best model viewer!
HL
model viewer from MilkShape
Some other model viewers
meddle
model viewer Look at halflife models
mdlviewer
model viewer Look at halflife models
How to get source code.
Source code will be included in all major releases. The SCTF
code in particular will be available as open source, freely downloadable,
under the GNU GPL license, which means you will be free to use it, modify
it, even sell it. However as the software industry has recently learned,
once you include GNU GPL open source in your project, all of your
code also beomes open source and must also be freely distributed under
the license. Open Source Forever!!!
For interim releases, especially prior to HL-SCTF v1.0, you can contact
Dataspel
via email. Requests will be handled on a case-by-case basis.
Command list:
runeCreate : Create and toss a rune (disabled code
in 0.08)
runeKill : remove the rune (disabled code in 0.08)
+hook : grapple hook
sctfVersion : show version of hlsctf
throwRune : toss the rune you are holding
runePower : toggle the rune active power
runeHelp : toggle the long rune help screen.
location : toggle. When set, the current player
location is printed (added in 0.09).
test : display some hud messages
nextSound: play next sound from sounds.cfg
prevSound: play previous sound from sounds.cfg
currSound: play current sound from sounds.cfg
changeteam: lets you change your team.
mapName: display the red and blue flag coordinates
plus an
error message if there
was a problem reading the flag file.
help: Display the help screen.
runeShow : lists runes and their locations
Quick How to: How to display status messages
on the HUD
The same SCTF functions are used in Q1 and HL, updatePlayerStatus()
and ncenterprint(). The old Q1 code used to call updatePlayerStatus()
once a second plus whenever a message had to change. Since the HUD
messages never fade out, the HL code only calls updatePlayerStatus() when
it needs to change something. That means we have to keep careful
track of when things change. All calls to updatePlayerStatus() happen
in the player PreThink() function. You can trigger a status update
by updating the nextSctfStatusUpdate field inside the player entity:
player->nextSctfStatusUpdate = gpGlobals->time + .1; // start display on next thinkIn the old Q1 code, the status was displayed as a large centerprint. The new display is always left justified.
To set up the screen coordinates: use x,y coordinates. (0,0) =
upper left. (.5,.5) = dead center of screen
The x,y specifies where the first character will appear.
If you send a linefeed, the HUD will scroll down and resume printing
on the next line.
Printing is by channel. Only 1 message at a time can appear for
that channel, but you can have as many channels
as you want. I am printing special messages on channel 8 (top
half of screen), and normal status on channel 9
(bottom half of screen).
If your message on one channel overlaps a message on another channel,
the overlapped message will
disappear completely, so be careful in how you position your channels.
You will see in v0.14 that a lot of display messages are commented
out because we don't have the supporting code written yet.
Here is a basic tutorial on how to do hud messages: weapons
on the hud tutorial
Quick How to: How to compile hlsctf.dll
Before you start, here are a few basic instructions for compiling and
testing. These instructions are for modifications to
the HL server code, not HL-DMC. When the DMC SDK comes out, I will
update this page.
1. Make sure you have the latest HL-SDK2. You can get it the fullsdk2.exe here.
2. You will need Microsoft VC++ 6.0 on a Win32 machine. If you use a different compiler or operating system, then you will need to figure out how to build the hl dynamic lib on your own.
3. All of the tutorials update the server file hl.dll, which is built from the workspace hlsdk/dlls/hl.dsw. Open this workspace. If you are prompted for a Visual Source Safe login, click the cancel and 'do not reattempt' buttons. After the project is loaded click project/settings. There are multiple configurations, but these tutorials will use the default 'Win32 Profile' config. Click the C++ tab and select the Category Optimizations. Set the Inline function expansion listbox to 'Disable *'. Now click OK and you are ready to build. Click the custom build tab. You will see that the file hl.dll and hl.map are copied to a directory \quiver\valve\dlls. You can change this to a directory of your choice, and when you copy hl.dll, rename it to hlsctf.dll. or you can remove the custom build instructions and copy the files manually after you are done building. Don't forget to save your project settings sometime before you exit Msdev.
4. Try building the project. If you succeed, copy the new hlsdk/dlls/profilehl/hl.dll to halflife/hlsctf/dlls/hlsctf.dll. Also get the hl-sctf liblist.gam and motd.txt from the released code zipfile and put them in your halflife/hlsctf directory.
5. To test your code, start halflife, bring down the console, and click
Custom Game (select hlsctf), click Done, click Multiplayer/Lan games/Create
then select the map you want to test in.
Quick How To: How to play sample sounds:
Create a file halflife/hlsctf/sounds.cfg
One sound per line, no quotes, no leading or following spaces or tabs.
example: items/9mmclip1.wav
In the game, bind keys to currSound, nextSound, prevSound
Cycle through the sounds by pressing the keys.
No More Than 64 entries allowed in this file!!!
Only halflife sounds are supported (no cs, tfc, or dmc, etc).
example: barney/ba_duty.wav
You can use the sound.txt file included in release 0.10 and above to
get playable sounds.
How it works: The file is read during the first client precache, and
each line is matched against an
array of all sounds. If a match is found, the sound is precached
and stored in a list..
Then the sound can be played on player command. I think only
the one person can hear it (let me know if you
want to change this). Once the end of the list is reached, start
all over from the beginning (or end if you are
using prevSound). If a sound starts looping (some of them are made
this way) just press the next sound
until you find a nonlooping one.
We will need to add new code to properly use looping sounds; it is
going to be error prone, I would like
to avoid these sounds if I can.
There are 2 ways to play sounds, with changed pitch or normal pitch.
All these sounds are normal
pitch (its a performance thing) Again, I would like to stick
with the pitches in the wav files.
Quick How To: How to add a rune to hl-sctf:
The new code will be in rune.h, rune.cpp, and wherever the rune power
has to manifest (usually player.cpp).
rune.h
1. increment #define maxRuneId by 1
2. Add a new RUNE_newpower #define , following the last rune.
rune.cpp
Add new entries to the ends of these lists:
char *runeNameList[maxRuneId + 1] // the name of
your rune
char *runeShortDescPowerList0 [maxRuneId + 1] // short
description of first power
char *runeShortDescPowerList1 [maxRuneId + 1] // short
description of second power
char *runeLongDescPowerList0 [maxRuneId + 1] // long description
of first power
char *runeLongDescPowerList1 [maxRuneId + 1] // long description
of second power
Careful! Don't try to print more than 40 chars per line, including
linefeed.
You only have 192 bytes for the total of both long descriptions.
Some of the Q1
long descriptions will not fit in this range. There is a bug
in the current code, it won't print
the entire second description, I am working on it.
Now just add the code to implement the power. The existing code
will spawn your rune
randomly, let you pick it up, drop it, and change the active power,
display its name/power
when you pick it up, etc.
If you need a new sound, model, or other entity for your rune, the safest
place to add it
is in the SCTF block in weapons.cpp.
It may happen that you need to keep track of additional information
for your rune.
For example, the Artemis rune has 2 entities (either 2 guard dogs or
2 attack dogs).
Instead of adding to the player class, just inherit a new class from
CRune, and provide
the new rune functionality there. Then edit the CRune::Create()
function and create the
derived class when your new rune id is passed into the funmction.
When you get to this
point I can help write the code for the first class, to show how to
do it.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.27
30 Aug 2001
Removed observer. weakened hornet.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.25
30 July 2001
Commands: observer, location, sctfversion
Otherwise this is vanilla hl.dll
----------------------------------------------------------------------------------------------------------------------------------------
v 0.22
17 July 2001
Throw rune when player suicides, is killed, or disconnects.
Add reverse runes ammo regen (to haste) and strength (to resist).
Restored hasted glock (but not the empty glock haste). I also
capped the server sv_maxrate 6000.
Added cmd to count runes still in the world : runeShow
All cmds are now case-insensitive
Chat without 'say' cmd. Yeah!
----------------------------------------------------------------------------------------------------------------------------------------
v 0.21
15 July 2001
Fixed rune earth magic resist power, and changed the sound.
Added diag messages for rune events.
Changed runeInfo to contained object.
Changed earth power1 to strength.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.20
14 July 2001
Trying to address observed server instability. Wait before creating
sctf objects.
Only create one runeInfo per player to fix crashes when player dies
while holding rune.
Cap haste regen at imaxclip for each weapon.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.19
8 July 2001
Add RUNE_HASTE - 1st Power - Faster Shooting. 2nd Power Ammo regen.
Use runePower in console or bind to switch powers.
HASTE does not work with RPG, Crossbow or MP5
----------------------------------------------------------------------------------------------------------------------------------------
v 0.18
5 July 2001
Fixed a bug where the wrong flag was reported as captured.
Announce flag carrier on the carrier's hud (this was actually done
in 0.17)
Add team menu option for Help.
Add help command.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.17
4 July 2001
Capture points:
15 what you get for capture
10 what your team gets for capture
2 what you get for recovery
1 what you get for picking
up enemy flag
2 what you get for fragging
the carrier
Rewrote and renamed the flag file. Sorry!! This will be
the first and last time.
It is now called (mapname).sctf.txt
Format:
# any line starting with a hash key is ignored as a comment
# format: team entity x y z
# teamnames: red, blue
# entities : flag. More will be added later, for spawnpoints
and powerups.
red flag
10 20 30
blue flag
100 101 102
Internal changes: A single SCTFManager entity is spawned from dm start.
It reads the config file
and creates the appropriate sctf entities.
Added gnu pdl to sctfManager, sctfRune.
runePower command is disabled until I can write more rune powers. For now, 1 power per rune.
Added new flag locations for crossfire, boot_camp, and snark_pit.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.16 2 July 2001
Red and blue flags. Standing flag, carried flag, stolen sound,
returned sound and captured sound and status
update messages.
Flag placement by writing an ascii file containing the flag coordinates
(see the how-to above).
I wrote 3 flag placement files: undertow, bounce, and stalkyards.
Copy them the halflife/hlsctf and you will
get flags on these maps.
mapName command to see what happened if you can't see the flags specified
in the ascii file.
hmmm what happened to v0.15?
----------------------------------------------------------------------------------------------------------------------------------------
v 0.14 1 July 2001
Use the hud for sctf status, rune help, etc.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.13 30 June 2001
Teamplay. Red - recon model. Blue - gina model
Observer mode. Noclip observer until a team is chosen.
Select team menu.
Change teams with the changeteam command.
No sneak teamchanges by changing model manually.
Note: no team spawnpoints yet.
Hook obit message.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.12 27 June 2001
Removed hook damage wait time, it was lame.
Recurring damage is now per second, but calculated continuously.
Detect if hook target player moves away, and remove hook
Do not hook when dead.
Allow underwater hook.
Do not try to follow target.
Check cvar on each hook spawn, so you don't have to reload map to effect
changes.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.11 27 June 2001
Fixed hook code: Recurring damage, configurable with cvars.
default 10 initial 5 recurring at 1 second interval.
Better checks for enemy death.
Need to test to see if moving enemy causes problems
----------------------------------------------------------------------------------------------------------------------------------------
v 0.10 26 June 2001
Fixed rune spawn, runes appear on every map change..
Add sound preview keys: nextSound, prevSound, currSound.
Read sound.cfg file from halflife/hlsctf.
Use this format: barney/ba_duty.wav
No more than 64 sounds in sound.cfg!
----------------------------------------------------------------------------------------------------------------------------------------
v 0.09 25 June 2001
location cmd, to see your current map location
runePower cmd, to toggle your rune power.
runeHelp cmd to show the long rune description.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.08 24 June 2001
Rune infrastructure.
First rune: Earth magic (resistance, firepower) powers are not
coded yet.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.07 23 June 2001
New server side mod, so you don't have to replace hl.dll.
hlsctf.dll is the output dll, copied it halflife/hlsctf/dlls. Also
liblist.gam and motd.txt
was added to the install.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.06 22 June 2001 (Removed - this was pre hlsctf mod
code)
This is just the 0.05 release with the hook code that I used for the
tutorial.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.05 17 June 2001 (Removed - this was pre hlsctf mod code)
Only players can be damaged (you can't break or explode boxes with
the hook)
Kill hook if the object grappled dies.
Added sctfVersion cmd. Displays this value before the motd text
at connect time.
Default cvar hookSpeed 800.
Add cvars hookRed, hookGreen, hookBlue, hookBright for adjusting the
hook rope.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.04 16 June 2001 (Removed - this was pre hlsctf mod
code)
Added prototype rune code
----------------------------------------------------------------------------------------------------------------------------------------
v 0.03 16 June 2001 (Removed - this was pre hlsctf mod code)
Fixed hook sprite, player jumpiness and speed.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.02 12 June 2001 (Removed - this was pre hlsctf mod code)
Hook thinks from launch (see rope extend, won't lose hook in sky).
Shortened delay between hook touch and hook pull from .2 to .1.
Rope color closer to brown.
----------------------------------------------------------------------------------------------------------------------------------------
v 0.01 12 June 2001 (Removed - this was pre hlsctf mod code)
HalfLife grappling hook as written by EVILCLONE.
----------------------------------------------------------------------------------------------------------------------------------------
files.html (c) 2001 Dataspel Productions
Contact : Dataspel