Quantcast

Jump to content

» «
Photo

SA Save File Glitch Detection and Repair

22 replies to this topic
OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#1

Posted 17 May 2008 - 07:11 PM Edited by OrionSR, 19 June 2014 - 08:11 AM.

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 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.


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#2

Posted 17 May 2008 - 07:51 PM Edited by OrionSR, 18 May 2008 - 01:01 AM.

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 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.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#3

Posted 17 May 2008 - 08:07 PM Edited by OrionSR, 17 May 2008 - 11:54 PM.

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.c...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.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#4

Posted 17 May 2008 - 09:15 PM Edited by OrionSR, 17 May 2008 - 11:13 PM.

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" down left up left X R2 R1 L2 L1

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.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#5

Posted 17 May 2008 - 11:47 PM

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

QUOTE (pdescobar)
QUOTE (OrionSR)
QUOTE (pdescobar)
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.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#6

Posted 18 May 2008 - 12:33 AM Edited by OrionSR, 20 July 2008 - 07:09 PM.

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...howtopic=301764
Link to pdescobar's Traffic Glitch repair tool (incomplete): http://pdescobar.hom...Glitch_Test.rar

xmen
  • xmen

    Foot Soldier

  • Members
  • Joined: 02 Jun 2005

#7

Posted 18 May 2008 - 03:55 AM

i think it will help me in making that tool, thanks wink.gif

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#8

Posted 18 May 2008 - 04:46 AM Edited by OrionSR, 18 May 2008 - 04:48 AM.

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.

xmen
  • xmen

    Foot Soldier

  • Members
  • Joined: 02 Jun 2005

#9

Posted 18 May 2008 - 04:48 AM

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

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#10

Posted 18 May 2008 - 05:55 AM Edited by OrionSR, 18 May 2008 - 09:10 AM.

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

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#11

Posted 18 May 2008 - 09:07 AM Edited by OrionSR, 18 May 2008 - 10:22 AM.

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.

hmvartak
  • hmvartak

    Thug

  • Members
  • Joined: 17 Nov 2006

#12

Posted 03 June 2008 - 07:32 PM Edited by hmvartak, 10 January 2010 - 01:26 AM.

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

QUOTE
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.

CODE
Before Drive by
PED 7 (Gang1)
Respect : 10000000
Like : 0
Dislike : 100001000000001
Hate : 11011110100000000

After Drive by
PED 7 (Gang1)
Respect : 10000000
Like : 0
Dislike : 100001000000000
Hate : 11011110100000001

Before Madd Dogg's Rhymes
PED 7 (Gang1)
Respect : 10000000
Like : 0
Dislike : 100001000000000
Hate : 11011110100000001

After Madd Dogg's Rhymes
PED 7 (Gang1)
Respect : 10000000
Like : 0
Dislike : 100001000000001
Hate : 11011110100000000

Before Los Sepulcros
PED 8 (Gang2)
Respect : 100000000
Like : 1
Dislike : 100001000000000
Hate : 11011110010000000

After Los Sepulcros
PED 8 (Gang2)
Respect : 100000001
Like : 0
Dislike : 100001000000000
Hate : 11011110010000000

Before Ice cold killa
PED 23 (Special)
Respect : 0
Like : 0
Dislike : 0
Hate : 0

After Ice cold killa
PED 23 (Special)
Respect : 0
Like : 0
Dislike : 0
Hate : 1

Before Meat Business
PED 23 (Special)
Respect : 0
Like : 0
Dislike : 0
Hate : 1

After Meat Business
PED 23 (Special)
Respect : 1
Like : 0
Dislike : 0
Hate : 0

Before Breaking Bank...
PED 4 (CivMale)
Respect : 100000
Like : 0
Dislike : 0
Hate : 0

After Breaking Bank...
PED 4 (CivMale)
Respect : 100000
Like : 1
Dislike : 0
Hate : 0

Before Home Coming
PED 8 (Gang2)
Respect : 100000001
Like : 0
Dislike : 100001000000000
Hate : 11011110010000000

After Home Coming
PED 8 (Gang2)
Respect : 100000000
Like : 1
Dislike : 100001000000000
Hate : 11011110010000000

You can compare it with glitched ped acquaintances.

P.A. of Civmale and Civfemale in corrupt save
CODE
PED 4 (Civmale)
Respect : 0
Like : 0
Dislike : 0
Hate : 11111111111111111111

PED 5 (Civfemale)
Respect : 0
Like : 0
Dislike : 0
Hate : 11111111111111111111

PED 22 (Prostitute)
Respect : 0
Like : 0
Dislike : 0
Hate : 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.

hmvartak
  • hmvartak

    Thug

  • Members
  • Joined: 17 Nov 2006

#13

Posted 19 July 2008 - 12:06 PM

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:

QUOTE
//-------------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.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#14

Posted 20 July 2008 - 07:34 PM

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.


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#15

Posted 26 July 2008 - 09:08 AM

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.







crazyassdriver2002
  • crazyassdriver2002

    Player Hater

  • Members
  • Joined: 14 Oct 2008

#16

Posted 14 October 2008 - 08:25 AM

pdescobar, easy repair. Thanks a ton

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#17

Posted 20 February 2010 - 10:58 PM Edited by OrionSR, 20 February 2010 - 11:00 PM.

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....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.gtamoddin...Block_1:_Script

Create 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.

NTAuthority
  • NTAuthority

    member_title

  • The Yardies
  • Joined: 09 Sep 2008
  • European-Union
  • Most Knowledgeable [Technology] 2013
    Best Map 2013 "ViceCityStories PC Edition"

#18

Posted 21 February 2010 - 08:01 AM

QUOTE (OrionSR @ Feb 20 2010, 23:58)
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.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#19

Posted 31 December 2010 - 02:58 AM Edited by OrionSR, 31 December 2010 - 09:12 AM.

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.
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.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#20

Posted 10 January 2011 - 07:23 AM

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.

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


JesterGeO
  • JesterGeO

    Player Hater

  • Members
  • Joined: 22 Jun 2010

#21

Posted 20 June 2012 - 04:30 AM

The Save File Glitch repair tool is unavailable by few days on the website, but i need to it. Can someone fix it or move it to another server? It's gonna be very important for me. Thank forward! tounge.gif

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci Racing
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#22

Posted 20 June 2012 - 08:55 AM Edited by OrionSR, 20 June 2012 - 11:38 AM.

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.

QUOTE
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.

JesterGeO
  • JesterGeO

    Player Hater

  • Members
  • Joined: 22 Jun 2010

#23

Posted 20 June 2012 - 09:35 AM

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users