Logo135.png We're building a new wiki, so information on this page may be out of date.

We'd love for you to help us out!

Half-Life TAS Mod

From SourceRuns
Jump to: navigation, search
Half-Life TAS Mod
Developer(s) YaLTeR
Released 24.11.2013
Type Single-Player
Game Half-Life
Download v1.4

v1.3
v1.2
v1.1
v1.0
Latest version - 2.0 (docs below!)

This mod is very outdated, contains functionality that has never been in any Half-Life version (therefore making it not legitimate for speedrunning) and is not recommended. Use Bunnymod XT instead.

Half-Life TAS Mod is a mod for making tool-assisted speedruns of Half-Life maps. It is based on Bunnymod Pro, and so has all the functionality from it available.

Features

  • All features from Bunnymod Pro!
  • Perfect strafing for the optimal speed gain!
  • Perfect autojumping!
  • Automatic ducktapping, works like duckroll, but only when you're on the ground!
  • Other interesting stuff!

Important note

When writing a TAS script, make sure to start it with pause, then set up cvars and host_framerate, then insert 4 waits and another pause (you might need more waits, but that has never happened yet and either way it's not too bad if the situation does indeed happen). This needs to be done due to a quirk in GoldSource that delays the user messages for whatever reason. You can look at an example script here (TASmod 2.0 version).

TAS Mod 1.4 and lower documentation

Console variables

  • tas_perfectstrafe_airaccel - set this to the same value as sv_airaccelerate. Defaults to 10, like sv_airaccelerate.
  • tas_perfectstrafe_accel - set this to the same value as sv_accelerate. Defaults to 10, like sv_accelerate.
  • tas_perfectstrafe_friction - set this to the same value as sv_friction. Defaults to 4, like sv_friction.
  • tas_perfectstrafe_maxspeed - set this to the same value as sv_maxspeed. Defaults to 320, like sv_maxspeed.
  • tas_perfectstrafe_autojump - if set to 1, you will automatically jump when your speed is such as that airaccelerating is faster than ground accelerating.
  • tas_perfectstrafe_movetype (0 | 1 | 2) - 0 - optimal angle (maximize the speed), 1 - maximal angle, 2 - backpedalling.
  • tas_autostrafe_airdir (0 - 7) - sets the way of strafing in the air.
  • tas_autostrafe_grounddir (0 - 7) - same as above, for the ground strafing.
   0 - W/S (going left)
   1 - WA/WD
   2 - A/D
   3 - SA/SD
   4 - W/S (going right)
   5 - SA/SD (backwards)
   6 - A/D (backwards)
   7 - WA/WD (backwards)
  • tas_autostrafe_backpedaldir (0 - 7) - sets which movement direction (key) to use for backpedalling.
   0 - D
   1 - SD
   2 - S
   3 - SA
   4 - A
   5 - WA
   6 - W
   7 - WD
  • tas_autostrafe_desiredviewangle - sets the desired viewangle for your auto strafing to accelerate you in. Only has purpose when tas_autostrafe_manualangle is set to 1.
  • tas_autostrafe_manualangle - if set to 1, auto strafing tries to accelerate you in the tas_autostrafe_desiredviewangle angle. Otherwise - whatever angle you're looking at when you enable the auto strafing.
  • hud_velclip (0 | 1) - shows the velocity clip counter. Whenever the velocity is clipped, the counter is increased (reset if no clips in a second), the angle is updated to match the angle of the latest plane the player has clipped against. The counter is green if the player can jump from the plane, red if not, normal console colour if the plane is facing inwards (like a slanted ceiling).
  • cl_printpos (0 | 1) - if 1, prints the player position every input frame.
  • tas_log (0 | 1) - if 1, logs a whole bunch of different info every input frame. Useful for debugging and whatnot.
  • sv_autojump - if set to 1, jumps automatically as soon as you reach the ground, while your jump button is held. Consecutive jumps might happen, use +tas_autojump instead.
  • sv_jumpvelocity - sets the vertical speed that you get when jumping, in units per second. Set to -1 to use the default value.

Console commands

  • +tas_perfectstrafe - enables the perfect strafing. Requires holding both your forward and one of your side strafe keys along with it to work on the ground, and just one of your strafe keys in the air.
  • +tas_autostrafe - enables the automatic strafing. Does not require you to hold anything in the air.
  • tas_stopbhop - if you are perfectstrafing or autostrafing and want to land and continue perfectstrafing on the ground afterwards, execute this command during the last jump.
  • +tas_autojump - enables autojump, jumps automatically as soon as you hit the ground.
  • +tas_groundduck - enables autoduck, works like duckroll, but only when you are on the ground. Has a higher priority than +tas_autojump.
  • tas_setpitch <pitch> - sets the player's pitch (viewangle x).
  • tas_setyaw <yaw> - sets the player's yaw (viewangle y).

Changelog

  • v1.4
    • Major improvements to perfection. Warning: previous TAS's will most likely not work.
    • Added +tas_autojump.
    • Fixed a bug in autostrafing that made strafing to certain angles impossible.
    • Fixed a lot of other bugs, particularly improper strafing while ducking.
    • Added maximal angle strafing and backpedalling.
    • Added tas_perfectstrafe_movetype cvar to control the strafing type.
    • Added tas_autostrafe_air/ground/backpedaldir.
    • Added hud_velclip.
    • Added tas_setpitch and tas_setyaw.
    • Added cl_printpos and tas_log.
  • v1.3
    • Tas_autostrafe_desiredviewangle can now be changed while autostrafing.
  • v1.2
    • Autostrafing is now compatible with high sv_acceleration and sv_airacceleration values! Have fun.
    • Also added a little thing that would make the strafes a tiny little bit more perfect.
  • v1.1
    • Remade auto strafing to make it much faster and more flexible.
  • v1.0
    • Initial release.

Credits

Huge thanks to HL TAS Team and especially Matherunner for various help and for their TAS tools from where I got a bunch of ideas.

See Also

List of Half-Life TAS's

In development - TAS Mod 2.0 documentation

  • v2.0 Download
    • TAS-breaking updates:
    • 09.06.2014: Fixed a bug which I accidentally introduced, which prevented tas_strafe_autojump from working correctly while ducked. It may have also prevented the correct strafing while ducked.
    • 30.05.2014: Another precision improvement, previous TAS's may not work once again.
    • 28.05.2014: Made the prediction a little bit more correct, which made everything more accurate and faster, so your previous TAS's may not work. Also the output of tas_log is now indented to enhance readability.


    • Complete rewrite of the TAS part, many features are not done yet.
    • Stuff that is working partially or completely in the current build is listed here.
    • The tas_enable cvar for globally disabling everything that TAS mod does. Set to 0 to make TAS mod behave like it was clean Bunnymod Pro.
    • The tas_log cvar for outputting huge amounts of various log information (if set to 1), which helps me to debug the mod and which can help you to detect problems in your scripts.
    • The sv_taslog cvar for outputting some log information from the serverside movement code (if set to 1). Both logging cvars are recommended to be used in conjunction with condebug, which is a standart GoldSource console command for writing the console output into the qconsole.log file situated in the directory of your hl.exe.
    • An advanced movement prediction system which will allow me to implement various functionality much more accurately. It will also allow me to automate glitches like jumpbug. At the moment the system is complete with the exception of water and ladder movement prediction, as well as noclip movement prediction (which is quite useless, so it will probably come the latest, if ever).
    • +tas_autojump, which does the same thing as it did in v1.4, but much better and more accurately. Thanks to the prediction system it now understands water and will eventually understand ladders, so you won't have any inconveniences if you bind it instead of +jump. Autojump is controlled by three console variables which are listed below.
    • tas_autojump_ground controls whether autojump should jump if the player has reached the ground, which is the normal functionality.
    • tas_autojump_water is used for making autojump hold the jump key while in deep water where the player can swim up.
    • +tas_ducktap is a function that was known before as +tas_groundduck, but made better through the use of the prediction system as well. From now on it won't hit +duck in places where you cannot ducktap due to reasons like insufficient space. At the moment it works correctly in all cases except for one, which is very rare and specific, that case will be dealt with a bit later.
    • tas_db4c stands for duck before collision. This functionality is controlled as follows: you set the cvar to the count of automatic actions you want it to make, or to -1 if you want it to make infinite automatic actions. So if you set this cvar to 2, it will perform 2 ducks, whenever appropriate. -1 is especially useful for the realtime play when you just jump around and don't know how many times you'll end up in the situation when db4c comes into play.
    • tas_db4c_ceiling controls whether db4c needs to duck before hitting ceilings.
    • tas_db4c_slanted controls if db4c needs to duck before hitting slanted surfaces. This is set to 0 by default so that you can surf normally.
    • +tas_db4f is duck before floor, which means that the mod will duck right before you reach the floor.
    • +tas_strafe - what the mod's all about pretty much. Autostrafing. Highly configurable with the following cvars:
    • tas_strafe_type sets the strafing type. 0 is maximal speed strafing, 1 is maximal angle strafing and 2 is least speed strafing, which can be named backpedalling (however, that's not the case in every situation).
    • tas_strafe_dir sets the strafing direction. -1 and 1 are left and right, respectively; 0 is to the "best" of the given strafe type (not very usefull unless you're least speed strafing), and 2 is strafing to a given yaw angle (viewangle y in the HUD), the behaviour default to 1.4's +tas_autostrafe. 3 is a new thing called "pointstrafe". It strafes to the point with coordinates specified by tas_strafe_point_x and tas_strafe_point_y cvars.
    • tas_strafe_yaw sets the yaw to use for the tas_strafe_dir 2. Works exactly like tas_autostrafe_desiredviewangle from 1.4.
    • tas_strafe_point_x sets the x coordinate of the point for the tas_strafe_dir 3.
    • tas_strafe_point_y sets the y coordinate of the point for the tas_strafe_dir 3.
    • tas_strafe_autojump is the same cvar as tas_perfectstrafe_autojump from 1.4, but made better with prediction. Instead of calculating the speed analytically (which can lead to precision errors) the mod just checks if it's faster to strafe in the air. Works only when maximal speed strafing on the ground.
    • tas_strafe_autojump_on_low_speed controls if it's necessary to tas_strafe_autojump on low velocities. This can only be useful if you need to travel really tiny distances.
    • tas_strafe_*buttons_* where "*" replaces left/right and air/ground is the replacement for _airdir and _grounddir cvars from 1.4. You can now customize the buttons to use for strafing into each side individually. By default those cvars are set to strafe using WA/WD while on the gruond and A/D while in the air. The possible settings can be observed in a table below.
   0 - W
   1 - WA
   2 - A
   3 - SA
   4 - S
   5 - SD
   6 - D
   7 - WD
    • tas_consider_fps_bug should be set to 1 to consider the FPS rounding bug (also known as 501 FPS slowdown) when doing the calculations. This cvar exists due to the FPS bug being fixed in the newer engine versions to stay compatible with them.
    • tas_consider_clientside_entity_trace_bug should be set to 1 to correctly handle the situations where the clientside tracing system doesn't correctly process an entity you're standing on at times.
    • hud_ladderinfo shows the ladder info HUD element, which displays the normal components of the ladder the player was on a frame ago.
    • tas_calc_ladder_viewangles outputs the viewangles you need to set to climb the current ladder optimally up and sideways. There's no good way of getting the ladder info without being one frame late, so what you have to do is get onto a ladder, tas_calc_ladder_viewangles, and then manually climb it in your tas script.
    • tas_setpitch and tas_setyaw work exactly like the ones from TAS mod 1.4, with one small difference: if you're setting the yaw, the strafing is not calculated to not waste your speed accidentally.
    • tas_paused - set this to 1 if the game is paused on the current frame and to 0 if it's unpaused. The way of getting the paused state which is used in the old TAS mod is a bit inaccurate - it provides the data that is one frame late, which is, in fact, very bad. I haven't yet managed to find a clean way of getting the up-to-date paused state, so for now you have to set this up manually. Basically you can just modify the slowmotion aliases to contain "pause;tas_paused 1;<waits>;pause;tas_paused 0;wait" and that will work perfectly.
    • All cvars for setting various movement parameters (like tas_perfectstrafe_airaccel) are now optional and were renamed from tas_perfectstrafe_ to tas_custom_. By default the mod will pull the present movement parameters from the appropriate server variables relieving you from setting them up manually. If you want to override the values you can set tas_use_custom_cvar_values to 1, as soon as you do so the mod will use the values from tas_custom_ cvars instead.
    • There is a HLAE-compatible motion exporter built in for exporting accurate player position (not camera position!). Note that the motion exporter requires constant FPS throughout its operation. You can set the filename using the tas_motionexporter_filename cvar. The .bvh extension is added automatically. The file will be created in your current working directory (check hl.exe shortcut settings). To enable or disable exporting, use tas_motionexporter_enable, when it's set to 0 the exporter is disabled, and enabled otherwise. Example of usage: put tas_motionexporter_enable 1 in the beginning of your script, where the action starts, and tas_motionexporter_enable 0 in the end of the script.
    • You can export your TAS Mod script into a script runnable by clean Half-Life. This feature is very experimental. The cvar names are prefixed with tas_scriptexporter. _filename sets the file name for the script, without an extension. _demoname sets the name which is inserted into the record command inside the exported script. _savename - same, for the save command. If _demoname is empty, no record command is inserted, same for the _savename. The _enable cvar works exactly like the motionexporter one, but does not require a constant framerate (you can even export realtime gameplay!).
Personal tools