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


Author Topic: *TUTORIAL* Adding peds to interiors  (Read 38730 times)

0 Members and 2 Guests are viewing this topic.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #45 on: February 10, 2012, 04:17:10 PM »
I will post the information about this a bit later tonight after I finish going through my notes. They are quite a mess atm.

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #46 on: February 21, 2012, 03:21:41 AM »
Well good news your tut. worked I now have characters spawning almost in all exterior Their's a bit of problem's though. I cant get characters into the chem o plant exterior or the out skirts of New Conventory. I also cant ger nerds in the observatory. It's odd all the interiors with mission scripts are harder to get peds into can you explain mad? I will be doing it myself if your still busy I just need to know how to spawn characters in these interior or exteriors.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #47 on: February 21, 2012, 01:17:16 PM »
What you have to do is add a popoverride section to the coord area you are spawning peds in.

I will explain a bit later if you still want me to show you a example of what to do.

It is really not too hard to do....just takes a little trial and error to find the correct coords for a ped spawn.

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #48 on: February 22, 2012, 10:45:32 AM »
I'm like half way into my machinima I just needed the nerds to spawn in the Observatory and the Dropouts to spawn in the exterior of the Chem O Plant. Then I need Dropout's to spawn in the interior of the Chem O Plant. If you could help me with this that would be great. Is there a way to get them to these places? I need a fast response I'm trying to finish it.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #49 on: February 23, 2012, 03:48:00 AM »
There is....

sry for the very slow responses but I have been extremely busy with trying to decompile the lua scripts.

I found where ntauthority hangs out now and sent him a pm tonite asking for some assistance and outlining the situation on modding...etc and hopefully when I wake up there will be a good response.....

He seems to have lost interest in modding bully anyways and I figure if he is willing to at least share his modded decompiler with me...then I will be one step closer to providing the community with editable lua scripts.

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #50 on: March 16, 2012, 07:27:29 PM »
@Madman You'll love this, I was messing with the code in the trigger.img for each interior I found out that changing FORCEPOPRREAD FALSE to FORCEPOPOVERRED TRUE this sets the trigger.img to believe that characters are supposed to spawn their like the doors. I don't know if it works but it should. The Chemical Plant's AI might be able to be spawned to. Changing the ISDOOR FALSE to ISDOOR TRUE, it should set the Chemical Plant's door to be closed instead of opened. I am not talking about the first door that is the exterior one, the interior door that is closed when you enter and just like the mission by pressing the button it opens. I don't know why this is removed pretty weird. I also think that if you do the same for the basement doors it will use the mission script which in help Gary you have to open the doors the way the mission tells you. If you want you can add this to your tut. if it works. I will try to mod some files and see what happens with the Ped Spawning I am on the verge of something big lol.

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #51 on: March 16, 2012, 07:29:42 PM »
@Madman You'll love this, I was messing with the code in the trigger.img for each interior I found out that changing FORCEPOPRREAD FALSE to FORCEPOPOVERRED TRUE this sets the trigger.img to believe that characters are supposed to spawn their like the doors. I don't know if it works but it should. The Chemical Plant's AI might be able to be spawned to. Changing the ISDOOR FALSE to ISDOOR TRUE, it should set the Chemical Plant's door to be closed instead of opened. I am not talking about the first door that is the exterior one, the interior door that is closed when you enter and just like the mission by pressing the button it opens. I don't know why this is removed pretty weird. I also think that if you do the same for the basement doors it will use the mission script which in help Gary you have to open the doors the way the mission tells you. If you want you can add this to your tut. if it works. I will try to mod some files and see what happens with the Ped Spawning I am on the verge of something big lol.
Also change FORCEPOPREAD and the other FORCEPOP hopefully it works.

Offline MadmaN

  • Bully-Board Admin Team
  • Moderator
  • Newbie
  • *****
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #52 on: March 17, 2012, 09:48:32 PM »
Way ahead of ya there m8...but good work figuring that out nontheless.

those do indeed work...but they are overridden by the scripts themselves so....until I get those working fully.....there will be no way to fully override those settings in trigger.

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #53 on: March 18, 2012, 12:07:52 AM »
Their might be a way to, maybe when you have the scripts done you could change the script for ped spawning so characters can spawn all over. Probably by creating a script hook. I tried one of those I don't think it worked though. I tried to create a custom interior spawner as soon as I pressed the button it crashed.

