Thread: [FF2] Cloak Pack Abilities
View Single Post
Author Message
LordHotPocketHomicide
Member
Join Date: Aug 2016
Location: This Realm of Existence
Old 02-14-2021 , 22:08   Cloak Pack Abilities
Reply With Quote #1

I've always liked the idea of stealth hales in FF2, though I don't think I've ever seen a boss get it quite right. I figured I'd try and solve part of this by writing a simple ability pack that lets users do some fancy things using invis watches!


#1: Cloak Speed
Very self-explanatory. This ability allows the user to have a set speed while cloaked.
Code:
"abilityX"
{
	"name"		"cloakpack_speed"
		
	"arg0"		"520.0" 	//Boss' speed while cloaked (1.0 - 520.0)
		
	"plugin_name"	"ff2_cloakpack"
}
#2: Status Invulnerability
Allows the user to become invulnerable to various status effects while cloaked. Really useful for making hales hard to track while invisible.
Code:
"abilityX"
{
	"name"		"cloakpack_statinvuln"
		
	"arg0"		"1"	//Milk immunity while cloaked
	"arg1"		"1"	//Flame immunity while cloaked
	"arg2"		"1"	//Gas immunity while cloaked
	"arg3"		"1"	//Bleed immunity while cloaked
	"arg4"		"1"	//Jarate immunity while cloaked
	"arg5"		"1"	//Marked-For-Death immunity while cloaked
	"arg6"		"1"	//Flicker immunity while cloaked (cloak doesn't glow when bumping/taking damage)
	"arg7"		"1"	//Stun immunity while cloaked
		
	"plugin_name"	"ff2_cloakpack"
}
#3: No Collision
Allows the user to pass through opponents while cloaked. Works similarly to Le Fantôme, as seen in Karma Charger's video.
Code:
"abilityX"
{
	"name"		"cloakpack_nocollision"
		
	"arg0"		"0.05"		//Additional  cloak drain per tick while in contact with another player while cloaked (can be anywhere from 0.0 to 100.0, though anything above 0.1 gets insanely fast)
	"arg1"		"2"		//Which method should be used to handle instances where the user decloaks inside of an enemy player?
					//0: User cannot decloak inside of other players
					//1: User can freely decloak
					//2: User can decloak, and will kill whoever is touching them at that point in time (much like a telefrag)
	"arg2"		"125.0"		//Distance the boss must be from a player upon decloaking in order to be considered "stuck". Collision models for players in TF2 have a height of 83.0 and a width of 49.0, so you should consider these to be minimum values.
		
	"plugin_name"	"ff2_cloakpack"
}
#4: Damage Control
Modifies all damage the user takes while cloaked, potentially adjusting their cloak meter.
Code:
"abilityX"
{
	"name"		"cloakpack_damage"
		
	"arg0"		"0.5"		//Amount to multiply all damage taken while cloaked
	"arg1"		"0.0"		//Amount to drain user's cloak when hit while cloaked
		
	"plugin_name"	"ff2_cloakpack"
}
#5: Cloak Particles
Gives the user some fancy particles. One spawns when cloak is activated, another follows the user like a trail while their cloak is active, another spawns when cloak is deactivated.
Code:
"abilityX"
{
	"name"		"cloakpack_particles"
		
	"arg0"		""				//Particle effect to display when cloak is activated (blank for none)
	"arg1"		"passtime_tv_projection"	//Particle effect to display while cloaked (blank for none)
	"arg2"		"root"				//Particle attachment point for arg3 (blank for none)
	"arg3"		""				//Particle effect to display when cloak is deactivated (blank for none)
	"arg4"		"1.5"				//Arg0 particle lifetime (0.0 = permanent. Alternatively, particles which are designed to only play once rather than loop, such as explosions, will only play once if this is 0.0)
	"arg5"		"3.0"				//Arg3 particle lifetime (Same rules as arg4)
	"arg6"		"root"				//Arg0 particle attachment point
	"arg7"		"root"				//Arg3 attachment point
		
	"plugin_name"	"ff2_cloakpack"
}
#6: Cloak Sounds
Allows the user's cloak to emit sounds. Works similarly to Cloak Particles, just with sounds instead of particles. NOTE: Your sounds won't play unless you include them in the sound_precache section of your CFG!
Code:
"abilityX"
{
	"name"		"cloakpack_noise" 
		
	"arg0"		"player/resistance_medium4.wav"		//Sound played when cloak is activated, relative to the sound folder (blank for none)
	"arg1"		"100"					//Arg0 volume, 1-255 (default: 100)
	"arg2"		"passtime/tv2.wav"			//Passive sound while cloak is active, relative to the sound folder (blank for none)
	"arg3"		"75"					//Arg2 volume, 1-255 (default: 100)
	"arg4"		"player/resistance_heavy1.wav"		//Sound played when cloak is deactivated, relative to the sound folder (blank for none)
	"arg5"		"100"					//Arg4 volume, 1-255 (default: 100)
	"arg6"		"1"					//Sound mode (0: boss cannot hear their own sounds, 1: all can hear)
	"arg7"		"6.5715"				//Arg2's sound duration, in seconds, if not blank (more precise = smoother looping)
		
	"plugin_name"	"ff2_cloakpack"
}
#7: Cloak Overcharge Bomb
An extra ability I wrote for fun. Allows the user to charge a customizable explosive while cloaked, which automatically activates when the user decloaks, assuming it's not on cooldown and they have sufficient rage to trigger the bomb. NOTE: As with Cloak Sounds, the sounds you choose for this ability must be included in the config's sound_precache section, otherwise they won't play.
Code:
"abilityX"
{
	"name"		"cloakpack_overcharge_bomb"
		
	"arg0"		"0.0"							//Base damage
	"arg1"		"1.0"							//Damage gained per 0.1 seconds the user is cloaked
	"arg2"		"0.1"							//Damage gained per point of damage taken while cloaked
	"arg3"		"500.0"							//Max explosion damage
	"arg4"		"25.0"							//Base explosion radius
	"arg5"		"1.02"							//Amount to multiply the explosion radius per 0.1 seconds the user is cloaked
	"arg6"		"1.02"							//Amount to multiply the explosion radius per point of damage taken while cloaked
	"arg7"		"1250.0"						//Max explosion radius
	"arg8"		"1.5"							//Damage falloff strength (1.0 = no falloff)
	"arg9"		"30.0"							//Time, in seconds, between each overcharge explosion
	"arg10"		"50.0"							//Rage cost per overcharge explosion
	"arg11"		"4.0"							//Duration to stun the user before the explosion occurs (0.0 = no stun, no warning, the user just explodes as soon as they decloak)
	"arg12"		"freak_fortress_2/pentagonthief/teleport.mp3"		//Warning sound to play when the user decloaks, if arg11 isn't 0.0 (blank for none)
	"arg13"		"WARNING: THE BOSS' CLOAK IS ABOUT TO OVERCHARGE!"	//Warning message to play to all enemies when the user decloaks, if arg11 isn't 0.0 (blank for none)
	"arg14"		"misc/halloween/spell_spawn_boss.wav"			//Overcharge bomb sound effect (blank for none)
	"arg15"		"0"							//If the user decloaks without triggering an overcharge explosion, should their stats be reset? 0: no, 1: yes
	"arg16"		"-1.0"							//HUD X position (-1.0 = center)
	"arg17"		"0.1"							//HUD Y position (-1.0 = center)
	"arg18"		"1"							//Should the user be invulnerable while stunned by the overcharge's activation? (Only used if arg11 isn't 0.0)
	"arg19"		"fireSmoke_collumn_mvmAcres"				//Particle name used for the overcharge explosion
		
	"plugin_name"	"ff2_cloakpack"
}
#8: Cloak Pack Model Fix
Something weird I noticed about TF2's cloak system is that it doesn't always work; what I mean by that is if a model has custom textures or particles attached to it, you don't become invisible when cloaking. This extra ability I wrote solves that by changing your model to that of a stock spy while you're cloaked, then back to whatever it's supposed to be when you decloak.
Code:
"abilityX"
{
	"name"		"cloakpack_fixmodel"
	"plugin_name"	"ff2_cloakpack"
}
Attached Files
File Type: sp Get Plugin or Get Source (ff2_cloakpack.sp - 138 views - 36.8 KB)
File Type: smx ff2_cloakpack.smx (18.9 KB, 180 views)
__________________
Professional retard. I might borrow some code, but I always try to give credit when I do! If you've noticed I've borrowed some of your code, and you have a problem with that, please add me on Steam and let me know so I can correct the problem as soon as possible!

Last edited by LordHotPocketHomicide; 03-05-2021 at 17:21. Reason: Fixed a bug with damage control and added model fix
LordHotPocketHomicide is offline