Individual Hold the Flag (IHTF) : a gametype for COD2
Version : 1.2
Author : La Truffe (latruffe666@hotmail.com)

++ Credits

Bell : AWE mod, HTF gametype
Ravir : cvardef function
Wizz & Wildcard : WW2X mod

++ History log

1.0
- initial version
- minor bug fixes and some minor tweaking by Bell before including it in AWE

1.1
- force some printed text in white color in case player names include color codes
- add a time out for stealing the flag, controlled by scr_ihtf_flagtimeout ; after this delay the flag respawns elsewhere
- force players to spawn away from the flag, at a minimum distance controlled by scr_ithf_spawndistance
- remove cvar scr_ihtf_removeflagspawns

1.2
- enable scr_ihtf_pointsforkillingplayers to be negative, to be able to penalize players killing non flag carriers
- make use of all spawn points available in the map, as well as CTF flag positions, SD bomb zones and HQ radio positions ; 2 new dvars : scr_ihtf_playerspawnpointsmode and scr_ihtf_flagspawnpointsmode
- flag time out applies also when flag has been dropped - not only when flag is at base
- all printed text is localized
- more informative serverinfo screen
- fixed flag base visibility
- compatibility with WW2X

++ Object

IHTF is based on the famous HTF gametype.
For those familiar with HTF, IHTF is a mix between HTF and DM.
Basically, it is like HTF without teams, or DM with an objective (the flag).

The object is to get the flag, which spawns randomly, and hold it as long as possible.

The flag holder scores 3 points every 30 seconds by default.
The flag is always marked on the compass.

The first player that reaches the score limit wins.
The player with the best score at time limit wins.

Any player can kill any other player, being the flag holder or not.
However, killing the flag carrier, stealing the flag and holding it earns more points.

If the flag has not been stolen within a time limit, it will respawn elsewhere. This in case it may become unreachable to players.

++ Compatibility with COD2

COD2 1.3
Do NOT try it on older versions, it will probably not work well, if working at all.

++ Compatibility with mods

IHTF 1.2 is compatible with the latest WW2X mod (1.5 and later).
For other mods an adaptation may probably be needed.

++ Compatibility with maps

IHTF 1.2 is able to create player spawn points and flag spawn points from the following entities defined in maps :
- DM, TDM, CTF, SD spawn points
- CTF flag positions
- SD bomb zones
- HQ radio positions
This is configurable by 2 dvars.

This makes IHTF COMPATIBLE WITH EVERY COD2 MAP CREATED ON EARTH !!

However, compatibility does NOT guarantee it will be enjoyable in all maps.
For example, sniper maps usually have 2 areas separated by a non crossable frontier. IHTF will work on those maps but the gameplay will be pretty dumb.

++ Configuration

Please see the gametypes.cfg for a description of the new dvars, and a note about dvar overriding.

++ Limitations / problems

The mod does not include configuration options from a listen server ; please use a dedicated server instead, listen servers are known to be mods unfriendly anyway.

IHTF being an additional gametype, it may not be possible to vote for this gametype with the standard voting option. This is a known COD2 limitation, and there's little we can do for that. Also, custom maps won't be showing on the menu if you select IHTF, even if they actually work fine with IHTF.

The serverinfo screen has been stripped down in the WW2X version, because this mod reserves half of the serverinfo screen for itself.

You may find in your server log lines such as "WARNING: Spawn point entity 683 is in solid at (2495, -1793, 172)" but you can ignore them ; the game complains about some new spawn points but it should not be a problem.

++ Copyright

Copywhat ?? no, seriously... as long as you don't forget the credit you're free to do anything you want with this mod.

++ Feedback

Please give your feedback (comments, bug reports, suggestions, cheers, insults or whatever) preferably in this thread, or by a PM in this forum, or by email at latruffe666@hotmail.com.
Remember that this is still beta, and may (read : "surely") contain bugs, as it's difficult to test in conjunction with every standard option or many features provided by AWE or eXtreme+ mods.
I'm particularly interested in script error reports from the console log, because it's sometimes difficult to reproduce bugs.
Another sweet tool for helping the debugging is to make a small demo (with the console command /record) showing the problem.

Have fun with this gametype !