www.tombraiderforums.com  

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

Reply
 
Thread Tools
Old 17-01-20, 12:07   #19651
SebCroc
Historian
 
SebCroc's Avatar
 
Join Date: Nov 2011
Location: Australia
Posts: 393
Default

Quote:
The Stop sliding animation might be in this case, and the issue would be that the corresponding function has no code that will trigger the Run state. Probably just because they forgot, nothing more. That means that even if you put the correct State change in the animation to trigger animation 246 (stop sliding to run), practically it won't ever be triggered.
(I've seen your EDIT after typing this, so in this case there's no issue but it's still applicable to other animations)
I had the vaguest idea that something of this sort was happening; it's nice to have an abstraction of the actual reason behind it now. It was indeed the issue in this case, but:

Quote:
you could try changing the Stop sliding animation's state to 2 (the Stand state). If there is no side effect, then that means you can safely trigger the Run animation using a simple State Change, and it will work.
Yep, this was just about what I did to get it working.
  • I changed the inherent StateID of the stop-sliding animation (71) to stand (2),
  • made a run-forward (1) state change possible between frames 0 to 1,
  • leading into slide-to-run animation (246) if executed.

The animation frames match as well as they need to, and it ends up being functionally identical to a "true" implementation. There is one side effect: Lara can now rotate during the stumble animation. I think this is a subtle perk, as it means Lara's controls are now that bit more responsive. My general intent is to do just that.

Quote:
the Jump state won't be triggered until frame 19 of the run animation is reached at least once
That's a curious detail. I had the idea of making a jump equivalent to the distance of a standing hop possible before running one block, so now I wonder if there's a way around this.

Quote:
I haven't got in too much details
It was truly all I needed. Surely this is basic stuff for you, so thank you for taking the time to write that. Infinite thanks.
__________________
Braids please :)
SebCroc is online now   Reply With Quote
Old 17-01-20, 16:11   #19652
Krystian
Explorer
 
Join Date: May 2010
Posts: 964
Default

Quote:
Originally Posted by SebCroc View Post
Surely it's possible to do. How did SSJ6Wolf create this crawlspace roll without TRNG scripts? https://www.trsearch.org/item/2255
However complicated it gets, I'm up for it.
In case you're still interested to know how SSJ6Wolf set this one up, it's actually really clever and I must admit I'm still quite impressed with the solution to this day.

Basically, the idle crawling animation ("on all fours") has one frame where Lara faces the the opposite direction - just one frame. Before and after this the animation is normal. The animation commands panel shows that there are two "Change Direction" effects applied to this flipped frame and the frame right after it. Change Direction is also used for the various roll (Up + Down) animations: on ground, in air and underwater. This explains why in game you don't notice anything, that one frame is flipped in the animation, but simultaneously there is a Change Direction effect so it cancels out (180+180 = 360, which looks the same as 0) . Then the next Change Direction effect reverts it back to normal again for the rest of the animation.

But what is the purpose of this gimmick? Here's where the brilliance shines through, for this one flipped frame (that doesn't looked flipped in game thanks to the effect), there is a State Change that uses the StateID of the "exit crawlspace and hang" move, i.e. StateID 88. But it leads to animation 421, which is indeed the "roll out of crawlspace" animation. And this also explains why the key combination of action + down is needed to trigger the move, because it uses the same StateID Change the as the exit crawlspace backwards move. Pretty neat, huh?
And of course the animation 421 also needs to have the Change Direction effect applied to the first frame to again revert Lara to the original facing, as it is triggered after the first Change of Direction and before the second.

This solution does have its drawback of Lara being able to perform this move only in a single frame window of the idle animation, which means the move isn't as responsive. And of course there was a lot more stuff that needed to be taken care of, similarly the State Changes to "start crawling forwards", "start crawling backwards", etc. had to be handled separately on this single frame, and these animations themselves had to also be seperated to have the Change Direction effect reapplied again to change the facing. But this comes to show how involved this solution is. And for being done with the features available before the TREP/TRNG era, it was really quite the accomplishment imho.

Be sure to check out the other animations, they were also done with similar exploits behind them, it's quite interesting.

Last edited by Krystian; 17-01-20 at 16:15.
Krystian is offline   Reply With Quote
Old 17-01-20, 16:48   #19653
Patricia_S
Student
 
Patricia_S's Avatar
 
Join Date: Oct 2008
Location: Bordeaux, France
Posts: 133
Default

