Announcements: Please turn off your adblock for Bullymods.net! Advertisements help us pay for the site, which allows you to use it--
*Also make sure to Introduce yourself, in the below section! Say Hi, and tell us who you are!* ~quinn

Specific NPCs In Boy's Dorm

User avatar
DreadedGhoul575
New Kid
New Kid
Posts: 48
Joined: Sat Aug 12, 2017 10:54 pm

Specific NPCs In Boy's Dorm

Postby DreadedGhoul575 » Tue Nov 28, 2017 10:41 pm

Anyone know how to spawn Sheldon in the boy's dorm? Since, I assume something on the line of code tells him not too (like townie Zoe).

I don't mean with mods, I mean with the objects folder and editing there.

Help is appreciated.

User avatar
quinn
Administrator
Administrator
Posts: 550
Joined: Wed Aug 09, 2017 4:36 pm
Contact:

Re: Specific NPCs In Boy's Dorm

Postby quinn » Wed Nov 29, 2017 12:43 am

I mean, BDorm.lua is the LUA file that prevents other factions from spawning inside the Boys dorm. The only way around that would be to modify that file, and put it back into scripts.img.

User avatar
DreadedGhoul575
New Kid
New Kid
Posts: 48
Joined: Sat Aug 12, 2017 10:54 pm

Re: Specific NPCs In Boy's Dorm

Postby DreadedGhoul575 » Wed Nov 29, 2017 1:36 am

Ah ok, and how would I edit it, with notepad++?

User avatar
quinn
Administrator
Administrator
Posts: 550
Joined: Wed Aug 09, 2017 4:36 pm
Contact:

Re: Specific NPCs In Boy's Dorm

Postby quinn » Thu Nov 30, 2017 9:25 pm

Yes. You'd edit it, if you know basic LUA, and then recompile it to a .lur file.

User avatar
DreadedGhoul575
New Kid
New Kid
Posts: 48
Joined: Sat Aug 12, 2017 10:54 pm

Re: Specific NPCs In Boy's Dorm

Postby DreadedGhoul575 » Thu Nov 30, 2017 10:28 pm

Ok, what parts would I need to edit? I looked in the code for Sheldon and restrictions and nothing. Would appreciate the help.

User avatar
derpy54320
Moderator
Moderator
Posts: 41
Joined: Tue Aug 15, 2017 7:14 am
Contact:

Re: Specific NPCs In Boy's Dorm

Postby derpy54320 » Fri Dec 01, 2017 2:30 pm

/Config/dat/PedPop.dat is actually what determines which factions spawn in each interior. This is the case for most default areas, however missions can override this, as can any script.

BDorm.lur as pointed out by Quinn is the area script for the boy's dorm (duh), and actually disables specific ped models using PedSetUniqueModelStatus. A ped's unique model status is if it can spawn, and if so if it can spawn multiple times. It is the -1, 1, or 2 found in default.ide (and therefor ide.img when you make freeroam peds spawn).

So it first loads PedPop.dat and that says generic students (such as Sheldon) should spawn, but the boy's dorm script says that Sheldon specifically should not spawn (as well as all the other little kids), and then says they should spawn again when you exit. The cleanest way to do this would be to modify the script itself, since then it sticks to the script that is actually responsible. However an easier way would be to make an STimeCycle.lur script (since this script is a lot easier to mod) and make it repeatedly set Sheldon's unique model status to true when you're in the dorm.
Attachments
sheldon.zip
(1.33 MiB) Downloaded 8 times
sheldon.zip
(1.33 MiB) Downloaded 8 times

User avatar
DreadedGhoul575
New Kid
New Kid
Posts: 48
Joined: Sat Aug 12, 2017 10:54 pm

Re: Specific NPCs In Boy's Dorm

Postby DreadedGhoul575 » Fri Dec 01, 2017 4:17 pm

I'm guessing that allows Sheldon to spawn in the boy's dorm. Hope this doesn't annoy you, but are there any other characters restricted? (Like Pedro). Also, feel free to guide me on what to edit, if it's troubling you (just in case, you're busy).

Edit: The file you posted, is causing me lag in-game by the way, with 60 fps bully.

User avatar
derpy54320
Moderator
Moderator
Posts: 41
Joined: Tue Aug 15, 2017 7:14 am
Contact:

Re: Specific NPCs In Boy's Dorm

Postby derpy54320 » Mon Dec 04, 2017 6:04 pm

Yes, the boy's dorm script also disables all other little kids by setting their unique model status to -1. If you want to bring them back, you can make the source.lua provided also set the unique model status of the other kids to 1 repeatedly, forcing them to always spawn. Again, it'd be better to just do it once in a modified boy's dorm script, but this is a lot easier for a simple patch in my opinion. Just take the source.lua I provided and add whatever lines you want, recompile to STimeCycle.lur using luac and put it back in Scripts.img using some img tool. I'll give you some tools and a little tutorial so you can try it yourself. <3

Image
Attachments
tools.zip
(101.27 KiB) Downloaded 2 times
tools.zip
(101.27 KiB) Downloaded 2 times


Who is online

Users browsing this forum: No registered users and 1 guest