Ranking
Original Post
Basic Replay Haxing
TABLE OF CONTENTS
Introduction and basic information - [INTRDINF]
Basic replay editting - [HAXTIME]
POS, LINVEL, ANGVEL - [POLIAN]
Ending crap + special thanks - [ENSP]
__________________________________________________ ______________________________
================================================== =====================
[INTRDINF]

Replay haxing, quite simple if you have the common sense. I figured the stuff I know on my own, some of it may be wrong, but bear with me, if you do spot something wrong or out of place, please tell me about it.

First things first, you need a replay. Open up toribash, move some joints around, save it, and you got yourself a replay! Alrighty, once that is done, go to your toribash replay directory (CProgram Files\Toribash-x.xx\replay is default [x.xx depends on what version you have])



Now open up your replay with your favourite text editor (notepad for me).



At first glance, it may look intimidating. But, it really is quite simple.

Now look at this,


This line, tells the game settings. I am not sure what a few of them are, though.
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Match frames
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Turn frames
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Game flags
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Engage distance
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Engage height
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Game mod.
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Dismember Threshold
NEWGAME 0;1000 1 0 0 0 2 500 0 0 classic 0 0 100 0 0 0 1 0 2 0 0 0 Fracture threshold

NOTE: The ones I didn't name are the ones I have no clue, or am too lazy to experiment to find out .

SECOND NOTE: This line is constantly changing throughout versions as new features are implemented. Try not to rely on it too much.



FRAME 0; This indicates which frame the lines after effect. Numbers after the semi colon indicate game points. So there could be up to 4 players, by just editting the replay you can achieve it, but why bother when other people have already?http://forum.toribash.com/showthread...404#post174404

Every time you move a joint or something else happens (emotes, dismembers) a new line for the frame appears. So sometimes some frames are missing in the replay, that is because nothing is really "happening." I can't really explain it better than that.



Lets talk about the player variables. Any number in the replay that comes after letters in caps and before the semi colon is the player variable(other than in the line that states frames). It tells the game which player is getting "this" done to. 0 = Your tori, 1 = Uke. I will get more into this later.


__________________________________________________ ___________________________
================================================== ==================
[HAXTIME]
Now, onto the actual haxing itself.



As you can see, I editted this replay already. Let me explain. After the line ANGVEL I added a few commands. EMOTE and CRUSH. EMOTE is well... an emote. The 0 after that represents your tori as I explained earlier, so basically what that line is telling the game to do is make your tori to emote "bang bang" on frame 23(as it comes after FRAME 23, and before all the other frames, in this case, nothing.) CRUSH 1; is telling the game to dismember a part on uke. The 0 after the semi colon is the part that is getting dismembered. You can get a full list of the body part numbers at here (thanks to Jok). There are also GRIP commands, which I haven't experimented enough with to tell you how it works.

TIP: For CRUSH commands and FRACT commands you can list them as CRUSH 1; 0 1 2 3 4 5 instead of writing them out individually as I did. (thanks Juntalis)

I went a little bit power hungry and dismembered every part. You can see the outcome of this on the replay I attached.

I am not sure how to dismember parts in the middle of a replay without it glitching up terribly. I don't think it is possible.

__________________________________________________ __________________________________
================================================== =========================
[POLIAN]
Originally Posted by Skjef View Post
Line 8:
JOINT 0; 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 4 12 4 13 4 14 4 15 4 16 2 17 2 18 4 19 4
<joint number> <joint state> <joint number> <joint state> ... <joint number> <joint state>
The joint numbers are as follows:
0 = neck
1 = chest
2 = lumbar
3 = abs
4 = right pec
5 = right shoulder
6 = right elbow
7 = left pec
8 = left shoulder
9 = left elbow
10 = right wrist
11 = left wrist
12 = right glute
13 = left glute
14 = right hip
15 = left hip
16 = right knee
17 = left knee
18 = right ankle
19 = left ankle
The joint states are as follows:
If a joint isn't listed, it also counts as relax.
1 = extend/right rotate/right bend
2 = contract/left rotate/left bend
3 = hold
4 = relax
The number after JOINT means this command refers to either tori or uke. 0 = tori, 1 = uke.
JOINT is identical for tori and uke.

