Jump to content

SA Save File Glitch Detection and Repair


Recommended Posts

The most up to date glitch repair tool is available through the modification's tab of GTASnP.

Upload your save, choose the appropriate modifications, and download the repaired save to your choice of save slot.

 

The Savegame Editor 3.x has many excellent repair tools.

Legacy Glitch Repair Tool is available at hmvartak's site: (Includes a stray blip tool) <Online Glitch Repair Tool>

Please Read: The purpose of this topic is to document Glitches in San Andreas that are part of the save file. It is intended for people who can hex edit a save file or create tools that can detect or repair save file glitches. Questions about your specific glitch would be more appropriate in another topic.

Documentation on the structure of the save file can be found on the Wiki at gtamodding.com
SA Save Files



Basketball Glitch

Description: No Basketball appear on the Basketball Courts

Cause: Saving near an "Active" basketball; Madd Dogg's Crib

The Basketball Glitch is active if the following Global Variable is set to 1:

PCv1, PCv2, PS2v1 = $1928
PS2v2 = $1932
iOS = $3315

The Basketball Glitch can be fixed by setting the global variable to 0.

A Basketball fix is available in the form of a "memory hack." I'm not sure how it works but it seems to do the job effectively. As far as I know this is the only utility that can repair the Basketball Glitch.

Basketball Bug Fix

The Basketball Glitch can be prevented by moving Madd Dogg's Save Disk farther from the Basketball. At about 70m, the basketball will unspawn even if CJ continues to watch or face the object.

CODE // Madd Dogg's Library
$886[1] = 1291.8
$904[1] = -797.8284
$922[1] = 1089.5
$940[1] = 1286.8
$958[1] = -797.69
$976[1] = 1089.1
$994[1] = 90.0
$848 = 0


For PS2v2 add 4 to each global variable (1928 + 4 = 1932)
(PS2 offset does not hold true for all global variables)

The save disk pickup will move when the save routine is executed, but a save file editor may also want to move the associate pickup to complete the modification.

Basketball Fix for PS2

Basketball Fix v1 - RAW
206B3E10 00000000

AR Max PS2v1 NTSC
VGVP-QHC1-F1QA5
50Z7-B0G7-MJ5GX

Basketballs Enabled (Tagging Up Turf mission completed)
PCv1, PCv2, PS2v1: $1903 = 1
PS2v2; $1907 = 1

Basketballs Enabled PS2v1 - RAW
206B3DAC 00000001

AR Max PS2v1 NTSC
NQVV-WRPQ-QHTJM
9RP8-511M-HZ6Q2



Pool Player Glitch

Description: The Pool Player never appears at the pool tables.

Cause: Saving near an active pool player. Normally this will only be a concern for people that add a pool table to a save house, but it may also cause problems for people using a save anywhere mod or CLEO save script. This glitch is included here because the cause and solution are identical to the Basketball Glitch.

The Pool Player Glitch is active if the following Global Variable is set to 1:

PCv1, PCv2 = $9462
PS2v1 = $9461
PS2v2 = $9466

iOS = $10819

Related Objects: Saving near a gambling object does not cause an active casino dealer to glitch. However, I'm not so sure about the random peds that are also associated with these objects. No problems are observed from saving near video games or gym equipment (besides the basketball). The vending cart vendor was not tested.

Edited by OrionSR
Link to comment
https://gtaforums.com/topic/348331-sa-save-file-glitch-detection-and-repair/
Share on other sites

Zone Glitches - Taxi Glitch, Turf Glitch, Zone Name Glitch

Taxi Glitch: No Taxi Fares appear anywhere on the map.
Turf Glitch: Extra Gang War Turfs appear in SF or LV.
Zone Name Glitch: County names are displayed instead of neighborhood names.

Cause: Zone Glitches are caused by traveling off the edge of the map. The routine that controls the ungraying of the map writes 01s over 00s in an incorrect place place in the zone block. Different versions of the program suffer from corruption in different areas of the zone block.

Turf Glitch

Description: Extra Gang Turfs in SF, LV or other unusual places. The most common form of a zone glitch.

Normally the "GrayBot" will check to see if CJ is entering a new GrayZone. If the associated byte in the GrayZone or MapFog array is equal to 00 it changes the value to 01 and adds 1 to the GrayZone counter. The ZonePop structure is full of 00s and is an easy target for corruption when the pointers to the array are confused by a location outside of land area.

On PC only the last 12 zones are likely to become glitched. On PS2v1 the glitch appears to start near the top of the ZonePop structure. More turfs can be glitched, and fewer problems with corruption in the ZoneInfo structure are reported. On PC, the 12 zones can be systematically glitched with one member of each gang and a dealer by flying directly south from mount Chilliad.

Taxi Glitch No Taxi Fares appear anywhere on the map.

The Taxi Glitch is active and no fares will appear if the null terminator between SAN_AND and SAN_AND at the end of the 2nd SAN_AND is set to 01. SAN_AND is the first zone listed in the main ZoneInfo structure of Save Block 10: Zones.

The Taxi Glitch can be repaired by resetting the null terminator to 00.

