Quantcast

Jump to content

» «
Photo

Opcode 0767; Setting Zones for peds and Cars...

4 replies to this topic
daniHCF96
  • daniHCF96

    Sanit

  • Members
  • Joined: 21 Sep 2013
  • Spain

#1

Posted 07 October 2013 - 05:22 PM

In the main.scm, there are a few lines dedicated to settting the zones in which peds are spawned:

 

0767: set_zone 'MARKST' popcycle_group_for_peds_and_cars_to 14  // Market Station
0767: set_zone 'UNITY' popcycle_group_for_peds_and_cars_to 5  // Unity Station
0767: set_zone 'LAIR1' popcycle_group_for_peds_and_cars_to 16
0767: set_zone 'LAIR2A' popcycle_group_for_peds_and_cars_to 16
0767: set_zone 'LAIR2B' popcycle_group_for_peds_and_cars_to 16
0767: set_zone 'LBAG1' popcycle_group_for_peds_and_cars_to 19
0767: set_zone 'LBAG2' popcycle_group_for_peds_and_cars_to 19
0767: set_zone 'LBAG3' popcycle_group_for_peds_and_cars_to 19
0767: set_zone 'BLUF1A' popcycle_group_for_peds_and_cars_to 10
0767: set_zone 'BLUF2' popcycle_group_for_peds_and_cars_to 10
0767: set_zone 'SUN1' popcycle_group_for_peds_and_cars_to 2
0767: set_zone 'SUN1' popcycle_group_for_peds_and_cars_to 2
0767: set_zone 'SUN3A' popcycle_group_for_peds_and_cars_to 2
0767: set_zone 'SUN3B' popcycle_group_for_peds_and_cars_to 2
0767: set_zone 'SUN3C' popcycle_group_for_peds_and_cars_to 2
0767: set_zone 'SUN4' popcycle_group_for_peds_and_cars_to 2

...

...

...

...

 

The last parameter indicates the type of ped, and the second one indicates the zone. MARKST stands for Market Station, PER1 should stand for Pershing Square, CRANB stands for Canberry Station, but there are a lot more that i have no clue on what they stand for, if there's some information about it, it would be great help!


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#2

Posted 07 October 2013 - 06:36 PM Edited by fastman92, 13 April 2014 - 11:08 AM.

In info.zon there are zones defined as 3D cuboids.
This is easy to understand. A zone is simply an area of map limited by coordinates.
Every zone has a name assigned.

In cargrp.dat there are car defined for specified car groups.
http://pastebin.com/qsH0gryn
When game attempts to spawn a vehicle from certain car group, it must know what is appropriate driver for that car.
For example an ordinary person won't ride a Baggage near the airport.
buffalo, stretch, taxi, cabbie, coach, flash, sultan, club, zonda, forte 	# POPCYCLE_GROUP_CLUBBERS
Let's say "flash" vehicle was selected.

Declaration of "flash" vehicle is found in vehicles.ide:
565, 	flash, 	flash, 	car, 	FLASH, 	FLASH,	null,	richfamily,	7,		0, 	0, -1,	0.79,	0.79,		1
Notice "richfamily".
This is the value corresponding to ped definition from peds.ide.


Peds are defined in peds.ide.
9, BFORI, BFORI, CIVFEMALE, STAT_COWARD, woman, 120C,0, man,7,3,PED_TYPE_GEN,VOICE_GEN_BFORI,VOICE_GEN_BFORI
Where 120C (stored as hex) made of bits determines what car classes of vehicles defined ped might drive.
 
# car groups:
#NORMAL_CAR 		1
#POOR_FAMILY_CAR 	2
#RICH_FAMILY_CAR	4
#EXECUTIVE_CAR		8
#WORKER_CAR			16
#BIG_CAR			32
#TAXI_CAR			64
#MOPED				128
#MOTORBIKE			256
#LEISURE_BOAT		512
#WORKER_BOAT		1024
#BICYCLE			2048
#ON FOOT			4096
In programming & operation is used to merge more than one numbers and get appropriate number made of bits.
In example if ped has bit enabled for RICH_FAMILY_CAR, then it may be a good driver for "flash" car.
 
0767: set_zone 'LBAG2' popcycle_group_for_peds_and_cars_to 19
Rockstar Games made a possibility to change popcycle with SCM instead of hard-coding it into info.zon.'
Popcycle types from popcycle.dat:



#Peds
#Cars
Dealers
Gang
Cops
Other
Workers
Business
Clubbers
Farmers
BeachFolk
Parkfolk
Casual_Rich
Casual_Average
Casual_Poor
Prozzies
Crimimals
Golfers
Servants
AircrewEntertainers
oot_fact
Desertfolk 
Aircrew_runway
I can't be certain of their IDs at this time.
My guess is "dealers" is the popcycle with ID of zero (0).

Popcycle types will correspond to hardcoded ped groups (loaded by pedgrp.dat) and car groups (loaded by cargrp.dat).

For example "Workers" popcycle type may correspond to:
- ped group: POPCYCLE_GROUP_WORKERS / POPCYCLE_GROUP_WORKERS (SF) / POPCYCLE_GROUP_WORKERS (VEGAS) depending on current player's town determined by a zone from map.zon
- car group: POPCYCLE_GROUP_WORKERS
I hope it helps.

Author: fastman92

daniHCF96
  • daniHCF96

    Sanit

  • Members
  • Joined: 21 Sep 2013
  • Spain

#3

Posted 07 October 2013 - 07:14 PM Edited by daniHCF96, 07 October 2013 - 07:15 PM.

that was really useful information, and helped a lot but isn't really what I was looking for. I only wanted to know what zones do the abreviations stand for, for example SUN1 or LBGA3, etc.

 

But thanks anyway for that info, I was interpreting wrongly the lines :D


OrionSR
  • OrionSR

    Chain Game Development Team

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

#4

Posted 07 October 2013 - 07:34 PM

I don't think I've seen a good list of which zone names belong to a particular neighborhood. For example; OCEAF1, OCEAF2, and OCEAF3 all belong to OCEAF and is displayed as "Ocean Flats", which I think is what you are asking for. But perhaps pdescobar's zone map will still be of some use:

 

http://pdescobar.hom...zone_mapper.png


daniHCF96
  • daniHCF96

    Sanit

  • Members
  • Joined: 21 Sep 2013
  • Spain

#5

Posted 07 October 2013 - 07:39 PM

that's what I was looking for!! thanks both!! :^:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users