Coding

 Reply to this postStart new topic

Meanwhile, in SA development...

Spider-Vice
post Apr 22 2011, 03:38 PM
Post #1


In motus...

Group Icon

Posts: 361
From: Portugal
Joined: 28-May 09



R* has decided to leave some interesting comments and features on some files, which I found interesting. So I did a research on every file I could find... Some even can be explained by topics present here. Obviously I'm not going to post the whole file in here...


/data
animviewer.dat: Looks like an alternative loading for the game, which I still have to try.

ar_stats.dat
CODE
# note - numbers on left hand must align up!
# any new stats needed see DerekP, otherwise
# feel free to adjust values!


#######################################################################

# IMPORTANT:  If you add/remove anything from this LIST make sure
#               you update enum in STATS.H accordingly!

#######################################################################

Interesting how R* leaves some of the development notes in here. Also warning anyone that edits this compiled file, to update the enumerations on the source code too.


carcols.dat - Line 8
CODE
# Press START on controller to reload this file while the game is running.

Deji has recently found debug keys which aren't readable by normal keyboards, on the game's memory (Think he posted this somewhere), and this file confirms it further. These simple unreadable keys might be PS2 controller keys, which were used to reload files while playing the game. Maybe someone could explore this feature on the PC version or would we need the source code?


default.dat
CODE
#
# Load IDEs first, then the models and after that the IPLs
#

# everything is loaded on a per directory basis and in alphabetical order
# to improve the speed of loading

I still haven't understood what this file does, might have been a development fast loading option as it includes a few IDE's, nothing more. It's interesting how R* avoids loading problems by making files load alphabetically and per directory.


furnitur.dat
CODE
# INTERIOR FURNITURE GROUPS DATA

# !! DONT CHANGE ANY OF THESE VALUES !!
# A - min width
# B - min depth
# C - max width
# D - max depth
# E - can place in front of Window
# F - is tall
# G - is stealable

This is interesting. I don't think this file is used but might be, it suggests that SA had a feature to furniture your own house (See flag # E - can place in front of Window) or maybe you could get stolen or as the game observes, you can steal. Another interesting thing was the fact that it says DON'T CHANGE ANY OF THESE VALUES. Still haven't tried this, might edit later.
Thanks to Deji, it's apparently used to store items inside burglary houses and it's also used to randomise them, this file stores which items are stealable and which are placed into X house.

Line 313
CODE
# NOT USED ANY MORE
# =================

Hmm. Below this there are some model categories called MISC_ORNAMENTS and so on, maybe tiny stuff to decorate your house further and currently disabled. Might later edit aswell, taking the comments out of some models.


gridref.dat
CODE
##################################################
# gridref.dat                                    #
# stores which artist deals with map grid areas. #
# These names must be the artist's user id       #
##################################################

# these names MUST!!!! be the artist's bugstar userid any questions see Alex !!!!!!!!!!

It seems to attrib. a grid location for each developer. What could this be used to? I remember seeing in GTA3, when you tried to access the Ghost Town, some developer names would appear on the map. I don't know why these names MUST!!!! be the artist's bugstar user ID but I have an idea what this was used for, reporting bugs, and each part of the map was attributed to each artist, and apparently the system was called BugStar.


handling.cfg
CODE
; Author: Bill Henderson
; Created 10/12/1999
;
; > COMMENTS <
; ------------
; TWEAK AT YOUR OWN RISK

As obvious. Well it hasn't been changed since 1999 except some car models added, this might prove GTA3 was being developed since 1998-99...


info.zon
Looks like an unused file for GTA3, includes some coords and model ID's such as CHINA.


main.sc
CODE
// Test script for Industrial level

VAR_INT        player scplayer
VAR_INT        TEST_CAR test_char
VAR_FLOAT x_float_m y_float_m z_float_m player_heading_debug debug_car_heading
VAR_INT magic_car button_press_flag car_colour car_colour2
VAR_INT flag_create_car initial_create_car initial_car_selected counter_create_car