pdescobar has published a drag and drop Taxi Glitch Fix patch utility for SA save files.

Taxi Fix

One particularly hazardous Taxi Glitch Zone has been identified directly east of the ship anchored at the dock in the SW corner of the map - about 500 meters off shore. It sometimes takes the GrayBot about 40 seconds to register that CJ has entered a new zone.


Zone Name Glitches

These go mostly unnoticed unless someone is looking specifically for this kind of corruption. The null terminator for other zones may also be corrupted like SAN_AND, but this generally doesn't cause any unexpected problems with game play. One solution would to simply replace this structure with an uncorrupted copy from another save. I don't think any information in this structure changes after the save is created.

 

Toreno Glitch

 

Problems with the null terminators of the DOH and EASB zones can cause problems with the Mike Toreno mission where CJ needs to got to these zones to trigger the next stage of the mission. Usually the player can progress by traveling a little farther to the next zone in Doherty or Easter Basin to continue the mission.

Edited by OrionSR
  • Like 1

Gym Glitch

Description: CJ is not allowed to use the gym equipment.
Cause: I don't know, a teammate had already worked out the details and I didn't investigate further.

Fix: Artem Khassanov (Hammer83) http://www.artemkh.com/files/gtasa/sagym.zip

Originally posted by pdescobar:

  • Symptom: You can never work out; game always says "you have worked out enough today; come back tomorrow" even though you haven't exercised at all.
  • Gameplay Cause: Rampant speculation such as not eating enough or saving too often.
  • Technical Cause: Related to the 4 global variables $5345 through $5348; $5349 may have some relation too. I'm not yet sure of the proper relationship these variables should have but resetting all 4 to -1 (their initial values) clears the glitch.

_____________________

Updated:

 

$5345=$Current_Month_Day
$5346=$Current_Month
$5347=$GYM_Month_Day_When_Limit_Reached
$5348=$GYM_Month_When_Limit_Reached
$5349=$GYM_Day_Limit

 

The Gym Glitch: CJ cannot work out after waiting more than one day.

Technical: (current month > exceeded month) or (current day > exceeded day) is not true

 

The Gym Glitch Explained

"You have worked out enough for today, come back tomorrow!"

If this message is displayed every time CJ tries to workout, even when he returns the next day, then you've got the Gym Glitch.

The Gym Glitch can be avoided completely if CJ never exceeds the daily workout limit on that save.

When CJ exceeds the daily limit the current in-game month and day is recorded. Usually when CJ returns the next day or later the current month or current day will be greater than the exceeded month or day and he will be allowed to use the gym equipment. However...

There is no in-game year. When enough time has passed the current month will rollover back to 1. So let say that CJ last exceeded the daily limit on the 14th day of May. After the new year he will not be able to workout for the first two weeks of every month until June finally rolls around.

But there's a catch. There is no in-game method to determine the current month and day. The sum of all game days and safehouse visits is hardly even close. The best I can do is suggest to start checking for the glitch sometime after 200 game days, but that depends a lot of how often the game is saved.

The effects of the gym glitch can be mitigated by saving (which advances the calendar by 1 day) or by rolling over the clock past midnight until he can finally workout again. Then intentionally exceed the daily limit. This will set the exceeded date to the current date and CJ can work out normally again, until next year when you'll need to go through this process again.

Or better yet, wait until the last day of the month and start to work out. Wait until the clock rolls over and exceed the limit on the first day of a new month. Then the glitch will only be in effect next year on the first day of the early months. A player can determine the 1st day of the month because on the previous day CJ could work out but now he can't. Work between 2 saves and load the previous save when necessary.

Or even better, wait until new years eve to start working out and exceed the limit on new years day. Then if CJ never exceeds the limit again the glitch will only be noticed on new years day of each year. If the player carefully tracked each and every day for several months it might be possible to determine the current month based on a leap year calendar.

What can you do about the gym glitch?

If the glitch isn't very severe (March 5th) then don't do anything which might make it worse (December 31st).

On PS2, if you have AR-Max or similar cheat device software the glitch can be repaired with cheat device codes.

On backwards compatible PS3s it's possible to export the save to a PC, extract the save data, and use a save editor to examine the current month and day.

PSN users are out of luck. It's easy enough to export the save but it's encrypted, so unless someone figures out a way to decrypt the data there's no way to learn the date or fix anything.

PC players can use the repair tools linked below to reset the exceeded date. These tools will not work properly on PS2 saves because the global variables are different.

GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa
hmvartak's Online Glitch Repair Tool: http://hmvartak.freeiz.com/fix.htm

Cheat Device Codes to repair the Gym Glitch on NTSCv1, NTSCv2, and PALv1 can be found at the end of the post linked below.
http://www.gtaforums.com/index.php?showtop...st&p=1058178034

Gym Glitch Discovery topic on GTAForums: http://www.gtaforums.com/index.php?showtopic=551244

Edited by OrionSR
  • Like 2

NPC Glitches - Madd Dogg, Catalina, Denise

 

Madd Dogg Glitch: Madd Dogg jumps to his death before he can be saved during an LV mission.

Denise Glitch: Denise runs off and fights random peds instead of finishing the Burning Desire mission.

