www.tombraiderforums.com  

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

Reply
 
Thread Tools
Old 23-08-20, 12:33   #1
Alex Chap
Hobbyist
 
Alex Chap's Avatar
 
Join Date: Apr 2017
Location: France, Oise
Posts: 13
Default Saving causes crashes

Hi everyone,

I'm having some troubles with my project, I experience crashes but in some strange conditions.

I have 10 playable levels, and the 10th level is crashing when I try to save, but it doesn't happen when I load the level normally from the New Game option, no, it happens if I begin from the 1st level and reach it after some leveljumps.

I had the same problem on the 9th level but I managed to solve the crashes caused by the saves by deleting some triggers and rooms. But for this 10th level, it's very inconsistent, I deleted a lot of rooms and triggers, making it quite the lightest PRJ I had for the levelset, and it was still crashing at some points.

I saw on a thread that you can't have more than 128 objects of the same slot on the game, otherwise saving would cause crashes, but despite applying this limit, crashes still happened.

I'm using TRNG 1.3.0.7 (It also happened with 1.3.0.6), and I've seen that there was some kind of memory leak in the 1.3.0.0 version and above.
The ResetHUB command solves the crashes, but it resets a global variable that I use as a score for the whole game, so I can't use this.

Any suggestions for this problem ?
I'm using a plugin and I may be able to edit what data are reseted from level to level by coding, but I'm not sure how to do at this moment and it's quite sensitive to edit such code.
Alex Chap is offline   Reply With Quote
Old 23-08-20, 12:48   #2
SSJ6Wolf
Archaeologist
 
SSJ6Wolf's Avatar
 
Join Date: Nov 2004
Location: Connecticut, US
Posts: 1,503
Default

Quote:
Originally Posted by Alex Chap View Post
The ResetHUB command solves the crashes, but it resets a global variable that I use as a score for the whole game, so I can't use this.
It sounds like there is too much data being put in your savegames. When you donít use resethub, the savegame has to remember everything that changed in each level. TR4 only ever did this for 3 or 4 levels at a time, so it may just not be able to handle 10 of them.

The only way I can think of to get through this is to use the secrets counter as the score, since that is designed to be used across levels. With TRNG it could be possible to modify one of the other stats, such as ammo used, for this purpose too (and obviously change the corresponding label in english.txt). Sadly I donít have a better solution for you, but I donít know what TRNGís capabilities are with savegame info and maybe someone will come along with a better idea.
SSJ6Wolf is online now   Reply With Quote
Old 23-08-20, 13:02   #3
Alex Chap
Hobbyist
 
Alex Chap's Avatar
 
Join Date: Apr 2017
Location: France, Oise
Posts: 13
Default

Quote:
Originally Posted by SSJ6Wolf View Post
It sounds like there is too much data being put in your savegames.
I was expecting this unfortunately, but now that it's clearly exposed I'll try to find a workaround with your solutions, thank you.

Using the secret counter risks to be very limited so I think I can try to use an ammo counter or something like that. I could reach 16000 with the score, I just hope that something like the ammo counter will handle this value. It's up to 65536 I guess ?

Last edited by Alex Chap; 23-08-20 at 13:13.
Alex Chap is offline   Reply With Quote
Old 24-08-20, 04:45   #4
A_De
Archaeologist
 
A_De's Avatar
 
Join Date: Jan 2012
Posts: 1,259
Default

Quote:
Originally Posted by Alex Chap View Post
level is crashing when I try to save, but it doesn't happen when I load the level normally from the New Game option, no, it happens if I begin from the 1st level and reach it after some leveljumps.
Do you have some script which swaps item meshes? This problem can happen when you swapped meshes of some item and then didn't return them back but swapped another meshes. I.e.:

Code:
[swapping Lara's head mesh with blinking mesh]
[saving: ok]
[jump to another level]
[saving: ok]
[jump to previous level]
[swapping some other mesh]
[saving: crash]
or:

Code:
[swapping Lara's head mesh with blinking mesh]
[saving: ok]
[swapping some other mesh]
[saving: crash]
solution might be like this:

Code:
[swapping Lara's head mesh with blinking mesh]
[swapping normal head mesh back]
[saving: ok]
[jump to another level] or [swapping some other mesh]
[saving: ok]
[jump to previous level] or [swapping some other mesh back]
...
etc.
It seems that leveljump with weapons or other items in hands should be avoided either.
__________________
...ARGENTINAMANITNEGRA...
A_De is offline   Reply With Quote
Old 24-08-20, 13:07   #5
Alex Chap
Hobbyist
 
Alex Chap's Avatar
 
Join Date: Apr 2017
Location: France, Oise
Posts: 13
Default

@A_De

I use many Meshwaps flipeffects in my project indeed, but it's already managed with the restoration of Lara's main outfit at the end of the levels. The crashes occured even if the wads were the same so it wasn't the cause, I forgot to mention it.

I solved my problem by using the ResetHUB command in mid-game and managed to keep the score value temporary in the Ammo Used counter, then restore it to my personal counter.
Alex Chap 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 22:50.


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