Quantcast

Jump to content

» «
Photo

Remove pedestrians, cars and missions

4 replies to this topic
ReyEspada45
  • ReyEspada45

    Player Hater

  • Members
  • Joined: 16 Apr 2013

#1

Posted 13 December 2013 - 03:45 AM

I'd like to remove all the pedestrians, cars (excepting parked cars) and missions. I've used the opcodes 01EB and 03DE:

 

 
01EB: set_traffic_density_multiplier_to 0.0
03DE: set_pedestrians_density_multiplier_to 0.0
 
 
however, I don't know why, there's still some pedestrians and cars, these opcodes only reduce the level of traffic and pedestrians, and it doesn't remove them (or at least it doesn't work for me).

I want a "cleaned" san andreas, with no pedestrians walking or driving, no missions, no traffic, nothing, I just need the map and parked cars to make my mod. I've also tried to use the opcode 0395:
 
 
0395: clear_area 1 at 246.6274 63.7407 1003.641 radius 999.9 
 
 
but, the problem is that I need to remove all pedestrians and create my own pedestrians around the player, and they'll attack me because that's a part of the mod, so clearing the area will remove my pedestrians too, and worse, default pedestrians and cars will reappear (even if I clear the area many times, they appear again and again), but mine don't reappear. If I need to modify main.scm, or another file, tell me what I have to change.
 
 
so, in summary, I need to delete all pedestrians, cars, missions, etc, get a cleaned san andreas where I can let my imagination and my sanny builder fly away, create my own pedestrians that will attack me, and continue with my mod. 
 
Here's a part of the mod:
 
 
thread 'ATTACK' 
 
:ATTACK_19
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @ATTACK_19 
if 
  $ONMISSION == 0 
else_jump @ATTACK_19
01EB: set_traffic_density_multiplier_to 0.0
03DE: set_pedestrians_density_multiplier_to 0.0
:ATTACK_20
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
08E5: get_actor_in_sphere 0@ 1@ 2@ radius 7.0 handle_as 3@
05E2: AS_actor 3@ kill_actor $PLAYER_ACTOR
:ATTACK_21
wait 0
if 
Actor.Dead(3@)
jf @ATTACK_21
Actor.DestroyWithFade(3@)
Actor.RemoveReferences(3@)
jump @ATTACK_20

 


OrionSR
  • OrionSR

    Chain Game Development Team

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

#2

Posted 13 December 2013 - 03:55 AM Edited by OrionSR, 13 December 2013 - 04:03 AM.

022B: create_forbidden_for_peds_cube_cornerA -3000.0 -3000.0 -100.0 cornerB 3000.0 3000.0 100.0  
01E8: create_forbidden_for_cars_cube_cornerA -3000.0 -3000.0 -100.0 cornerB 3000.0 3000.0 100.0
0395: clear_area 1 at 0.0 0.0 0.0 radius 10000.0

There are other ways to accomplish your goals but this one becomes part of the save file, except for the clear area part but you can manage that if necessary. I'm actually not sure what would happen if the same forbidden area is created more than once, but in general, special care must be used for anything that gets saved, like car generators, radar blips, and pickups. Don't let your scripts create new ones every time it loads.

  • ReyEspada45 likes this

ReyEspada45
  • ReyEspada45

    Player Hater

  • Members
  • Joined: 16 Apr 2013

#3

Posted 14 December 2013 - 12:28 AM Edited by ReyEspada45, 14 December 2013 - 12:36 AM.

that worked, but if I delete all the pedestrians and the cars, the opcodes related to pedestrians doesn't work, like: 

 

02DD: 0@ = get_random_ped_in_zone 'JEF' with_pedtype_civilian 1 gang 0 criminal/prostitute 0

0A3E: unknown_get_actor_in_sphere 1@ 2@ 3@ radius 1.5 13.0 1.5 handle_as 0@

0376: 18@ = create_random_actor_at -1576.88 55.26 8.57

 

I read in a post that if there's no peds, those opcodes won't work (and that's hilarious because I hadn't read that post before start codding the mod, and when I read it, all the opcodes that I used was in the list of peds opcodes that doesn't work if there's no pedestrians around).

 

So I decided to modify the game by modifying the .dat files of peds. In the ped.dat file, I put that every group of peds hate "PLAYER1", or "PLAYER", I didn't remember the name of the ped type that correspond to the CJ or the main player, but I tried with "PLAYER1" and "PLAYER" and nothing, everyone was walking around normally. Now my question is: how can I control the behavior of peds by modifying .dat files?


 

 

I tested the mod with pedestrians, and it worked, some peds appeared and attacked me, but there was still normal pedestrians walking around, and that's not what I want.

 

ah, and I want to create random peds around me or by zones, not in especific coordinates


OrionSR
  • OrionSR

    Chain Game Development Team

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

#4

Posted 14 December 2013 - 09:35 AM

I haven't tried modifying the preferences in ped.dat. I suppose it might work for some peds on a new save, but I'm not sure. Many of the peds have their preferences altered by the intro missions, sometimes the gangs get altered as the story progresses, and the Pedestrians Attack Each Other cheat can mess up a few other settings. This information is retained in the save and can be altered by the Savegame Editor 3.x. Below one of the opcodes used to set the ped preferences for an example.

0746: set_acquaintance 1 of_actors_pedtype 8 to_actors_pedtype 0 // see ped.dat

GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa

 


ReyEspada45
  • ReyEspada45

    Player Hater

  • Members
  • Joined: 16 Apr 2013

#5

Posted 14 December 2013 - 08:35 PM

Nothing, neither modifying ped.dat file nor using 0746 opcode, I don't know if I'm doing something wrong or there's a problem with my san andreas, in ped.dat I've tried that all people hate PLAYER1, PLAYER, GANG2 and CIVMALE (because I don't know what pedtype correspond to CJ, so I tested it with those types) and nobody attacks me, and it doesn't work using the opcode (for example set_acquaintance 5 of_actors_pedtype 7 to_actors_pedtype 0), and I started a new save.

 

As I said, I don't know if there's a problem with my san andreas, because I modify the behavior of everyone, but everything keeps normal, only Ballas hate me, but the rest of the people don't. The only way that I've tried to get the effect that I want is typing the code that makes everyone attacks you, but I want to make that code a default configuration of the game, that people attack me as it was totally normal in the game, modifying it or by a cleo script. 

 

Well, maybe I'll star with another proyect if there's no solution, thank you very much





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users