Skip to content

Instantly share code, notes, and snippets.

View sigsegv-mvm's full-sized avatar

sigsegv sigsegv-mvm

View GitHub Profile
@sigsegv-mvm
sigsegv-mvm / 20210113-CTFBotGenerator.txt
Created January 14, 2021 05:06
A dense and probably horrendously difficult-to-understand description of how the bot_generator and bot_action_point entities work
CTFBotGenerator / bot_generator
================================================================================
bool m_bSuppressFire = false ; kv "suppressFire"
bool m_bDisableDodge = false ; kv "disableDodge"
bool m_bUseTeamSpawnpoint = false ; kv "useTeamSpawnPoint"
bool m_bRetainBuildings = false ; kv "retainBuildings"
int m_iOnDeathAction = 1 ; kv "actionOnDeath"
int m_spawnCount = 0 ; kv "count"
int m_maxActiveCount = 0 ; kv "maxActive"
float m_spawnInterval = 0.0f ; kv "interval"
@sigsegv-mvm
sigsegv-mvm / l4d2_difficulty.txt
Last active September 10, 2022 15:33
L4D2: things affected by game difficulty
L4D2: things affected by game difficulty
research by sigsegv: 2020-01-03
Boomer::ShouldBackOff(void)
- easy: alters back-off behavior in some manner
BoomerSelfDestruct::OnStart(Boomer *,Action<Boomer> *)
- determines timer (4.0/2.0/1.0/1.0)
BoomerVomitOnVictim::OnStart(Boomer *,Action<Boomer> *)
@sigsegv-mvm
sigsegv-mvm / item_meter_attributes.txt
Created November 14, 2019 05:05
TF2 attributes related to "item_meter"
item_meter_charge_type: 2-bit bitmask
bit 0 [0x1]
- if set: CTFPlayerShared::UpdateItemChargeMeters will passively recharge
- only if item has IHasGenericMeter as a base class
- only when item->ShouldUpdateMeter() returns true
- rate is based on: item_meter_charge_rate * mult_item_meter_charge_rate
- rate is also affected by item->GetMeterMultiplier()
bit 1 [0x2]
- if set: CTFPlayer::OnDealtDamage will recharge when dealing damage
- but not if: playing MvM mode and playing as pyro and weapon is in secondary slot
@sigsegv-mvm
sigsegv-mvm / TEX_file_format.txt
Last active October 19, 2024 07:31
Reverse-engineered EXAPUNKS ".TEX" texture file format details
TEX FILE FORMAT
Reverse engineering by sigsegv, 20180914.
All values are little-endian.
0x00 int: TEX file version / magic number [1002 = 0x000003EA]
0x04 int: data resolution [x]
0x08 int: data resolution [y]
0x0C int: color format { 0 => invalid, 1 => 8BPP, 2 => RGBA }
0x10 int: display resolution [x]
@sigsegv-mvm
sigsegv-mvm / mvm_calico_b1a_tank_damage_filter_analysis.txt
Created January 6, 2018 06:17
A quick (untested) analysis of mvm_calico_b1a's tank-protecting filter_damage_type entities
filter_bullet1 20200000 DMG_BUCKSHOT|DMG_USEDISTANCEMOD
filter_bullet2 20300000 DMG_BUCKSHOT|DMG_USEDISTANCEMOD|DMG_CRITICAL
filter_bullet3 00200002 DMG_BULLET|DMG_USEDISTANCEMOD
filter_bullet4 00300002 DMG_BULLET|DMG_USEDISTANCEMOD|DMG_CRITICAL
filter_bullet5 02100002 DMG_BULLET|DMG_USE_HITLOCATIONS|DMG_CRITICAL
---------------------------------------------------------------------------------
filter_blast1 00240040 DMG_BLAST|DMG_HALF_FALLOFF|DMG_USEDISTANCEMOD
filter_blast2 00340040 DMG_BLAST|DMG_HALF_FALLOFF|DMG_USEDISTANCEMOD|DMG_CRITICAL
filter_blast3 00040040 DMG_BLAST|DMG_HALF_FALLOFF
filter_blast4 00140040 DMG_BLAST|DMG_HALL_FALLOFF|DMG_CRITICAL
@sigsegv-mvm
sigsegv-mvm / tf2__g_aWeaponDamageTypes__20171214a.txt
Created January 6, 2018 05:49
TF2 weapons' damage type bits (g_aWeaponDamageTypes)
TEAM FORTRESS 2 WEAPON DAMAGE TYPES (g_aWeaponDamageTypes)
Current as of TF2 version 20171214a
Dumped by sigsegv
NOTE: these are NOT necessarily the actual damage bits that will be used;
weapon code CAN and WILL modify these flags and/or use different ones in many cases
(most obvious example: DMG_CRITICAL is OR'd on when crit-boosted)
@sigsegv-mvm
sigsegv-mvm / tf2_damagebits.txt
Created January 6, 2018 05:46
TF2 damage type bits/flags
TF2 DAMAGE BITS
BIT MASK NAME
--------------------------------------------------------------------------------
xx 00000000 DMG_GENERIC
00 00000001 DMG_CRUSH
01 00000002 DMG_BULLET
02 00000004 DMG_SLASH
03 00000008 DMG_BURN
04 00000010 DMG_VEHICLE
@sigsegv-mvm
sigsegv-mvm / tf2_mvm_pop_file_keywords_20171214a.txt
Last active March 30, 2024 03:25
TF2 MvM Pop File Keywords, as of Dec 14 2017
TF2 MVM POP FILE KEYWORDS LIST
by sigsegv
accurate as of TF2 20171214a
note that some valid keywords listed in this document may be vestigial and do nothing in the current game
Base KeyValues Format "Directives"
==================================
#include "file"
#base "file"
@sigsegv-mvm
sigsegv-mvm / tf_player_scaling.cpp
Created November 27, 2017 00:27
TFPlayer body part scaling speeds
// TF2 20171020a server_srv.so
// reverse engineering by sigsegv
float CTFPlayer::GetDesiredHeadScale()
{
float desired = 1.0f;
CALL_ATTRIB_HOOK_FLOAT(desired, head_scale);
return desired;
}
@sigsegv-mvm
sigsegv-mvm / tfbot_parachute_logic.cpp
Last active March 30, 2024 03:28
TFBot AI logic for using the BASE Jumper item
// Based on ServerLinux 20170616a
//
// SUMMARY: when TFBots have the BASE Jumper equipped, they will press their jump button in the following manner:
//
// If their parachute is not yet deployed, they will start holding down the jump button to deploy it if:
// - their health is at least 50%
// - AND they are not on fire
// - AND they are moving downward
// - AND they are at least 300 HU above the ground