x_float_m = 0.0
y_float_m = 0.0
z_float_m = 0.0
player_heading_debug = 0.0
debug_car_heading = 0.0

magic_car = 0
button_press_flag = 0
car_colour = 0
car_colour2 = 0
flag_create_car = 0
initial_create_car = 0
initial_car_selected = 0
counter_create_car = 151 //CAR_CHEETAH

Partial code.
Interesting, it's a test script for an industrial level (GTA3?) and it includes a magic car with some flags, which are disabled. We need scripters to explore over here! Apparently it is a script but it's uncompiled unlike SCM which you can't open with notepad. It includes GTA III and GTA VC code (thanks Siggi!)


map.zon
CODE
zone
Vegas, 3, 685.0, 476.093, -500.0, 3000.0, 3000.0, 500.0, 3, UNUSED
SF01, 3, -3000.0, -742.306, -500.0, -1270.53, 1530.24, 500.0, 2, UNUSED
SF02, 3, -1270.53, -402.481, -500.0, -1038.45, 832.495, 500.0, 2, UNUSED
SF03, 3, -1038.45, -145.539, -500.0, -897.546, 376.632, 500.0, 2, UNUSED
LA01, 3, 480.0, -3000.0, -500.0, 3000.0, -850.0, 500.0, 1, UNUSED
LA02, 3, 80.0, -2101.61, -500.0, 1075.0, -1239.61, 500.0, 1, UNUSED
end

That's all the file has. The map.zon controls the island zones and also the type of cop car (LA,SF or LV) if there is no zone, it spawns the country cop car. The last value is always UNUSED for zones controlling the island-ID's. Normally you have all zone-names stored in the map.zon and the island-boundary-zones with their ID's in the map.zon. The last number is the Island-ID.
You can lock/unlock them using SCM.


numplate.dat
CODE
;
; Alternative pallettes for carplate charsets.
;
; Palettes here are saved in PaintshopPro7's JASC-palette format (*.PAL)
; (menu "Colors" -> "Save Palette...").
; Paste only colors here - skip palette header (3 first lines of *.PAL file: "JASC-PAL 0100 16...", etc.).
;
;
; 08/12/2003 - Andrzej:  - initial;

It saves license plate palette settings for the PS2 version of the game, for each city. R* also uses Paintshop Pro 7... down.gif


peds.ide
CODE
#
# see default.ide for id ranges
#

There you go, the purpose of default.ide.

Line 25
CODE
# radio stations
# Rap                 0
# Pop                1
# Interview            2
# Soul                3
# Rock                4
# Current affairs    5
# Spanish            6
# Fernando            7
# new wave            8
# off                9

Fernando? GTA VC? blink.gif


plants.dat Line 7
CODE
;----------------------------------------------------------------------------------
;
; Note: "X" + "Select" on Pad1 will    reload this file while game is running;
;
;----------------------------------------------------------------------------------

Another file that could be reloaded while the game was running. Might be another thing to research on the game's memory. Deji has found two hidden keys as I said on other file above, but these manage missions and race objectives. Also one to skip a mission, maybe when they modified main.scm and decided to test whatever they modified. This file manages plant ID's and characteristics.

Line 15
CODE
;    Name        -     Surface Name (it must correspond to names in "ColPoint.h",
;                    e.g. "TARMAC" -> "COLPOINT_SURFACETYPE_TARMAC");

This type of comments makes me want the source code so leaked...


popcycle.dat
CODE
// Fore each type of zone (Business, Countryside etc) we have a that controls the ped densities.
// There is a set of values for each time of the day in 2 hour increments (midnight, 2am, 4 am etc)
// There are 2 sets of values: Weekday & Weekend.
// #Peds is the maximum number of peds you can ever have.
// #Cars is the maximum number of cars you can ever have.

// 4 Values for Dealers Gang Cops Other. These are percentages and are used to take the
// number of Dealers, gang members etc down during certain times of the day.
// These numbers do not add up to anything. If they are all 100% you would get the full #Peds.

