Endurance Onslaught 6.0
Original Post
Replay Recorder
This script is supposed to provide replay information for advanced replay hacking and I also added some other shenanigan. It's designed to work with Toribash 4.5, I don't know if it works in later versions and I'm even less sure if I'd be able to make it work with later versions.

Known bugs: Don't use numbers in replaynames! Will be fixed later.

Huge thanks to Yoyo and stew who helped me to create this script! Stew wrote the basic recording function and Yoyo helped me extend it with all these features (or rather wrote it himsef )

Download the script and load it ingame.
First command:
simply type /record playerid inputfile outputfile parameters

Command explained:
playerid = set 0, 1 or 2 to record Tori(0), Uke(1) or both(2)
inputfile = this name is taken straight from the replayfolder. If you type blah it takes blah.rpl from your replayfolder
outputfile = the file it records to. If you type blaha it will create a file called blaha.rpl in your replay folder(careful about overwriting files)

Parameters:
By default it records everything on every frame but you can change that with a few parameters.
-pos = doesn't save POS lines
-linvel = doesn't save LINVEL lines
-angvel = doesn't save ANGVEL lines
-qat = doesn't save QATlines
-dm = doesn't save CRUSH lines (dismemberments)
-grip = doesn't save GRIP lines (griprecording is still wip)
dmonce = saves CRUSH only when it happens (automatically disables save on every frame)
Numbers = Put 2 numbers there to determine a frame intervall in which you want to record. These numbers represent the countdown you see at the top of the screen. So to determine the intervall space+p to the frame you want to start, write down the number, space+p to when you want to end and write down that number.

Example command:
/record 2 Discipline output -pos -qat -angvel 500 300
Saves Discipline.rpl from 500 to 300 without pos, qat or angvel lines to output.rpl

Second Command:
This let's you start a replay from the middle of another replay.
command is /startfrom playerid inputfile outputfile parameter

Command explained:
Everything like before but the parameter now determines the frame where you want to start from. So shift+p to where you want to start and use that number. The script then records 25 frames before and puts that at the beginning of outputfile.rpl

Command to merge the replays back together is currently under construction.
Attached Files
recordframe.lua (7.8 KB, 294 views)
Last edited by NutHug; Jan 4, 2014 at 05:50 PM. Reason: finally able to fix YOYOS name
Oblivion: that wasn't hilarious
Oblivion: it was brilliantly complex though
Oblivion: hands down man
Oblivion: today I genuinely believe more than I ever did before
Oblivion: that you are better than me
Oblivion: gg NutHug

Like my stuff?
Join my FunClub or subscribe on Youtube
Worked with 4.62 when I tested it.

This is a ridiculously amazing script for hacking replays.
I'll make a quick tutorial on a use of it when I have the time to.
We're still kids in buses longing to be free.
lua code:
function sign(num)
if num >= 0 then
return 1
end

return -1
end

function mat2qat(rot)
local q = {w = 0, x = 0, y = 0, z = 0}

q.w = math.sqrt(math.max(0, 1 + rot.r0 + rot.r5 + rot.r10)) / 2
q.x = math.sqrt(math.max(0, 1 + rot.r0 - rot.r5 - rot.r10)) / 2
q.y = math.sqrt(math.max(0, 1 - rot.r0 + rot.r5 - rot.r10)) / 2
q.z = math.sqrt(math.max(0, 1 - rot.r0 - rot.r5 + rot.r10)) / 2

q.x = q.x * sign(q.x * (rot.r9 - rot.r6))
q.y = q.y * sign(q.y * (rot.r2 - rot.r8))
q.z = q.z * sign(q.z * (rot.r4 - rot.r1))

return q
end


This bit of code is really cool, it transforms a 4*4 rotation matrix (get_body_info().rot) into a quaternion, that is actually the rotation format used in replays.

Here's a snippet from nut's script:
lua code:
f:write("QAT " .. i - 1 .. ";")
for j = 1, 21 do
local quaternion = mat2qat(get_body_info(i - 1, j - 1).rot)
f:write(" " .. round(quaternion.w, 6) .. " " .. round(quaternion.x ,6) .. " " .. round(quaternion.y, 6) .." " .. round(quaternion.z, 6))
end
f:write("\n")

To give you an idea of how it's used.

Also, nut's script has some really messy code in it, I'll probably help him do a cleanup soon.
Last edited by Yoyo; Jan 4, 2014 at 08:30 PM.
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men
Originally Posted by Yoyo View Post
I'll probably help him do a cleanup soon.

Yoyo: first I'll have to do a cleanup of the code
Yoyo: that's a very hacky thing
Nutstone McHugginson: hahaha no!
Yoyo: yes
Yoyo: I'm definitely
Nutstone McHugginson: I don't want you to spend another 5 hours to clean up my shit
Nutstone McHugginson: it makes me feel bad
Yoyo: well I want to
Yoyo: and you can't stop me
Oblivion: that wasn't hilarious
Oblivion: it was brilliantly complex though
Oblivion: hands down man
Oblivion: today I genuinely believe more than I ever did before
Oblivion: that you are better than me
Oblivion: gg NutHug

Like my stuff?
Join my FunClub or subscribe on Youtube
I can barely understand your explanation of the script cause I'm a retard but I'll go fuck around with this thing.
"they're like enormous pillows of disgusting girly meat" ~Orih 2016
My Replays
Hey, for latest version moving your replay to stock replays/ folder, instead of my replays, should work
Not Super Moderator Discord: Aliosa#5260 ; If you have any questions don't PM me
for latest latest versions do /opt replaycache 0 to fix it if it's not working

fixed as of 5.60/5.70
Last edited by jsph; 4 Weeks Ago at 06:21 PM. Reason: update