jump.tf Forums
Welcome B)

TAS Plugin

nolem · 97 · 103662

ondkaja

  • Newbie
  • *
    • Posts: 38
    • Frags: +0/-0
    • View Profile

Hmm I haven't actually worked on the plugin in a very long time, but based on some of my old code that is now commented out I feel like this should be handled:
Code: [Select]
/* No real need for this any more with the ghost tick thing, it accounts for it
if (ucmd->buttons & IN_DUCK && !(recording.getCommand(teleportToFrame - ghostTicks).buttons & IN_DUCK)) {
Msg("[TAS] Crouch Mismatch\n");
}
if ( !(ucmd->buttons & IN_DUCK ) && recording.getCommand(teleportToFrame - ghostTicks).buttons & IN_DUCK) {
Msg("[TAS] Crouch Mismatch\n");
}
*/
Basically, for the period of the "ghost ticks" (the time before it starts recording again while it has control) it should be completely overriding player input and teleporting you every tick, so even if there was initially a mismatch I feel like it should smooth out (and apparently that's what I thought in the past too).

Is this something you can consistently reproduce? As in it's not some funky edge case right at the bounds of the ghost tick window? I haven't gotten a chance to look at the recording yet - sorry if it's clear from looking at it. Any extra info you have would be helpful until I have a chance to investigate more.

Also, I was actually working on getting a working dev environment on my current computer a few weeks ago, but worst case I still have my other computer lying around somewhere that has it working.

Okay so some info about the recording. It's basically a recording that will automatically edgebug. However it only seems to only edgebug if you press the crouch button AFTER you regain control of the character. It seems that if you hold control while regaining control of the character, the edgebug will not work (even though it should). This seems to be very consistent as well.




firestabber

  • Newbie
  • *
    • Posts: 34
    • Frags: +0/-0
    • View Profile
Nobody's mentioned it here yet, but a discussion in the Tempus discord this morning has led to the discovery that rockets saved midair as part of a savestate end up giving slightly more knockback than normal rockets do (they deal 100 base damage instead of 90).  Hopefully there will be a fix soon!  Thanks to Voyager for starting discussion about the issue and Larry for confirming the problem and attributing it to the change in base damage. 


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
Hey everyone, sorry it's been a little bit since I've posted an update here... my old computer that had a working setup for building the plugin had shit the bed, and I hadn't been able to figure out how to get it to compile on my new machine, so I kinda just forgot about it.

Buuuutttt, Shadow Sheep brought up one issue with the .recording files that I was vaguely aware of from years back, and one day later Larry let me know about this rocket damage issue, so I kinda felt like working on it again. After a bit of fiddling, I've been able to get it to compile!

The rocket damage issue is obviously pretty bad, and I'm really sorry that this issue wasn't caught sooner. The explanation for why generated rockets have 100 damage and not 90 is pretty straightforward - I barely knew what I was doing when I wrote the plugin (still don't), and basically copied the implementation of rocket spawning from https://forums.alliedmods.net/showthread.php?t=253219&page=2, which has a 100 damage rocket spawn. There are other posts elsewhere in this thread that use 90 damage, but silly me didn't know what I was doing. Kind of a crappy explanation, but at this point it is what it is - not much I can do to change the past. Again, I'm very sorry this hasn't been caught until now, but I'll have a fix out for it soon  :'(

On that note, I'm working a new build of the plugin that has these issues fixed. At present, I am aware of the following issues:
* respawned rocket damage should be 90 instead of 100
* precision issues when saving and loading .recording files from disk
* ondkajas issue with ghost ticks
* always says 'Unknown command', even if it's a valid tas command

If anyone else has more concrete issues that they can describe and I can reproduce, I'd love to get some other issues fixed while I'm working on it. Additionally, if anyone has more general feedback on the plugin's commands, ammo handling, ghosting before checkpoint resumes, or literally anything else with the plugin, I'm open for suggestions.

That is NOT a promise that I'll implement everyone's feature requests, but I'd like to see what might be generally useful for the plugin.

Please reply here or shoot me a message on discord/steam (discord preferred)

Thanks :)
« Last Edit: June 04, 2021, 12:10:29 AM by nolem »


cowboyana

  • Newbie
  • *
    • Posts: 25
    • Frags: +0/-0
    • View Profile
If anyone else has more concrete issues that they can describe and I can reproduce, I'd love to get some other issues fixed while I'm working on it. Additionally, if anyone has more general feedback on the plugin's commands, ammo handling, ghosting before checkpoint resumes, or literally anything else with the plugin, I'm open for suggestions.

That is NOT a promise that I'll implement everyone's feature requests, but I'd like to see what might be generally useful for the plugin.

Please reply here or shoot me a message on discord/steam (discord preferred)

Thanks :)

if you're considering feature requests, it would be amazing if this plugin could save state for stickybombs mid flight. i know vphysics is a pain to work with though, so understandable if that can't happen


Gorge004

  • Proficient
  • ****
    • Posts: 323
    • Frags: +1/-0
    • View Profile
TAS working with map regen. Idk how that would ever work tho considering you would have to ignore the regen triggers during the ghost ticks and reset the regen timer when you reload.

TAS working with attribute triggers. Currently anytime you reload a checkpoint you lose whatever attributes you previously had. You probably would want to make your own "attribute plugin" for this to work since the triggers itself are super buggy and never work. Most important ones would be airstrike attributes, knockback attribute, reload speed and firing speed. They are the most commonly used in maps.

There is a bug where you can fire rockets earlier than you would normally be able to if you hold m1 during the ghost ticks. So if you save a state right after shooting a rocket (anywhere between 0-0.8s), when you reload and hold m1 you will be able to shoot a rocket right after the ghost ticks end even if you shouldnt be able to.  sometime it also feels like you can shoot during the ghost ticks when you hold m1 but I cant confirm that, just feeling that you seem to shoot faster than usual when holding m1.


Elandi!!

  • Newbie
  • *
    • Posts: 44
    • Frags: +0/-0
    • View Profile

ondkaja

  • Newbie
  • *
    • Posts: 38
    • Frags: +0/-0
    • View Profile
Just another bug report. My game crashes if I use "tas load" with a name that doesn't exist, which is a bit annoying.


seras/roberto

  • Novice
  • **
    • Posts: 94
    • Frags: +0/-0
  • hello
    • View Profile
    • Steam

dipp

  • Novice
  • **
    • Posts: 80
    • Frags: +0/-0
    • View Profile
TAS plugin doesn't save the rockets of a cow mangler, please fix that! :D


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
Alright, just updated the link in the main post with the update, and here is the link again: https://drive.google.com/file/d/0B3PhHB4Z67zRUHpSV0t2Q3BLN2c/view?usp=sharing

Everyone should download this new version

Here are the changes included in this release:
* Spawned rockets have 90 damage instead of 100
* Recording files and exported CSVs now save decimals out to 6 places, instead of using 6 total digits
* tas commands will no longer show as unknown commands
* tas list on a map with no recordings will display properly
* tas load <name> no longer crashes the game when the recording doesn't exist

Thanks to Larry and Shadow Sheep for doing some testing for me!

Also thanks for calling out some of the other issues. As far as my general priority order for which ones I want to tackle, it looks something like this:
* Gorge's issue where you can fire a rocket earlier than expected. I've been able to reproduce this, but haven't quite pinned down the cause yet. I suspect it may be related to ondkaja's issue from a few months back, but if not,
* Ondkaja's issue
* Stickies - I've tried to do this in the past and could never quite figure it out, but maybe I'll be able to :shrug:
* Attributes - Would like to do this, but to be honest, I'm not sure what it will entail. We'll see how it goes
* Cow mangler rockets - probably pretty straightforward, but not exactly top priority...
* Regen - To be honest, in the past I tried to deal with controlling ammo, but it was a pain to try and make it play nice with map regen. Maybe there's a decent approach here, but not high on my list

The first two are definitely bugs, so the rest are lower priority.

@Elandi - Is there a reason why you couldn't just rewind and recreate the checkpoint? Undo button doesn't seem super necessary to me

 Please let me know if you run into any new issues. Also still open to any additional suggestions/ideas about the plugin's commands, hud, behavior, etc, so feel free to leave an idea!
« Last Edit: June 05, 2021, 09:46:46 PM by nolem »


dipp

  • Novice
  • **
    • Posts: 80
    • Frags: +0/-0
    • View Profile
Not sure if this was brought up before, but a big issue with TAS is that in the demo recording, the damage indicators are very frequently buggy and not showing correctly.

Here are some examples (I've included the timestamp in the caption since for some reason I can't include the timestamp in link).

Incorrect amount of damage indicators for a quint (3:17):


Damage indicators not even showing up (0:15):


Incorrect damage indicator for a speedshot. It uses the damage indicator you'd see from a wallshot or pogo (1:43):


Incorrect damage indicator for a wallshot. It uses the damage indicator you'd see for a speedshot (0:21):


Fix please! :D

« Last Edit: June 09, 2021, 12:11:46 AM by dipp »


ondkaja

  • Newbie
  • *
    • Posts: 38
    • Frags: +0/-0
    • View Profile
Here are the changes included in this release:
* Spawned rockets have 90 damage instead of 100
* Recording files and exported CSVs now save decimals out to 6 places, instead of using 6 total digits
* tas commands will no longer show as unknown commands
* tas list on a map with no recordings will display properly
* tas load <name> no longer crashes the game when the recording doesn't exist

Regarding this precision change, it doesn't seem like the plugin resets the angle to the correct position. The experiments I have made confirm this. I have included some examples below, which were gotten by typing "getpos" in console, saving the state and resetting, and typing "getpos" again, without moving the mouse.

Initial value: 89.000000 -90.082397 0.000000
Reset value: 88.994751 -90.082397 0.000000

Initial value: 44.641338 -169.704956 0.000000
Reset value: 44.637451 -169.700317 0.000000

Initial value: 19.583820 152.032806 0.000000
Reset value: 19.583130 152.028809 0.000000

It seems that the reset value is what you get if you use the console commands "setang" or "setang_exact" on the initial values, so I don't know if this is actually possible to patch, since the Source engine's own commands are imprecise. But if it is possible to fix, it would be awesome as it would help a lot with finding angle bhops.


Larry

  • Intermediate
  • ***
    • Posts: 116
    • Frags: +3/-0
    • View Profile
IIRC I ran into a similar issue when making my ga bot and there was something funky about the engine SetViewAngles func. I ended up just setting viewangles in the CUserCmd* that gets passed to CreateMove. Nolem's tas seems to use both, not sure if that does anything.


Gorge004

  • Proficient
  • ****
    • Posts: 323
    • Frags: +1/-0
    • View Profile
not sure if this is something that came with this new version of tas, but when I saved a 89k tick tas it softlock my computer for a good 3-4 minutes before it actually saved and gave me back control over my computer.

I made longer tas before and I don't remember having this problem when saving.

In the end the tas did save correctly and everything is good, just seems like it took way too long.


Voyager

  • Newbie
  • *
    • Posts: 14
    • Frags: +0/-0
    • View Profile
can you make it so that you can override previous tas saves with the same file name? maybe include a yes/no prompt so that people dont accidentally override

also i made an updated offline jump pack post including the latest tas release here if you wanna update the "really quick download guide" link