// A number of values for the different types of peds that are not Dealers, Gang members or cops.
// This is what is specified as 'Other' in the first 4 values.
// This number should add up to 100%. If it doesn't the game will scale it to 100% and print a warning.

This file manages peds and where they should spawn, also the type and ID of ped and their actions. Few interesting notes there, such as this file uses percentages of map to spawn and if someone fucked up and the sum went more than 100%, the game would scale the density of the pedestrian and print a warning on the debug console.
laugh.gif at how they name the prostitute ID: Prozzies.


shopping.dat
Stores cost data for weapons, car mods, clothes and how much fat, sex appeal, muscle, respect they give you.

Line 15
CODE
# - 'calories' (changes fat and health)

I had heard of a calories feature before but it just seems how the game handles both fat and health data at the same time, just like in real life. Though if that were the logic, when you would eat a burger, fat would increase, but calories at the same time would double increase the fat and double decrease the health. Maybe an unused feature?


statdisp.dat
CODE
#######################################
# statdisp.dat                        #
# selects when to show messages based #
# on stat values in the game          #
#######################################

# note - numbers on left hand (stat_num) must align up with numbers in STAT_VAR_CONSOLE_REF.TXT in "sa_docs" dir in AB

The description on the file says all. Yet developers needed a manual on how to handle these stats, located in a directory on the game's development root folder.

Line 22:
CODE
#stat_num    stat_name                        condition    value    text_id
#========   =========                           =========   =====   =======


21        FAT                                    morethan    250        SBOFAT0

One could change these conditions to what they want and change how the game handles stats. I could change that "morethan" to "lessthan" and it would warn me I was getting too fat when I was actually getting skinnier tongue.gif


vehicles.ide
CODE
#
# see default.ide for id ranges
#
# flags:
# 0x01 gets streamed out after 1 car is generated (for dumpsters, MrWoopy etc)
# 0x02 Don't use. Used by code internally.

Defines who drives these cars, how are they driven and their characteristics. Someone should try that 0x02 flag though, try to debug that thing.


/data/Decision
In this folder, the artist responsibilities take place, I don't actually know if this is used but it stores some data on player decisions with other players and with the world (peds) in general.

/data/maps
As obvious. Map files generated from 3ds max files, these files don't have any interesting comments, just generated from weeks of hard work modelling and placing maps.

/data/Paths
Stores paths data and includes the unused train tracks that go around the map. One modder explained at GTAForums that these files were randomly generated to match the missions objectives and nothing more (Snail Trail, Wrong Side of The Tracks), so they go around the map flying and at the same time match the tracks for a while but as I said not for long.

/data/Script
Includes the game script. Now could someone investigate main.scm and do it on a different post? ninja.gif tongue.gif


Well this is it, as I don't have access to the source code this post can't be much longer... That's all folks! Though I might add img files and stuff.

This post has been edited by Spider-Vice: Sep 8 2011, 09:41 PM
Reason for edit: Edited furnitur.dat definition - Thanks Deji! (8 Sep 2011)
Go to the top of the page
 
+Quote Post
fastman92
post Apr 24 2011, 05:00 PM
Post #2


Trained Member

Posts: 77
Joined: 25-October 10



QUOTE
info.zon
Looks like an unused file for GTA3, includes some coords and model ID's such as CHINA.


It is part of maps, loaded because of gta.dat:

CODE
# have to load map.zon before any of the IPLs
IPL DATA\MAP.ZON
# IPL DATA\NAVIG.ZON
IPL DATA\INFO.ZON


Maybe Rockstar Games was going to make GPS? (NAVIG.ZON)?

It is used to separate zones and:
- display GXT text of place when you are entering zone
- for gangs:
SANNY
076C: set_zone 'BYTUN' gang 9 density_to 90  // Bayside Tunnel


This post has been edited by fastman92: Apr 24 2011, 05:03 PM
Go to the top of the page
 
+Quote Post
Silent
post Apr 24 2011, 05:57 PM
Post #3


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



Main.sc is apparently a very native part of source. Perhaps Rockstar wrote main.scm for III era (maybe IV too) using this syntax.
Go to the top of the page
 
