Official script modifying cause certain missions to crash
-
- Jaywalker
- Posts: 5
- Joined: 22 May 2025, 18:47
Official script modifying cause certain missions to crash
Greetings!
I've got an old idea to make industrial map more lively by placing items on it like benches in the parks, trashcans on pavements, etc.
As far as i know, it could be done by modification of scripts. I've got an official Industrial scripts sources. Compilation by ScriptPad v2.5.1 is OK, everything works normally.
For example, I add a radio near start point by this command:
OBJ_DATA KEKW = ( 44.5 , 103.5 , 2.0 ) 0 BLASTER
As usual, it compiles OK. Desired object is in place. BUT...
When I try to take a mission phone ingame, I have a game crash.
By a precise look I've got next results:
All Krishna phones are busted.
All Zaibatsu phone are busted, except red, it works OK.
All Russian phones are busted, except green, both are normal.
All bugs are gone, if at least one non-busted job is complete.
Only one string cause this problem, any other scripts is untouched. If i delete this new command, i got no bugs again.
Using GTA2 v11.44.
Maybe, i forgot something? Please help.
I've got an old idea to make industrial map more lively by placing items on it like benches in the parks, trashcans on pavements, etc.
As far as i know, it could be done by modification of scripts. I've got an official Industrial scripts sources. Compilation by ScriptPad v2.5.1 is OK, everything works normally.
For example, I add a radio near start point by this command:
OBJ_DATA KEKW = ( 44.5 , 103.5 , 2.0 ) 0 BLASTER
As usual, it compiles OK. Desired object is in place. BUT...
When I try to take a mission phone ingame, I have a game crash.
By a precise look I've got next results:
All Krishna phones are busted.
All Zaibatsu phone are busted, except red, it works OK.
All Russian phones are busted, except green, both are normal.
All bugs are gone, if at least one non-busted job is complete.
Only one string cause this problem, any other scripts is untouched. If i delete this new command, i got no bugs again.
Using GTA2 v11.44.
Maybe, i forgot something? Please help.
Re: Official script modifying cause certain missions to crash
Some things need to be created after LEVELSTART command, some before. There could also be an issue if you create an object in the WHILE loop because it will just keep creating them.
Re: Official script modifying cause certain missions to crash
Weird things can also happen if the script name is too long
-
- Jaywalker
- Posts: 5
- Joined: 22 May 2025, 18:47
Re: Official script modifying cause certain missions to crash
I think i've figured it out.
The problem was that after compilation I copy only bil.scr into game's directory. Despite phone missions is unchanged, it's is mandatory to copy bil directory along with bil.scr into game's dir... And somehow it works without bugs anymore. That's crazy.
Thank you anyway for response!
The problem was that after compilation I copy only bil.scr into game's directory. Despite phone missions is unchanged, it's is mandatory to copy bil directory along with bil.scr into game's dir... And somehow it works without bugs anymore. That's crazy.
Thank you anyway for response!
Re: Official script modifying cause certain missions to crash
nice to see someone add objects, gta1 maps were full of them and they were great, lack of ambient objects in gta2 always disappointed me.
-
- Jaywalker
- Posts: 5
- Joined: 22 May 2025, 18:47
Re: Official script modifying cause certain missions to crash
I've encountered another problem.
For Industrial map size a lot of objects required summary, approximately 2000-5000.
Tried to add 1000 trashcans with random XY-coords. Game can't start, crashes upon level loading.
Reduced amount of bins to 300, the game lasts 1 min 34 sec, then crashes.
The same tendency is on 150-300 added objects (and the time is always the same!).
The game seems to be ok with amount of objects around 20. But I've tried a stress-test: a battle with 6 wanted level. The game lasts 30 sec, then crashes.
I leave one-two objects - and game won't crash anymore.
Looks like maps already on it's memory limits or something.
Meanwhile I've seen the gtamp community's maps with objects and didn't experience crashes. Much like of it's smaller size?
For Industrial map size a lot of objects required summary, approximately 2000-5000.
Tried to add 1000 trashcans with random XY-coords. Game can't start, crashes upon level loading.
Reduced amount of bins to 300, the game lasts 1 min 34 sec, then crashes.
The same tendency is on 150-300 added objects (and the time is always the same!).
The game seems to be ok with amount of objects around 20. But I've tried a stress-test: a battle with 6 wanted level. The game lasts 30 sec, then crashes.
I leave one-two objects - and game won't crash anymore.
Looks like maps already on it's memory limits or something.
Meanwhile I've seen the gtamp community's maps with objects and didn't experience crashes. Much like of it's smaller size?
Re: Official script modifying cause certain missions to crash
perhaps there is a limit how much objects can be on screen or your random coordinates are placing objects inside buildings and cause problems?
Try placing them on road surfaces only.
Try placing them on road surfaces only.
Re: Official script modifying cause certain missions to crash
If the game is crashing always at the same time, I would guess that it's a train issue. Maybe spawning objects at railroads may crash the game when the train drive over them.GiftTheAuto wrote: 28 May 2025, 20:10 I've encountered another problem.
For Industrial map size a lot of objects required summary, approximately 2000-5000.
Tried to add 1000 trashcans with random XY-coords. Game can't start, crashes upon level loading.
Reduced amount of bins to 300, the game lasts 1 min 34 sec, then crashes.
The same tendency is on 150-300 added objects (and the time is always the same!).
The game seems to be ok with amount of objects around 20. But I've tried a stress-test: a battle with 6 wanted level. The game lasts 30 sec, then crashes.
I leave one-two objects - and game won't crash anymore.
Looks like maps already on it's memory limits or something.
Meanwhile I've seen the gtamp community's maps with objects and didn't experience crashes. Much like of it's smaller size?
-
- Jaywalker
- Posts: 5
- Joined: 22 May 2025, 18:47
Re: Official script modifying cause certain missions to crash
I've placed next objects:
- trashcans with some lids, rubbish and bench into church's space; - some balls and a lot of benches in the outskirts of vedic temple. No rail tracks affected.
Total: 84 objects.
Game crashes with 6 wanted level on any wide road with 3-tank blockade and shooting with explosions. Game lasts about 20 sec with such pressure.
I believe there is objects limit inside of game's code. It's strange that developers actually made objects as a ready-to-use content, but didn't include the possibility to use them as much as it possible.
Do you have any clues how to bypass this restriction?
- trashcans with some lids, rubbish and bench into church's space; - some balls and a lot of benches in the outskirts of vedic temple. No rail tracks affected.
Total: 84 objects.
Game crashes with 6 wanted level on any wide road with 3-tank blockade and shooting with explosions. Game lasts about 20 sec with such pressure.
I believe there is objects limit inside of game's code. It's strange that developers actually made objects as a ready-to-use content, but didn't include the possibility to use them as much as it possible.
Do you have any clues how to bypass this restriction?
Re: Official script modifying cause certain missions to crash
Maybe the gta2 reverse engineering project can answer some of those questions ( https://github.com/CriminalRETeam/gta2_re ), but it sounds like it is actually running out of some fixed object allocation, perhaps the crashing is related to objects created for roadblocks. does it work fine without any cops?
-
- Jaywalker
- Posts: 5
- Joined: 22 May 2025, 18:47
Re: Official script modifying cause certain missions to crash
Ok, i'll try this project.
Yes, without cops it works fine. At least it worked after 3.30 min game time passed with intensive driving.
Yes, without cops it works fine. At least it worked after 3.30 min game time passed with intensive driving.
Re: Official script modifying cause certain missions to crash
Pretty sure this is related to roadblocks then.
Maybe you can use gta2 powermanager or script option to disable roadblocks - try if that works.
Maybe you can use gta2 powermanager or script option to disable roadblocks - try if that works.