Jump to content

SA Save File Glitch Detection and Repair


OrionSR

Recommended Posts

52 minutes ago, MrGTAmodsgerman said:

The save is marked with red text in the menu, no idea why.

Nothing to worry about. I did that to mark the save as an edited test save, and to distinguish it from the other EoL saves on my list. The save text will revert to normal when saved again.

 

Thanks for the report. Good luck with your game.

  • Like 1
Link to comment
Share on other sites

MrGTAmodsgerman
4 hours ago, OrionSR said:

Nothing to worry about. I did that to mark the save as an edited test save, and to distinguish it from the other EoL saves on my list. The save text will revert to normal when saved again.

 

Thanks for the report. Good luck with your game.

Thanks for your support. I felt that you really wanted to help me.

Link to comment
Share on other sites

  • 7 months later...

Sorry, I have a problem with the save file. Now I will jump out of the desktop after reading the file, and I cannot enter the game. I have installed cleo and the game version is 1.0. Can you please help me to take a look? Thank you
Attach archive URL: https://gtasnp.com/0M8dgd

Edited by mamijuby
Link to comment
Share on other sites

34 minutes ago, ArmanCan said:

@mamijuby 你好 🙂 你的文件似乎工作..你為什麼不刪除 cleo 一段時間再試一次? 😉

 

 

Hello, I have tried to reinstall the game without CELO,

but it still jumps back to the desktop after loading the game, I don’t know why, thank you for your help

Link to comment
Share on other sites

22 minutes ago, mamijuby said:

Hello, I have tried to reinstall the game without CELO,

but it still jumps back to the desktop after loading the game, I don’t know why, thank you for your help

 

Maybe your savefile is problematic..i can not say exactly but this file has been somehow badly edited because i can see some embed cars which generated with car generator (probably with savegame editor or some tools).. i think the guy who edits this file made a mistake and this is causing a problem  🙂

Link to comment
Share on other sites

18 minutes ago, ArmanCan said:

 

也許您的保存文件有問題..我不能確切地說,但這個文件在某種程度上被錯誤地編輯了,因為我可以看到一些用汽車生成器生成的嵌入汽車(可能用保存遊戲編輯器或一些工具)..我認為編輯這個的人文件出錯,這導致了問題  🙂

Is there a way to fix this part of what you said?

Link to comment
Share on other sites

19 minutes ago, mamijuby said:

Is there a way to fix this part of what you said?

 

if you played with this savefile before than it needs a fix but if you newly downloaded it.. than.. you should find another one..

 

I'm not expert of it but i've also realised another problem..

 

I've just completed "Explosive Situation" and saved the game but the game saved as "Fender Ketchup".. i'm just little bit suspecting that some kind of "Mission Passer" mod has been used and these codes are somehow injected into this file.. If you need a file which close to "Fender Ketchup" i can send you my "Green Goo" which saved in front of the Casino 😉 

Edited by ArmanCan
Link to comment
Share on other sites

  • 6 months later...
On 5/1/2021 at 2:12 AM, OrionSR said:

GTASnP.com has amodificationstool that can fix the traffic glitch on most save formats, PC, Android/iOS, and PS2.

Hello,excuse me, how does the ios use GTASnP.com to fix

 

 

 

 

Link to comment
Share on other sites

8 hours ago, yangsijue said:

Hello,excuse me, how does the ios use GTASnP.com to fix

In general, iOS, Android, and WinStore save files use identical formats, so Modifications designed for Android also work on iOS.

 

The tricky part for iOS is gaining access to the save file. I don't have an iOS device so I can't be much help. You may need a third party file browser to access your saves. If you're lucky, your web browser will allow you to search for the file to upload, and allow you to download the modified save to the appropriate folder.

Link to comment
Share on other sites

  • 7 months later...

