www.tombraiderforums.com  

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

Reply
 
Thread Tools
Old 13-06-21, 01:47   #4121
Krystian
Archaeologist
 
Join Date: May 2010
Posts: 1,139
Default

Quote:
Originally Posted by Craig Michaels View Post
The former seems to have been connected somehow to the crash - the second mesh swap was supposed to be triggered by a heavy camera, but removing that A37 heavy trigger was one of the things I did that seems to have stopped the crashes. Can you only swap meshes once, or are there any other limits about swapping meshes that would be helpful to know?
(I didn't see your edits in the TRNG thread, else I would have answered )

1) About the meshswaps - the way meshswaps work is not by simply copying the mesh from one object to another object, but actually swapping the mesh data between two slots. If you were to place both objects involved side by side and do the mesh swap, you would see this happening - the objects will exchange their meshes. Let's analyse what happens when you swap the mesh of object A with object B. Object A recieves object B's mesh and vice-versa. So far so good.
But what if we perform another mesh swap on object A? It already has object B's mesh, so if you meshswap that with object C, object B's mesh goes to object C and object C's mesh goes to object A.

So at first you have:
Code:
A - A
B - B
C - C
Then after the first swap you have:
Code:
A - B
B - A
C - C
And finally after the second swap you have:
Code:
A - C
B - A
C - B
So you can see, it becomes quite an entangled situation. I'm unable to provide information on what exactly causes the crash, but my guess would be that TRNG stores information on the meshswap between object, so it can store this information in the save game. But (again, just a guess) it can keep up with the first swap, where the meshes are exchanged between just two object, but if meshwap between a third object gets involved, it becomes too entangled for this to be saved properly in the savegame (that ultimately object A had its mesh given to B, B had its mesh given to C and C had its mesh given to A).

What would I suggest is: before doing the second swap between A and C, to perform a swap between A and B again (this will effectively "unswap" the meshes, returning both objects to the intial state), and only then swap A to C (so in the end, Object B will have it's own mesh back).


2) About using the AssignSlot= command for a Raising_Block. The AssignSlot command is mainly purposed for assigning identical behaviors for enemy slots (for example, to have two different-looking enemies behaving as the SAS slot or the DOG slot). However, it is emphasised in the description of the AssignSlot command that using this command for objects other than enemies can have unpredictable outcomes:
Quote:
Originally Posted by TRNG Reference (AssignSlot)
* It's probable that not all slots will accept a reassignment. The doors, waterfalls, switches and something-emitters probably will have troubles in a reassigned slot. You should use this command only to work with enemies.
And I think this is the exact problem you encountered here - the AssignSlot feature is not well equipped for dealing with this situation.

To explain why I suspect this doesn't work, I have to mention briefly how objects in the game code are "primed" with certain functions to well... function properly. For most items, they have initialisation functions (for giving the object an initial state, before being triggered), control functions for giving them specific behavior, collision functions to determine how Lara collides and interacts with these objects, as well as draw functions to tell how the object should be rendered in terms of graphics.

Objects like raising blocks, bridges, twoblock_platforms, etc. are unique from other kinds of objects in that they can actively modify the collision properties of rooms, inserting a solid block where there was none before. They do this by having floor and/or ceiling type functions attributed to them, which gives them these unique properties.

What AssignSlot appears to do is it takes the animations and initialisation, control, collision and draw functions from one object and transfers them to the other object. And it seems that it can do this for floor functions as well at first. But once you save the game, the control/collision/initialising/drawing remapped with AssignSlot are saved, but the floor (ceiling) functions are not. Hence, once you reload, the object loses its floor function, and thus is no longer able to affect the geometry of the room.

Last edited by Krystian; 13-06-21 at 08:52.
Krystian is offline   Reply With Quote
Old 13-06-21, 02:31   #4122
justin
Professor
 
Join Date: Aug 2001
Location: In the Land of Mordor where the Shadows lie (CT)
Posts: 4,126
Default

Thanks Krystian, as always!

