Originally created by Matheus28 - link
Then modified and improved by atomic-penguin(Eric G. Wolfe) and Daniel Murray - link
Now redux by me, luki1412. I didn't want the mod to die, but the last version had a lot of problems. The main one being - crash when giving player a knife. EquipPlayerWeapon is the cause. I didn't want to use TF2Items just so I can replace 1 weapon for 1 person. I couldnt find a way to fix this but I did at last. TF2 Items is not required. I used to love this mod so Im bringing it back.
Description:
Never heard of this mod before? Its based on The Hidden:Source mod - https://www.hidden-source.com/. Basically a variant of One person vs Everyone else(like vs saxton hale). On the red team you have players(called team IRIS) with no special abilities but you have the quantity. On the blue team you have The Hidden. Its a permanently cloaked spy, only revealed when attacking or using his abilities. The objective is pretty simple - kill the hidden before he kills you.
What's different from the version by atomic-penguin and Daniel Murray?
the hidden no longer has the ability to boo, he has a cluster bomb instead
added a lot of cvars so you can customize the mod
players are no longer allowed to switch their team just to be on the same team as the hidden
the command for forcing the next hidden is now working correctly and wont make a spectator the next hidden
removed unused code and afk for hidden
added a hunger meter for the hidden, if it reaches 100%, the hidden dies
fixed the problem with tf2 assistances - if the hidden were to die from hunger or a suicide, tf2 would give the frag to the last person that damaged him. tf2 still showing the assistance but he wont become the next hidden
the next hidden selection is based on the damage done to the hidden(or selected randomly if not killed by a player)
the plugin now properly compiles even if you dont have the steamtools inc file
the hidden now takes no fall damage
the hidden's hp is now properly calculated based on the number of players on the server
you can now modify hp, the hidden gets after a kill
pounce was modified so you can stick to the walls and look around
backstabs gib the victim, butterknife kills restore health
there is a cvar for heavies/pyros so you can replace their primary weapons
there are cvars for engies so you can limit their buildings
there is a cvar for removing razorbacks
the autoexeccfg is now properly named and the version cvar is removed from the file
the hidden now wont die when he wins - he just gets his powers removed
setting multiple tf2 cvars so the mod is working properly
you can block taunts or taunt damage
the hidden's jump now uses stamina
there is a cvar that allows iris team to turn to ghosts after death
fixed all bugs I could find
the hidden preference
a lot of code optimization
Cvars:
This plugin autocreates a config file, you can use to change cvars(in cfg/sourcemod). If I add new cvars, you have to remove this file so it gets recreated with the new cvars, or add them in yourself.
PHP Code:
//version cvar - do not edit
sm_thehidden_version
// Enables/disables the hidden mod redux
sm_thehidden_enabled "1"
// Amount of hp used for calculating the Hidden's starting/max hp.
sm_thehidden_hpbase "300"
// This amount of hp, multiplied by the number of players, plus the base hp, equals The Hidden's hp.
sm_thehidden_hpincreaseperplayer "70"
// The Hidden's stamina.
sm_thehidden_stamina "20.0"
// Time til the Hidden dies without killing.
sm_thehidden_starvationtime "100.0"
// How much time the Hidden is visible for, after throwing the cluster bomb.
sm_thehidden_visiblebomb "1.5"
// How much time the Hidden is visible for, after taking weapon damage.
sm_thehidden_visibledamage "0.5"
// How much time the Hidden is visible for, when splashed with jarate, mad milk, or bonked.
sm_thehidden_visiblejarate "1.0"
// How much time the Hidden is visible for, when dashing.
sm_thehidden_visiblepounce "0.25"
// Forces bots to be snipers
sm_thehidden_forcebotsclass "1"
Some of the cvars(mainly cooldown cvars) above wont take effect until the next round starts, because it would break the functionality of the mod. If it is a time period cvar, its not in seconds but in server ticks (0.01 is one tick). Default values should be fine for most servers.
Commands:
PHP Code:
sm_nexthidden <player> //console command that forces the player specified to be the next hidden, regardless of who wins the round. Cant select a player that isnt on RED/BLU
sm_hiddennext <player> //same as sm_nexthidden
sm_hiddenhelp //console command, the help menu
sm_hiddenpref //console command, the pref menu
sm_hiddenpreference //same as sm_hiddenpref
//each command above can be triggered from chat by replacing sm_ with / for silent execution or ! for public execution
Installation:
It was tested and made for sourcemod 1.11 so I recommend to compile it yourself or use the attached compiled version.
This mod only works on arena maps, so you might want to set your server's starting map to an arena map.
SteamWorks is needed only for changing the game in server browser. This plugin autogenerates a config file on load, in tf/cfg/sourcemod.
Installing the plugin without SteamWorks:
Download thehiddenmodredux.smx and put it in tf\addons\sourcemod\plugins
Download the.hidden.mod.redux.txt file and put it in tf\addons\sourcemod\gamedata
Extract translations.zip into tf\addons\sourcemod\translations
Restart your server
Installing the plugin with SteamWorks(thread link):
Download the SteamWorks extention and install it
Download thehiddenmodredux.smx and put it in tf\addons\sourcemod\plugins
Download the.hidden.mod.redux.txt and put it in tf\addons\sourcemod\gamedata
Extract translations.zip into tf\addons\sourcemod\translations
Restart your server
How to compile the plugin yourself:
Download steamworks.inc and put it in tf\addons\sourcemod\scripting\includes<-- this step is optional. if you dont want game change then ignore this
Download thehiddenmodredux.sp and put it in tf\addons\sourcemod\scripting
Download morecolors.inc and put it in tf\addons\sourcemod\scripting\includes
Compile the plugin (on Windows, run compile.exe)
Your compiled plugin is now in tf\addons\sourcemod\scripting\compiled and its name is now TheHiddenModRedux.smx. Install it.
Credits:
- Matheus28 - for creating the original mod
- atomic-penguin(Eric G. Wolfe) and Daniel Murray - for updating the mod
- the person who created the cluster bomb code - sorry I forgot who that was, its been a while
- creators of SMLIB - I borrowed a couple of functions
- everyone who helped me test it or provided help with the code
- KyleSanderson for SteamWorks
- Dr. McKay for morecolors
- Blueberryy - Russian translation(now outdated)
Changelog:
1.00 - Initial version
1.01 - Removed alltalk cvar - there is no reason for it because you can change one cvar yourself
- Removed an unused event hook
- Added arena fix - when the server with arena on is empty(or only one player) - it keeps spamming the roundstart event, making the server very laggy(dont know why valve thinks thats a good idea). this command enables 2 bots when players join so there is no lag when someone joins. if the bot becomes the hidden, he gets beaconed so you can find him.
- No longer killing anyone when changing their classes/teams
- Removed unnecessary code
1.02 - Removed arena bot fix - laggy arena was fixed in the last update
- Removed couple of unnecessary checks
- Removed unused code
- Removed saving last hidden's class - setting to random for everyone
- Modified a couple of default cvar values
- Increased velocity for hidden's special jump
1.03 - Fixed the respawn function not changing hidden's team and class
- Fixed the check for active round event as well
- Added 2 cvars for blocking taunts
- Added a check so 1 player can join the blue team so the game can start
1.04 - Modified version cvar and its flags
- Modified cluster bomb properties
- Changed cluster bomb skin
- Changed bomblet model and skin
- Removed unused code
1.05 - Transitional Syntax
- Properly blocking taunt damage
- Modified the behavior when people select auto(random) or blu team -> The plugin is now changing their team to red, not spectator
- Modified the hud text colors and fixed the bug with the text blinking
- The hud text is now using and showing integer values
- Added a check for when the timer for hud text isnt running
- Using a custom gamedata file
1.06 - Fixed the incorrect check for a person that dealt the most damage to the hidden
- Added a check for the player with the most damage to the hidden, so if he switches to spectator we pick a random player
1.07 - Updated max speed for spy, changed by the big update
- Fixed Hud text disappearing after mapchange
- Fixed bug introduced in 1.05 where damage done to the Hidden wasnt calculated properly, resulting in errors and the next hidden being always set randomly
- Removed convar change hook for version cvar
- Fixed bug where the hidden left/got kicked out during pre-round time and the plugin switched everyone to blu
1.08 - Removed an unnecessary chat line for a player's death where the hidden wasnt the attacker or the victim
- The hidden's hunger now gets fully reset after killing someone(up from 50%)
1.09 - Removed HTeam enum
- Removed unnecessary defines
- Fixed plugin not working correctly after reload
- Properly stopping the repeatable timer for hud text
1.10 - Added a check so the plugin doesnt try to activate twice after map start
- Replaced the function for killing the hidden, so it doesn't show assistances when he starves to death
1.12 - Added the server tag "thehidden", when the plugin loads
- Allowed bots to use the disguise kit so they move out of the spawn(bots vs bots is now possible but the hidden sometimes doesnt leave the spawn)
- Added a 10% chance for bots to throw the cluster bomb when attacking
- Performance improvements
- Minor bug fixes
1.13 - Fixed the plugin not unloading properly
- Removed unneeded lines of code (including TF2_MakeBleed that caused spam in logs and other problems)
- Performance improvements
- Properly removing the hidden's powers and respawning him, when the plugin gets unloaded
- Modified the code for giving weapons
1.14 - Added 3 new cvars for more customization - sm_thehidden_allowpyroprimaries, sm_thehidden_allowheavyprimaries, sm_thehidden_allowsentries
- Increased upper limit for *visible* cvars to 5.0
- Performance improvements
- Code optimizations
- Fixed a bug, where bodies would get dissolved even when there was no Hidden
- Delayed body dissolving to 1s after death
- Resetting damage done to Hidden for everyone when a new game starts - fixes a problem where someone could go to Spec, after he won(did most damage to Hidden) and his damage wouldnt get reset
- Fixed a bug that occurred when Hidden was being selected
1.15 - Added a check for late load and improved functionality when its lateloaded
- Checking damage done to the Hidden through player_hurt, not SDKHooks
- Removed the changeclass hook and added a joinclass hook
- Big performance improvements
- Code optimizations
- No longer changing players class randomly, unless its needed
- Fixed errors related to GetClientUserId
- Modified the way we randomly select the next hidden
- Removed unused code
1.17 - Modified Hud text so it doesnt flicker
- No longer changing color of Hidden's health hud text to orange
- Fixed team joining so it doesnt show an error when you choose random
- Fixed class joining so it doesnt show an error when you choose auto
- Fixed functions that randomly change player's class so it includes all allowed classes
- Killing all bots in the first round so players dont have to wait til they die
- The Hidden no longers gets hp after each kill. He will only get hp back if he kills them using his knife and its not a backstab
- When the Hidden kills a player, his ragdoll will either dissolve or gib, based on how he kills them.
- Hidden's super jump is now stronger
- The Hidden's hp wont be shown if its equal to 0
- Code optimization
- Performance improvements
1.18 - Added a translation file, that allows server administrators to translate or modify text
- Removed cvars for allowing heavies/pyros/engies - no longer needed
- Reworked bomblet spread calculation
- Removed cvars for bomblet variation and vervel - no longer needed
- Using ShowSyncHudText for hud text
1.19 - Fixed a bug where the overlay wasnt removed when the Hidden won
- Reworked the Hidden's special jump - it now uses stamina, just like pounce.
- Fixed a bug where the Hidden's special jump stopped working
- Removed cvars sm_thehidden_jumptime and sm_thehidden_pouncetime
- Added sm_thehidden_stamina
- The Hidden can now get hurt by his own cluster bomb
- Updated the translation file
1.20 - Modified explosion entity spawn flags
- Bombs can no longer be bounced off
- Slightly modified hud text colors and duration
- Code optimization
1.21 - Replaced the function for random integers so its more random when picking the next Hidden
- Added a cvar that can set whether the hidden gets damaged by his own bombs or not
1.22 - Added ghosts (disabled by default)
- New game class change function is now delayed by one frame
- Resetting the entire damage array now
1.23 - Added a help menu
- Replaced the game engine check
- Changing tf_bot_reevaluate_class_in_spawnroom to 0 so bots stop killing themselves after spawn
- Added gas blast when checking for taunt damage
- No longer setting global variables to falsy values
- Added a cvar to disable the plugin from forcing bots to play snipers only
1.24 - The hidden is no longer invisible while taunting
- Increased the cooldown on the superjump by 0.4s
- The superjump now consumes more stamina (1/5 -> 1/4)
- Bomblets from the cluster bomb now do less damage by default (30 -> 25)
- Fixed sm_thehidden_forcebotsclass not actually enabling other classes for bots
- The hiddens cluster bomb bomblets now do huge knockback
- Fixed a rare bug with invisibility
- Fixed a bug where the clusterbomb wouldnt launch but the cooldown would trigger anyway
- Fixed a couple of typos in the translation
- The plugin now refunds metal if the user upgrades a building that is not allowed to be upgraded
- Code optimization
1.25 - SteamTools was replaced by SteamWorks. It is still optional
- Default Bomblet damage was lowered to 20
- Push force velocity and its radius are no longer tied to bomblet magnitude cvar
- Bomblets now do generic damage instead of blast damage
- Bomblets push force now respects line of sight
- Bomblets push force magnitude and radius were decreased
- Config handle is no longer a global variable
- No longer checking whether arena mode is on, based on the map file name. It is now based on the arena logic entity
- Hidden's sapper is now being replaced with the stock one
- Cap point time limit is set to 0 so maps that open gates to the point after some time has passed first are now open right away
1.35 - Added Hidden preference
- removed BombIgnoreUser cvar
- removed Ghosts - a tf2 update broke it - might get reimplemented in the future
- the hidden help menu title can now be translated
- sourcemod 1.11 compatibility fixes
- the hidden's bomb no longer explodes when the hidden won/lost
- no longer removing pyros primary weapon - it now gets replaced with Dragon Fury
- no longer removing heavy's primary weapon - it now gets replaced with Brass Beast that does 5 times less damage
- HUD text is updated more often and should no longer flicker
- The Hidden bot ping is now more pronounced and no longer triggers twice
- removed redundant entity amount check
- fixed memory leak
- translation changes
- hp from butterknife kills is now the same as the hp used to calculate the max hp of the hidden
- code organization and optimization
1.36 - fixed ragdolls not gibbing on backstabs
- fixed bomb spread velocity value calculation
- changed default convar values:
number of bomblets 10 -> 6
magnitude of a bumblet 20 -> 50
spread velocity of bomblets 60 -> 50
cluster bomb throw speed 2000 -> 1800
- added command aliases /hiddennext and /hiddenpreference
- slightly adjusted hidden's jump
- cluster bomb now explodes with particles
- increases bomblet push force and radius
1.37 - removed redundant connection checks
Recommended changes:
The plugin wont change these settings but you should consider modifying them: tf_forced_holiday 2 - halloween mode allows you to show halloween hats, but also shows a soul coming to you when you kill someone. That is bad because it would reveal the hidden's position. mp_forcecamera 0 - allows you to spectate anyone, including the hidden. People could reveal his position to others. tf_weapon_criticals 1 - random crits should be off because crits do a lot of damage but you might wanna bump the hiddens hp and leave them on. its on you. sv_alltalk 1 - you should decide whether you want this on or off. tf_arena_preround_time 10 - it's the pre-round time, before the gates open and you cant change your class after the time has passed. default is 10s. max is 15s. I use 15s. Not enforced by the mod.
You should disable any team balancing plugins so they dont break the mod.
Dont run this mod on dev versions of Sourcemod. They usually break it.
If you want the Hidden to look like someone/something else, use a plugin like this.
To do list:
- add a translation file
- block taunt damage
- get rid of pointless deaths and frags
- add reimplement ghosts
- add help menu
- fix superjump
- hidden preference
- make pyros and heavies more fun to play
Is this a complete rewrite or can i use this with the previous hidden mod? We have a multimod server just wondering how much would need to be reconfigured.
Is this a complete rewrite or can i use this with the previous hidden mod? We have a multimod server just wondering how much would need to be reconfigured.
Not a complete rewrite but a lot has been changed. Dont think you can use it with the previous version. The previous versions of this mod crash the server. You cant run it without a fix. Besides, the previous version has a lot of bugs, like players joining the blue team. I fixed majority of the bugs present in the previous versions. Plus, I changed a lot of stuff, including the code (changes are mentioned in the first post).
to leave this plugin usable, put an option to activate or deactivate the plugin.
I will use this plugin on a multimod server and keep forcing the plugin to disable with unload commands is bad, not to give conflict between the other plugins.
to leave this plugin usable, put an option to activate or deactivate the plugin.
I will use this plugin on a multimod server and keep forcing the plugin to disable with unload commands is bad, not to give conflict between the other plugins.
You can disable the plugin with sm_thehidden_enabled 0 .
plugin doesnt compile
please fix i really want to play this with my friends on my server
It does. I have to try and compile the plugin before posting it here, because it cant have warnings/errors when its here. Just tested and it compiles fine on the latest stable version of Sourcemod. Dont use dev version, because it wont work well on dev versions of Sourcemod.
It wont compile here. I mentioned it above. Added a compiled version, because the online compiler doesnt work.