User:Ashe/Sandbox

From Valve Developer Community
Jump to navigation Jump to search

More working ladders workarounds for TF2

Brush entity-Based Ladder Workaround

https://tf2maps.net/threads/tip-better-ladder-gameplay.48717/

VScript-Based Ladder Workaround

Ladder from VScript hunted map from ficool2

"gamematerial"

Todo: How does the game assign a letter/number to a material type?

The "gamematerial" parameter in surfaceproperties.txt references an array in game\client\fx_impact.cpp that determines what should a material display when shot (bulletholes, flecks, impact sounds). The base Source 2013 SDK provides a 26 size array. More arrays can be created if necessary. The syntax of the array is:

From Source 2013 SDK:

static ImpactEffect_t s_pImpactEffect[NUMBEROFELEMENTS] = 
{
	{ "impact_antlion",		NULL },							// CHAR_TEX_ANTLION
	{ NULL,					NULL },							// CHAR_TEX_BLOODYFLESH	
	{ "impact_concrete",	"impact_concrete_noflecks" },	// CHAR_TEX_CONCRETE		
	{ "impact_dirt",		NULL },							// CHAR_TEX_DIRT			
	{ NULL,					NULL },							// CHAR_TEX_EGGSHELL		
	{ NULL,					NULL },							// CHAR_TEX_FLESH			
	{ NULL,					NULL },							// CHAR_TEX_GRATE			
	{ NULL,					NULL },							// CHAR_TEX_ALIENFLESH		
	{ NULL,					NULL },							// CHAR_TEX_CLIP			
	{ NULL,					NULL },							// CHAR_TEX_UNUSED		
	{ NULL,					NULL },							// CHAR_TEX_UNUSED		
	{ NULL,					NULL },							// CHAR_TEX_PLASTIC		
	{ "impact_metal",		NULL },							// CHAR_TEX_METAL			
	{ "impact_dirt",		NULL },							// CHAR_TEX_SAND			
	{ NULL,					NULL },							// CHAR_TEX_FOLIAGE		
	{ "impact_computer",	NULL },							// CHAR_TEX_COMPUTER		
	{ NULL,					NULL },							// CHAR_TEX_UNUSED		
	{ NULL,					NULL },							// CHAR_TEX_UNUSED		
	{ NULL,					NULL },							// CHAR_TEX_SLOSH			
	{ "impact_concrete",	"impact_concrete_noflecks" },	// CHAR_TEX_TILE			
	{ NULL,					NULL },							// CHAR_TEX_UNUSED		
	{ "impact_metal",		NULL },							// CHAR_TEX_VENT			
	{ "impact_wood",		"impact_wood_noflecks" },		// CHAR_TEX_WOOD			
	{ NULL,					NULL },							// CHAR_TEX_UNUSED		
	{ "impact_glass",		NULL },							// CHAR_TEX_GLASS			
	{ "warp_shield_impact", NULL },							// CHAR_TEX_WARPSHIELD		
};

Material type letters and numbers

The game can assign a material (defined as CHAR_TEX_ in the SDK) to a letter/number in game/shared/decals.h by the following way: #define CHAR_TEXT_MATERIAL 'NUMBER'.
From surfaceproperties_cs.txt from CS:GO. Several of these won't work in older branches.

// CHAR_TEX_ANTLION			'A'
// CHAR_TEX_BLOODYFLESH		'B'
// CHAR_TEX_CONCRETE		'C'
// CHAR_TEX_DIRT			'D'
// CHAR_TEX_EGGSHELL		'E' ///< the egg sacs in the tunnels in ep2.
// CHAR_TEX_FLESH			'F'
// CHAR_TEX_GRATE			'G'
// CHAR_TEX_ALIENFLESH		'H'
// CHAR_TEX_CLIP			'I'
// CHAR_TEX_GRASS			'J'	// L4D addition
// CHAR_TEX_SNOW			'K'
// CHAR_TEX_PLASTIC			'L'
// CHAR_TEX_METAL			'M'
// CHAR_TEX_SAND			'N'
// CHAR_TEX_FOLIAGE			'O'
// CHAR_TEX_COMPUTER		'P'
// CHAR_TEX_ASPHALT			'Q'	// L4D addition
// CHAR_TEX_BRICK			'R'	// L4D addition
// CHAR_TEX_SLOSH			'S'
// CHAR_TEX_TILE			'T'
// CHAR_TEX_CARDBOARD		'U'	// L4D addition
// CHAR_TEX_VENT			'V'
// CHAR_TEX_WOOD			'W'
//// CHAR_TEX_UNUSED		'X' ///< do not use - "fake" materials use this (ladders, wading, clips, etc)
// CHAR_TEX_GLASS			'Y'
// CHAR_TEX_WARPSHIELD		'Z' ///< wierd-looking jello effect for advisor shield.
// CHAR_TEX_CLAY			1 	// L4D addition
// CHAR_TEX_PLASTER			2	// L4D addition
// CHAR_TEX_ROCK			3	// L4D addition
// CHAR_TEX_RUBBER			4	// L4D addition
// CHAR_TEX_SHEETROCK		5	// L4D addition
// CHAR_TEX_CLOTH			6	// L4D addition
// CHAR_TEX_CARPET			7	// L4D addition
// CHAR_TEX_PAPER			8	// L4D addition
// CHAR_TEX_UPHOLSTERY		9	// L4D addition
// CHAR_TEX_PUDDLE			10	// L4D addition
// CHAR_TEX_MUD				11	// L4D addition
// CHAR_TEX_SANDBARREL		12	// CSGO addition (no penetration)
// CHAR_TEX_SANDBARREL		13	// CSGO addition
// CHAR_TEX_METALSHIELD		14	// CSGO addition
Note.pngNote:CHAR_TEX_UNUSED are for fake materials, like "ladder"

