Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

Would you help me find the lines responsible for the elements i want to change in GTA:SA?


bangbang1
 Share

Recommended Posts

Hello. Can someone tell me which lines do i need to modify in MAIN.SCM in order to:

 

  • Increase or decrease the amount of traffic and the number of pedestrians;
  • Increase or decrease the amount of damage dealt by different weapons;
  • Increase or decrease the amount of health CJ and the NPCs have, as well as the health of vehicles;
  • Increase or decrease the at which the RPG rockets travel;
  • Increase or decrease the speed at which boats, vehicles and airplanes can travel
  • Increase or decrease the chance of a person attacking CJ, instead of running away from CJ, if CJ attacks him/her;
  • Increase of decrease the chance of a random NPC having a gun or a knife;
  • Increase or decrease the amount of health people have (if cops' HP is independent of people's HP, tell me how to edit cops' HP, too);
  • Increase or decrease the time required for a vehicle to explode, once it starts burning;
  • Increase or decrease the chance of raining;
  • Increase or decrease the chances of people/gangs fighting;
  • Increase or decrease the chance of criminal activity provoking a cop to kill someone;

 

This is what i want to know for now. I'm new at GTA modding, but i would like to learn advanced modding, so i can mod GTA in the way i want. I already know some Pawn, but i don't understand Cleo very well. I hope i will learn it.

 

Also, tell me what does that mean:

 

screenshot-122.jpg

 

Does it mean that if i introduce some changes and increase the file size, Sanny Builder will no longer be able to open the file? If yes, is there a way to open the file, if it has a size larger than 2MB?

 

As for final, i have one more question. See the following line:

 

014B: $PARKED_RHINO = init_car_generator 432 color -1 -1 force_spawn 1 alarm 0 door_lock 0 min_delay 0 max_delay 10000 at 2435.302 -1671.848 12.8007 angle 90.0 

 

If i want to make it have a chance of 100% being locked, do i have to replace "0" with "1", or do i have to enter a different value?

 

Also, i need the full list of NPC names and the full list of names of vehicles, so it can be easier for me to use Ctrl+F to find key-words related to the elements i want to modify.

 

Thanks.

Edited by bangbang1
Link to comment
Share on other sites

Most of the questions were answered already on this forum. Search and read,read,read. 

 

Quote

but i would like to learn advanced modding

And at the same time you're asking for an answer to all your questions without showing any effort to find them yourself. 
Start writing something basic using CLEO, at least 'Hello, world !'. You'll start to understand how it works and it will be way easier to find and change things.
 

Link to comment
Share on other sites

20 hours ago, bangbang1 said:

Hello. Can someone tell me which lines do i need to modify in MAIN.SCM in order to:

There're many lines but it's useless to modify them


Basicly you have to understand that the main programming is done by gta_sa.exe
The exe takes files from installation directory as well as informations and settings to create the game world, let a Player Charakter do what the user want,
let cars and peds appear in traffic, make weather and water and many more
and takes the content of main.scm and script.img to execute scripts

Read more here and use a stripped main (empty main.scm) to see what is done by exe and what is done by main.scm

 

So as i mentoined, cars and peds appear in traffic, is done by exe
But peds (actors) and vehicles for missions are spawned by main.scm

   

Quote

Increase or decrease the amount of traffic and the number of pedestrians;

There're many lines that changes traffic_density for peds and cars

Spoiler

code example

01EB: set_traffic_density_multiplier_to 0.0 
03DE: set_pedestrians_density_multiplier_to 0.0

 


    In addition, traffic_density will be reset to default at the end of each mission 

caused by following code

00D8: mission_cleanup

   
    

Quote

    Increase or decrease the amount of damage dealt by different weapons;

 this is only possible by modifiying data\weapon.dat    
    only weapon skill can be modified by main.scm
   
 

Quote

    Increase or decrease the amount of health CJ and the NPCs have, as well as the health of vehicles;

find at line 432296 this code: increase_float_stat 24, it makes the healthbar bigger
    NPCs in traffic, is done by exe, they get a default health of 100
    mission actors get the health by mission script
 

Quote

    Increase or decrease the at which the RPG rockets travel;

  It's hardcoded (means, is done by exe)
    

Quote

    Increase or decrease the speed at which boats, vehicles and airplanes can travel

 Is given by data\handling.cfg
 

Quote

    Increase or decrease the chance of a person attacking CJ, instead of running away from CJ, if CJ attacks him/her;

 is given by data\peds.ide => pedgrp.dat => pedstat.dat
    

Quote

    Increase of decrease the chance of a random NPC having a gun or a knife;

It's hardcoded depending to pedgrp.dat
    
 

Quote

    Increase or decrease the amount of health people have (if cops' HP is independent of people's HP, tell me how to edit cops' HP, too);

NPCs in traffic, is hardcoded, they get a default health of  100
    Cops are hardcoded (it's possible to spawn an actor as cop with given health and transform him to a cop controlled by exe)
    

Quote

    Increase or decrease the time required for a vehicle to explode, once it starts burning;

 It's hardcoded
    

Quote

    Increase or decrease the chance of raining;

The weather change system is hardcoded. By script (cleo or main.scm) you can make any weather you like.

Spoiler

code example

01B6: set_weather 1

 

    In addition, the weather will be reset to default weather change system at the end of each mission

caused by following code

00D8: mission_cleanup

    There're 23 weather definitions. These are listed in data\timecyc.dat.
    timecyc.dat gives coloring and brightness for each weather definition
    
    But it's hardcoded that you have rain if RAINY_SF or RAINY_COUNTRYSIDE is activ
    That you have fog if FOGGY_SF is activ
    And that you have sandstorm if SANDSTORM_DESERT is activ
    

Quote

    Increase or decrease the chances of people/gangs fighting;

 It's hardcoded
    

Quote

    Increase or decrease the chance of criminal activity provoking a cop to kill someone;

It's hardcoded

 

Note: many files inside data folder can be edited by notepad.exe (text editor)

all files inside data\maps can be edited by notepad.exe

 

20 hours ago, bangbang1 said:

Also, tell me what does that mean:

 

screenshot-122.jpg

 

 

Main size means the amount of data in byte of main part

Read also about Structure of main.scm

 

Largest mission means the biggest mission script

 

Largest script means the biggest script inside main part

 

Quote

Does it mean that if i introduce some changes and increase the file size, Sanny Builder will no longer be able to open the file? If yes, is there a way to open the file, if it has a size larger than 2MB?

 No
Originally main.scm file size is 3 MB


Maximum: 200000 means: If the amount of data inside main part is bigger than 200000,

then not everything can be executed, so some codes are missing and that can cause bugs and crashes


Maximum: 69000 means: If the amount of data of a mission script is bigger than 69000,

then not everything can be executed, so some codes are missing and that can cause bugs and crashes
This is also true for a cleo script

 

 

Quote

If i want to make it have a chance of 100% being locked, do i have to replace "0" with "1", or do i have to enter a different value?

it needs to write  door_lock 100

 

Quote

Also, i need the full list of NPC names and the full list of names of vehicles

 

full list of vehicles = data\vehicles.ide
(view and understand content)

Id,    Model name,     Txd name,    Type         HandlingId    Game name,     Anims    Class        Frq    flags   Comprules

596,     copcarla,     copcarla,     car,         POLICE_LA,     POLICAR,    null,    ignore,        10,    0,    0,        -1, 0.7, 0.7,    -1


Note: Game name =  POLICAR

 

Now look in text\american.gxt

 

(find a converted american.gxt in Sannybuilder install directory\help\GXT Strings\GTASA.text)
search for POLICAR and find following:

POLICAR        // Police


full list of peds in traffic = data\peds.ide


There're special charackter for story missions, but they're not defined
You can find them in Sanny Builder Help: SCM Documentation: GTA SA: Special actors


Btw. in Sannybuilder, type # , then a pop up window opens with a big list of models for peds, vehicles guns and objects

 

 

 

Edited by ZAZ
Link to comment
Share on other sites

8 hours ago, bangbang1 said:
  • Increase or decrease the amount of traffic and the number of pedestrians;

It must be these two files (cargrp.dat, pedgrp.dat) under DATA folder.. you may try to tweak something but you should always back up your files..

8 hours ago, bangbang1 said:
  • Increase or decrease the amount of damage dealt by different weapons;

Look for this data folder again and find "weapon.dat"

8 hours ago, bangbang1 said:
  • Increase or decrease the amount of health CJ and the NPCs have, as well as the health of vehicles;

CJ's health is described as a STAT in Sanny Builder. You just need to find the proper OPCODE under Sanny's help folder (SASCM.ini) and change it. You may have to press a key or enter a cheat code in order to trigger it after starting a new game. Changing CJ's health before starting a game is too difficult..Default NPC and vehicles healths are hardcoded and you can only load your designated NPC's and give them healths..It won't be same as regular NPC's..

8 hours ago, bangbang1 said:
  • Increase or decrease the speed at which boats, vehicles and airplanes can travel

It is already written under data folder "handling.cfg"..Open it with this NOTEPAD++ (You can also use the same program for dat files..it's really good and similar to Sanny Builder) and look for the top speed column..

8 hours ago, bangbang1 said:
  • Increase or decrease the chance of raining;

 There are some opcodes for CHANGING it but the script needs to be prepared and tested really carefully..Other than that "the chance of raining" is hardcoded..

8 hours ago, bangbang1 said:

As for final, i have one more question. See the following line:

 

014B: $PARKED_RHINO = init_car_generator 432 color -1 -1 force_spawn 1 alarm 0 door_lock 0 min_delay 0 max_delay 10000 at 2435.302 -1671.848 12.8007 angle 90.0 

 

If i want to make it have a chance of 100% being locked, do i have to replace "0" with "1", or do i have to enter a different value?

 

- $PARKED_RHINO is a special name for this vehicle and it's a GLOBAL VARIABLE.. You should always stay away from using global variables.. You can only use LOCAL VARIABLES..There is a full explanation under Sanny Builder's tutorial..

- init car generator is a command..

- "432" is a "Model ID".. you can also write like this "#RHINO"

- "-1 -1" is the CLEO color codes.. do NOT confuse it with the carcols.dat.. Cleo colors are totally different.. for example.. "0 0" makes both colors black.. just like "Car Color 1" and "Car Color 2" under transfender menu..first value is the "Color 1" and the other one is off course "Color 2"

- you can always change "force_spawn" and "alarm" command values by switching 0 to 1 or reverse..

- 2435.302 -1671.848 12.8007 are the X-Y-Z Coordinates and the last one is offcourse the angle of this vehicle.. You can get CJ's current coords by pressing "CTRL+SHIFT+C" and angle by pressing "CTRL+SHIFT+E" you can also get any vehicles currents coords.. just get in an vehicle and apply the same commands..😉

8 hours ago, bangbang1 said:

This is what i want to know for now. I'm new at GTA modding, but i would like to learn advanced modding, so i can mod GTA in the way i want. I already know some Pawn, but i don't understand Cleo very well. I hope i will learn it.

 

Also, tell me what does that mean:

This is a SUCCESS REPORT 😀 If you can properly write a script at Sanny Builder you get this report message.. 😉

 

You want to learn CLEO and advance modding.. right???

 

Than.. START TO GET BURN.. 😃 

Edited by ArmanCan
Link to comment
Share on other sites

3 hours ago, ZAZ said:

Main size means the amount of data in byte of main part

Awesome summary of the contents of TheScriptSpace / MAIN Size, but it's missing a very large segment, the global variable space. This part is hidden in main.txt as Sanny manages the variable space internally. When viewed with a hex editor, there's a roughly 40kb block of blank buffer reserved for the variables.

Link to comment
Share on other sites

8 hours ago, OrionSR said:

the global variable space. This part is hidden in main.txt as Sanny manages the variable space internally.

thanks for completing

how can you imagine that?

as an definition list like that?

$0 = 0
$1 = 0
$2 = 0
$3 = 0

till

$10941 = 0
$10946 = 0
$10947 = 0

 

Link to comment
Share on other sites

4 hours ago, ZAZ said:

how can you imagine that?

The easiest way to describe the variable space block in main.scm is a strict interpretation of the data. $0 and $1 mark the beginning of main.scm, the data that's loaded into the 200,000 bytes of script space. They are not really global variables, which is why they are reserved and protected by Sanny Builder. These bytes hold SCM commands to simply jump around the variable space. Execution of main.scm would then resume at the Object Table.

 

5 hours ago, ZAZ said:

as an definition list like that?

No, but what you are expecting is actually included in the scripts - most global variables are initialized very early, either in MAIN or the initialization and intro missions. What's missing from the original C-like source scripts are all of the variable declarations which define their names and data type. If you are curious, Serge's UndefinifiedGrove project has recreated how the original source script would have appeared.

 

Anyway, to take this conversation back to the beginner level, what all this boils down to is that editing main.scm is tricky business. Add one new global variable, or a previously undefined object ID, or make any modifications that change the exact size of normal threads, and suddenly your script is incompatible with normal saves.

 

A cool trick for more advanced coders; it's possible to reconfigure Sanny to read all IDE files instead of just those defined in GTA.DAT. The primary reason I do this is because it allows me to use model names instead of numbers in cleo scripts. The side effect is that object definitions aren't needed in main.scm, which increases the space available for normal scripts. 

Link to comment
Share on other sites

On 11/12/2022 at 1:20 AM, ZAZ said:
On 11/11/2022 at 5:37 PM, bangbang1 said:

Hello. Can someone tell me which lines do i need to modify in MAIN.SCM in order to:

There're many lines but it's useless to modify them


Basicly you have to understand that the main programming is done by gta_sa.exe
The exe takes files from installation directory as well as informations and settings to create the game world, let a Player Charakter do what the user want,
let cars and peds appear in traffic, make weather and water and many more
and takes the content of main.scm and script.img to execute scripts

Read more here and use a stripped main (empty main.scm) to see what is done by exe and what is done by main.scm

 

So as i mentoined, cars and peds appear in traffic, is done by exe
But peds (actors) and vehicles for missions are spawned by main.scm

   

Quote

Increase or decrease the amount of traffic and the number of pedestrians;

There're many lines that changes traffic_density for peds and cars

  Hide contents

code example

01EB: set_traffic_density_multiplier_to 0.0 
03DE: set_pedestrians_density_multiplier_to 0.0

 


    In addition, traffic_density will be reset to default at the end of each mission 

caused by following code

Thanks.

 

So, once i increase the pedestrian/traffic density, the density will always return to 0, once a missions is finished? Won't the density remain 5, for example, if i type "5" at the line of multiplayer_to?

 

Or, mission_cleanup just cleans the elements loaded and used during the mission?

 

Thanks for all your other explanation, they really helped me.

 

However, i have a problem now. When i change the following:

set_traffic_density_multiplier_to 0.0

set_pedestrians_density_multiplier_to 0.0

 

To the following:

 

 

set_traffic_density_multiplier_to 9.0

set_pedestrians_density_multiplier_to 9.0

 

then try to compile, i get the following error:

 

gJ9Zpzi.png

 

The link presented in the error messages, gives e the following code:

 

 
if
[email protected] == 1
[email protected] == 1 // error, logical operator is missing
then
//
end

if and
[email protected] == 1
[email protected] == 1 // OK
then
//
end

if or
[email protected] == 1
[email protected] == 1 // OK
then
//
end

if
[email protected] == 1 // OK
then
//
end
 

 

So, where do i have to put that code? I tried to put it at the bottom of MAIN.SCM, but this didn't solve the problem.

Link to comment
Share on other sites

On 11/12/2022 at 1:20 AM, ZAZ said:

is given by data\peds.ide => pedgrp.dat => pedstat.dat

Would you also give me an example?

 

Here is the code of increasing weapon dmage: https://pastebin.com/AqsxQPab

The code loos messed and i don't understand which value for what is responsible.

 

This is the peds.dat code: https://pastebin.com/DaTtEkCZ

Would you show me which line is responsible for increasing the chance of peds attacking CJ, instead of running from him, if he attacks them?

 

I'm new at this and GTA/Cleo codes still look too alien to me.

Edited by bangbang1
Link to comment
Share on other sites

22 minutes ago, bangbang1 said:

So, where do i have to put that code?

 

As you may already noticed Sanny jumps to initiated section by a cursor in order to show the problematic part and according to your script i think you need to put AND or OR to here.. You will get these kind of messages until you finally write a proper script..😃

 

if // <<<< to here
[email protected] == 1
[email protected] == 1 // error, logical operator is missing
then
//
end

 

And try to open ".dat" files with "Notepad++"...It's really useful 😉 

 

Edit: By the way i forgot to tell you an important stuff..As you seen.. OrionSR and ZAZ have a really good knowledge of CLEO/Modelling and they are great teachers.. that means it will be better when you show RESPECT to them at all times 😎

Edited by ArmanCan
Link to comment
Share on other sites

1 hour ago, ArmanCan said:

 

As you may already noticed Sanny jumps to initiated section by a cursor in order to show the problematic part and according to your script i think you need to put AND or OR to here.. You will get these kind of messages until you finally write a proper script..😃

 

if // <<<< to here
[email protected] == 1
[email protected] == 1 // error, logical operator is missing
then
//
end

 

And try to open ".dat" files with "Notepad++"...It's really useful 😉 

 

Edit: By the way i forgot to tell you an important stuff..As you seen.. OrionSR and ZAZ have a really good knowledge of CLEO/Modelling and they are great teachers.. that means it will be better when you show RESPECT to them at all times 😎

I better show you more screenshots, so you can see what exactly i do. :)

 

So, when i decompile and open main.scm, and change the following:

 

set_traffic_density_multiplier_to 0.0

set_pedestrians_density_multiplier_to 0.0

 

To the following:

 

set_traffic_density_multiplier_to 9.0

set_pedestrians_density_multiplier_to 9.0

 

I get the following error:

 

screenshot-124.jpg

 

Do you see line 232242? Do you see the line before the letter "J"? This is where Sanny Builder jumps and puts the cursor when i get the error after trying to compile it.

 

If i put "AND":

 

Quote

:SYND4_3650
if AND
jf @SYND4_3672 
wait 0 
jump @SYND4_3650 

Or "OR":

Quote

:SYND4_3650
if OR
jf @SYND4_3672 
wait 0 
jump @SYND4_3650 

I get the following error:

screenshot-125.jpg

 

If i put the following code at the end of the main.scm:

 

if and

[email protected] == 1 // error, AND is used for a single condition

then

//

end

if

[email protected] == 1 // OK

then

//

end

if and

[email protected] == 1

[email protected] == 1 // OK

then

//

end

 

The problem isn't solved.

 

When i get the following error:

gJ9Zpzi.png

 

and then put the following code at the bottom of main.scm:

 

screenshot-126.jpg

 

and put "AND" or "OR" after "if" on the first line, i still get the error.

1 hour ago, ArmanCan said:

And try to open ".dat" files with "Notepad++"...It's really useful 😉 

Yes, this is what i did. The order of the code is messed, it's disordered, so i have to try to manually make it more ordered. I will do it later and see if it's easier to understand which value what does and for what it is responsible.

 

1 hour ago, ArmanCan said:

Edit: By the way i forgot to tell you an important stuff..As you seen.. OrionSR and ZAZ have a really good knowledge of CLEO/Modelling and they are great teachers.. that means it will be better when you show RESPECT to them at all times 😎

Yes, i know this. :)

Link to comment
Share on other sites

3 hours ago, bangbang1 said:

So, when i decompile and open main.scm, and change

... nothing you'll get the same error. 

 

This error is part of the original script, but this code segment is dead and does not execute so it doesn't matter - unless you are trying to recompile. The standard solution is to comment out all 4 lines in this segment.

:SYND4_3650
//if OR
//jf @SYND4_3672 
//wait 0 
//jump @SYND4_3650 

 

Link to comment
Share on other sites

  

 

4 hours ago, bangbang1 said:

 get the following error:


Do you see line 232242? Do you see the line before the letter "J"? This is where Sanny Builder jumps and puts the cursor when i get the error after trying to compile it.


If i put "AND":


Or "OR":

I get the following error:

 It's a known issue: R* made an incorrect conditional check because the condition is missing.
Sannybuilder doesn't accept it for compiling.

 

So this wiered existing conditional check of mission  Ice Cold Killa, at line number 232223, doesn't have any condition

 

:SYND4_3650
00D6: if
004D: jump_if_false @SYND4_3672
0001: wait 0 ms
0002: jump @SYND4_3650

 

the way to fix: deactivate the codes by comment slashes

 

:SYND4_3650
//00D6: if
//004D: jump_if_false @SYND4_3672
0001: wait 0 ms
//0002: jump @SYND4_3650

 

 

 

Quote

I'm new at this and GTA/Cleo codes still look too alien to me

Do you have any experience with scripting? Lua, html, DOS ?

Did you try the stripped main?

 

 

 

Quote

So, once i increase the pedestrian/traffic density, the density will always return to 0, once a missions is finished?

No, it returns to 1.0

 

Quote

Or, mission_cleanup just cleans the elements loaded and used during the mission?

No, it doesn't clean the loaded elements

It just restore some things like weather and traffic and something else

 

 

Quote

Won't the density remain 5, for example, if i type "5" at the line of multiplayer_to?

Don't know about multiplayer, samp or mta have additional exe running and use own main.scm

But standard gta sa game can't make more than density of 2.0

 

 

 

5 hours ago, bangbang1 said:

Here is the code of increasing weapon dmage: https://pastebin.com/AqsxQPab

The code loos messed and i don't understand which value for what is responsible.

 

Take time to study it

The first 40 lines is just explanation (comments, not used for the game)

 

#    L:        int damage

#	A				B			C	 D		E	F		I	J			K	 L		M     N     O		P  Q	R	S	 	T  U  V  	 W  X  Y  Z		a			b    c    d      e
################
$ GRENADE			PROJECTILE	30.0 40.0	342	-1		8	grenade		1	 75		0.0   0.0   0.0		1  0	1.0	 1.0	 0 99  6	 0 99  8  99	100			0.25 -1.0 800.0	 1.0

 

L = 75

 

 

 

5 hours ago, bangbang1 said:

This is the peds.dat code: https://pastebin.com/DaTtEkCZ

Would you show me which line is responsible for increasing the chance of peds attacking CJ, instead of running from him, if he attacks them?

Not peds.dat

 is given by data\peds.ide => pedgrp.dat => pedstat.dat

 

 

peds.ide

The first 40 lines is just explanation (comments, not used for the game)

13, BFYST, BFYST, CIVFEMALE,  STAT_STREET_GIRL <--

(pedtype = CIVFEMALE)
=> STAT_STREET_GIRL


pedstat.dat

The first 20 lines is just explanation (comments, not used for the game)

#	D:	Fear					(0-100) 100=Scared of everything
#	E:	Temper					(0-100) 100=Bad Tempered
#	F:	Lawfullness				(0-100)	100=Boy Scout
#	G:	Sexiness				(0-100)
#	H:	Attack strength			(float multiplier to attack damages)
#	I:	Defend weakness			(float multiplier to received damages

#   A                B     C      D   E	  F   G   H     I     J		K
STAT_STREET_GIRL     17.0  7.5    45  30  30  60  0.9   1.0   40	2


peds.ide

21, BMYCR, BMYCR, CRIMINAL, STAT_CRIMINAL, gang1, 110F,1, man,5,0,PED_TYPE_GEN,VOICE_GEN_BMYCR ,VOICE_GEN_BMYCR

 

=> pedtype CRIMINAL

 

pedgrp.dat

BMYCR, HMYCR, WMYCR  		# POPCYCLE_GROUP_CRIMINALS
SBMYCR, SHMYCR, SWMYCR		# POPCYCLE_GROUP_CRIMINALS (SF)
VBMYCR, VHMYCR, VWMYCR  	# POPCYCLE_GROUP_CRIMINALS (VEGAS)

 

 

data\Decision contains additional file with configurations about detailed behavior, depending to their pedtype

 

Edited by ZAZ
Link to comment
Share on other sites

4 hours ago, bangbang1 said:

I better show you more screenshots, so you can see what exactly i do. :)

 

 

Obviously i don't have a programming language experience and i'm amateur at Sanny Builder but i've helped you because the problem that you showed us was easy.. If you have long script to share us please use SPOILER button first "👁️" and than use the code button.

 

I've also tried to edit some parts of main.scm before but i've always encountered error messages.. As they said you above editing main.scm is a tricky business so you should only copy some of the opcodes as a reference. It will be healthy to not the change the main.scm and the main parts of it like missions.. (That's my opinion) 

 

I've read some experiences from the people who said "I know this programming language but CLEO seems different" and according to my observe i highly suggest you to begin small, and check out all the links that ZAZ gave to you..😉  

Link to comment
Share on other sites

On 11/13/2022 at 8:11 PM, OrionSR said:

... nothing you'll get the same error. 

 

This error is part of the original script, but this code segment is dead and does not execute so it doesn't matter - unless you are trying to recompile. The standard solution is to comment out all 4 lines in this segment.

:SYND4_3650
//if OR
//jf @SYND4_3672 
//wait 0 
//jump @SYND4_3650 

 

Mmmmm, nice!! The error is solved now and i no longer get the error. Thank you! :) 

Link to comment
Share on other sites

On 11/13/2022 at 8:26 PM, ZAZ said:

No, it returns to 1.0

So, i have to make the same modification over and over again each time i finish a mission?

On 11/13/2022 at 8:26 PM, ZAZ said:

Don't know about multiplayer, samp or mta have additional exe running and use own main.scm

But standard gta sa game can't make more than density of 2.0

Alright. I tried 9.0, but it didn't work. I will try 2.0 now.

So, there is an additional application that can help me have a greater than 2.0 multiplier? Can you tell me the name of the app?

On 11/13/2022 at 8:26 PM, ZAZ said:

Take time to study it

The first 40 lines is just explanation (comments, not used for the game)

 

#    L:        int damage

#	A				B			C	 D		E	F		I	J			K	 L		M     N     O		P  Q	R	S	 	T  U  V  	 W  X  Y  Z		a			b    c    d      e
################
$ GRENADE			PROJECTILE	30.0 40.0	342	-1		8	grenade		1	 75		0.0   0.0   0.0		1  0	1.0	 1.0	 0 99  6	 0 99  8  99	100			0.25 -1.0 800.0	 1.0

 

L = 75

Okay. First i need to re-order the code and make it more ordered.

Thanks.

 

On 11/13/2022 at 8:26 PM, ZAZ said:

Do you have any experience with scripting? Lua, html, DOS ?

Did you try the stripped main?

I have experience only with Pawn for. I use that language to make plugins for my CS servers.

 

Yes, i'm already looking at Cleo tutorials. Cleo isn't well understood by me, but i think i will learn it. After some practice and looking at redy-to-use codes, i will master the basics (i think).

 

On 11/13/2022 at 8:26 PM, ZAZ said:

Not peds.dat

 is given by data\peds.ide => pedgrp.dat => pedstat.dat

Thanks. I found what i wanted, in pedstat.dat

 

On 11/13/2022 at 8:26 PM, ZAZ said:

data\Decision contains additional file with configurations about detailed behavior, depending to their pedtype

This is the content of ryder3.ped:

data values:
12,4,412,0.000000,0.000000,0.000000,0.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
56,4,508,0.000000,0.000000,0.000000,0.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
9,4,251,100.000000,100.000000,100.000000,100.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
13,4,917,100.000000,100.000000,100.000000,100.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
36,4,1000,100.000000,100.000000,100.000000,100.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
37,4,1000,100.000000,100.000000,100.000000,100.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
38,4,1000,100.000000,100.000000,100.000000,100.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
39,4,1000,100.000000,100.000000,100.000000,100.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,
15,4,200,100.000000,0.000000,0.000000,0.000000,1,1,300,0.000000,100.000000,0.000000,0.000000,0,1,-1,0.0,0.0,0.0,0.0,0,0,-1,0.0,0.0,0.0,0.0,0,0,


How do i know which value what it is responsible for?

On 11/13/2022 at 8:26 PM, ZAZ said:

=> pedtype CRIMINAL

What is this?

 

Link to comment
Share on other sites

On 11/18/2022 at 11:38 PM, bangbang1 said:

So, i have to make the same modification over and over again each time i finish a mission?

yes, or just let the code repeat every 5 seconds

 

 

Quote

Alright. I tried 9.0, but it didn't work. I will try 2.0 now.

So, there is an additional application that can help me have a greater than 2.0 multiplier? Can you tell me the name of the app?

I don't know any. Maybe Limit Adjuster

You should know that modders made Limit Adjuster, because the game engine has many limits that needs to overcome, especially for map modding

Open Limit Adjuster

fastman92 limit adjuster

 

 

Quote

I have experience only with Pawn for. I use that language to make plugins for my CS servers.

 

Yes, i'm already looking at Cleo tutorials. Cleo isn't well understood by me, but i think i will learn it. After some practice and looking at redy-to-use codes, i will master the basics (i think).

 

Then i recommand the High Level tutorial

Sannybuilder accepts scripts written in this syntax

 

 

About pedstat.dat, Decision

pedstat.dat seems to be unused, maybe just the last entry is relevant

#    K:     Default Decision Maker -> 0: group member, 1:cop, 2:rand_norm 3:rand_tough 4:rand_weak

look at https://gtamods.com/wiki/Pedstats.dat

 

The Decision data is a secret mystery

Find some few information at https://gtamods.com/wiki/Decision_Maker

Link to comment
Share on other sites

On 11/20/2022 at 9:49 AM, ZAZ said:

About pedstat.dat, Decision

pedstat.dat seems to be unused, maybe just the last entry is relevant

#    K:     Default Decision Maker -> 0: group member, 1:cop, 2:rand_norm 3:rand_tough 4:rand_weak

look at https://gtamods.com/wiki/Pedstats.dat

 

The Decision data is a secret mystery

Find some few information at https://gtamods.com/wiki/Decision_Maker

Okay.

So, in PedEvent.txt, i found the following:

EVENT_DRAGGED_OUT_CAR 7 

EVENT_KNOCK_OFF_BIKE 8 

EVENT_DAMAGE 9 

EVENT_DEAD_PED 11 

EVENT_POTENTIAL_GET_RUN_OVER 12 

EVENT_POTENTIAL_WALK_INTO_PED 13 

EVENT_SHOT_FIRED 15 

EVENT_PED_ENTERED_MY_VEHICLE 17 

EVENT_SEXY_PED 20 

EVENT_ATTRACTOR 27 

EVENT_VEHICLE_THREAT 30 

EVENT_GUN_AIMED_AT 31 

EVENT_ACQUAINTANCE_PED_HATE 36 

EVENT_ACQUAINTANCE_PED_DISLIKE 37 

EVENT_ACQUAINTANCE_PED_LIKE 38 

EVENT_ACQUAINTANCE_PED_RESPECT 39 

EVENT_VEHICLE_DAMAGE_WEAPON 41 

EVENT_SPECIAL 42 

EVENT_GOT_KNOCKED_OVER_BY_CAR 43 

EVENT_POTENTIAL_WALK_INTO_OBJECT 44 

EVENT_POTENTIAL_WALK_INTO_FIRE 46 

EVENT_SCRIPTED_ATTRACTOR 48 

EVENT_SHOT_FIRED_WHIZZED_BY 49 

EVENT_LOW_ANGER_AT_PLAYER 50 

EVENT_HIGH_ANGER_AT_PLAYER 51 

EVENT_HEALTH_REALLY_LOW 52 

EVENT_HEALTH_LOW 53 

EVENT_LEADER_ENTERED_CAR_AS_DRIVER 54 

EVENT_LEADER_EXITED_CAR_AS_DRIVER 55 

EVENT_POTENTIAL_WALK_INTO_VEHICLE 56 

EVENT_FIRE_NEARBY 59 

EVENT_SOUND_LOUD 61 

EVENT_SOUND_QUIET 62 

EVENT_ACQUAINTANCE_PED_HATE_BADLY_LIT 63 

EVENT_SEEN_PANICKED_PED 65 

EVENT_PLAYER_COMMAND_TO_GROUP 71 

EVENT_SEEN_COP 72 

EVENT_VEHICLE_DAMAGE_COLLISION 73 

EVENT_DANGER 75 

EVENT_PLAYER_COMMAND_TO_GROUP_GATHER 76 

EVENT_VEHICLE_ON_FIRE 79 

Is there a post that can tell me what those numbers/values mean? I can't edit them, if i don't know what they mean.

I also need an explanation about what the values in the .ped files mean. For example, here is what i see in Cop.ped - how can i know which number what means?

screenshot-156.png

Link to comment
Share on other sites

3 hours ago, bangbang1 said:

So, in PedEvent.txt, i found the following:

Editing this list won't change anything. It simply enumerates a meaning for the values. You can use this information to make your cleo scripts more readable by using the CONST..END construct.

const
  EVENT_DRAGGED_OUT_CAR=7 
  EVENT_KNOCK_OFF_BIKE=8 
end

if or
   074F:   actor $PLAYER_ACTOR  ped_event == EVENT_DRAGGED_OUT_CAR
   074F:   actor $PLAYER_ACTOR  ped_event == EVENT_KNOCK_OFF_BIKE
then
  036A: put_actor $PLAYER_ACTOR in_car [email protected]
end

 

Edited by OrionSR
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.