www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
 
Thread Tools
Old 27-09-15, 10:12   #1
1upMushroom
Archaeologist
 
1upMushroom's Avatar
 
Join Date: Jun 2009
Location: UK
Posts: 1,938
Default Changing Lara's jump physics

Is Lara on a planet with different gravity?
Is Lara young, and less skilled?
Are you using a character other than Lara?

Whatever your reason for changing her jumping ability, this guide will help you do so.

In this tutorial:
1. Pertinent animations
2. Changing jump height with Set Grab Position
3. Lower Block vaulting
4. Higher block vaulting

Part 1 Pertinent animations:
16 - Running jump
18 – Running Jump
74 – Back Jump
76 – Forward Standing Jump
78 – Left Jump
80 – Right Jump
91 – Jump straight up

(The block-vault sequence 26 to 27 has hardcoding to get around, dealt with in part 3)

Part 2: Changing jump height with Set Grab Position
In Wadmerger's animation editor, the “set grab position” command is found in the anim commands window. (anim commands is the 2nd button from right, the numbers icon)

What the values mean: The first value is the height, and the second value the arc length.
A higher arc with the same arc length value will travel further.
Note that the height value is negative

Height guide:
-50 = 4 clicks
-75 = 5 clicks
-95 = 6 clicks
-110 = 7 clicks
-125 = 8 clicks
-135 = 9 clicks
-148 = 10 clicks

Part 3: Block Vaulting Animations
The complication:
When Lara jumps to grab a block, the game engine sets the height of the block as the grab position, and applies the grab position when anim 27 is played.
So anim 27 has to be in sequence to satisfy the engines need for the 6 or 7 click jump, this is hardcoded.

If you direct the anim sequence to avoid anim 27, the engine has not applied the set grab position, so the next time she jumps she will jump to that height, magically.

However, 27 doesn't have to be part of a jump sequence to satisfy the engine. It can be a one-frame standing animation.

Step 1
First, we need to have an animation sequence for 4-5 click blocks.

Copy anim 26 into an open slot, with next anim 28.
Be sure to change the grab position to 5 clicks (-75, 2)

The script line:
Animation= 497, KEY1_UP + KEY1_ACTION, IGNORE, IGNORE, ENV_MULT_CONDITION, 1, IGNORE, -103 ;Low vault
MultEnvCondition= 1, ENV_SUPPORT_IN_FRONT_WALL, $154, IGNORE, ENV_FREE_HANDS, IGNORE, IGNORE ;Low vault
(The $154 means, at least 1 click space above the block, 5 clicks max, 4 clicks min)

Step 2
Replace anims 26 and 27 with single frames of anim 103 (standing)
Set the state id of anim 27 to 19 with next anim 103.
Set grab position of anim 26 to be the same as you have for 91. (You need to do this, the engine will take this value after applying anim 27)

Now, when Lara is in front of a high block, the engine will play 26 and 27 (standing,) then go back to 103; and she won't magically jump to a forbidden height.

Part 4 Higher block vaulting
Suppose you were setting Lara to jump higher; and wanted a corresponding vault animation.
Copy Anim 26 into an open slot, with an appropriately high grab position, and next anim 28.

If you wanted her to vault to 9 clicks:
The script line:
Animation= 497, KEY1_UP + KEY1_ACTION, IGNORE, IGNORE, ENV_MULT_CONDITION, 1, IGNORE, -103 ;High vault
MultEnvCondition= 1, ENV_SUPPORT_IN_FRONT_WALL, $198, IGNORE, ENV_FREE_HANDS, IGNORE, IGNORE ;High vault
(The $198 means, at least 1 click space above the block, 9 clicks max, 8 clicks min)
__________________
Don't eat any mushrooms that look like this.
1upMushroom is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 02:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.