Block bullets but not players

This trick allows to create a fake clipbrush that works as toolsblockbullets but is not solid to players using func_physbox_multiplayer.

Creating the brush

  • Create a func_physbox_multiplayer (maybe just func_physbox) brush entity.
  • Flags:
    • Start Asleep
    • Debris - Don't collide with the player or other debris
    • Motion Disabled
    • Only Break on Trigger
    • Don't Take Physics Damage
    • Don't Allow Bullet Penetration
    • Prevent Motion Enable on Player Bump

Uncheck the rest. Also, set these keyvalues:

  • Material: (Anything)
  • Strength: 0
  • Disable Shadows: Yes
  • Disable Receiving Shadows: Yes
  • Render Mode: Don't Render

$8WayMovement

Animation macro used for most MVM robots run animations.

TF2 / Source 2013 MP? Activity list

Base?

  • ACT_MP_STAND_IDLE
  • ACT_MP_CROUCH_IDLE
  • ACT_MP_CROUCH_DEPLOYED_IDLE
  • ACT_MP_CROUCH_DEPLOYED
  • ACT_MP_CROUCHWALK_DEPLOYED
  • ACT_MP_DEPLOYED_IDLE
  • ACT_MP_RUN
  • ACT_MP_WALK
  • ACT_MP_AIRWALK
  • ACT_MP_CROUCHWALK
  • ACT_MP_SPRINT
  • ACT_MP_JUMP
  • ACT_MP_JUMP_START
  • ACT_MP_JUMP_FLOAT
  • ACT_MP_JUMP_LAND
  • ACT_MP_DOUBLEJUMP
  • ACT_MP_SWIM
  • ACT_MP_DEPLOYED
  • ACT_MP_SWIM_DEPLOYED
  • ACT_MP_VCD

 

  • ACT_MP_ATTACK_STAND_PRIMARYFIRE
  • ACT_MP_ATTACK_STAND_PRIMARYFIRE_DEPLOYED
  • ACT_MP_ATTACK_STAND_SECONDARYFIRE
  • ACT_MP_ATTACK_STAND_GRENADE
  • ACT_MP_ATTACK_CROUCH_PRIMARYFIRE
  • ACT_MP_ATTACK_CROUCH_PRIMARYFIRE_DEPLOYED
  • ACT_MP_ATTACK_CROUCH_SECONDARYFIRE
  • ACT_MP_ATTACK_CROUCH_GRENADE
  • ACT_MP_ATTACK_SWIM_PRIMARYFIRE
  • ACT_MP_ATTACK_SWIM_SECONDARYFIRE
  • ACT_MP_ATTACK_SWIM_GRENADE
  • ACT_MP_ATTACK_AIRWALK_PRIMARYFIRE
  • ACT_MP_ATTACK_AIRWALK_SECONDARYFIRE
  • ACT_MP_ATTACK_AIRWALK_GRENADE
  • ACT_MP_RELOAD_STAND
  • ACT_MP_RELOAD_STAND_LOOP
  • ACT_MP_RELOAD_STAND_END
  • ACT_MP_RELOAD_CROUCH
  • ACT_MP_RELOAD_CROUCH_LOOP
  • ACT_MP_RELOAD_CROUCH_END
  • ACT_MP_RELOAD_SWIM
  • ACT_MP_RELOAD_SWIM_LOOP
  • ACT_MP_RELOAD_SWIM_END
  • ACT_MP_RELOAD_AIRWALK
  • ACT_MP_RELOAD_AIRWALK_LOOP
  • ACT_MP_RELOAD_AIRWALK_END
  • ACT_MP_ATTACK_STAND_PREFIRE
  • ACT_MP_ATTACK_STAND_POSTFIRE
  • ACT_MP_ATTACK_STAND_STARTFIRE
  • ACT_MP_ATTACK_CROUCH_PREFIRE
  • ACT_MP_ATTACK_CROUCH_POSTFIRE
  • ACT_MP_ATTACK_SWIM_PREFIRE
  • ACT_MP_ATTACK_SWIM_POSTFIRE

