I too have been doing some gang war testing and have a few things to report.
All attempts to have Aztecas attack a gang zone have failed. I suspect this Master Mind glitch is bogus so I haven't spent all that much time on it.
Least Favorite Gang: I finally found where the kill stats for individual gangs are stored. The information can be found in the stats block of the save file in an area just beyond where the normal stats are stored.
| PC and PS2 offset from beginning of stats block: |
0x04EO // Ballas Killed
0x04E4 // Grove Killed
0x04E8 // Vagos Killed
0x04EC // Rifa Killed
0x04F0 // Da Nang Killed
0x04F4 // Mafia Killed
0x04F8 // Triad Killed
0x04fC // Aztecas Killed
Memory writes are easier to implement than save file editing, so here are the codes for PC. Note that these codes will set gang kills to 0, so alter the value as required.
| 0A8C: write_memory 0xB78EAC size 4 value 0 virtual_protect 0 // Ballas Killed |
0A8C: write_memory 0xB78EB0 size 4 value 0 virtual_protect 0 // Grove Killed
0A8C: write_memory 0xB78EB4 size 4 value 0 virtual_protect 0 // Vagos Killed
0A8C: write_memory 0xB78EB8 size 4 value 0 virtual_protect 0 // Rifa Killed
0A8C: write_memory 0xB78EBC size 4 value 0 virtual_protect 0 // Da Nang Killed
0A8C: write_memory 0xB78EC0 size 4 value 0 virtual_protect 0 // Mafia Killed
0A8C: write_memory 0xB78EC4 size 4 value 0 virtual_protect 0 // Triad Killed
0A8C: write_memory 0xB78EC8 size 4 value 0 virtual_protect 0 // Aztecas Killed
I think I have identified the memory locations for PS2v1, but I haven't tested actual codes, so just the addresses are posted for now.
0x802730 // Ballas Killed
0x802730 // Grove Killed
0x802730 // Vagos Killed
0x802730 // Rifa Killed
0x802730 // Da Nang Killed
0x802730 // Mafia Killed
0x802730 // Triad Killed
0x802730 // Aztecas Killed
Note that integer stat 239, Enemy Gang Members Killed, does not automatically update when the gang killed stats are altered. Integer stat 324, Gang Members Wasted, does get updated. However, in the end game saves I've looked at, Gang Members Wasted doesn't usually equal Enemy Gang Members Killed, and neither does the sum of all the gang member killed stats.
Seeman identified the dword in the save file's gangwar block at offset 0x38 as "next attack time (?)". I'm not entirely sure what this value represents, but resetting it to 0 in the save or in memory will cause an immediate attack if a suitable zone is available for attack.
CLEO snippet for PC
| 0A8C: write_memory 0x96ab48 size 4 value 0 virtual_protect 0 // Clear Next Attack Time |
Possible address of Next Attack Time for PS2v1 (untested)
| 0x66c7e4 // Next Attack Time PS2v1 |
If gang wars are artificially enabled at the beginning of a game there are no zones suitable for attack. In order to be attacked a zone must have a Grove density of at least 16 and there must be a rival (Ballas or Vagos) density of at least 20 in the same zone or in an adjacent zone. One successful test involved a lone Azteca 40 zone (ELCO1) with 20 Ballas and 16 Grove.
Total density of a zone and the surrounding zones appears to be a primary factor for deciding which zone will be attacked. However, the results are often confusing; there is probably other criteria I have not be able to identify.
A zone can often be disqualified from attack if CJ is too close to the attack zone.
Defending a zone from attack will add a density of 10 to the zone in which CJ is standing when the last attacker is killed. The maximum density provided is 55.
Ignoring an attack will add 30 to the density of the attacking gang in the zone attacked. Timeout occurs in about 04:30.
Dying while defending a zone from an attack provides a density increase to the attackers of 15 in the zone attacked - sometimes. I also noticed an increase of 18, but that might only occur when density levels are very high (>165, 55).
If a zone defense is started and abandoned the attacking gang got an increase of 18 to the zone attacked, but again, this might be attributed to the very high densities involved. Timeout is about the same; a little over 4 in-game hours.
More testing of full scale wars is needed, but notes so far:
Winning a war will add the density of the losing gang to Grove's total. However, if Ballas = 240, and Grove = 20, winning the war will leave Grove with a total density of 4. This is because the density value is stored in a byte so the value rolls over at 256. This is the only way I have found for Grove to lose density in a zone.
Losing during the first round of a war results in no change of density.
My results for losing during the 2nd or 3rd round of a gang war didn't make much sense. I think I need to try again with smaller densities to make sense of it all.
PC players will notice that the zone name displayed will be tinted when CJ enters a zone shared with Vagos or Ballas.