Line 9:
POS 0; 1.000000 7.400000 2.590000 1.000000 7.450000 2.140000 1.000000 7.450000 1.890000 1.000000 7.500000 1.690000 1.000000 7.550000 1.490000 0.750000 7.450000 2.090000 0.450000 7.450000 2.240000 0.050000 7.450000 2.240000 1.250000 7.450000 2.090000 1.550000 7.450000 2.240000 1.950000 7.450000 2.240000 -0.350000 7.400000 2.240000 2.350000 7.400000 2.240000 0.800000 7.550000 1.390000 1.200000 7.550000 1.390000 0.800000 7.550000 1.040000 1.200000 7.550000 1.040000 1.200000 7.550000 0.440000 0.800000 7.550000 0.440000 0.800000 7.450000 0.040000 1.200000 7.450000 0.040000
<x co-ordinate> <y co-ordinate> <z co-ordinate> <x co-ordinate> <y co-ordinate> <z co-ordinate> ... <x co-ordinate> <y co-ordinate> <z co-ordinate>
Each triplet of x,y,z co-ordinate refers to a different joint, using the same ordering scheme as the JOINT list above. So, the first triplet refers to the neck joint, the second triplet to the chest joint, etc..., and the last triplet refers to the left ankle joint.
The y axis is directly towards uke, as seen from tori. The x axis is perpendicular to the y axis, and the z axis is straight up and down.
The reason the numbers for the y co-ordinates are so high is because I used a 1500 engage distance for this replay. The regular value for y co-ordinates at an engage distance of 100 is about 0.4.
The number after the POS means this command refers to either tori or uke. 0 = tori, 1 = uke.
POS is identical for tori and uke.

Okay, to sum that quote up. It pretty much is that each "triplet" stands for a joint. It is the same order as the joints listed in the first section of the quote.


If you mess around with the POS, the joint you mess around with teleports to the spot you told it to. the first number in the triplet represents the X co-ordinate. Which is if uke and tori are facing each other its left and right. The second integer in the triplet is the Y co-ordinate, which is forward and backwards. The last number is the Z co-ordinate, which is pretty much up and down, or quite simply, height.
In testing2 I use LINVEL to add momentum to my head and launch it at uke. In testing3, I teleport my head behind Uke's with POS and it stays there because I copy the POS value for a few frames, instead of letting the replay run normally, and it teleports back to its original position by copying the frame before I teleported the head. Make sense?

ANGVEL is the rotation of the joint, like how fast it will spin, and LINVEL is force.

Playing with a mod. There seems to be a new type of line.

EPOS 0; 1.00000000 0.00000000 4.17917055
EQAT 0; 1.00000000 0.00000000 0.00000000 0.00000000
EANGVEL 0; 0.00000000 0.00000000 0.00000000
ELINVEL 0; 0.00000000 0.00000000 -10.19315977


Notice the E in front of POS, QAT, ANGVEL, and LINVEL? It's for the enviroment. It pretty much is the same as everything else. Only it has 1 triplet per environment object. An interesting thing with environment is that if you try to edit only one thing from the different lines (Let's take ELINVEL for example) every other value of each line seems to get set back to 0.

All the XYZ co-ordinates for me so far, are just hit and miss, as I do not know whats going to do what. So if the integer is negative, and it flies behind you. It is common sense to make it positive to make it teleport in front of you. Note that this is only for POS.


Under construction

__________________________________________________ _________________________________________
================================================== ===============================

Thats about all I figured out so far, I shall update this regularly until I cover off most things like XYZ co-ordinates (which I really have no clue how they work, but just bear with me as I suffer). shotputfinal.rpl in your replay folder is a REALLY great example of replay editting.
Attached Files
#testing.rpl (11.9 KB, 1093 views)
#testing2.rpl (136.4 KB, 729 views)
#testing3.rpl (120.2 KB, 763 views)
#SpinTheBottle!.rpl (513.2 KB, 1095 views)
Last edited by WorldEater; Oct 28, 2017 at 09:17 AM.
Can you tell if I haxed this replay? (press "E" to look at old joints)
this helped out a lot! +rep
Last edited by Beeh; Feb 14, 2008 at 05:12 AM.
Meow, I am quite a cat these days.
Even though no one knows me, I know more about them than they know of me.
Originally Posted by goodmonkey View Post
Can you tell if I haxed this replay? (press "E" to look at old joints)
this helped out a lot! +rep

Yep, you sure did. I am no expert at this yet. Everything I wrote so far, is what I figured out this night. I saw a single player replay with some emotes, and got curious as to how it was done. Everything took about 3 hours, which is REALLY quick for a tutorial if you ask me. But I think the outcome so far is pretty good.
Alright, I'm slowly figuring out the XYZ axis's. Expect a huge overhaul to this tutorial by tonight or tomorrow morning.

EDIT: I am gonna put some of the stuff down here that I've figured out so far, just so I know where it is. My logic is pretty messed up, but it works, so just ignore this little section. POS 0; 0.623772 4.794531 1.980862 refers to, if uke and tori are facing each other, left and right. X = left and right. POS 0; 0.623772 4.794531 1.980862 forward and backwards. POS 0; 0.623772 4.794531 1.980862 Refers to height. There doesn't seem to be a surefire way to be able to do mess around with that and get exactly what you want first try. Sort of a hit and miss thing. In order to dismember after hacking the replay so something "shoots" at uke. You have to press E right before that part is going to hit uke and then space. I don't know why parts seem to fly out off in some direction when you mess with pos. But I will try to come up with the solution.

Replay attached is the replay of me playing with POS values.
Attached Files
#testing2.rpl (136.4 KB, 334 views)
Last edited by Moltex; Dec 24, 2007 at 08:47 PM.