Quantcast

Jump to content

» «
Photo

SA Restricted Areas

19 replies to this topic
OrionSR
  • OrionSR

    Chain Game Development Team

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

#1

Posted 06 January 2008 - 09:52 PM

Does anyone have any idea how the restricted area borders are drawn? I know the 3 star wanted level from the Impound Garages are controlled by the Impound Script, but I can't find any other method to determine the borders of other restricted areas. My main question is in regard to how the game determines when CJ is in a military area, or in restricted parts of SF or LV, but I'm also curious about the 2 star wanted level generated when CJ is armed inside of a police interior.

I was hoping to find some clues in the zone files, but there appears to be very little correlation between the zones and the restricted borders. A wanted level is earned if CJ is anywhere over, on, or below a restricted area (-100 to +950), far beyond the limits for the zones. I have a fairly accurate map of each zone, and have spent a lot of time exploring the borders; they don't match.There isn't any information in the zone records that appears to be used for determining restricted access. All the zones use the same island number. Zones have straight and unrotated edges. The restricted border is much more detailed than that, especially along the channels between the 3 main islands. In fact, there seems to be a great deal of detail to the restricted border. It roughly follows the outline of the waterways, but includes enough of the opposite bank that CJ can usually travel by boat anywhere in the river and he won't earn a wanted level for straying to far to one side - usually.

I was hoping to find a method to accurately map the borders to restricted areas, but I'm stumped. My only thought is that an overlay image could be used to paint the restricted areas over the map, but poking around through the texture libraries isn't turning up any likely candidates. So, does anyone have any information that might be useful?
  • OG Viking likes this

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2013 "Sanny Builder"

#2

Posted 07 January 2008 - 02:53 PM

I believe that the military zones borders are defined in either the cull.ipl, or the CULL section of other IPLs.

Wanted stars for the weapon shown in police stations are controlled by the INTMAN thread in the main.scm

CODE
:INTMAN_3052
00D6: if
0038:   $1260 == 1
004D: jump_if_false @INTMAN_3095
00D6: if
82D8:   not actor $PLAYER_ACTOR current_weapon == 56
004D: jump_if_false @INTMAN_3095
010E: set_player $PLAYER_CHAR minimum_wanted_level_to 2

  • OG Viking likes this

OrionSR
  • OrionSR

    Chain Game Development Team

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

#3

Posted 07 January 2008 - 07:11 PM Edited by OrionSR, 07 January 2008 - 11:28 PM.

Thank you. I made some progress on the Military Zones, but I've added the question about the retention of stars in cities, or removal of stars in country regions.

Military Zones from cull.ipl
CODE
190.734, 1870.47, -1.06643, 0, 73.3125, -1.06643, 95.4981, 0, 73.9336, 4096, 0
-1357.44, 503.578, -10.6598, 0, 18.9495, -10.6598, 115.205, 0, 140.26, 4096, 0
-1380.64, 421.429, -10.6598, 0, 63.1997, -10.6598, 161.207, 0, 140.26, 4096, 0
-1481.8, 308.229, -10.6598, 0, 50, -10.6598, 157.743, 0, 140.26, 4096, 0
289.513, 2011.4, -1.06643, 0, 71.208, -1.06643, 102.159, 0, 73.9336, 4096, 0
333.553, 1861.82, -1.06643, 0, 79.8704, -1.06643, 58.2495, 0, 73.9336, 4096, 0


CULL - SA Interior Format
CODE
centerX, centerY, centerZ, 0, Ywidth, bottomZ, Xwidth, 0, topZ, Flag, Vx, Vy, Vz, Cm

This format is only(always?) used for elevations above 990 meters (except for something centered at 1.7363, 29.5882, 198.602)
The Shamal Interior is +1000 off from these coodinates.