Given that, Craig, maybe you should try what I did to use multiple 2 block platforms: create an invisible 2 block platform and several animating objects (like #13-16 because they have no collision) to make up the appearance.

Similarly we can use invisible bridge flats and statics as the "skins"

You could simulate this with an invisible Raising Block, and use an animating as its "skin," but then you'd need to animate it to raise/lower since the Raising Block has a unique squishing effect... Still may be worth a try.
justin is offline   Reply With Quote
Old 13-06-21, 07:47   #4123
Craig Michaels
Archaeologist
 
Craig Michaels's Avatar
 
Join Date: Feb 2006
Location: Irvine, California
Posts: 1,372
Default

Quote:
Originally Posted by Krystian View Post
What would I suggest is: before doing the second swap between A and C, to perform a swap between A and B again (this will effectively "unswap" the meshes, returning both objects to the intial state), and only then swap A to C (so in the end, Object B will have it's own mesh back).
Thanks Krystian, your explanation is SO helpful for figuring out what’s going on and understanding the editor and game on a deeper level. What you’ve said makes perfect sense, and would account for the problems I’ve been experiencing, I’ll bear this in mind as I continue.

Regarding your suggestion quoted above, I’m uncertain how to perform the swap backwards, turning B back into A again. I can select the pushable block and transform it into an Animating mesh, but I don’t see an option to transform the same pushable block back into itself. The pushable blocks aren’t listed when I go to the pull down menu for A47. Perhaps this is another limit of some kind?

I’m considering just doing one swap and leaving it at that, which wouldn’t be as “immersive” but sounds like it might circumvent other problems!

Also justin, thanks for your suggestion and explaining how you created the effect with the two block platform, I’ll do some experimentation and figure it out.
__________________
Archaeologist in Irvine, California
Craig Michaels is online now   Reply With Quote
Old 13-06-21, 08:49   #4124
Krystian
Archaeologist
 
Join Date: May 2010
Posts: 1,139
Default

Quote:
Originally Posted by Craig Michaels View Post
Regarding your suggestion quoted above, I’m uncertain how to perform the swap backwards, turning B back into A again. I can select the pushable block and transform it into an Animating mesh, but I don’t see an option to transform the same pushable block back into itself. The pushable blocks aren’t listed when I go to the pull down menu for A47. Perhaps this is another limit of some kind?
Remember that the swapping flipeffect literally exchanges the meshes between object A and object B. So if you swap once, what do you think would happen if you swap for a second time?
There is no separate flipeffect to swap back, because do to the way the swapping feature is done, it isn't needed. You just swap for a second time on the same objects and the meshes will return to their respective owners again

Last edited by Krystian; 13-06-21 at 08:53.
Krystian is offline   Reply With Quote
Old 13-06-21, 16:44   #4125
Stryke
Student
 
Stryke's Avatar
 
Join Date: May 2019
Posts: 233
Default

Hey I have like two problems with my tr2 level. I believe someone had already answered these too.

I'm not really sure how to display pickups in-game/sprites? and my texts show up a bloops in the inventory. Is there a solution to these problems?
Stryke is offline   Reply With Quote
Old 14-06-21, 02:47   #4126
Craig Michaels
Archaeologist
 
Craig Michaels's Avatar
 
Join Date: Feb 2006
Location: Irvine, California
Posts: 1,372
Default

Quote:
Originally Posted by Krystian View Post
Remember that the swapping flipeffect literally exchanges the meshes between object A and object B. So if you swap once, what do you think would happen if you swap for a second time?
OH that makes sense. Thank you so much for helping me and hopefully others in the future who experiment with swapping meshes. Iím really excited to keep experimenting with this new knowledge - and my level got a lot closer to being finished now too.

Iím sorry Stryke I donít know TR2 too well. Hopefully someone else knows about sprites!
__________________
Archaeologist in Irvine, California
Craig Michaels is online now   Reply With Quote
Old 18-06-21, 12:56   #4127
Stryke
Student
 
Stryke's Avatar
 
Join Date: May 2019
Posts: 233
Default

All is good thank you much. I'll figure it out. It's really cool messing with the older TRs.
Stryke is offline   Reply With Quote
Old 19-06-21, 04:13   #4128
NicNamSam
Hobbyist
 
Join Date: Jan 2018
Posts: 80
Default

Is there any way to make a flyby camera shake with an earthquake? Or to approximate this effect?
NicNamSam is offline   Reply With Quote
Old 19-06-21, 05:26   #4129
justin
Professor
 
Join Date: Aug 2001
Location: In the Land of Mordor where the Shadows lie (CT)
Posts: 4,126
Default

Quote:
Originally Posted by NicNamSam View Post
Is there any way to make a flyby camera shake with an earthquake? Or to approximate this effect?
Oh I also want to know this!

Now I haven't placed Flybys in TE, yet, but can we move them ever so slightly the same way we can move objects? If so, we could place a few close to gether and increase their speed to create a shaking effect.
justin is offline   Reply With Quote
Old 21-06-21, 21:07   #4130
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 4,369
Default

Quote:
Originally Posted by Lwmte View Post
Tomb Editor can't read any of plugin files, including .trg, .btn and all other formats described by Paolone.
I'd like to ask that .ocb format (amongst plugin files) is also something which cannot be read in TE?
Because TIDE reads .script files in script command descriptions, but (seemingly) doesn't read .ocb files in OCB descriptions. (I.e. my plugin#1 has a file like that and I cannot see its info in TIDE after plugin installation there.)
Not a problem, though, people can easily read them manually.

Else:
Interesting, not a problem:
Sometimes when I rebuild the script, then TIDE says (i.e. error message) script backup is missing, I need to click on build again, to do that.
AkyV 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 03:47.


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