View Single Post
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-31-2011 , 13:05   [TF2] Force Holidays - 1.10.2, Updated 2015-10-07
Reply With Quote #1

This plugin now requires SourceMod 1.7 or newer.

If you just want to force one holiday on, use the tf_forced_holiday cvar instead with one of these values:
  • 1: Birthday (same as setting tf_birthday 1)
  • 2: Halloween
  • 3: Christmas
  • 5: End of the Line (bonus ducks?)
  • 6: Valentines (?)
  • 8: Full Moon
  • 11: April Fools

9 and 10 are used for internal housekeeping for Halloween/Full Moon/Valentines day. Don't use them directly.

Three more holidays exist but it is unknown what they do:
  • 4: Community Update
  • 7: Meet the Pyro
  • 8: Spy vs. Engy War (not implemented in this plugin) Removed

Requirements
Team Fortress 2
SourceMod 1.7.0 or newer to run

This plugin is known to not work properly on MvM maps

Description
Team Fortress 2 now supports multiple holidays running at once. However, tf_forced_holiday only allows you to set Halloween mode or Birthday mode on, and doesn't work anymore anyway.

This plugin was written to replace the [TF2] Holidays and [TF2] Force Halloween plugins.

Changelog
1.10.2 - Now compiles under SourceMod 1.7 or newer. No longer needs to be recompiled on every holiday change.
1.10.1 - Compiled against custom tf2.inc to fix holiday numbering. Added tfh_endoftheline, which may control bonus ducks.
1.10.0 - Compiled against SM 1.6.3-git4801 to fix holiday numbering. Removed map list, removed precache code... both were no longer used and shrinks the plugin's footprint significantly. tfh_updater 0 can be used to disable Updater support. tfh_normalhealth 1 will prevent this plugin from changing health kits to their holiday versions.
1.9.0 - Updated map list, added April Fools holiday. Precache code is no longer active as Valve fixed it in 2013. Now manipulates tf_forced_holiday cvar when Full Moon and Halloween are on in order to fix Zombie costumes.
1.8.1 - Fix a crash where a ammokit model isn't being precached.
1.8.0 - Adds tfh_valentines and tfh_fullmoon. tfh_halloween 2 is now deprecated. Also fixed halloween costumes not working on Full Moon and Halloween.
1.7.1 - 1.6.0 with a new version number. Removes tfh_mannvsmachine as it's no longer present in the game binary. Also fixed halloween costumes not working on Full Moon and Halloween.
1.7.0 - Added tfh_mannvsmachine for the Mann Vs. Machine holiday, fixed other holidays that got broken by the 2012/08/15 update.
1.6.0 - Added tfh_meetthepyro for the Meet the Pyro holiday, fixed other holidays that got broken by 2012/06/27 update.
1.5.0 - Added Updater support and added support for presetting Halloween mode on maps listed in configs/halloween_maps.txt. Fixed missing model and sound precaches for koth_viaduct_event that would cause crashes and errors.
1.4.1 - Added a missing model and some sounds to the koth_viaduct_event precache list.
1.4 - Added tfh_winter for the Winter holiday, fixed other holidays that got broken by the 2011/12/15 update.
1.3.1 - Fixed "ConVarRef tfh_halloween doesn't point to an existing ConVar.
SetConVar: No such cvar ( tfh_halloween set to 1), skipping" type errors
1.3 - Added additional Monoculus sounds to the precache list. Also made cvars visible from outside the server.
1.2 - tfh_fullmoon is now gone, use tfh_halloween 2 for Full Moon mode.
1.1 - You can now set cvar to -1 to disable holiday even when it would normally be active.
1.0 - Initial Release

Installation instructions
  1. Copy tfforceholidays.smx to addons/sourcemod/plugins/
  2. Set cvars in either server.cfg or map config files (tfh_halloween 1 in cp_manor_event.cfg for example)
  3. To force Halloween mode on halloween maps, copy hallween_maps.txt to addons/sourcemod/configs/
ConVars
tfh_version - TF2 Force Halloween version
tfh_enabled - 0 to disable this plugin, 1 to enable it. Default 1.
tfh_dontforce - 1 to prevent this plugin from manipulating tf_forced_holiday to make Halloween costumes work.
tfh_normalhealth - 1 to replace holiday healthkits with standard ones (if forced on via tf_forced_holiday manipulation for Halloween/Full Moon)
tfh_birthday - Force Birthday mode on. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0.
tfh_halloween - Force Halloween mode on. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0.
tfh_fullmoon - Force Halloween mode on. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0.
tfh_winter - Force Winter mode on. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0.
tfh_meetthepyro - Force Meet the Pyro holiday on. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0. Deprecated and will likely be removed in a later version as it only seems to be used on the client side.
tfh_valentines - Force Valentines holiday on. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0.
tfh_aprilfools - Force April Fools holiday on. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0.
tfh_endoftheline - Force End of the Line / Bonus Ducks. -1 = Always off; 0 = Use game setting; 1 = Always on. Default 0.

Translations
There aren't any.

What works in Halloween Mode
  • Crit Candy randomly on kills
  • Halloween taunt (Thriller)
  • Halloween Hats and Costumes
  • Exploding pumpkins (these work year-round anyway)
  • Horseless Headless Horsemann, Monoculus, and Merasmus (if you have halloween_maps.txt in your addons/sourcemod/configs/ directory.)
  • Health kits and ammo boxes replaced with their Halloween versions.
  • Redmond and Blutarch arguing on Helltower
  • Skeleton King and spells (these work year-round anyway)
  • The Spell UI and notice about equipping spellbooks on Helltower
What doesn't work in Halloween Mode
  • Haunted Halloween Gift on Mann Manor
  • Haunted Halloween Gift on Eyeaduct
  • Haunted Halloween Gift on Ghost Fort
  • Haunted Halloween Gift on Helltower
What works in Birthday Mode
  • Birthday Noisemaker
  • Health kits and ammo boxes replaced with their birthday versions.
What works in Full Moon Mode
  • Halloween Hats and Costumes
What doesn't work in Full Moon Mode
  • Full Moon Kills strange part
What works in Winter Mode
  • Winter Noisemaker
  • Gift Boxes drop that can be collected to gain the Valve Gift Grab 2011 achievement.
What works in Meet The Pyro Mode
  • I Have No Idea!
  • (This is likely only used as a vision flag for Pyrovision and will be removed soon)
What works in April Fools Mode
  • Schadenfreude taunt sometimes replaces normal taunt.
This plugin does not use its own config file so that you can override this on a per-map basis.

The Get Plugin link doesn't work, download the tfforceholidays.smx file instead. This is due to the Updater support added in 1.6.0 that allows clients who have the Updater plugin to auto-update to newer releases.
Attached Files
File Type: sp Get Plugin or Get Source (tfforceholidays.sp - 1979 views - 10.4 KB)
File Type: smx tfforceholidays.smx (7.2 KB, 3775 views)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-08-2019 at 22:33. Reason: Updated the holiday numbers after ignoring this thread for years
Powerlord is offline