I felt the need to create an account just to thank you guys for helping me fix my San Andreas save game.  after loading up my old save from years ago to pick up where I left off, and with only about 75 hours on that save (PS2 original save, now playing on backward compatible PS3 phat), the traffic on the highway had been seeming to be more and more chaotic.  Cars and trucks would rear end you while you were going full speed with nitrous engaged in a supercar like you were stopped, everyone driving super aggressive and accidents everywhere.  It made no sense and was becoming not fun to cruise the highways anymore.  Uploading the save to https://gtasnp.com/ and using the traffic glitch fix as suggested here seems to have done the trick.  Bonus points the site showed me where the rest of the oysters I was missing could be found!  Great work all, thank you again.

Link to comment
Share on other sites

  • 2 months later...
Elmascapo777
On 5/17/2008 at 9:33 PM, OrionSR said:

Traffic Glitch - a Global Timer Glitch

Citing notes from a joint project with pdescobar.

  • Symptom: Cars travel backwards (without turning around), morph into each other, and in some cases even appear to "fly." "Jittery" traffic may be an early warning indicator.
  • Gameplay Cause: Appears to be related to playing time -- the longer you play (total time played, not single-session) on that save strand, the more likely the glitch will appear and the worse it gets. So far the best examples have all been in saves with playing times over 150 hours.
  • Technical Cause: Some interaction between the global timer (stored in block 0) and the traffic-spawning mechanism causes traffic to go screwy. Resetting this timer to a low value (as well as related timers to maintain relative relationships) clears the glitch.
  • Untested: the problem appears to be worse near overpasses or in tunnels; possibly related to cull zones.

Global Timer / traffic glitch. Things which have timers that probably also need to be adjusted when the global timer is "reset:"

1) Weather timer (block 0)
2) All thread "wakeup" times
3) Car generator timers
4) Pickup timers
5) Police Trigger Zone timers

Updates:

Link to original discovery of the traffic glitch: http://www.gtaforums.com/index.php?showtopic=301764
Link to pdescobar's Traffic Glitch repair tool (incomplete): http://pdescobar.home.comcast.net/gta/SA_T...Glitch_Test.rar

 

 

Added: Current Savegame Editor fix includes adjustment to the following global variables that may not be appropriate for other save formats. These changes were added to repair a fast food glitch introduced when the timers are reset within 3 hours after eating.

$672 = 0 // eaten recently$674 = 0 // $TOTAL_FOOD_EATEN$5283 = 0 // = current time ($5284) -= the junkfood timer ($5285)$10045 = 0 // warned that eating more will make CJ ill (?)$184 = 0 // $CURRENT_TIME_IN_MS (mission cleanup time)

How could I modify the time played variable (global timer) to cause the traffic glitch?
With which program, how? I want to experiment, thanks in advance

Link to comment
Share on other sites

1 hour ago, Elmascapo777 said:

How could I modify the time played variable (global timer) to cause the traffic glitch?

There used to be a program called GTA:SA Save Game Tool v1.0 by shamblertm that could edit the global timer (TimeInMilisecond) and weather timers (LastClockTick), but it looks like it has fallen off the internet, and I can't find a copy in any of my archives. It's worth a search but I'm not optimistic.

 

You could edit the data with a hex editor. The easy way would be to use my binary template for the 010 Editor; you should find links in my SA Save File Companion topic (the link with OG Xbox support is the latest version). However, the 010 editor is a proprietary tool, so it would get expensive to use beyond the initial 30 day trial. If you aren't familiar with hex editing it would be worth the trial to help transition to a free hex editor like HxD.

 

The nice thing about HxD, besides being free, is it includes a tool to calculate a new checksum, which is required any time you edit the save or it'll be detected as corrupt. The 010 template includes a script that calculates the new checksum, so again, it's the easier option. Still, this data is pretty easy to find as it's always at a consistent offset from the start of the file; you don't really need the template. Also, if you upload and download your save from GTASnP.com it'll fix the checksum for you. Other save editors will usually do the same.

 

The SA Save wiki has reference on what data you need to edit. Basically, add 5 to the offsets shown to account for the BLOCK marker at the start of the file, and you're good to go. Be sure to make the same changes to both of these timers or the weather will go nuts trying to catch up, which is a fun experiment when you're first getting started.

Edited by OrionSR
  • Like 1
Link to comment
Share on other sites

