Closed logaz0 closed 6 years ago
So only 1 opponent being randomised is a known thing, will be sorted in a later update. I will double check on the completion crash and the dialogue crashing.
I think I may have discovered the source of these bugs. Whenever there is a mission that uses an AI vehicle that is already supposed to appear in the level as a traffic car or the chase car, that mission's file that contains all the assets to load does not contain these vehicles. For example, the level 1 circuit race uses the Honer Roller, a Minivan, and the Mini School Bus. The mission's file contains this line to prepare the Honer Roller LoadDisposableCar("art\cars\honor_v.p3d","honor_v","AI"); Most missions contain a line of code like this to prepare any vehicles used in the mission, but the street races are different. This is because the street races use traffic vehicles that are already in the level, so for the level 1 circuit race, the Minivan and Mini School Bus already appear in the level as traffic so it does not contain a line of code to prepare these vehicles, because they are already loaded as traffic vehicles, and the game is able to load them directly into the mission, without needing to prepare them first. Your randomiser code seems to ignore this, and only changes cars that have been prepared in the mission files, which works for most missions, but not for the street races. Because of how your code works, it makes it not change these traffic cars, and crashes the game after the mission is completed for some reason. But more confusingly, is that I tried to fix it by changing the mission files to load the traffic vehicles in the street races like a normal mission vehicle, using a line of code to prepare it, but what ended up happening was that the random player character hack stopped working, and talking to other characters freezes the game.
The following misions will cause the game to crash The circuit races on levels 1,2,3,4,5 and 7 The point-to-point races on levels 1,2,3 and 7 Mission 4 of level 2 (Bart n Frink), due to the part where you follow the Pizza van
You may want to use this information to try to develop a patch.
I'm aware of why the randomisations don't work fully on traffic cars in races, I am planning on changing and fixing that but the way they work doesn't 100% work with the current system.
The actual crashing was related to random player character, and more specifically their dialogue. I think I've made a fix for that and it's going through testing at the moment. Once it's gone through I'll publish it.
When doing a street race with random mission cars selected, only one of the opponent cars is randomized, and the other two stay the same. (The one that gets randomized is the one that is the player vehicle for the next level, example, the Honer Roller in the level 1 street races. The two traffic vehicles stay the same.) Also, upon completion of a street race, the game crashes. (I have only tried this with the level 1 circuit street race, the one with Nelson.) Also, sometimes the game crashes when talking to a character. (I have random characters enabled. that might have something to do with it.)