TFC Jump Trainer
v0.9a
This plugin is for making training courses that involve flying targets, by recording weapon jumps and having bots follow them, as can be seen in
http://www.youtube.com/watch?v=UIAFT0nCzRI .
It requires FoxBot to be installed (any version), and for one or more bots to be in the game on the team you want to defend against (blue by default). No other setup is needed on that end.
A recorded jump simulates one of the long weapon jumps that TFC is well known for, and for short manual hops if you need it to (it can simulate bunny hopping to some extent).
To make one, you prepare a jump (lay pipe bombs, prime a concussion grenade, etc.),
say jumprec, and let fly.
As soon as you leave the ground, a series of nodes are created along your trajectory until you land, then you are teleported to the beginning of that newly-created jump so that you can test it, since jump recording isn't exact due to various limitations.
The green dots (jump nodes) can be moved around with +grabit if they're in the way, and you might want to hide them so that queued bots aren't visible during training.
A training course would include a few of those jumps, and one or more of the following:
Props (created through the /cc menu):
Fake capture pad: It is meant to be placed on the actual capture pads of attack/defend style maps, like avanti or dustbowl, to simulate defense of it with a training course. It's solid during setup, so you can move it around, and unsolid during training.
When a bot touches the ground within that block's area, a "<botname> capped!" message occurs, and that bot is reset.
Escape wall: Any bot that flies through it during training mode is rewarded a few frags and reset, with a "<name> escaped!" message generated, so you would place it at the end of a hallway you want to defend. It's also solid during setup and unsolid during training.
Fake flag: Generates a message upon touch, for testing your flag pipe timing possibly. Does not reset the bot.
To move those props around, bind a key to
+grabit, aim at the prop, press that key and move your mouse.
You can make up to 9 courses per map, and 20 jumps per course.
The default course is 1, so jumps will be assigned to it until you switch by saying
c#, where # is the course of choice; for example, say c3 to switch to course 3.
Say "
start1" to start a training session, once the jumps are set up. After you do that, all props and jumps become invisible, the bots will randomly choose a jump in the current course, follow the jump trajectory, and either be killed by the player, be teleported back by a prop (like the capture pad), or hit the ground and roam around for an adjustable time before being reset.
Saying "
start2" starts that session with visible props and jumps.
Saying "
stop1" stops the training session and re-enters setup mode (which is on by default upon map start).
Say
/cc to enter the course creation menu, where you can add props, adjust course details or pick a player effect, like infinite grenades and no-reload mode.
The teleportation commands can make course creation and use easier. They are:
save#: Saves the player's location to slot #, where slots 1 to 9 are written to file, but require admin_slay privilege to create
go#: Teleports the player to the location stored in slot #, where 1 to 9 can be used by any player, and 0 is the position saved right before a jump is created
zapto: Teleports the player right next to the position being aimed at. It's used a few times in the youtube video.
Lastly, all of your changes are saved to a <mapname>.cfg and <mapname>tele.cfg file in the <amxmodx>/configs/JT folder.
Other commands:
traineron: Enables no-reload, infinite grenades and health for the player
traineroff: Disables the above
noclipme: Toggles noclip
quad: Gives the player quad
giveall: Gives the player all weapons
vs<teamcolor>: Change this to the team color you want to train against, for example 'vsgreen' (default blue)
Cvars:
fakelag: (Native to Half-Life, and requires sv_cheats 1): This lets you simulate network lag if you're hosting the game server locally, to refine your pipebomb detonation timing.
roamdelay: Changes the time that bots roam around upon landing
pointsforcap: Adjusts the points awared per fake cap
nodeheight: Increases the height a player is given when using a jump
jumpdelay: Adjusts the wait time before a jump is used again
nodesens: Adjusts the sensitivity of connected jump nodes (it's recommended that you leave this at the default of 15, though you can tweak it to see if it helps for sharper turns)
--------------------------------------------------------------------------------------
Demo.zip contains an example of setting up and using jumps, which was designed to be as easy as I could manage. To view it, you will need the sprites and models zip.
Consider this a holiday gift for the fast-shrinking TFC community.
Also, thanks to the players who playtested it: Moogle, DLC, Static, tn|Snow, auntydan, cocoageejo, and Mr. CR1M1NAL.
The code is still in alpha and uncommented, until I add the last two features: jump coordination (varying levels beyond random, written to file), and additional save slots.