Elmascapo777
On 8/24/2023 at 5:34 AM, OrionSR said:

There used to be a program called GTA:SA Save Game Tool v1.0 by shamblertm that could edit the global timer (TimeInMilisecond) and weather timers (LastClockTick), but it looks like it has fallen off the internet, and I can't find a copy in any of my archives. It's worth a search but I'm not optimistic.

 

You could edit the data with a hex editor. The easy way would be to use my binary template for the 010 Editor; you should find links in my SA Save File Companion topic (the link with OG Xbox support is the latest version). However, the 010 editor is a proprietary tool, so it would get expensive to use beyond the initial 30 day trial. If you aren't familiar with hex editing it would be worth the trial to help transition to a free hex editor like HxD.

 

The nice thing about HxD, besides being free, is it includes a tool to calculate a new checksum, which is required any time you edit the save or it'll be detected as corrupt. The 010 template includes a script that calculates the new checksum, so again, it's the easier option. Still, this data is pretty easy to find as it's always at a consistent offset from the start of the file; you don't really need the template. Also, if you upload and download your save from GTASnP.com it'll fix the checksum for you. Other save editors will usually do the same.

 

The SA Save wiki has reference on what data you need to edit. Basically, add 5 to the offsets shown to account for the BLOCK marker at the start of the file, and you're good to go. Be sure to make the same changes to both of these timers or the weather will go nuts trying to catch up, which is a fun experiment when you're first getting started.

Is it common that after replacing the 4 bytes with a specific hexadecimal value, I see in the game a value that differs from the one I placed? Anyway.
I've managed to tweak it to have 1000 hours, but I'm currently intrigued by the result hitting the 1193 hour mark. What happens when you reach that value?
I would also like to know, what is the function of the variable "global timer", why does that value exist? Thank you.

Link to comment
Share on other sites

15 hours ago, Elmascapo777 said:

Is it common that after replacing the 4 bytes with a specific hexadecimal value, I see in the game a value that differs from the one I placed?

The global timer will increase at a rate of 1000 per second.

 

15 hours ago, Elmascapo777 said:

I've managed to tweak it to have 1000 hours, but I'm currently intrigued by the result hitting the 1193 hour mark. What happens when you reach that value?

You won't, actually. According to rhans, iirc, the timer will reset at 1150 hours, something that must be coded because there's still quite a few hours left before the interger maxes out. However, all the in-game timestamps keep their large values; the scripts go to sleep and won't wake up, recently collected vehicles or pickups can't respawn, expired pickups can reappear and won't time out, etc. However, all the glitchy traffic and whatnot works like a new game.
 

15 hours ago, Elmascapo777 said:

I would also like to know, what is the function of the variable "global timer", why does that value exist? Thank you.

The global timer is the heartbeat that keeps the timing of the game in sync. Has the 250 ms wait period passed so the script can run another loop? Has 6 minutes passed so the collected pickup can respawn? Has CJ waited long enough to eat fast food again without puking? Is it time for another girlfriend call? How long should the garage wait until displaying another full message? When was the last time this cop car came shooting out in front of CJ when he had a wanted level? The game is full of timestamps. 

 

Fixing the traffic glitch by resetting the global timer is easy enough, but it also causes plenty of glitches unless every recorded timestamp is reset. It is definitely the most complex glitch fix available on GTASnP.com.

Edited by OrionSR
  • Like 1
Link to comment
Share on other sites

Elmascapo777
20 hours ago, OrionSR said:

The global timer will increase at a rate of 1000 per second.

 

You won't, actually. According to rhans, iirc, the timer will reset at 1150 hours, something that must be coded because there's still quite a few hours left before the interger maxes out. However, all the in-game timestamps keep their large values; the scripts go to sleep and won't wake up, recently collected vehicles or pickups can't respawn, expired pickups can reappear and won't time out, etc. However, all the glitchy traffic and whatnot works like a new game.
 

The global timer is the heartbeat that keeps the timing of the game in sync. Has the 250 ms wait period passed so the script can run another loop? Has 6 minutes passed so the collected pickup can respawn? Has CJ waited long enough to eat fast food again without puking? Is it time for another girlfriend call? How long should the garage wait until displaying another full message? When was the last time this cop car came shooting out in front of CJ when he had a wanted level? The game is full of timestamps. 

 