Catalina: Catalina fights peds, not sure on the details.

 

Cause: NPC Glitches are caused by saving after using the Peds Attack Each Other cheat code.

 

PC Cheat: "Peds Attack Each Other" AJLOJYQY

PS2 Cheat: "Pedestrians Riot" http://media.gtanet.com/gtaforums/images/html/emoticons/dbutton.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/lbutton.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/ubutton.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/lbutton.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/xbttn.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/r2bttn.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/r1bttn.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/l2bttn.gifhttp://media.gtanet.com/gtaforums/images/html/emoticons/l1bttn.gif

 

Actually, I'm not sure on the PS2 code. The description is different, but one site listed the NPC glitches along with this code.

 

The cheat code permanently alters the likes and dislikes for CivMale, CivFemale, Drug Dealers, Bums, Fire Fighters, and Paramedics.

 

   GLITCH:     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 0F 00 
 4 CIVMALE:    20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (before Breaking the Bank at Caligula’s)
 4 CIVMALE:    20 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (after Breaking the Bank at Caligula’s)  
 5 CIVFEMALE:  10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
17 DEALER:     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
18 MEDIC:      40 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
19 FIREMAN:    40 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
21 BUM:        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 
 

 

 

The NPC Glitch can usually be tested in-game by observing the behavior of the Vending Cart Vendors. They will attack CJ or anyone else they see if the glitch is active (CivMale). Drug Dealers will attack any peds that approach asking to buy drugs. Bums, Paramedics, and Fire Fighters don't attack. Problems with CivFemale is usually noted during missions. Dating or meeting girls may also be a problem (based on notes on a PS2 board).

 

As far as I know, there currently is no fix or patch available for NPC Glitches caused by the Peds Attack Cheat. The glitch has been repaired successfully by patching parts of Save Block 19: Ped Acquaintances with data from a working save. These records appear to remain constant throughout the game except for one small adjustment to CivMale during the mission Breaking the Bank at Caligula's.

Edited by OrionSR
Code Tags

Dead Girlfriends

 

Description: Girlfriend is permanently unavailable.

 

Causes: CJ killed her or he ignored Denise or Millie for too long. (I'm still unsure on the exact causes; this was PD's project.) It is my understanding that the other girls can be met again if their progress drops too low.

 

Possible Solution

 

 

Here is a rough outline of a way to revive a dead girlfriend (minimally tested on Denise) which came from a forum request; not exactly a glitch, but a potentially useful patch.

 

1) Change the global progress var for that girl from -999 to whatever ($359-$365).

2) Change the stat for progress with that girl from 0 to whatever (stat 252-257)

3) Set bit for that girl on global $406 (girlfriend_gift_bitmask)

4) Reenable the appropriate car generator (to_gen word to xFFFF)

Do I understand these variables correctly?

 

1) Bring her back to life

2) Provide some of what we commonly refer to as progress

3) Give the gift outfit back because it won't be provided again at 100% (?)

4) Unhide the car instead of waiting for the clock to do the job (?)

It doesn't quite have that 1:1 correlation between steps and effects. Basically I started with the idea that resetting the progress for #1 will bring her back, and steps #2 & #3 restore the things which were explicitly changed after the death happened. I don't even really know what #3 actually does (it's not the outfit because that doesn't get taken away). Then #4 was done because her car wasn't there on my first test and reenabling a car generator is something that was quick and easy to do.

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)
  • Like 2

I hope this helps. I don't have the programing skills to implement these repairs with a patching utility. However, I suspect it wouldn't be difficult to make many of the repairs with a CLEO script. I never made the transition from Darkpact to CLEO as we were always working with the startup scripts anyway.

 

Rare Glitches

 

Dying to Save Glitch

 

Description: CJ spawns in the Save Disk location, then respawns at the hospital. There are no save disks on the map and missions are unavailable. The save is obviously broken; there may be other problems as well.

 

Cause: One player described saving just before dying, but apparently not soon enough. I have been unable to recreate this glitch at the Angel Pine outdoor save disk using cocktails to predict the time of death.

 

Repair: Minimal testing, no feedback from player.

 

Save Block 15: Player data

  • is_wasted_or_busted flag cleared
Save Block 4: Wasted/Busted
  • unknown Wasted_Busted Flag cleared
  • unknown Wasted_Busted time zeroed out
Pimping Glitch

 

Description: Pimping stats are not correct despite SAMA's report that the mission is complete. The Broadway will not trigger the pimping mission or display the sub-mission message.

 

Cause: Was specific to a single player in the Chain Game (shared save). Only known mod was a something that changed the names of zones to real cities in California and Nevada.

 

Fix: The player stopped completing the pimping mission on the shared save. No other progress was made. No other reports of this glitch have been identified.

Edited by OrionSR

There's a big hole in my documentation so I may need some help from hmvartak or Samutz.

 

Continuity Settings

 

If taxis have nitro before the Taxi mission is completed then the 50th fare will toggle off the Taxi bonus. Save continuity implies that the Taxi mission and Taxi flag have consistent settings. However, the save documentation isn't very compete as far as details from the huge lists of stats and variables. I'm not sure how to identify that the mission is marked as complete.

 