(solved)
__________________
Building: Sanctuary Fantasy [Tomb Raider X Saint Seiya]

Last edited by Patricia_S; 17-01-20 at 16:56. Reason: solved
Patricia_S is offline   Reply With Quote
Old 18-01-20, 10:51   #19654
SebCroc
Historian
 
SebCroc's Avatar
 
Join Date: Nov 2011
Location: Australia
Posts: 393
Default

Quote:
Originally Posted by Krystian View Post
Basically, the idle crawling animation ("on all fours") has one frame where Lara faces the the opposite direction - just one frame.
Aha, so that was the weird flashing frame in the animation editor. I didn't know about Change Direction. Clever indeed.

There might be one way to improve responsiveness: "flip" Lara every second frame, though I realise that requires even more bookkeeping. It's of no use to me now since I discovered what TREP can do, and engine patches are what I need where I can get them. The crawlspace vault is handled better through TREP, and so is the crouch roll. Putting it all together into a TR4 mod will be fun. (Yikes.)

I got the stand-to-crouch-abort working perfectly. It's so cool when you see results!
__________________
Braids please :)
SebCroc is online now   Reply With Quote
Old 18-01-20, 11:33   #19655
CheshireBitch
Archaeologist
 
CheshireBitch's Avatar
 
Join Date: Jan 2012
Posts: 1,483
Default

Quote:
Originally Posted by CheshireBitch View Post
Hello,
I have an "animations" problem and I don't get how to fix it.

I use the bird switch from TR5 in the "PULLEY" slot, with the TR5 animation.
Not anything fancy, just want Lara to use it once and then I'm fine (even set a One Shot for the "switch for pulley".) (This is what I use: https://www.trsearch.org/item/4276)

Problem is: TR4 pulley thing has 3 animations of Lara using it (339, 340 and 341) the bird switch in the pulley slot only use one animation (339). Everything is working great but when Lara is finished using it, she plays anim 340 and 341 (the middle and end of the original TR4 pulley animation) which looks ugly. If I replace anims 340 and 341 with any other anim to hide the fact that it's a 3 part animation (11, or another one) she gets stuck in a loop of that anim placed in 340 and you can't play anymore.

What can I do to make Lara go back to normal after playing anim 339 ? Or to prevent her to get stuck in a loop with anim 340/341 ?

I really know nothing about animations but replacing them. I tried some things by looking around in wadmerger but didn't get any results...

UPDATE: Problem solved
So I replaced anim 340/341 with the anim 11 (so she won't move after playing the anim 339). By changing anim 340 and 341 she was stucked on 340 for ever. What I did to bypass this looping hell is that the one-shot pulley she's using triggers an hidden rolling ball in an unreachable room. This rolling ball triggers not only the door and camera related to the birdswitch but also a flipeffect that forces her to play the original Anim11. It reboots Lara very fast and she's not stuck in a loop anymore.
In game the illusion is perfect. Just need to get her in the exact same spot for each anim so it's perfectly smooth but at least it's working.

Also thanks to Mulf who talked with me on PM and made me tried a few things that worked very well too. (like having the birdswitch not in a pulley slot but in a switch slot)

The only not solved yet mystery is : how to make the birdswitch usable more than once ! But it's not usefull in my level so we'll see that later I guess.

Last edited by CheshireBitch; 18-01-20 at 11:38.
CheshireBitch is offline   Reply With Quote
Old 18-01-20, 21:47   #19656
SSJ6Wolf
Archaeologist
 
SSJ6Wolf's Avatar
 
Join Date: Nov 2004
Location: Connecticut, US
Posts: 1,453
Default

Quote:
Originally Posted by SebCroc View Post
I'm determined to get the slide-to-run animation (246) working without the use of TRNG scripts, even if I have to resort to unintuitive workarounds, but I'm stumped as to how StateIDs work. Is there a guide or something that details the kinks with the StateID system, for instance why StateID changes sometimes seemingly aren't enough to trigger an animation?

Surely it's possible to do. How did SSJ6Wolf create this crawlspace roll without TRNG scripts? https://www.trsearch.org/item/2255
However complicated it gets, I'm up for it.

Same thing with the stand-to-crouch-abort animation (303). The state changes appear to already be there in stand-to-crouch (217), ready to go... so why is the game not able to register when I've let go of the crouch button (supposedly in the "stop" state (2)), while in the stand-to-crouch animation?

Very new to this, but I'm having fun messing around.

EDIT: OMG I got the slide-to-run working!! Now to make the transition smooth. I'm getting a better grasp on StateIDs as I tinker around.
I’m glad to see you’ve had success so far. If you haven’t seen this tutorial yet, give it a look. I put a lot of notes about StateIDs toward the end of it - see chapter 4. Making new maneuvers without an engine will feel like hitting a brick wall on occasion, but it can be a fun challenge as well.

Last edited by SSJ6Wolf; 18-01-20 at 21:53.
SSJ6Wolf is offline   Reply With Quote
Old 19-01-20, 08:14   #19657
Joey79100
Professor
 
Joey79100's Avatar
 
Join Date: Mar 2012
Location: France
Posts: 3,074
Default

Quote:
Originally Posted by Krystian View Post
In case you're still interested to know how SSJ6Wolf set this one up, it's actually really clever and I must admit I'm still quite impressed with the solution to this day.

Basically, the idle crawling animation ("on all fours") has one frame where Lara faces the the opposite direction - just one frame. Before and after this the animation is normal. The animation commands panel shows that there are two "Change Direction" effects applied to this flipped frame and the frame right after it. Change Direction is also used for the various roll (Up + Down) animations: on ground, in air and underwater. This explains why in game you don't notice anything, that one frame is flipped in the animation, but simultaneously there is a Change Direction effect so it cancels out (180+180 = 360, which looks the same as 0) . Then the next Change Direction effect reverts it back to normal again for the rest of the animation.

But what is the purpose of this gimmick? Here's where the brilliance shines through, for this one flipped frame (that doesn't looked flipped in game thanks to the effect), there is a State Change that uses the StateID of the "exit crawlspace and hang" move, i.e. StateID 88. But it leads to animation 421, which is indeed the "roll out of crawlspace" animation. And this also explains why the key combination of action + down is needed to trigger the move, because it uses the same StateID Change the as the exit crawlspace backwards move. Pretty neat, huh?
And of course the animation 421 also needs to have the Change Direction effect applied to the first frame to again revert Lara to the original facing, as it is triggered after the first Change of Direction and before the second.