Fixing the traffic glitch by resetting the global timer is easy enough, but it also causes plenty of glitches unless every recorded timestamp is reset. It is definitely the most complex glitch fix available on GTASnP.com.

As I told you, I have managed to modify a game so that it has 1071 hours, and I have noticed that no fish appear in the water.
It is normal? Is this mechanism also affected by the global timer?

Link to comment
Share on other sites

16 minutes ago, Elmascapo777 said:

As I told you, I have managed to modify a game so that it has 1071 hours, and I have noticed that no fish appear in the water.
It is normal? Is this mechanism also affected by the global timer?

Really? I've never noticed that before, and don't remember any reports of the issue. I suppose that it would be normal if everyone that tested the modified save got the same result. Few people bother playing with such a glitched save, but perhaps it clicks in at a lower level. I'm expecting 1071 hours to be the same as 600 hours (rounding up a bit, iirc); what about the 300 hour mark, or 150? 

 

No one really knows, deep down, how this glitch works. Back in the heyday of the SilentPatch development, Silent and Nick007 looked into it, and came up empty handed. Without a decent theory on how the glitch works, it's impossible to predict the effects. 

 

 

  • Like 2
Link to comment
Share on other sites

  • 6 months later...
rezaaaaaw
On 1/10/2011 at 10:53 AM, OrionSR said:

Deleted Object Required - Driving or Bike School Deletes Object

 

Original Topic: Crashing around the SF Docks

 

V2 save with glitch ready to occur: http://gtasnp.com/download/24365

 

It appears that the Driving and Bike School missions aren't very careful about which objects are destroyed when revisiting the lessons. These schools use the array $201($200,46i) for traffic cones. It looks like sometimes only some of the array is initiated, but all possible cones are destroyed during clean up - maybe, it's difficult to tell. But regardless of the flow, these missions are deleting objects that are now in the same memory location as the cones from a previous initiation of the array.

 

In the example above the index (0x8610) of the Blackboard object (#NF_BLACKBOARD, 3077) from the Import/Export mission is stored in the thread 'impexpm' in local variable 27@. Global variable $221, part of the traffic cone array, also contains the value 0x8610. When either school is started the blackboard gets deleted. When this object is missing while 'impexpm' is running the game will crash when CJ enters the area near the Import/Export ship.

 

It might be possible for other required objects to get deleted, but so far I've only seen two examples of missing blackboards.

 

The glitch can be prevented by scanning the traffic cone array for values equal to the value of 'impexpm' 27@. I wasn't sure what deleting the object at index 0 would do so I set $221 equal to $220 since I figured that object, whatever it might be, was getting deleted anyway during the loop.

 

I was able to repair saves in which the Blackboard object had already been deleted by replacing the blackboard and assigning the index value to 'impexpm' 27@ using a CLEO script. Note: it should be possible to insert an object into a save and assign the local using some sort of editor. The file size would need to be trimmed, but it should work well enough.

 

BlackboardFixPC.cs

 

{$CLEO .cs}
0001: wait 4000 
029B: 7@ = init_object 3077 at -1573.881 135.3845 2.535 // #NF_BLACKBOARD
0177: set_object 7@ Z_angle_to 180.0 
0550: keep_object 7@ in_memory 1 
0392: make_object 7@ moveable 0 
01C7: remove_object_from_mission_cleanup_list 7@ 
0AAA: 1@ = thread 'IMPEXPM' pointer
0085: 2@ = 1@
000A: 2@ += 0x3C // offset to local variable space
0006: 3@ = 27 // local variable
0012: 3@ *= 4
005A: 2@ += 3@
0A8C: write_memory 2@ size 4 value 7@ virtual_protect 0
0ACE: show_formatted_text_box "~r~The Blackboard Glitch has been repaired. Disable this script!"
0A93: terminate_this_custom_script
 

 

 

Does anyone one know if this can be done on Android?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.