+Quote Post
Spider-Vice
post Apr 24 2011, 06:11 PM
Post #4


In motus...

Group Icon

Posts: 361
From: Portugal
Joined: 28-May 09



Thanks for all the contribs.

Fastman: Navig.zon is actually the file that controls the text of the zone you are. For example, you enter Mount Chilliad, and the game shows on the bottom Mount Chilliad. All that is managed by that file. The main.scm uses this to check if you are in the zone.
Go to the top of the page
 
+Quote Post
Deji
post Apr 24 2011, 08:44 PM
Post #5


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



In a convo between me an NTAuthority, he sent me this:


They are apparently from some early PS2 game guides.


None of the functions to do this will still exist, though. But in case anyone like me wishes to go on a huge mission to reimplement what might have been... here's something to go on smile.gif


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Apr 25 2011, 03:35 AM
Post #6


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



Is it just me or are the rotor blades of the helicopter and the propeller of that Rustler similar to VC? ohmy.gif


--------------------
Go to the top of the page
 
+Quote Post
Spider-Vice
post Apr 25 2011, 01:02 PM
Post #7


In motus...

Group Icon

Posts: 361
From: Portugal
Joined: 28-May 09



Yes they are I noticed that too. The police Maverick is also VC's which shows these are very early screens. wink.gif
Go to the top of the page
 
+Quote Post
Deji
post Sep 8 2011, 09:33 PM
Post #8


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



furniture.dat is used. If you go into a burglary interior, you may notice that each time you enter, items are in different places. The data file sets what object models can be placed where and which ones are stealable. It also sets which types of objects they are. The engine uses the data from this file and generates new locations for the interior objects each time.

Pretty damn clever.

Oh yeah.. and "calories" is basically the players hunger. If the calories is low, the player starts losing health, etc. You can also gain calories from entering the hot dog van, which is a bit random since you don't get it from pizza bikes or ice cream trucks... Something I added for Vigilante Justice tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
Spider-Vice
post Sep 8 2011, 09:39 PM
Post #9


In motus...

Group Icon

Posts: 361
From: Portugal
Joined: 28-May 09



Oh well thanks for the explanation tongue.gif I'ma update the first post.
Go to the top of the page
 
+Quote Post
Deji
post Nov 17 2011, 06:50 PM
Post #10


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Found this as part of MTA's source (the part which was provided by R* smile.gif)...
CODE
//
// ACTION REACTION STATS (used to identify in table array):
//
// IMPORTANT:  If you add/remove anything from this enum make sure
//             you update AR_STATS.DAT accordingly!
enum {
    //
    // amount to increase/decrease the stats by:
    //
    STAT_INC_CYCLE_STAMINA = 0,
    STAT_INC_SWIM_STAMINA,
    STAT_INC_SPRINT_STAMINA,
    STAT_INC_RUNNING,
    STAT_INC_DRIVING_SKILL,
    STAT_INC_FLYING_SKILL,
    STAT_INC_CYCLE_SKILL,
    STAT_INC_MOTORBIKE_SKILL,
    STAT_INC_BOAT_SKILL,
    STAT_INC_BODY_MUSCLE,
    STAT_INC_BREATH_UNDERWATER,
    STAT_INC_MAX_HEALTH,        // 11
    
    STAT_INC_PISTOL_SKILL,      // 12
    STAT_INC_PISTOL_SILENCED_SKILL,
    STAT_INC_DESERT_EAGLE_SKILL,
    STAT_INC_SHOTGUN_SKILL,
    STAT_INC_SAWNOFF_SHOTGUN_SKILL,
    STAT_INC_SPAS12_SHOTGUN_SKILL,
    STAT_INC_MICRO_UZI_SKILL,
    STAT_INC_MP5_SKILL,
    STAT_INC_AK47_SKILL,
    STAT_INC_M4_SKILL,
    STAT_INC_SNIPERRIFLE_SKILL, // 22

    STAT_DEC_FAT,           // 23
    STAT_DEC_BODY_MUSCLE,
    STAT_DEC_MAX_HEALTH,    // 25
    