Interior CULLs almost always use flag 1 (except for a single type 2 centered at (-1399.83, -208.103, 1039.34)
8-Track and the super cool projection TVs

Vx, Vy, Vz, and Cm are documented elsewhere as controlling reflective or projecting surfaces

And then there's everything else. I'm not sure what's up with this yet, but I've still got some other documentation to review from the initial investigations into cull.

CULL - SA Exterior Format(?)
CODE
centerX, centerY, centerZ, 0, Ywidth, bottomZ, Xwidth, 0, topZ, Flag, (unknown)


Flag Notes (need to merge with other reports)
Standard Exterior Flag = 8
Tunnel Flag = 128
Unknown Flag used once by itself = 1024
Tunnel Flag = 2048
Military Zone Flag = 4096
Tunnel Flag always used with 2048 = 8192 (10240)
Fairly Common Flag = 16384
Always used with 1024 flag = 32768 (33792)

I never did figure out what the rest of the cull flags are for. Running SA with a stripped cull leaves the restricted borders in place so I guess I'm out of leads on this part of the question. Also, stripping cull doesn't appear to change how the stars are removed or retained in country or city regions. However, the helicopters seemed more likely to track CJ down when he was inside of a tunnel or covered car park when cull is stripped - which makes a lot of sense for a cull.
  • OG Viking likes this

OrionSR
  • OrionSR

    Chain Game Development Team

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

#4

Posted 09 January 2008 - 09:53 PM

I've been reviewing some old images stored in the data files. I was hoping to find something that would explain the wanted levels for restricted areas, a town map of some sort, but didn't find anything. However, I did make some interesting observations based on some old maps. The oldest map seems to be the one on the wall at Toreno's Ranch and the UFO Bar. In the picture, the area of Bayside Marina is missing. I revisited Bayside and explored the restricted areas a little more closely. I was surprised by how much of the the town in unrestricted. I'm wondering if the... Town Map that defines the restricted areas is older than the updated map we have to play on.

Another clue is from the old Country Endurance course map from models\txd\ld_race.txd: race02. This image seems to show a lot of water surrounding the cloverleaf at Flint Intersection and the area of the Trucking Asset. The extra water seems to reflect the unrestricted areas I am familiar with in that section of the map.

Still, nothing in these images explains the large unrestricted area in the desert that's pretty much directly north (and a tad west) of Pier 69 (or rather, north and a tad east of the submarine). The roads in that area, and the outline of the coast, seem to be the same on every map, but much of this area is unrestricted. Also, there's a restricted area near the stern of the Amphibious Assault ship that extends well out into the bay, almost to the ship, and I'm not finding any clues as to why.

So now I'm stuck, and I'm not sure where else to look.

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2013 "Sanny Builder"

#5

Posted 10 January 2008 - 02:31 PM

What makes you think that some images are related to the restricted areas borders? Ain't these borders defined by the CULLs only? Please, explain.

derty
  • derty

    My member's custom title is "Solid Snake"

  • BUSTED!
  • Joined: 01 Nov 2007

#6

Posted 10 January 2008 - 03:27 PM

Wow Orion, nice dedication smile.gif

The marina north of san fierro bridge was added later in development, but wait, it is possible
to be there without being gaining a wanted level of 4 stars?

Like, if I used a trainer of some sort, and put myself there early in the game,
the game would instead of judging me for being outside of the first
allowed area, it instead counts for places that I cannot be?

Meaning, it isn't a box holding us in, but rather cull boxes we should not go into?

OrionSR
  • OrionSR

    Chain Game Development Team

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

#7

Posted 10 January 2008 - 06:47 PM

I don't think the restricted borders are defined by culls because when I strip my cull file of all entries the restricted areas remain in place. When I ran this test I didn't clear the tunnel culls, but I don't think this makes a difference. Also, culls and zones are limited by height, but the restricted ares appear to use a flat 2-D detection method that is active anywhere between Z -100 and +950.

The reason I suspected an image overlay is based on another game, UT2004, the only other game I have experience modding. UT2004 uses image overlays to paint detail over a terrain. A grayscale image represents the height values the terrain, and other images paint on different textures (dirt at the bottom, rocks in the middle, snow on top) or foliage (a few shrubs over here, lots of grass over there). Since I don't have any other clues to work with, and I'm used to thinking of images controlling my maps, I speculated that an image could be used for this purpose and started to poke around to see what I could find. Searching through thousands of texture libraries is proving to be a difficult task. I've checked the libraries that seem like they might be related without any success.

Unrestricted Marina: Yes, if you warp or change CJ's game start location to the boat school at the beginning of the game, you will not earn the 4 star wanted level. Actually, it's possible to make the trip from the Jetmax north of Palomino Creek through the bay all the way to the boat school, but there's a narrow gap near the Amphibious Assault ship that is difficult to navigate. It's easy enough in an aircraft, just cross over the ship, but in a boat CJ must round the stern of the ship fairly closely. Most of the eastern part of the Marina is not restricted, but as you move farther west the restricted area creeps more to the south. The silver weapon can be collected without triggering the stars, but not the armor on the beach. The southern road isn't restricted, and if you stick to the shore you can even cross the freeway to the hills along the coast. Anyway, trying to map the borders by trial and error isn't very accurate, and this is the reason I'm hoping to come up with some sort of map.
  • OG Viking likes this

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2013 "Sanny Builder"

#8

Posted 10 January 2008 - 08:21 PM

From what I can see in the exe, the game only reads the cull zones data while checking if the player is within a restricted zone area. The data written in the second format you posted (exterior) is only used.

CODE
centerX, centerY, centerZ, 0, Ywidth, bottomZ, Xwidth, 0, topZ, Flag, (unknown)


Did you look at the IPL files content? They have the CULL section which may contain the same data as the cull.ipl. Probably the missed borders are defined there. Sorry, I have no other idea.

P.S. Image overlaying is very unlikely. I've never heard GTASA ever used a technique like this.
  • OG Viking likes this

derty
  • derty

    My member's custom title is "Solid Snake"

  • BUSTED!
  • Joined: 01 Nov 2007

#9

Posted 10 January 2008 - 09:10 PM Edited by derty, 10 January 2008 - 09:30 PM.

extremely unlikely, if we are both reading that right??

here's cull.ipl, can give you any data you circle tounge.gif

however, as you can see, this doesn't cover the marina stuff, namely the off limits
areas at the beginning of the game:

user posted image
user posted image
I had a BALL reading your explanation of the journey from the marina
to LS, Orion. I had no idea that was possible, and I admire how much
dedication is evident in your roaming (better not f*ckin filter it. Farming.
lol.), shows that you're adamant.

A clue though: Someone made a mod (Opius comes to mind,
may have been someone else...) a long long time ago that removed the
wanted level when you left areas before you've unlocked others.

I remember that the area 69 and naval base, as well as I believe the military
base, and I think somewhere else, were dubbed as hard coded (?) Does this
mean that maybe Seemann's words about the exe could point to these being
defined in the exe but controlled with script? What about the binary assets?

QUOTE (seemann)
CODE
0A24: enable_military_zones_wanted_level 1


damn. yup.
  • OG Viking likes this

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2013 "Sanny Builder"

#10

Posted 10 January 2008 - 09:18 PM

There's opcode
CODE
0A24: enable_military_zones_wanted_level 1


Its flag is used in that exe code I mentioned (the one that scans the culls to check whether or not the player is within a restricted zone).

OrionSR
  • OrionSR

    Chain Game Development Team

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

#11

Posted 10 January 2008 - 10:42 PM Edited by OrionSR, 10 January 2008 - 11:01 PM.

At this point I would agree that an image overlay is very unlikely. Still, I had high hopes because this would spit out the map I was hoping for.

Other than tunnel.ipl, I'm not finding any more culls in the text or streamed IPLs. BTW, nice map Derty. Thanks.

Military Zones are definitely defined by culls (see post above). Do you have reference on a similar code that determines which town CJ is within?

Is there anything that would distinguish between the rural and urban areas for the islands? The stars clear more quickly in rural areas, and I'm trying to tie all the clues together when possible.

And regarding the Opius clue, it's not difficult to stop the game from registering a wanted level using the codes that unlock the cities, so unless I had some indication of something fancy going on, I'm not sure an investigation into the mod will provide any useful information. What would be more interesting would be a mod that changed the layout of the map, and moved the borders appropriately.

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2013 "Sanny Builder"

#12

Posted 11 January 2008 - 06:37 AM Edited by Seemann, 11 January 2008 - 07:29 AM.

I've just looked into the exe, in function that gives 4 stars if CJ left LS too early (stat 181 < 4). And what I found: there's a set of some coords stored in the exe, the function reads them, calculate somehow and compares with the current CJ's position.

CODE
3000.0
535.0
0.0

1759.0
576.0
0.0

989.0
693.0
0.0

-128.0
490.0
0.0

-845.0
707.0
0.0

-1477.0
1677.0
0.0

-2154.0
2497.0
0.0

-2971.0
2180.0
0.0

-3000.0
3000.0
0.0

3000.0
3000.0
0.0


Any thoughts of what these points mean?

Also, one day I also found the code which removed a wanted star if player has moved from the town to countryside (what you asked for). It's hardcoded, but I'm unable to find this code right now.

EDIT:
Yet another set of coords in the same function
CODE
28.0
-3000.0
0.0

-30.0
-1280.0
0.0

-148.0
-911.0
0.0

-487.0
-372.0
0.0

-1028.0
-424.0
0.0

-1145.0
479.0

-1461.0
1488.0
0.0

-3000.0
1668.0
0.0

-3000.0
-3000.0
0.0


EDIT2:
From what I can imagine, it's the hardcoded borderlines of the second (SF) and third (LV) islands. Interesting stuff.

They are stored at 008A5E58, btw.

Would be nice if someone made a map with these lines, similar to the one posted by derty.

EDIT3: thanks, PD wink.gif
  • OG Viking likes this

pdescobar
  • pdescobar

    Conformist Scum Panda

  • Members
  • Joined: 19 Jul 2005

#13

Posted 11 January 2008 - 07:21 AM

QUOTE (Seemann @ Jan 11 2008, 01:37)
Any thoughts of what these points mean?

If the fifth point on the first list has an x value of -845 instead of +845, then those two lists define polygons that very roughly cover LV and SF and they could very well be the 4-star areas.

Does this look like the borders you're familiar with, Orion? (small map links to full-size)
user posted image
  • OG Viking likes this

OrionSR
  • OrionSR

    Chain Game Development Team

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

#14

Posted 11 January 2008 - 08:46 AM

Sweet! Yeah, I think you've nailed it. I can't find any contradictions with my experience and your map. For some reason I had imagined a little more detail to the outline, but I must have been mistaken. This looks exactly right.

Thank you gentlemen, I appreciate all the support.

pdescobar
  • pdescobar

    Conformist Scum Panda

  • Members
  • Joined: 19 Jul 2005

#15

Posted 11 January 2008 - 09:16 AM

Cool. Great work, Seemann. Not only do we now have a map of the 4-star borders, but with that address discovered & documented it probably wouldn't be hard to alter these zones for modding purposes. biggrin.gif

OrionSR
  • OrionSR

    Chain Game Development Team

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

#16

Posted 11 January 2008 - 09:31 AM

Hey Dave (I suspect he cringes every time he reads that opening), would you mind if I reposted your map in the 4 Star topics (rubregg's here, and mine over at GTPlanet.net)? Also, is there any chance I can talk you into adding the military culls to the map (listed above)?

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia
  • Best Tool 2013 "Sanny Builder"

#17

Posted 11 January 2008 - 10:39 AM

If the marina north of San Fierro was added on the late development stage, they definitely forgot to change Y-coord of the seventh LV point to cover this area. biggrin.gif

pdescobar
  • pdescobar

    Conformist Scum Panda

  • Members
  • Joined: 19 Jul 2005

#18

Posted 11 January 2008 - 06:51 PM

QUOTE (OrionSR @ Jan 11 2008, 04:31)
Hey Dave (I suspect he cringes every time he reads that opening), would you mind if I reposted your map in the 4 Star topics (rubregg's here, and mine over at GTPlanet.net)? Also, is there any chance I can talk you into adding the military culls to the map (listed above)?

How's this one?

user posted image

And yeah, post it wherever you want. The new version includes the URL of the topic so people can always find their way back here from the map.

OrionSR
  • OrionSR

    Chain Game Development Team

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

#19

Posted 18 February 2013 - 09:02 AM

user posted image
  • OG Viking likes this

TheGodfather.
  • TheGodfather.

    Nobody likes me here...I think...

  • Members
  • Joined: 19 Jun 2012

#20

Posted 18 February 2013 - 02:19 PM

Does the wanted star boundaries work if using underwater glitch ?? I tried it & I didn't got any stars even after crossing the boundaries..!!
Is that only for me or someone else also noticed it ??




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users