Offline Carlosvc92

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #54 on: April 16, 2012, 02:21:10 PM »
@Madman You'll love this, I was messing with the code in the trigger.img for each interior I found out that changing FORCEPOPRREAD FALSE to FORCEPOPOVERRED TRUE this sets the trigger.img to believe that characters are supposed to spawn their like the doors. I don't know if it works but it should. The Chemical Plant's AI might be able to be spawned to. Changing the ISDOOR FALSE to ISDOOR TRUE, it should set the Chemical Plant's door to be closed instead of opened. I am not talking about the first door that is the exterior one, the interior door that is closed when you enter and just like the mission by pressing the button it opens. I don't know why this is removed pretty weird. I also think that if you do the same for the basement doors it will use the mission script which in help Gary you have to open the doors the way the mission tells you. If you want you can add this to your tut. if it works. I will try to mod some files and see what happens with the Ped Spawning I am on the verge of something big lol.

Hey, would you expand on that, did you ever try it for spawning peds inside interiors?

Offline Carlosvc92

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #55 on: April 16, 2012, 02:24:06 PM »
Ok...I know some of you have been wondering how to add peds to interiors...etc and now I will show you how to do it. It is very easy and once my Bully Editor is done it will be even easier. For now this is how to do it:

1. extract every file from trigger.img to a directory of your choosing. You can use any img editor you want for this.

2. open population.dat. Best app to use for this is notepad++ which keeps the scripting intact and allows for easier editing.

3. look in population.dat for the following line: POPULATIONDATA

you will see this line several times in population.dat. Each area with peds has this before the main ped code.

4. You should see somthing that looks about like this:
Code: [Select]
POPULATIONDATA
         BEGIN
            POPULATION_DAY
               BEGIN
                  TOTAL 60
                  PREFECT 5
                  NERD 5
                  JOCK 5
                  DROPOUT 5
                  GREASER 5
                  PREPPY 5
                  STUDENT 5
                  COP 5
                  TEACHER 5
                  TOWNPERSON 5
                  SHOPKEEP 5
                  BULLY 5
               END
            POPULATION_CLASS
               BEGIN
                  TOTAL 60
                  PREFECT 5
                  NERD 5
                  JOCK 5
                  DROPOUT 5
                  GREASER 5
                  PREPPY 5
                  STUDENT 5
                  COP 5
                  TEACHER 5
                  TOWNPERSON 5
                  SHOPKEEP 5
                  BULLY 5
               END
            POPULATION_NIGHT
               BEGIN
                  TOTAL 60
                  PREFECT 5
                  NERD 5
                  JOCK 5
                  DROPOUT 5
                  GREASER 5
                  PREPPY 5
                  STUDENT 5
                  COP 5
                  TEACHER 5
                  TOWNPERSON 5
                  SHOPKEEP 5
                  BULLY 5
               END
            POPULATION_CURFEW
               BEGIN
                  TOTAL 60
                  PREFECT 5
                  NERD 5
                  JOCK 5
                  DROPOUT 5
                  GREASER 5
                  PREPPY 5
                  STUDENT 5
                  COP 5
                  TEACHER 5
                  TOWNPERSON 5
                  SHOPKEEP 5
                  BULLY 5
               END
         END

5. edit the following parts in each interior you want to add peds to:
Code: [Select]
TOTAL 60
                  PREFECT 5
                  NERD 5
                  JOCK 5
                  DROPOUT 5
                  GREASER 5
                  PREPPY 5
                  STUDENT 5
                  COP 5
                  TEACHER 5
                  TOWNPERSON 5
                  SHOPKEEP 5
                  BULLY 5

change each number to the number of peds you want for each cliche to spawn in that interior...make sure you add all the values together and put the result of that for the total which is the first value in the listing. otherwise the game will likely crash.

6. once you have the population.dat file edited however you like either replace the population.dat file in trigger.img or use my img editor and make a new file...name it trigger.img in the same dir as the old one. and Add all the extracted files back in...save and then you are done.


As always. if I have missed anything please let me know in this thread and I will update the tutorial accordingly. :)

*UPDATE*

Here is a list of the trigger names of all the interiors and what they are so you can use this as a reference when changing the population data for each interior.