Block 0: Miscellaneous; 0x0135 byte Boolean: All taxis have nitro (opcode 0572 flag) Toggle!

Block 0: Miscellaneous; 0x0136 byte Boolean: Prostitutes pay you (opcode 0A3D flag) (toggle?)

 

Block 1: Script; global variables

 

Block 3: Garages; 0x0004 byte Free Bombs

Block 3: Garages; 0x0005 byte Free Resprays (opcode 0335)

Block 3: Garages; 0x0006 byte Boolean: Respray Garages disabled (opcode 0A14)

* All 0 by default. Free resprays was once identified as a random glitch.

* Warning: Bomb type 5 in a save garage.

 

Block 4: Wasted/Busted; 0x0004 byte Boolean: Lose stuff after wasted (opcode 08DD)

Block 4: Wasted/Busted; 0x0005 byte Boolean: Lose stuff after busted (opcode 08DE)

Block 4: Wasted/Busted; 0x0006 byte unknown Wasted_Busted Flag

* GF Bonus on a new game is a common glitch; not usually a problem. Start new game from a fresh start (no memory card).

 

Block 6: Pickups;

 

Missing Extinguishers and Rifle are IPL pickups and require a new game on a fresh start to be placed.

 

Block 9: Markers; stray blips remaining after missions (needs it's own post).

 

Block 10: Zones; 0x0064 dword number of opened map sectors should equal the sum of all flags in the GrayZone (map fog) Array

 

Block 15: Player data; 0x0A byte is wasted_or_busted flag (see Dying to save glitch)

Block 15: Player data; 0x20 byte infinite run (opcode 0330) - same as Burlary (toggle?)

Block 15: Player data; 0x21 byte fast reload (opcode 0331) - may cause increasing drive-by ammo on some executables.

Block 15: Player data; 0x22 byte fireproof (055D) - same as Firefighter mission (toggle?)

 

Block 21: IPL; barrier and object flags may be misaligned by mission help requests completed with a different version of GTA3.IMG. Also a confusing problem for save conversion, script switchers, and shared saves. Hybrid IPL saves are in use that enable both Carter objects early, and also enable Truths Crops as an easter egg.

 

Block 23: Gang wars; 0x04 byte enable gang wars (opcode 0879) associated missions, mod option

Edited by OrionSR

 

hey can you explain all the limits, like max vehicle spawn, max garages etc

Save File Limits

 

 

car generators 500

radar blips 175

pickups 620 

 

A few notes on Normal Game limits:

 

Objects: This applies specifically to SCM objects added to the save through mission coding. If you add more than 60 objects for a total of 134 object to the save, then there is a serious risk that the game will crash during the boat school lesson which temporarily adds a lot of new objects during the mission. The actual test was to start, quit, and restart the last boat school lesson and see if things crashed.

 

Garages: Only 50 garages can be active on a normal save. If an additional garage is added with IPL editing then it will be inactive, or it will deactivate another garage loaded later in gta.dat. Each save garage has a specific memory location for saving 4 vehicles. The impound garages have room for 4 vehicles, but always discard the forth vehicle so this area of the save remains blank. Impound garages can be duplicated but the results are confusing and placement is impractical on a normal map. Mod garages are controlled by scripts. A new Mod Garage may open and close for the correct cars, but they don't do anything without the scripted locations. For the most part these limitations restrict garage modifications to changing mission garages into Pay'n'Sprays or Bomb Shop before they are closed by the mission.

 

Pickups: The pickup pool is limited to 620 items. Add more items to IPL and many SCM objects simply won't be added to the save (check the studio weapons). However, the pickup pool needs quite a bit of blank space for random drops and new pickups. If you add many more than 24 pickups to a standard game then temporary drops like money or weapons will disappear quickly or not spawn at all. This is most noticeable during the early gang wars if CJ hasn't collect many horseshoes, oysters, or snapshots to free up some room in the pool. The health and armor frequently disappear when CJ opens fire on the first group of targets and they start dropping more money and weapons.

 

Editing "Pools": The Pickup Pool and Blip (Marker) Pool are very sensitive structures. Attempts to edit in or manually delete information usually causes the game to crash fairly quickly. Deleting items with direct edits is best accomplished by flagging the item to be "recycled" so another routine can eventually come along and "delete" it while the save is running. Adding new items to a pool can be accomplished by altering the properties of recycled items before they are deleted. This practice has generally proven to be so awkward that it's only worth the trouble for stray blips that remain after a mission. Sorry, the control flags have not been well documented.

 

Vehicle Generators: The actual vehicle limit is huge, but the practical limit isn't so hot. There are 208 vehicle generators in a normal game save. If you add many more than 60 to 70 new vehicles with IPL or mission coding the game is likely to lag a little more on some machines when spawning vehicles. Also, the game is generally less stable if more vehicles are added; crashes are more frequent, but we aren't exactly sure why. So total vehicles in the save would be about 280, hopefully less.

 

Custom Plates: 15 total, 4 are unused in a standard game. All are adjusted with mission coding.

 

Police Trigger Zones: Limit is 210, 209 are used in a normal game.

 

Tags: Not sure.

 

Unique Stunt Jumps: max=256 (according to Limits Adjuster) SAMA and the savegame editor limit the jumps they display to 70. The jumps often get rewritten to disk in a different order and this causes some confusing results with these programs. We were counting on SAMA to map the new jumps so we started cutting old jumps to hold at 70 total.

 

ENEX Connections: max=400 (according to Limits Adjuster) It is important to note the something creates new Enex connections in preparation for the Burlary Missions every night, so pushing this limit too closely may cause unexpected problems. 400 seems a bit low. There are 376 standard enex connections, and I thought I read someplace that someone successfully added about 70 (?) more. Maybe I'm wrong, I can't find the original post.

Edited by OrionSR
  • 3 weeks later...

Link to fix Madd dogg / Basketball / Taxi / Pool / Barriers glitch (PC only).

 

 

The glitch has been repaired successfully by patching parts of Save Block 19: Ped Acquaintances with data from a working save. These records appear to remain constant throughout the game except for one small adjustment to CivMale during the mission Breaking the Bank at Caligula's.

Ped Acquaintances changes 6-7 times throughout the game. I have list of the missions those change these stats.

 

 

Before Drive byPED 7 (Gang1)Respect : 10000000Like : 0Dislike : 100001000000001Hate : 11011110100000000After Drive byPED 7 (Gang1)Respect : 10000000Like : 0Dislike : 100001000000000Hate : 11011110100000001Before Madd Dogg's RhymesPED 7 (Gang1)Respect : 10000000Like : 0Dislike : 100001000000000Hate : 11011110100000001After Madd Dogg's RhymesPED 7 (Gang1)Respect : 10000000Like : 0Dislike : 100001000000001Hate : 11011110100000000Before Los SepulcrosPED 8 (Gang2)Respect : 100000000Like : 1Dislike : 100001000000000Hate : 11011110010000000After Los SepulcrosPED 8 (Gang2)Respect : 100000001Like : 0Dislike : 100001000000000Hate : 11011110010000000Before Ice cold killaPED 23 (Special)Respect : 0Like : 0Dislike : 0Hate : 0After Ice cold killaPED 23 (Special)Respect : 0Like : 0Dislike : 0Hate : 1Before Meat BusinessPED 23 (Special)Respect : 0Like : 0Dislike : 0Hate : 1After Meat BusinessPED 23 (Special)Respect : 1Like : 0Dislike : 0Hate : 0Before Breaking Bank...PED 4 (CivMale)Respect : 100000Like : 0Dislike : 0Hate : 0After Breaking Bank...PED 4 (CivMale)Respect : 100000Like : 1Dislike : 0Hate : 0Before Home ComingPED 8 (Gang2)Respect : 100000001Like : 0Dislike : 100001000000000Hate : 11011110010000000After Home ComingPED 8 (Gang2)Respect : 100000000Like : 1Dislike : 100001000000000Hate : 11011110010000000

 

You can compare it with glitched ped acquaintances.

 

P.A. of Civmale and Civfemale in corrupt save

 

PED 4 (Civmale)Respect : 0Like : 0Dislike : 0Hate : 11111111111111111111PED 5 (Civfemale)Respect : 0Like : 0Dislike : 0Hate : 11111111111111111111PED 22 (Prostitute)Respect : 0Like : 0Dislike : 0Hate : 1000000

 

You can see Civmale and Civfemale hate almost all peds but prostitutes. Prostitutes only hate cops. So if you decompile script and change Madd Dogg's ped type from 'Civmale' to 'prostitute', you will be able to complete 'Madd Dogg' mission with corrupt save.

 

Similar thing may be possible in Tanker commander mission, if you change Catalina from CivFemale to Prostitute.

Edited by hmvartak
  • 1 month later...

Pimping Mission Glitch

 

Fix available at http://hmvartak.110mb.com/fix.htm

 

Cause : Passing this mission using mission passer.

 

Description : Completing pimping by mission passer disables this mission permanantly by setting global variable $162 to value 1. If you restore this variable to value 0, glitch will get disappear.

 

From mission passer:

 

 

//-------------Mission 127---------------

// Originally: Pimping Sub-Mission

 

:NONAME_46

$162 = 1 // integer values

$ONMISSION = 1 // integer values

if

  $MISSION_PIMPING_PASSED == 0 // integer values

else_jump @NONAME_46_116

054C: use_GXT_table 'PIMP'

increment_mission_attempts

00BE: text_clear_all

00BC: text_highpriority 'SEXGOD' 6000 ms 1  // Pimping complete! Prostitutes will now pay YOU to have relations with them!

01E3: text_1number_styled 'PIMP_50' 1000 5000 ms 1  // Pimping Complete!

0394: play_music 2

Player.Money($PLAYER_CHAR) += 1000

Player.ClearWantedLevel($PLAYER_CHAR)

0595: mission_complete

030C: set_mission_points += 1

0A3D: toggle_prostitutes_pay_you 1

$MISSION_PIMPING_PASSED = 1 // integer values

 

:NONAME_46_116

$ONMISSION = 0 // integer values

01BD: $CURRENT_TIME_IN_MS = current_time_in_ms

mission_cleanup

end_thread

 

Probably author of mission passer forgot to set $162 to 0.

Traffic Glitch post <Link> has been updated with links to the glitch discovery topic and a link to a repair tool that repairs some but not all of the required timers.

 

As we got into tracking this glitch we kept running into more problems. First was the discovery that "resetting" the global timer solved the problem with the traffic, but then more problems became apparent. The weather cycled too fast (reset weather timer to fix), missions or script wouldn't start (wakeup timers), vehicles didn't appear. PD fixed many of the problems but then we discovered more. Pickups need some adjustment; the ones that had be recently used (flag 1?) wouldn't appear, and temporary drops were hanging around forever. Problems with police triggers were predicted and confirmed, but not repaired. And there was a report that pickups respawned too quickly but I never followed up with an investigation.

 

 

 

Do these^ specific savegame glitches exist for any config?

 

EXEs: 1.0, 1.1, 2.0, compact, hoodlum

SETUPs: original, downloaded, hybrid

 

...or are they experienced using any of the above?

 

 

Basketball Glitch - all versions. However, some custom scripts will reset the variable, some custom saves have moved the disk.

 

Pool Player Glitch - only on modified configurations with a pool table placed near a save disk.

 

Zone Glitches (Taxi Glitch, Turf Glitch, Zone Name Glitch) The turf glitch only works well on the original edition for PS2. The taxi glitch has never been reported on PS2, but may be present in all versions for PC, and also reported on Xbox. Zone names are similar to the taxi glitch, not much data has been collected on different version.

 

Gym Glitch - as far as I know, this is a frequent problem in all versions. I'm not sure if custom scripts account for this glitch - it seems like an easy enough fix.

 

NPC Glitches (Madd Dogg, Catalina, Denise) Present on all version of PS2 and PC. I'm not sure if the fix was ever worked into the custom scripts.

 

Dead Girlfriends - appears to be the same on PC, PS2 and different versions.

 

Traffic Glitch (a Global Timer Glitch) - probably specific to PC. Reported on version 1 and version 2.

 

Pimping Glitch - specific to the Mission Passer script.

 

 

 

 

 

 

 

  • 2 months later...
  • 1 year later...

Save Anywhere Mod Used During a Mission

 

This problem occasionally pops up so I wanted to move my notes somewhere where I could find them.

 

To fix the save:

 

Figure out which mission thread is running. When I tested this strategy I used the Japanese Save editor, but it should also be possible to figure out the thread name from the save, scripts, or other documentation.

http://gtasamod.web.fc2.com/tool/sase/index.html

 

Open the save with a hex editor. Search for the thread name. Use the thread structure documentation to identify the Wakeup Time for that thread and increase the value to something very large. Fix the checksum at the end of the save.

http://www.gtamodding.com/index.php?title=...Block_1:_Script

 

Create a CLEO script that will set $ONMISSION to 0 and end the thread.

 

0004: $ONMISSION = 00459: end_thread_named 'SCRASH3' // I tested this on 555 We Tip
 

Changing the Wakeup Time allowed me to load the save. Setting $ONMISSION to 0 enabled the missions again. Ending the thread got rid of the thread that was stuck in memory and may eventually wake up. To complete the repair it may be necessary to remove any pickups, blips, objects, or other stray settings created by the mission.


______________________________________

 

Add ~10 seconds to mission script's wakeup timer (not necessary but helps with debugging).
Set mission script's BaseIP to 0.

Set mission script's RelativeIP to 0xF181 (first terminate_this_script in v1 scripts).

Set On Mission status to 0 ($409 in PC scripts).
Fix checksum at end of file.

 

Edited by OrionSR

 

Changing the Wakeup Time allowed me to load the save. Setting $ONMISSION to 0 enabled the missions again. Ending the thread got rid of the thread that was stuck in memory and may eventually wake up. To complete the repair it may be necessary to remove any pickups, blips, objects, or other stray settings created by the mission.

Would this issue be caused by the mission segment not actually being loaded in memory on save load, since the game usually does not use that, causing the game to run invalid code? Odd, most 'Save Anywhere' scripts I've seen did check the ONMISSION flag.

  • 10 months later...

Cities Unlocked stat 181 altered during early Los Santos mission strand

 

Description:

 

When stat 181 is greater than 0 the mobile phone thread for the early Los Santos missions (MOB_LA1) will end. This usually occurs after the mission The Green Sabre when the thread is no longer necessary.

 

This problem is most commonly associated with Hot Coffee 2.0. I've never actually examined the HC mod scripts, but apparently other versions of the mod did not suffer from this problem.

 

Save Editors and CLEO scripts can also be used to alter stat 181.

 

Symptoms:

 

Phone calls will not occur; Hernandez warning CJ not to leave town, Sweet opening the gyms, Cesar informing CJ about illegal races (High Stakes Lowrider mission), Tenpenny insisting that CJ come to the donut shop (Burning Desire mission).

 

Gyms remain closed late into the early LS mission strand.

 

Countryside and possibly desert safehouses (depending on the stat setting) are available for purchase during the early LS mission strand.

 

Possible Repair:

 

Reset stat 181 to 0 and re-launch MOB_LA1 using a CLEO script.

 

//Possible Repair for altering City Unlocked during LA1 mission strand
0629: change_integer_stat 181 to 0

//create_thread 180158 // @MOB_LA1 PCv1
create_thread 180137 // @MOB_LA1 PCv2
 

 

 

Notes:

 

The code snippet should probably have a check to make sure the thread isn't still running. The main reason for posting it is to document the offsets required to launch the threads.

 

Global offsets must be used to launch threads in main.scm from a CLEO script. Comment/uncomment the v1 or v2 offsets as necessary.

 

This repair has only been tested as far as completing the first couple of Badlands missions after The Green Sabre on a v2 save. Other glitches may be in place that I am unaware of.

 

Countryside and desert safehouses remain available for purchase, but I doubt this will cause any problems.

 

CJ should start receiving the missing phone calls as soon as he is outside and not on a mission. The gyms will be unlocked and missing missions should be available after the calls have been answered.

 

Altering stat 181 while a mission is active should not cause MOB_LA1 to end prematurely.

Edited by OrionSR
  • 2 weeks later...

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
 

 

 

Edited by OrionSR
  • 1 year later...

If you are talking about the Online Glitch Repair Tool then hmvartak is the only one who can do anything to fix it, and he isn't active much anymore. However, most of the repairs have been incorporated into the Savegame Editor v3.1.2, and those links seem to be working.

 

If your problem cannot be fixed with the tool linked above then consider starting a new topic with a link to the save (use GTASnP.com) and a description of the problem. This topic is intended for documenting glitches and fixes, not solving individual problems.

 

 

The purpose of this topic is to document Glitches in San Andreas that are part of the save file. It is intended for people who can hex edit a save file or create tools that can detect or repair save file glitches. Questions about your specific glitch would be more appropriate in another topic.

 

I will not offer solutions to problems posted in this topic.

Edited by OrionSR

Thanks for the reply! My problem is some stucked radar blip in the save, and i can't find anything to correct it. I tried to edit the *.b file with HEX editor, but te game says "Corrupted Save File". Btw i think the inactive link is not just my individual problem...

I gonna try to contoact with hmvartak. sigh.gif

  • 2 years later...

Just copying critical notes into the appropriate topic.

On 3/8/2013 at 6:42 PM, OrionSR said:

Okay, this is what I've gathered so far. Roggan appears to be correct about the "random" mobile phone calls (thread MOB_RAN) messing with the calls in the Badlands (MOB_CAT). I have confirmed that the MOB_CAT thread is inactive on fnxrak glitched save, and... global variable $1411 = 1 using the Japanese save editor (linked at bottom).

Here's the bit where the thread gets killed. (the JF lines point where to go if the IF statement is not true - a value of 1 = true)

:MOB_CAT_56if$1411 == 1jf @MOB_CAT_76end_thread

This is how the thread is supposed to die. I think this is the call about The Truth's crops being ready so come on over for Are You Going...

:MOB_CAT_1136if$CALL_ANSWERED == 1jf @MOB_CAT_1194$1363 = 1Marker.Disable($MARKER_TRUTH_FARM)$MARKER_TRUTH_FARM = Marker.CreateIconAndSphere($ICON_TRUTH, $X_TRUTH_FARM, $Y_TRUTH_FARM, $Z_TRUTH_FARM)01F0: set_max_wanted_level_to 5$1411 = 1

This looks like the first call from the mafia, "Hey, Mr. Johnson. Just a friendly reminder that you owe me money." and variations.

:MOB_RAN_1781if$CALL_ANSWERED == 1jf @MOB_RAN_1820$1376 = 1$1377 = 0$1411 = 1

And then the call that the goons are on their way.

:MOB_RAN_2165if$CALL_ANSWERED == 1jf @MOB_RAN_2197$1377 = 1$1411 = 1

So yes, it definitely looks like the debt calls can and do glitch the Badland missions. The questions now are, can this be avoided by not answering the phone, and do the goons still show up in the uc2 Vincent?

The only place where $1411 is set to 0 is during the new game preparation, so there doesn't appear to be any why to repair the glitch in-game. Is anyone interested in a CLEO fix for this?

//Possible Repair for no Badland calls caused by Mafia Debt calls.
$1411 = 0 // good enough if before Green Sabre
create_thread 181884 // @MOB_CAT PCv1
//create_thread 181863 // @MOB_CAT PCv2

The Japanese save editor has a tool to show the values of the global variables and active threads.
GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html

Edited by OrionSR
Code Tags
  • 8 months later...

 

Gym Glitch

 

Description: CJ is not allowed to use the gym equipment.

Cause: I don't know, a teammate had already worked out the details and I didn't investigate further.

 

Fix: Artem Khassanov (Hammer83) http://www.artemkh.com/files/gtasa/sagym.zip

 

Originally posted by pdescobar:

  • Symptom: You can never work out; game always says "you have worked out enough today; come back tomorrow" even though you haven't exercised at all.
  • Gameplay Cause: Rampant speculation such as not eating enough or saving too often.
  • Technical Cause: Related to the 4 global variables $5345 through $5348; $5349 may have some relation too. I'm not yet sure of the proper relationship these variables should have but resetting all 4 to -1 (their initial values) clears the glitch.

_____________________

Updated:

 

$5345=$Current_Month_Day

$5346=$Current_Month

$5347=$GYM_Month_Day_When_Limit_Reached

$5348=$GYM_Month_When_Limit_Reached

$5349=$GYM_Day_Limit

 

The Gym Glitch: CJ cannot work out after waiting more than one day.

Technical: (current month > exceeded month) or (current day > exceeded day) is not true

 

The Gym Glitch Explained

 

"You have worked out enough for today, come back tomorrow!"

 

If this message is displayed every time CJ tries to workout, even when he returns the next day, then you've got the Gym Glitch.

 

The Gym Glitch can be avoided completely if CJ never exceeds the daily workout limit on that save.

 

When CJ exceeds the daily limit the current in-game month and day is recorded. Usually when CJ returns the next day or later the current month or current day will be greater than the exceeded month or day and he will be allowed to use the gym equipment. However...

 

There is no in-game year. When enough time has passed the current month will rollover back to 1. So let say that CJ last exceeded the daily limit on the 14th day of May. After the new year he will not be able to workout for the first two weeks of every month until June finally rolls around.

 

But there's a catch. There is no in-game method to determine the current month and day. The sum of all game days and safehouse visits is hardly even close. The best I can do is suggest to start checking for the glitch sometime after 200 game days, but that depends a lot of how often the game is saved.

 

The effects of the gym glitch can be mitigated by saving (which advances the calendar by 1 day) or by rolling over the clock past midnight until he can finally workout again. Then intentionally exceed the daily limit. This will set the exceeded date to the current date and CJ can work out normally again, until next year when you'll need to go through this process again.

 

Or better yet, wait until the last day of the month and start to work out. Wait until the clock rolls over and exceed the limit on the first day of a new month. Then the glitch will only be in effect next year on the first day of the early months. A player can determine the 1st day of the month because on the previous day CJ could work out but now he can't. Work between 2 saves and load the previous save when necessary.

 

Or even better, wait until new years eve to start working out and exceed the limit on new years day. Then if CJ never exceeds the limit again the glitch will only be noticed on new years day of each year. If the player carefully tracked each and every day for several months it might be possible to determine the current month based on a leap year calendar.

 

What can you do about the gym glitch?

 

If the glitch isn't very severe (March 5th) then don't do anything which might make it worse (December 31st).

 

On PS2, if you have AR-Max or similar cheat device software the glitch can be repaired with cheat device codes.

 

On backwards compatible PS3s it's possible to export the save to a PC, extract the save data, and use a save editor to examine the current month and day.

 

PSN users are out of luck. It's easy enough to export the save but it's encrypted, so unless someone figures out a way to decrypt the data there's no way to learn the date or fix anything.

 

PC players can use the repair tools linked below to reset the exceeded date. These tools will not work properly on PS2 saves because the global variables are different.

 

GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa

hmvartak's Online Glitch Repair Tool: http://hmvartak.freeiz.com/fix.htm

 

Cheat Device Codes to repair the Gym Glitch on NTSCv1, NTSCv2, and PALv1 can be found at the end of the post linked below.

http://www.gtaforums.com/index.php?showtop...st&p=1058178034

 

Gym Glitch Discovery topic on GTAForums: http://www.gtaforums.com/index.php?showtopic=551244

 

GYM Glitch can be fixed with set the global variable $5345, $5346, $5347, $5348, and $5349 to -1

That post has been edited a few times over the years, but I'm not sure why Johnson is repeating the same information. Only two variables need to be reset however, $5347=$GYM_Month_Day_When_Limit_Reached and $5348=$GYM_Month_When_Limit_Reached, but those numbers only work on PC. You can reset the others if you want but it won't make a difference.

  • 6 months later...
  • 3 months later...

Stray blips left over after a mission is just about the only blip subject within the scope of this topic, and I don't know the blip structure well enough to offer a solution. When I encounter a stray blip I usually identify it's index within the save and delete it with cleo.

 

Missing blips for the unmarked restaurant,and barber that were never included in the standard game is not considered a glitch.

 

Barring issues with data files as noted above, most issues with missing blips is related to bad mods. Usually the problem is caused by a cleo script that adds new icons each time a save is loaded until eventually no more can be created. Sometimes mission marker won't be created or will be created in the wrong location because a lousy script has altered critical global variables. Glitches related to bad mods are not within the scope of this topic.

 

Update: GTASnP.com has been updated with a Modifications tool that can remove Stray Blips - small-square usually yellow, sometimes green, destination blips that are leftover after a mission. This glitch is common with mission duping exploits (Om0) but can also happen accidentally in a normal game by starting a mission at the same time a phone call comes in. Upload the glitched save to the site. Any stray blips should be automatically detected by the modifications tool. Download the fixed save to remove the blips.

Update 2: BlipFix - cleo scripts for PC and Android that removes all non-standard blips.

 

 

Edited by OrionSR

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.