Primary

  • ACT_MP_STAND_PRIMARY
  • ACT_MP_CROUCH_PRIMARY
  • ACT_MP_RUN_PRIMARY
  • ACT_MP_WALK_PRIMARY
  • ACT_MP_AIRWALK_PRIMARY
  • ACT_MP_CROUCHWALK_PRIMARY
  • ACT_MP_JUMP_PRIMARY
  • ACT_MP_JUMP_START_PRIMARY
  • ACT_MP_JUMP_FLOAT_PRIMARY
  • ACT_MP_JUMP_LAND_PRIMARY
  • ACT_MP_SWIM_PRIMARY
  • ACT_MP_DEPLOYED_PRIMARY (related to the Minigun deployed state? and Sniper rifle zoom in?)
  • ACT_MP_SWIM_DEPLOYED_PRIMARY
  • ACT_MP_CROUCHWALK_DEPLOYED_PRIMARY
  • ACT_MP_CROUCH_DEPLOYED_IDLE_PRIMARY

 

  • ACT_MP_ATTACK_STAND_PRIMARY
  • ACT_MP_ATTACK_STAND_PRIMARY_DEPLOYED
  • ACT_MP_ATTACK_CROUCH_PRIMARY
  • ACT_MP_ATTACK_CROUCH_PRIMARY_DEPLOYED
  • ACT_MP_ATTACK_SWIM_PRIMARY
  • ACT_MP_ATTACK_AIRWALK_PRIMARY

 

  • ACT_MP_RELOAD_STAND_PRIMARY
  • ACT_MP_RELOAD_STAND_PRIMARY_LOOP
  • ACT_MP_RELOAD_STAND_PRIMARY_END
  • ACT_MP_RELOAD_CROUCH_PRIMARY
  • ACT_MP_RELOAD_CROUCH_PRIMARY_LOOP
  • ACT_MP_RELOAD_CROUCH_PRIMARY_END
  • ACT_MP_RELOAD_SWIM_PRIMARY
  • ACT_MP_RELOAD_SWIM_PRIMARY_LOOP
  • ACT_MP_RELOAD_SWIM_PRIMARY_END
  • ACT_MP_RELOAD_AIRWALK_PRIMARY
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_LOOP
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_END

 

  • ACT_MP_RELOAD_STAND_PRIMARY_2
  • ACT_MP_RELOAD_STAND_PRIMARY_LOOP_2
  • ACT_MP_RELOAD_STAND_PRIMARY_END_2
  • ACT_MP_RELOAD_CROUCH_PRIMARY_2
  • ACT_MP_RELOAD_CROUCH_PRIMARY_LOOP_2
  • ACT_MP_RELOAD_CROUCH_PRIMARY_END_2
  • ACT_MP_RELOAD_SWIM_PRIMARY_2
  • ACT_MP_RELOAD_SWIM_PRIMARY_LOOP_2
  • ACT_MP_RELOAD_SWIM_PRIMARY_END_2
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_2
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_LOOP_2
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_END_2

 

  • ACT_MP_ATTACK_STAND_PRIMARY_ALT
  • ACT_MP_ATTACK_CROUCH_PRIMARY_ALT
  • ACT_MP_ATTACK_SWIM_PRIMARY_ALT
  • ACT_MP_RELOAD_STAND_PRIMARY_ALT
  • ACT_MP_RELOAD_CROUCH_PRIMARY_ALT
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_ALT
  • ACT_MP_RELOAD_STAND_PRIMARY_LOOP_ALT
  • ACT_MP_RELOAD_CROUCH_PRIMARY_LOOP_ALT
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_LOOP_ALT
  • ACT_MP_RELOAD_STAND_PRIMARY_END_ALT
  • ACT_MP_RELOAD_CROUCH_PRIMARY_END_ALT
  • ACT_MP_RELOAD_AIRWALK_PRIMARY_END_ALT
  • ACT_MP_RELOAD_SWIM_PRIMARY_ALT
  • ACT_MP_ATTACK_STAND_PRIMARY_SUPER
  • ACT_MP_ATTACK_CROUCH_PRIMARY_SUPER
  • ACT_MP_ATTACK_SWIM_PRIMARY_SUPER

 

  • ACT_MP_ATTACK_STAND_GRENADE_PRIMARY (used for the scrapped grenade weapons?)
  • ACT_MP_ATTACK_CROUCH_GRENADE_PRIMARY
  • ACT_MP_ATTACK_SWIM_GRENADE_PRIMARY
  • ACT_MP_ATTACK_AIRWALK_GRENADE_PRIMARY