|
 |
|
|
|
|
|
GTA Modification Forums
SA Save File Glitch Detection and Repair Documentation and Technical Discussion
 |
|
 |
| |
OrionSR  |
Posted: Saturday, May 17 2008, 19:11
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
Update while the links are working: The most comprehensive Glitch Repair Tool is available at hmvartak's site:<Online Glitch Repair Tool>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. However, many glitches already have patch utilities and that information will be provided when it is available.Documentation on the structure of the save file can be found on the Wiki at gtamodding.com SA Save FilesBasketball 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 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 FixThe 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 PS2Basketball 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 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. This post has been edited by OrionSR on Tuesday, Oct 21 2008, 04:06
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
Posted: Saturday, May 17 2008, 19:51
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
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 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 FixOne 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. This post has been edited by OrionSR on Sunday, May 18 2008, 01:01
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
Posted: Saturday, May 17 2008, 21:15
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
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" 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. | CODE | 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. This post has been edited by OrionSR on Saturday, May 17 2008, 23:13
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
Traffic Glitch - a Global Timer GlitchCiting 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=301764Link to pdescobar's Traffic Glitch repair tool (incomplete): http://pdescobar.home.comcast.net/gta/SA_T...Glitch_Test.rar This post has been edited by OrionSR on Sunday, Jul 20 2008, 19:09
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
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. This post has been edited by OrionSR on Sunday, May 18 2008, 04:48
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
| QUOTE (xmen @ May 17 2008, 21:48) | | hey can you explain all the limits, like max vehicle spawn, max garages etc | Save File Limits | QUOTE (CyQ) | 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. This post has been edited by OrionSR on Sunday, May 18 2008, 10:22
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
Posted: Saturday, Jul 26 2008, 09:08
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
| QUOTE (a question in PM) | 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.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
Posted: Saturday, Feb 20 2010, 22:58
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
Save Anywhere Mod Used During a MissionThis 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.htmlOpen 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:_ScriptCreate a CLEO script that will set $ONMISSION to 0 and end the thread. | CODE | 0004: $ONMISSION = 0 0459: 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. This post has been edited by OrionSR on Saturday, Feb 20 2010, 23:00
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
Cities Unlocked stat 181 altered during early Los Santos mission strandDescription:
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. | CODE | //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. This post has been edited by OrionSR on Friday, Dec 31 2010, 09:12
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
OrionSR  |
|
Chain Game Development Team

Group: Members
Joined: May 23, 2007


|
Deleted Object Required - Driving or Bike School Deletes ObjectOriginal Topic: Crashing around the SF DocksV2 save with glitch ready to occur: http://gtasnp.com/download/24365It 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. | CODE | 7@ = Object.Init(3077, -1573.881, 135.3845, 2.535) //#NF_BLACKBOARD Object.Angle(7@) = 180.0 Object.KeepInMemory(7@) = True Object.ToggleInMovingList(7@) = False Object.RemoveFromMissionCleanupList(7@)
0AAA: 1@ = thread 'IMPEXPM' pointer 0085: 2@ = 1@ 2@ += 0x3C // offset to local variable space 3@ = 27 // local variable 3@ *= 4 005A: 2@ += 3@
0A8C: write_memory 2@ size 4 value 7@ virtual_protect 0 |
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(2) [1] 2
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|