This solution does have its drawback of Lara being able to perform this move only in a single frame window of the idle animation, which means the move isn't as responsive. And of course there was a lot more stuff that needed to be taken care of, similarly the State Changes to "start crawling forwards", "start crawling backwards", etc. had to be handled separately on this single frame, and these animations themselves had to also be seperated to have the Change Direction effect reapplied again to change the facing. But this comes to show how involved this solution is. And for being done with the features available before the TREP/TRNG era, it was really quite the accomplishment imho.

Be sure to check out the other animations, they were also done with similar exploits behind them, it's quite interesting.
Wow that is quite some dedication. I'm glad we don't need to resort to such workarounds as much now (because let's be honest, we still need workarounds sometimes).
Joey79100 is offline   Reply With Quote
Old 19-01-20, 11:14   #19658
SSJ6Wolf
Archaeologist
 
SSJ6Wolf's Avatar
 
Join Date: Nov 2004
Location: Connecticut, US
Posts: 1,453
Default

Quote:
Originally Posted by Joey79100 View Post
Wow that is quite some dedication. I'm glad we don't need to resort to such workarounds as much now (because let's be honest, we still need workarounds sometimes).
Indeed, we have had some awesome developers contribute and now such implementations are much easier!

Reading this thread has been quite the throwback - I remember resisting patches for a while, because I was on a mac, and I wanted my levels to support both mac and pc players. That was the main motivation behind these workarounds I came up with. Of course, since then the mac OS has switched processors, which made the level player + tools stop working, so that became a moot point.
SSJ6Wolf is offline   Reply With Quote
Old 19-01-20, 15:01   #19659
LaraCablara
Professor
 
LaraCablara's Avatar
 
Join Date: Feb 2006
Posts: 3,247
Default

So, what exactly counts toward the movable limit? I know nullmeshes do, but do things like flyby and regular cameras do also? I take it there is no way around the 256 limit ?
LaraCablara is offline   Reply With Quote
Old 19-01-20, 16:46   #19660
Kevin
Explorer
 
Kevin's Avatar
 
Join Date: Mar 2008
Posts: 616
Default

The limit of 256 moveables has been lifted a long time ago by TREP and TRNG. You can have 1024 in your level now which is more than enough for a single level.

If you use NGLE you can see the limit in the info box and what objects it affects.

Last edited by Kevin; 19-01-20 at 16:50.
Kevin is offline   Reply With Quote
Reply

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 08:03.


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