[MOD] Populated buildings

Show off your mod creations or just a work in progress.
Post Reply
imsobadatnicknames
Posts: 63
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

[MOD] Populated buildings

Post by imsobadatnicknames » Sat Aug 01, 2020 4:28 pm

Tired of feeling like the only person in the entire Iliac Bay who ever visits shops, temples, and guilds? This mod uses the quest system to occasionally spawn NPCs in buildings you're inside of.

Image
Image
Image
Image

How does it work?

An hour after you enter any city, a few buildings (shops, guilds and temples) will be randomly chosen to be populated with NPCs if you enter them. From there on, every hour you spend inside the city, these NPCs will be despawned, and a new set of buildings will be randomly chosen.

EDIT: There's also an alternative version of the mod which includes taverns among the buildings to spawn NPCs in. The reason why I didn't include taverns in the main version of the mod in the first place is because the NPCs spawned using this method count as "enemies" even if they're not hostile, so if you try to rest in a tavern that's getting populated with NPCs by this mod you will get the "there are enemies nearby" message. I don't consider this a big deal, since all cities in the game have a fuckton of taverns so if you find one you're unable to sleep in you can just go to a different one or wait outside for an hour while the mod resets and chooses a different tavern. You could even attempt to explain this in-character as the tavern having all rooms occupied, or being too noisy for you to be able to sleep. However, I figured most players would probably want to save themselves the annoyance and I removed the taverns from the first upload.

EDIT2: Version 1.1 changelog.
Changed timer to three hours to avoid spamming the quest system too much.
Corrected a couple errors that were preventing some quests in the folder from parsing.
NPCs will also spawn in palaces now.
Now they will also spawn in buildings in hamlets, not only in cities.

EDIT3: Version 1.2 changelog
NPCs will now do random small talk when you click them.
Your legal reputation will be reduced if you attack them, and reduced even further if you kill them

Image
Image
Image


Installation

1. Download the file.
2. Unzip the file inside /StreamingAssets/Questpacks
3. If you're starting a new game, that's all you need to do. If you wanna use the mod on a game you already started, you'll have to open up the console and type startquest PBMASTER to get the mod running.

Special thanks

I wanna thank Jay_H, Hazelnut, and interkarma for putting up with my barrage of dumb questions in the custom quest support thread.

You can find the mod on nexus at https://www.nexusmods.com/daggerfallunity/mods/105 or download it from this post.
Attachments
PopulatedbuildingsTaverns1.2.rar
(8.84 KiB) Downloaded 1 time
Populatedbuildings1.2.rar
(7.92 KiB) Downloaded 1 time
Last edited by imsobadatnicknames on Wed Aug 12, 2020 6:43 pm, edited 10 times in total.
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

User avatar
emmathepony
Posts: 115
Joined: Sat Jun 29, 2019 5:26 pm

Re: [MOD] Populated buildings

Post by emmathepony » Sat Aug 01, 2020 4:34 pm

Great idea! Do these NPCs move around or just stand still? Would be seriously amazing to see them move around (even if it's just randomly) to make it seem like they're going about their business. :mrgreen:

imsobadatnicknames
Posts: 63
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

Re: [MOD] Populated buildings

Post by imsobadatnicknames » Sat Aug 01, 2020 4:57 pm

emmathepony wrote:
Sat Aug 01, 2020 4:34 pm
Great idea! Do these NPCs move around or just stand still? Would be seriously amazing to see them move around (even if it's just randomly) to make it seem like they're going about their business. :mrgreen:
Sadly, they can only stay still due to limitations with the quest system. I spawn them like they're enemies and then use the "restrain" command to make them non-hostile, but restrain also has the side-effect of making them stand still. If I figure out a way of making them move around I'll update the mod :D
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

imsobadatnicknames
Posts: 63
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

Re: [MOD] Populated buildings

Post by imsobadatnicknames » Sun Aug 02, 2020 1:19 pm

emmathepony wrote:
Sat Aug 01, 2020 4:34 pm
Would be seriously amazing to see them move around (even if it's just randomly)
Good news! I think I just found a way to do it. The bad news is it's not very efficient

I think I'd have to go into the individual quests that control the spawn in each building and change

Code: Select all

_spawn1_ task:
	when _inside1_ 
	create foe _f1_ every 10 minutes 2 times with 50% success
	create foe _f2_ every 10 minutes 2 times with 50% success
	restrain foe _f1_
	restrain foe _f2_
	start timer _restraintimer_

_spawn2_ task:
	when _inside2_ 
	create foe _f3_ every 10 minutes 2 times with 50% success
	create foe _f4_ every 10 minutes 2 times with 50% success
	restrain foe _f3_
	restrain foe _f4_
	start timer _restraintimer_
to

Code: Select all

_spawn1_ task:
	when _inside1_ 
	create foe _f1_ every 10 minutes 2 times with 50% success
	create foe _f2_ every 10 minutes 2 times with 50% success

_spawn2_ task:
	when _inside2_ 
	create foe _f3_ every 10 minutes 2 times with 50% success
	create foe _f4_ every 10 minutes 2 times with 50% success
and then add somethin like

Code: Select all


_pacify1_ task:
	when _inside1_
	daily from 0:00 to 23:59
	change foe _f1_ infighting true
	change foe _f2_ infighting true
	change foe _f1_ team 1
	change foe _f2_ team 1
	clear _pacify1_
	
_pacify2_ task:
	when _inside2_
	daily from 0:00 to 23:59
	change foe _f3_ infighting true
	change foe _f4_ infighting true
	change foe _f3_ team 1
	change foe _f4_ team 1
	clear _pacify2_

This would essentially make them allied with the player instead of just making them completely static. This would also have the added bonus that if you get sent in a quest to kill something inside a building that NPCs are spawning inside of, they would help you kill it. I still gotta test it tho, and I'm not sure the "daily from (time) to (time)" thing accepts "when" conditions.

EDIT: I just tried it with a more elegant version of this code (the whole "daily from 0:00 to 23:59" bit turned out to be innecesary) but the result are disappointing. Turns out NPCs like these only move when they're trying to kill something, so even if I make them allied with the player and don't restrain them, they won't move unless there's an enemy in the building for them to try and kill. Still gona replace the old files with these new ones because the code is a lot cleaner.
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

imsobadatnicknames
Posts: 63
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

Re: [MOD] Populated buildings

Post by imsobadatnicknames » Wed Aug 12, 2020 6:42 pm

Update 1.2
Added random small talk when you click these NPCs, and legal repercussions if you attack them or kill them

Image
Image
Image
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

Post Reply