RichArea = Rich area of town where the preppies generally live.
DownTown = Self Explanatory
PoorArea = This is generally where the dropouts live at
IndustrialArea_DropOutEnclave = This is the dropouts hideout in the industrial area
DT_GASSTATION = This is for the gas stations (all of them)
POOR_TENEMENTS = The tenements near the poor area
Rich_Area_Corner_Courtyard = I think this is around where derby lives.
Industrial_Sawmill = The sawmill in the industrial area
Carnival = The Carnival
Industrial_Docks = The docks in the industrial area
SchoolArea = Inside the school
RichArea_DownTown = This is the rich area of downtown where the preppy type shops are
DT_ComicShop = The Comic books shop
DT_DropOutAlley = The alley that the dropouts hang out in
DT_GreaserAlley = The alley that the greasers hang out in
Rich_GreaserAlley = Same as above but in the rich area of town
Poor_DropTurf1 = The dropout's turf in the poor area of town
GraveYard = The old graveyard
Jocks = Jocks savepoint - thx to Insanitygames
Nerds = Nerds savepoint - thx to  Insanitygames
Preps = preps savepoint - thx to Insanitygames
Greasers = greasers savepoint -  thx to Insanitygames
FieldOverride = This overrides the population settings for the football field
Jocks_FootballField = Football field population settings. Can be overridden by the above setting
School_Basketball_Court = The basketball court/gym
PopRoads1 = Controls the population on the roads
BullyTurf = The bully's turf
BadPlaceTrigger = Not sure what this one is atm.
OutsideSchool1 = Outside the school in the schoolyard
SchoolBikeTrig = This controls how many if any at all bikes spawn around the schoolyard

You can also control vehicle spawning as well. The vehicle spawning is done in the same file (population.dat) and it edited for each area with vehicles as follows:

search for AMBIENTVEHICLEDATA and under it a few lines you will see somthing similar to the following:
Code: [Select]
AMBIENTVEHICLEDATA
         BEGIN
            AMBIENTVEHICLES_DAY
               BEGIN
                  TOTAL 30
                  CAR 10
                  BIKE 20
                  POLICECAR 0
               END
            AMBIENTVEHICLES_CLASS
               BEGIN
                  TOTAL 30
                  CAR 10
                  BIKE 20
                  POLICECAR 0
               END
            AMBIENTVEHICLES_NIGHT
               BEGIN
                  TOTAL 30
                  CAR 10
                  BIKE 20
                  POLICECAR 0
               END
            AMBIENTVEHICLES_CURFEW
               BEGIN
                  TOTAL 30
                  CAR 10
                  BIKE 20
                  POLICECAR 0
               END
         END

Simply edit this part like you did for the ped population by putting how many for each vehicle type you want and add all of them together and put that value where total is.

NOTE: Do not add too many vehicles or peds to a area or it will lag your game bad. If you have a very high end system then you should be ok but I wouldnt use more then what I have already used in my code examples.

Feel free to experiment with this and come up with your own ped spawn variations.

How exactly do you override populations in scripts.img? Sorry for all the questions, I don't want to be a beggar but how am I gonna learn if I don't ask?

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #56 on: April 23, 2012, 12:05:59 AM »
Huh? in the scripts.img? It's the Trigger.img I am modifying. I changed some of the interiors and created my own spawning files I cant try them on a pc right now I am out of a good graphics card to try out my mods. Some of the files in the trigger.img have files inside files that you cant see. Open img.editor and get these files SP_Observatory.dat and SP_tenements.dat they should be their it's should look like this unmodified.
(Unmodified!)
TRIGGERNAME "Observatory_Amb"
      AREACODE 40
      POSITION -694.966980, 75.752701, 20.251301
      YAWPITCHROLL 0.000000, 0.000000, 0.000000
      YAW 0.000000
      ZHEIGHT 1.000000
      ISMISSIONSPECIFIC FALSE
      ISLOCKED FALSE
      AMBIENT 0, 0, 0
      USETIMECYCLE FALSE
      HASPOPULATIONDATA 0 
      FORCEPOPREAD FALSE
      HASAMBIENTVEHICLEDATA 0
      FORCEVEHREAD FALSE
(Modified!)
TRIGGERNAME "Observatory_Amb"
      AREACODE 40
      POSITION -694.966980, 75.752701, 20.251301
      YAWPITCHROLL 0.000000, 0.000000, 0.000000
      YAW 0.000000
      ZHEIGHT 1.000000
      ISMISSIONSPECIFIC FALSE
      ISLOCKED FALSE
      AMBIENT 0, 0, 0
      USETIMECYCLE FALSE
                HASPOPULATIONDATA 1
      FORCEPOPREAD TRUE
                HASAMBIENTVEHICLEDATA 0
      FORCEVEHREAD TRUE
                POPULATIONDATA
         BEGIN
            POPULATION_DAY
               BEGIN
                  TOTAL 10
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 10
                  GREASER 0
                  PREPPY 0
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
            POPULATION_CLASS
               BEGIN
                  TOTAL 10
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 10
                  GREASER 0
                  PREPPY 0
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
            POPULATION_NIGHT
               BEGIN
                  TOTAL 10
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 10
                  GREASER 0
                  PREPPY 0
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
            POPULATION_CURFEW
               BEGIN
                  TOTAL 10
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 10
                  GREASER 0
                  PREPPY 0
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
         END
      HASAMBIENTVEHICLEDATA 0
      FORCEVEHREAD FALSE
      AMBIENTVEHICLEDATA
         BEGIN
            AMBIENTVEHICLES_DAY
               BEGIN
                  TOTAL 0
                  CAR 0
                  BIKE 0
                  POLICECAR 0
               END
            AMBIENTVEHICLES_CLASS
               BEGIN
                  TOTAL 0
                  CAR 0
                  BIKE 0
                  POLICECAR 0
               END
            AMBIENTVEHICLES_NIGHT
               BEGIN
                  TOTAL 0
                  CAR 0
                  BIKE 0
                  POLICECAR 0
               END
            AMBIENTVEHICLES_CURFEW
               BEGIN
                  TOTAL 0
                  CAR 0
                  BIKE 0
                  POLICECAR 0
               END
         END   
      HASAMBIENTVEHICLEDATA 0
      FORCEVEHREAD FALSE
   END