    STAT_EXERCISE_RATE_CYCLE,       // 26
    STAT_EXERCISE_RATE_CYCLE_SPRINT,
    STAT_EXERCISE_RATE_SWIM,
    STAT_EXERCISE_RATE_SWIM_SPRINT,
    STAT_EXERCISE_RATE_SPRINT,
    STAT_EXERCISE_RATE_RUN,
    STAT_EXERCISE_RATE_FIGHT,       // 32
    
    //
    // time intervals when the stats get changed (in sec?):
    //
    STAT_TIMELIMIT_CYCLE_STAMINA,       // 33
    STAT_TIMELIMIT_SWIM_STAMINA,
    STAT_TIMELIMIT_SPRINT_STAMINA,
    STAT_TIMELIMIT_RUNNING,
    STAT_TIMELIMIT_DRIVING_SKILL,
    STAT_TIMELIMIT_FLYING_SKILL,
    STAT_TIMELIMIT_CYCLE_SKILL,
    STAT_TIMELIMIT_MOTORBIKE_SKILL,
    STAT_TIMELIMIT_BOAT_SKILL,
    STAT_TIMELIMIT_FAT_ADJUST,
    STAT_TIMELIMIT_FAT_ADJUST_STRENUOUS,
    STAT_TIMELIMIT_BREATH_UNDERWATER,
    STAT_TIMELIMIT_MAX_HEALTH,          // 45
    
    //
    // limits that are not time (ie count limits):
    //
    STAT_TIMELIMIT_PISTOL_SKILL,        // 46
    STAT_TIMELIMIT_PISTOL_SILENCED_SKILL,
    STAT_TIMELIMIT_DESERT_EAGLE_SKILL,
    STAT_TIMELIMIT_SHOTGUN_SKILL,
    STAT_TIMELIMIT_SAWNOFF_SHOTGUN_SKILL,
    STAT_TIMELIMIT_SPAS12_SHOTGUN_SKILL,
    STAT_TIMELIMIT_MICRO_UZI_SKILL,
    STAT_TIMELIMIT_MP5_SKILL,
    STAT_TIMELIMIT_M4_SKILL,
    STAT_TIMELIMIT_AK47_SKILL,
    STAT_TIMELIMIT_SNIPERRIFLE_SKILL,   // 56

    // every time player dies and gets respawned we count it up
    // so we can decrement max health
    STAT_TIMELIMIT_DEATH_HEALTH,    // 57
    // every time player adds to their health we count it up
    // so this limit is a direct amount of health added
    STAT_TIMELIMIT_ADD_TO_HEALTH,   // 58
    
    MAX_REACTION_STATS
};


They also had naggy comments in the source!


--------------------
Go to the top of the page
 
+Quote Post
Spider-Vice
post Nov 20 2011, 01:56 PM
Post #11


In motus...

Group Icon

Posts: 361
From: Portugal
Joined: 28-May 09



Interesting how R* actually gave them bits of SA! Which file is that?
Go to the top of the page
 
+Quote Post
Deji
post Nov 20 2011, 02:36 PM
Post #12


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



CStats.h tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
Adler
post Nov 20 2011, 08:29 PM
Post #13


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



QUOTE (Spider-Vice @ Apr 25 2011, 05:02 AM) *
Yes they are I noticed that too. The police Maverick is also VC's which shows these are very early screens. wink.gif

Ummm so is there a way to enable that in SA? wub.gif


--------------------
Go to the top of the page
 
+Quote Post
Silent
post Nov 21 2011, 05:35 PM
Post #14


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



If NTAuthority says it's hard to do, it IS hard to do.
Go to the top of the page
 
+Quote Post
Adler
post Nov 21 2011, 08:56 PM
Post #15


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined: 26-July 09



QUOTE (Silent @ Nov 21 2011, 09:35 AM) *
If NTAuthority says it's hard to do, it IS hard to do.

When did he say that?


--------------------
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

4 User(s) are reading this topic (4 Guests and 0 Anonymous Users)
0 Members: