Bully-Board
Bully Modding Section => Modding Questions/Help => Topic started by: ConTresillo on March 01, 2022, 08:47:03 AM
-
I've always liked the fact that Jimmy isn't alone in the safehouse of the nerds also is it possible to add preps to Harrington and lighthouse safehouse, jocks inside the jock clubhouse since Jimmy didn't fight them like he did with the greasers and townies, Please help I tried editing pedpop and population for 4 hours still no luck. :(
-
You can use mod to spawn peds & props, or just script modding.
-
You can use mod to spawn peds & props, or just script modding.
Oops preps was autocorrected as props, it was preps bro and why don't pedpop work? also there's a video on adding preps but there was no description to the mod. I want preps to spawn automatically without using ped spawners but normally just like the nerds. Is there a code or something to add a specific clique to spawn in interiors
-
You can use mod to spawn peds & props, or just script modding.
Oops preps was autocorrected as props, it was preps bro and why don't pedpop work? also there's a video on adding preps but there was no description to the mod. I want preps to spawn automatically without using ped spawners but normally just like the nerds. Is there a code or something to add a specific clique to spawn in interiors
It's because Nerd's Hideout actually registered as Store rather than SaveZone like others HQ did.
In Dragon's Wing Comics Store, the script is spawning people through "Ped Production" function whereas the SaveZone does not have it.
I believe PedPop.dat won't help in this case, it requires scripting in order to spawn NPCs naturally.
That was some kind of hypothesis came to the top of my mind when i looked at the source code.
Correct me if i'm wrong.
-
You can use mod to spawn peds & props, or just script modding.
Oops preps was autocorrected as props, it was preps bro and why don't pedpop work? also there's a video on adding preps but there was no description to the mod. I want preps to spawn automatically without using ped spawners but normally just like the nerds. Is there a code or something to add a specific clique to spawn in interiors
It's because Nerd's Hideout actually registered as Store rather than SaveZone like others HQ did.
In Dragon's Wing Comics Store, the script is spawning people through "Ped Production" function whereas the SaveZone does not have it.
I believe PedPop.dat won't help in this case, it requires scripting in order to spawn NPCs naturally.
That was some kind of hypothesis came to the top of my mind when i looked at the source code.
Correct me if i'm wrong.
Thank you friend so how should i script the prep spawn? another doubt why don't harrington house spawn any npc i mean itsn't some save zone right
-
Thank you friend so how should i script the prep spawn?
It is a simple question that cannot be simply answered lol.
It depends on your Lua scripting knowledge.
If you haven't been introduced yet (to Lua scripting ofc), you should read some tutorials here on Bully-Board.
another doubt why don't harrington house spawn any npc i mean itsn't some save zone right
There are two answers on this particular question, you can decide which answer you'll likely to understand lol.
- SIMPLE ANSWER -
Simply because R* did not make it in the first place.
Some other areas did not have population either, so it wasn't only our HQ or this Harrington House.
- DETAILED ANSWER -
NPCs that spawn naturally are combination of Lua script + .DAT files (you can find that in Trigger.img). There is a population setting named 'populationdata' (indicated by 'haspopulationdata 1') within the .DAT file if the area meant to be inhabited regularly. Then, the 'populationdata' will be called in Lua script in order to control the population within a space world.
Sadly, most factions HQ (iSaveZones.DAT, SaveLocs.DAT, SP_iDropS.DAT, SP_iJockS.DAT, SP_iPrepS.DAT, and SP_iGrsrS.DAT) and Harrington House (PAn_Prep.DAT and SP_Prep_House.DAT) did not have 'populationdata'. Which means they are not supposed to have daily activities on that area.
Instead, the Dragon's Wing Comic store that we were talking about have 'populationdata' in Store.DAT which called ComicPopTrig. The ComicPopTrig is later found to be active in SStores.lua once you completed Nerd Challenge. That's why we can see some NPCs spawning there, it's still a store after all.
That may looks a little bit complex, but there are more beyond that.
And people still figuring more advanced way in area modding.
-
Thank you friend so how should i script the prep spawn?
It is a simple question that cannot be simply answered lol.
It depends on your Lua scripting knowledge.
If you haven't been introduced yet (to Lua scripting ofc), you should read some tutorials here on Bully-Board.
another doubt why don't harrington house spawn any npc i mean itsn't some save zone right
There are two answers on this particular question, you can decide which answer you'll likely to understand lol.
- SIMPLE ANSWER -
Simply because R* did not make it in the first place.
Some other areas did not have population either, so it wasn't only our HQ or this Harrington House.
- DETAILED ANSWER -
NPCs that spawn naturally are combination of Lua script + .DAT files (you can find that in Trigger.img). There is a population setting named 'populationdata' (indicated by 'haspopulationdata 1') within the .DAT file if the area meant to be inhabited regularly. Then, the 'populationdata' will be called in Lua script in order to control the population within a space world.
Sadly, most factions HQ (iSaveZones.DAT, SaveLocs.DAT, SP_iDropS.DAT, SP_iJockS.DAT, SP_iPrepS.DAT, and SP_iGrsrS.DAT) and Harrington House (PAn_Prep.DAT and SP_Prep_House.DAT) did not have 'populationdata'. Which means they are not supposed to have daily activities on that area.
Instead, the Dragon's Wing Comic store that we were talking about have 'populationdata' in Store.DAT which called ComicPopTrig. The ComicPopTrig is later found to be active in SStores.lua once you completed Nerd Challenge. That's why we can see some NPCs spawning there, it's still a store after all.
That may looks a little bit complex, but there are more beyond that.
And people still figuring more advanced way in area modding.
Wow thank you friend for answering so I know a little python but no lua coding, can I manually edit those .DAT files to have population spawning??
-
Thank you friend so how should i script the prep spawn?
It is a simple question that cannot be simply answered lol.
It depends on your Lua scripting knowledge.
If you haven't been introduced yet (to Lua scripting ofc), you should read some tutorials here on Bully-Board.
another doubt why don't harrington house spawn any npc i mean itsn't some save zone right
There are two answers on this particular question, you can decide which answer you'll likely to understand lol.
- SIMPLE ANSWER -
Simply because R* did not make it in the first place.
Some other areas did not have population either, so it wasn't only our HQ or this Harrington House.
- DETAILED ANSWER -
NPCs that spawn naturally are combination of Lua script + .DAT files (you can find that in Trigger.img). There is a population setting named 'populationdata' (indicated by 'haspopulationdata 1') within the .DAT file if the area meant to be inhabited regularly. Then, the 'populationdata' will be called in Lua script in order to control the population within a space world.
Sadly, most factions HQ (iSaveZones.DAT, SaveLocs.DAT, SP_iDropS.DAT, SP_iJockS.DAT, SP_iPrepS.DAT, and SP_iGrsrS.DAT) and Harrington House (PAn_Prep.DAT and SP_Prep_House.DAT) did not have 'populationdata'. Which means they are not supposed to have daily activities on that area.
Instead, the Dragon's Wing Comic store that we were talking about have 'populationdata' in Store.DAT which called ComicPopTrig. The ComicPopTrig is later found to be active in SStores.lua once you completed Nerd Challenge. That's why we can see some NPCs spawning there, it's still a store after all.
That may looks a little bit complex, but there are more beyond that.
And people still figuring more advanced way in area modding.
Wow thank you friend for answering so I know a little python but no lua coding, can I manually edit those .DAT files to have population spawning??
Update:
Ok so i have copied the population code an pasted it in sp_prep_house but still it doesn't work
NTRIGGERS 1
TRIGGER
BEGIN
TRIGGERNAME "PrepHouse_MainRoom"
AREACODE 32
POSITION -540.947998, 132.498001, 46.199902
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 FALSE
POPULATIONDATA
BEGIN
POPULATION_DAY
BEGIN
TOTAL 5
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 5
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
POPULATION_CLASS
BEGIN
TOTAL 5
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 5
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
POPULATION_NIGHT
BEGIN
TOTAL 5
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 5
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
POPULATION_CURFEW
BEGIN
TOTAL 5
PREFECT 0
NERD 0
JOCK 0
DROPOUT 0
GREASER 0
PREPPY 5
STUDENT 0
COP 0
TEACHER 0
TOWNPERSON 0
SHOPKEEP 0
BULLY 0
END
END
HASAMBIENTVEHICLEDATA 0
FORCEVEHREAD FALSE
END
-
It's because R* didn't add the control spawn of npcs in some area & script.
Like Altamurenza said, the NPCs will spawn automatically because the combination of Lua script & the .dat files. The Lua script control the spawn of npcs. The .dat files is just a source of the cordinates, and other data, then the value will be called it in the Lua script to control the npcs to spawn or to control other things.
cmiiw
-
It's because R* didn't add the control spawn of npcs in some area & script.
Like Altamurenza said, the NPCs will spawn automatically because the combination of Lua script & the .dat files. The Lua script control the spawn of npcs. The .dat files is just a source of the cordinates, and other data, then the value will be called it in the Lua script to control the npcs to spawn or to control other things.
cmiiw
Ok friend but can we add ??
-
the NPCs will spawn automatically because the combination of Lua script & the .dat files. The Lua script control the spawn of npcs. The .dat files is just a source of the cordinates, and other data, then the value will be called it in the Lua script to control the npcs to spawn or to control other things.
Yep, that's how the game works.
Update:
I also did the same thing before, but in faction HQ (modified SaveZones.lua + modified SP_iJockS.DAT).
But still, no luck. I'm not an expert in those kind of things :biggrin:.
So i decided to spawn people there by hooking my code into PrepHouse.lur, i used the npc spawn points on 2_08.DAT (Weed Killer) and managed to populate the house with 6 npcs. After all it still looks better than empty. Moreover, there are only 9 people on prep factions, so 6 people are kinda realistic imo.
Here you go: https://www.mediafire.com/file/g99ahef4kuwcd1f/Harrington_House_-_Population_Script.7z/file
-
the NPCs will spawn automatically because the combination of Lua script & the .dat files. The Lua script control the spawn of npcs. The .dat files is just a source of the cordinates, and other data, then the value will be called it in the Lua script to control the npcs to spawn or to control other things.
Yep, that's how the game works.
Update:
I also did the same thing before, but in faction HQ (modified SaveZones.lua + modified SP_iJockS.DAT).
But still, no luck. I'm not an expert in those kind of things :biggrin:.
So i decided to spawn people there by hooking my code into PrepHouse.lur, i used the npc spawn points on 2_08.DAT (Weed Killer) and managed to populate the house with 6 npcs. After all it still looks better than empty. Moreover, there are only 9 people on prep factions, so 6 people are kinda realistic imo.
Here you go: https://www.mediafire.com/file/g99ahef4kuwcd1f/Harrington_House_-_Population_Script.7z/file
Wow dude it really works Thanks A Ton :) :) :biggrin:, also can u explain whats hooking by the way :laugh:
-
also can u explain whats hooking by the way :laugh:
Well.. I'll take the chance from my understanding.
As far as i know, 'hook' is a method used in programming to redirect or add some new lines of script into an existing function. Usually, we injected our script before or after the function is being executed. The purpose of this action is pretty much obvious, whether you add a few things, change some of them, or completely overhaul the function itself.
My top two reasons of function hooking are:
1) I don't have the source code, so 'hook' is only my chance to have an access in that script.
2) I do have the source code, but i am just lazy to tidy up the script. For that reason, i prefer to modify the function in my current script that would be called in my destination script. So, i save a lot of my time and energy with the same final results lol.