Adding this pile of crap at the end usually gives a spawn but don't mess it up look at the others and see if it is going with the normal spawning places like this.
TRIGGERNAME "RichArea"
      AREACODE 0
      POSITION 448.889008, 350.924011, -1.331820
      YAWPITCHROLL 0.000000, 0.000000, 0.000000
      YAW 0.000000
      ZHEIGHT 60.000000
      ISMISSIONSPECIFIC FALSE
      ISLOCKED FALSE
      AMBIENT 0, 0, 0
      USETIMECYCLE FALSE
      HASPOPULATIONDATA 1
      FORCEPOPREAD FALSE
      POPULATIONDATA
         BEGIN
            POPULATION_DAY
               BEGIN
                  TOTAL 20
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 0
                  GREASER 10
                  PREPPY 10
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
            POPULATION_CLASS
               BEGIN
                  TOTAL 20
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 0
                  GREASER 10
                  PREPPY 10
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
            POPULATION_NIGHT
               BEGIN
                  TOTAL 20
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 0
                  GREASER 10
                  PREPPY 10
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
            POPULATION_CURFEW
               BEGIN
                  TOTAL 20
                  PREFECT 0
                  NERD 0
                  JOCK 0
                  DROPOUT 0
                  GREASER 10
                  PREPPY 10
                  STUDENT 0
                  COP 0
                  TEACHER 0
                  TOWNPERSON 0
                  SHOPKEEP 0
                  BULLY 0
               END
         END
      HASAMBIENTVEHICLEDATA 1
      FORCEVEHREAD FALSE
      AMBIENTVEHICLEDATA
         BEGIN
            AMBIENTVEHICLES_DAY
               BEGIN
                  TOTAL 5
                  CAR 2
                  BIKE 2
                  POLICECAR 1
               END
            AMBIENTVEHICLES_CLASS
               BEGIN
                  TOTAL 4
                  CAR 2
                  BIKE 1
                  POLICECAR 1
               END
            AMBIENTVEHICLES_NIGHT
               BEGIN
                  TOTAL 5
                  CAR 2
                  BIKE 2
                  POLICECAR 1
               END
            AMBIENTVEHICLES_CURFEW
               BEGIN
                  TOTAL 2
                  CAR 1
                  BIKE 0
                  POLICECAR 1
               END
         END
   END
PERIMETER
Then their you go if you need more info I can give their are no beggers in the modding world just
people that need info.

Offline UltimateGamer1

  • BullyLeecher
  • Full Member
  • ***
  • Posts: 189
  • Gender: Male
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #57 on: April 23, 2012, 12:10:21 AM »
Populations in the scripts.img are off limits until Madman figures what they are and how to work them. He says he is busy give him some time he has a gigantic dinner plate lol. He is a friendly person and wants to help out he will teach us all soon. I will post some tut's on youtube on how to do this with video's of when their done so everyone else won't just look at words only but words and video helps those who are lazy lol.

Offline Carlosvc92

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #58 on: April 23, 2012, 01:27:56 PM »
Alright thanks dude, btw I tried to spawn peds inside the barber shop but no results, are u sure it works better at the end of the triggers?

Offline -мα∂нαттяι¢к-

  • Full Member
  • ***
  • Posts: 254
    • View Profile
Re: *TUTORIAL* Adding peds to interiors
« Reply #59 on: April 23, 2012, 04:33:35 PM »
Carlos, i think there is an excluder that makes it so people besides jimmy can't spawn there. You can remove it in excluder.dat in the Data folder. Just erase the line. I'm pretty sure about this because i have removed everything from that file and one time there were 4 or 5 townspeople in the barbershop.