Game Tracker: Counter-Strike 2
repository·master·Indexed 21 days ago
https://github.com/steamtracking/gametracking-cs2A specialized tracking tool for Counter-Strike 2 and part of the SteamTracking ecosystem. It automates the monitoring and tracking of game-related files and data, including documentation for the ConVar Helper subtool, Hammer Editor commands for navigation and texture mapping, and light_environment entity configuration.
What's inside gametracking-cs2
- Game Tracker: Counter-Strike 2 is a specialized component of the SteamTracking ecosystem designed to automate the tracking of Counter-Strike 2 related data. It is part of the larger GameTracking project which manages file tracking and data collection for various games.
Use the alpha channel for paint masking and durability
masterColor textures can include an optional alpha channel to control how paint behaves on the weapon surface, particularly for Gunsmith finishes.
Paint Masking and Durability Rules
- Subtracting Refinishable Areas: Using values around 196 in the alpha channel subtracts from the refinishable areas of the weapon.
- Default Behavior: Values of 128 or 255 have no effect; the finish wears using default behavior.
- Increasing Durability: Values below 128 increase the durability of the finish. The darker the value, the more durable the paint.
When to use a pattern's alpha channel
- When your design requires more coverage than the default.
- When your design requires more of the substrate (the original material) to be revealed.
- When important design features wear too quickly.
- When important design features should never wear down to the substrate.
Configure Cloth Simulation with ClothChains
masterClothChains are used to generate cloth around joint hierarchies. They can simulate strips (flags, banners) or tubes (braids, thick tails) by extruding the joint chain.
Key Concepts
- Extrusion: Use
extrude_sidesto define the shape (1 = left strip, 2 = left/right strip, 3 = triangular tube, etc.) andextrude_radiusto set thickness. Setextrude_radiusto 1 or more to see any effect. - Simulation Control: Use the
simulatecheckbox to determine if a joint is free to move (checked) or fixed by animation (unchecked). The root of a chain is always fixed. - Goal Strength & Damping:
goal_strength(0..1) dictates how much the cloth follows its animated "goal".goal_dampingcontrols how fast the cloth snaps to that goal. - Stray Radius & Box:
stray_radiusdefines a spherical boundary around the animated position. If a vertex leaves this radius, it is yanked back.stray_box(format:x y z) provides a box-shaped boundary instead. - Spring Types:
- Stretch Springs (Red): Connect structurally closest elements.
- Bend Springs (Yellow): Skip one parent.
- Torsion Springs (Blue): Skip two parents.
- Advanced Dynamics:
- Stiff Hinge: Resists small bends (5-15 degrees) by pulling child, parent, and grandparent together. Use
stiff_hinge_angleto allow bending up to a certain degree without resistance. - Motion Bias: Controls how motion travels through the chain. A bias of 1 ensures motion travels down the chain (parent to child) but not up (child to parent), useful for rigid antennae.
- Twist Relax: Distributes twist along the chain to prevent sudden flips or discontinuities in branching chains.
- Stiff Hinge: Resists small bends (5-15 degrees) by pulling child, parent, and grandparent together. Use
/* Example configuration logic for a cloth chain */ clothchain.extrude_sides = 2; // Left and right strip clothchain.extrude_radius = 1.0; clothchain.goal_strength = 0.5; clothchain.goal_damping = 0.5; clothchain.stray_radius = 5.0;- Extrusion: Use
Help System Formatting and UI Elements
masterThe help system uses specific string patterns and HTML-like tags to render documentation. Key formatting elements include:
- Links: Uses
<a href='...'>for navigation. Internal links follow the pattern<a href='helpsystem:%s'>%s</a>. - Images: Embedded via
<img src='%1' />. - Coloring: Supports hex color formatting using
<font color=#%02x%02x%02x>. - Status Indicators:
<font color='#ff0000'><u>STALE HELP:</u></font>indicates outdated documentation.<p align=right><font color=red>(Help: [Not Bound])</font></p>indicates a command with no associated help.
- Tables: Documentation can be structured in tables using
<table width='100%%'>.
- Links: Uses
Understand Weapon Wear Value Ranges
masterWeapon finishes are categorized by wear values. While many finishes cover the full range from Factory New to Battle Scarred, some may have specific ranges. On application, random values are chosen within the specified range to ensure each application is unique.
Standard Wear Value Ranges:
- Factory New: 0.00 - 0.07
- Minimal Wear: 0.07 - 0.15
- Field Tested: 0.15 - 0.37
- Well Worn: 0.37 - 0.44
- Battle Scarred: 0.44 - 1.0
Set particle lifespan based on animation length
masterUse
C_INIT_SequenceLifeTimeto set a particle's lifespan based on the animation length of its sequence at a specific framerate. This is useful when particles consist of multiple sequences with varying lengths.Tip: If the
Render_Animated_Sprites'use animation rate as FPS' flag matches these settings, the particle's lifespan and animation will map perfectly.Understand the color application process for patterns
masterIn CS2, weapon patterns are applied in layers. The process starts with a base coat that covers all paintable areas, followed by the color channels from your pattern texture in a specific order:
- Base Coat
- Red Mask (Red channel)
- Green Mask (Green channel)
- Blue Mask (Blue channel)
Use the Operator Fade Group for advanced timing
masterThe Operator Fade Group allows you to fine-tune when an operator influences an effect. These properties are relative to the emitter lifespan, not the individual particle's life.
Standard properties include:
m_flOpStartFadeInTime/m_flOpEndFadeInTimem_flOpStartFadeOutTime/m_flOpEndFadeOutTimem_flOpFadeOscillatePeriod: If set, fade times become values between 0.0 and 1.0 relative to this oscillation period.
Example Oscillation: Setting an oscillation period of
4, a fade in of.25, and a fade out of.75results in the operator being inactive for 1 second, active for 2 seconds, and fading out for 1 second, before looping.Pull Nav Areas From Child Prefabs/Instances
masterUse the
Command.ToolNavMesh.PullFromChildrencommand to 'pull' navigation areas from child prefabs into the current map.Usage Rules:
- Root Map Only: This command only works when editing the current root map; it cannot be used while editing a prefab in-place.
- Selection-Based: If objects are selected, the command only pulls nav from the selected prefabs/instances. This allows for incremental updates to specific prefabs.
- Depth Limit: It pulls nav from child prefabs but deliberately does not pull nav from grand-child prefabs.
- Warning: The command does not check for nav area duplication. Running this command multiple times on the same prefab may result in duplicate nav areas.
Command.ToolNavMesh.PullFromChildrenAuthoring PBR-compliant textures for CS2
masterCS2 uses Physically Based Rendering (PBR). Weapon finishes must be authored within specific RGB reflectance ranges to respond correctly to in-game lighting. Using values outside these ranges may result in textures being rejected from the workshop.
Metallic Finishes
For finishes like Anodized Multicolored, Patina, and metallic portions of Gunsmith, the effective RGB range is typically 180-250. Values as low as 90 may be acceptable depending on saturation.
Non-Metallic Finishes
For non-metallic finishes, the effective reflectance range is between 55-220.
Use custom Paint-By-Number masks
masterAll finishable weapons are divided into regions. Paint-by-number masks control which areas can be anodized, given a patina, or receive patterns and accent colors.
g_bOverrideDefaultMasks: Enables a custom mask texture.g_tPaintByNumberMasks: The texture defining these regions. The red channel specifically masks the painted area.
Note: Certain areas (shell casings, inside barrels, firing rods, etc.) are predefined and will not be refinished. The best way to visualize these areas is to load the weapon in the CS2 Workshop Item Editor and assign colors.
Authoring textures for Physically Based Rendering (PBR)
masterCS2 uses Physically Based Rendering (PBR), which requires weapon finishes to be authored within specific RGB ranges to respond correctly to in-game lighting. Finishes outside these ranges may be rejected from the workshop.
Metallic Finishes
For materials like Anodized Multicolored, Patina, and metallic portions of Gunsmith, use an effective RGB range between 180-250. Values as low as 90 may be acceptable depending on saturation.
Non-Metallic Finishes
For non-metallic finishes, the effective reflectance range is between 55-220. Albedo values outside this range will not respond appropriately to lighting.