News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: PED'S spawn anywhere.  (Read 4176 times)

0 Members and 1 Guest are viewing this topic.

Offline Shrimp

  • Sr. Member
  • ***
  • Posts: 514
  • Gender: Male
  • your official b-b's chav. wag wan.
    • View Profile
PED'S spawn anywhere.
« on: June 16, 2015, 11:59:17 AM »
Hi, I don't really want a mod as I like to do this my-self because I'd like it to be highly accurate to what I want, blah blah you'll know what I mean.

So, I want to make that Townies, Preps, Jocks, Ect spawn EVERYWHERE, The town, the beach, the school, the school gang place's n shit, inside of the School, boy's dorms, Blue skies Industrial park, you know what I mean?
May anyone kindly help me throughout how to do this?
Thanks ^^

Offline AlphaTech

  • LostInSpace
  • Sr. Member
  • ***
  • Posts: 758
  • Gender: Male
  • The name's AlphaTECH, whatca need help with?! :)
    • View Profile
Re: PED'S spawn anywhere.
« Reply #1 on: June 16, 2015, 02:34:25 PM »
Glad to see you sign up dude and to spawn peds in interiors you would have to use lua. Learning lua is the best way to go with spawning peds in interiors the maximum frequency for ped spawning is 18 peds. Using more then 18 peds causing a crash but you could also do this. Have a script load which spawns a ped each time another script loads with this code.

Code: [Select]
ImportScript("spawn1.lua") using many of these at once will allow you to spawn peds into different interiors using multiple lua scripts. I haven't tried this method before but I have been trying many to get many ped spawns. Running a spawning ped cycle is using this to spawn them all day and every day.

Code: [Select]
F_SpawnRandomPedOverrivde = function()
PedCreateXYZ(Ped,Cord1,Cord2,Cord3)
end

F_SpawnRandomPedOverride2 = function()
if PedIsDead(Ped) then
PedCreateXYZ(Ped,Cord1,Cord2,Cord3)
end

CreateThread("main2")

main2 = function()
repeat
F_SpawnRandomPedOverride2()
Wait(0)
until not Alive
end




Code: [Select]
PedCreateXYZ(Ped,CORD1,CORD2,CORD3)
Code: [Select]
Example : PedCreateXYZ(Johnny,-5.503,-3.404,12.216)(DO NOT USE~!) :mad:
« Last Edit: June 16, 2015, 02:36:02 PM by LostInSpace »

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: PED'S spawn anywhere.
« Reply #2 on: June 16, 2015, 05:06:11 PM »
You can actually have about 26 peds spawned before you get a crash, including the player (so 25 NPCs). But the free-roam peds combine with this, I usually say it's safe to only spawn about 10 peds in a script if you don't disable the peds spawned normally by the game in free-roam.

I think Shrimp prefers a way that will mod configuration files rather than spawn them manually. I'm sure there is a way to do that, I've seen it before I think even. I haven't ever done it myself though. I think it's something Trigger.img but I don't actually know.

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: PED'S spawn anywhere.
« Reply #3 on: June 16, 2015, 07:15:09 PM »
There is a lot of population overrides you can use in the .dat files that are inside trigger.img

I have posted tutorials about this before...a long time ago. Just look in my section of the modding area or look in the ultimate modding topic (very outdated now sadly) and you should find your answers there for that. You actually can go beyond the 26 ped limit since I have spawned well over 100 before in freeroam. You just have to make sure your edits are correct. Might take a little trial and error. 8)

Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
Re: PED'S spawn anywhere.
« Reply #4 on: June 16, 2015, 07:39:23 PM »
Couldn't you simply change everyone's to "STUDENT"?

Offline ShadowRageEX

  • AKA ShadowCorn
  • Jr. Member
  • **
  • Posts: 85
  • Gender: Male
    • View Profile
Re: PED'S spawn anywhere.
« Reply #5 on: June 17, 2015, 06:07:48 AM »
Couldn't you simply change everyone's to "STUDENT"?
I tried doing this and bcz and the school was empty LOL

Offline Shrimp

  • Sr. Member
  • ***
  • Posts: 514
  • Gender: Male
  • your official b-b's chav. wag wan.
    • View Profile
Re: PED'S spawn anywhere.
« Reply #6 on: June 20, 2015, 05:21:15 AM »
Couldn't you simply change everyone's to "STUDENT"?

Woulden't that make every single PED (Excluding adults and Five-o) non-clique, making them fight each-other?

deadpoolXYZ

  • Guest
Re: PED'S spawn anywhere.
« Reply #7 on: June 20, 2015, 01:37:35 PM »
You have to edit the spawn points in trigger.img to spawn everyone everywhere. I recommend you to use the replace option in hexeditor unless you want to spend an eternity.

This is a basic spawnpoint found in 1_02.dat (inside trigger.img):

Code: [Select]
NTRIGGERS 1
TRIGGER
BEGIN
TRIGGERNAME "1_02_PopulationTrig"
AREACODE 0
POSITION 271.337006, -108.561996, 1.403180
YAWPITCHROLL 0.000000, 0.000000, 0.000000
YAW 0.000000
ZHEIGHT 10.000000
ISMISSIONSPECIFIC FALSE
ISLOCKED FALSE
AMBIENT 0, 0, 0
USETIMECYCLE FALSE
HASPOPULATIONDATA 1
FORCEPOPREAD FALSE
POPULATIONDATA
BEGIN
POPULATION_DAY
BEGIN
TOTAL 0
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 0
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
POPULATION_CLASS
BEGIN
TOTAL 0
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 0
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
POPULATION_NIGHT
BEGIN
TOTAL 0
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 0
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
POPULATION_CURFEW
BEGIN
TOTAL 0
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 0
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
END
HASAMBIENTVEHICLEDATA 0
FORCEVEHREAD FALSE
END

Basically what you have to do is to look for the word "GREASER 0" in trigger (using hex editor) and replace it with "GREASER 9" or something like that. Start doing it with every other faction until you replaced everyone's spawn number. Then you have to replace "TOTAL X" (X being the number that is there by default) with the total number of peds.
Let's say there is a spawn trigger where there spawns 4 students and 2 nerds... therefore the total should be 6 right? Well if you replace 4 students and 2 nerds with 6 and 6 respectively then you should replace total with 12 (6 + 6 = 12 duhh).

Offline Shrimp

  • Sr. Member
  • ***
  • Posts: 514
  • Gender: Male
  • your official b-b's chav. wag wan.
    • View Profile
Re: PED'S spawn anywhere.
« Reply #8 on: June 20, 2015, 01:40:43 PM »
Thanks, I tried Population.dat but it failed.