Jump to content

[WIP] FP based Brothel / Prostitution system for settlements


Roggvir

Recommended Posts

"Fun" challenge for anyone who dares...
 
Refine conditions for the ClientFinder script.
It is used to fill a refCollectionAlias with NPCs satisfying given brothel requirements (within radius, and allowed races and factions only).
 
To make it a bit more complicated, i want to be able independently allow or forbid the following:
 
- Ghouls (not the ferals, not Raiders, not Gunners)
- Gunners (humans or ghouls who are Gunners)
- Raiders (humans or ghouls who are Raiders)
- Humans (any except Gunners or Raiders)
- Super Mutants
- Synths Gen1
- Synths Gen2
 
So far, my shortest list of conditions that achieves this, looks like the following.
It's not bad, but if anyone's got any idea on how to make it shorter, or simpler, i'd appreciate it.
(i am worried that with Nuka World, or Far Harbor, there might be other factions i will need to handle - like additional raider factions not covered by the old RaiderFaction or the FH Trappers, etc., so it may yet get much more messy)

GetDistance (roggBrothelMarker00) < global:roggBrothelInviteRadius00 AND
GetInFaction (roggBrothelNeutralFaction) == 0 AND
GetInFaction (roggBrothelProstituteFaction) == 0 AND
GetInFaction (CurrentCompanionFaction) == 0 AND

GetIsRace(HumanRace) == 1 OR
GetIsRace(GhoulRace) == 1 OR
GetIsRace(SynthGen1Race) == 1 OR
GetIsRace(SynthGen2Race) == 1 OR
GetIsRace(SuperMutantRace) == 1 AND

GetIsRace (SynthGen1Race) == 0 OR
GetVMQuestVariable (roggBrothel00, AllowSynthGen1) == 1 AND
 
GetIsRace (SynthGen2Race) == 0 OR
GetVMQuestVariable (roggBrothel00, AllowSynthGen2) == 1 AND
 
GetIsRace (SuperMutantRace) == 0 OR
GetVMQuestVariable (roggBrothel00, AllowMutants) == 1 AND
 
GetInFaction (GunnerFaction) == 0 OR
GetVMQuestVariable (roggBrothel00, AllowGunners) == 1 AND
 
GetInFaction (RaiderFaction) == 0 OR
GetVMQuestVariable (roggBrothel00, AllowRaiders) == 1 AND
 
GetIsRace (GhoulRace) == 0 OR
GetVMQuestVariable (roggBrothel00, AllowGhouls) == 1 OR
GetInFaction (GunnerFaction) == 1 OR
GetInFaction (RaiderFaction) == 1 AND
 
GetIsRace (HumanRace) == 0 OR
GetVMQuestVariable (roggBrothel00, AllowHumans) == 1 OR
GetInFaction (GunnerFaction) == 1 OR
GetInFaction (RaiderFaction) == 1 AND
 
IsInList (roggBrothelExcludes) == 0 AND

(It should be straightforward, but just in case: those GetVMQuestVariable are pulling the various toggleable option settings from conditional variables of the brothel script this client finder runs for)

EDIT: forgot the second block limiting the races, otherwise it would include all kinds of vermin :)

Link to comment

Maybe someone will find this usefull...

 

When using refCollectionaAliases attaching some data on the references in the collection,

be mindfull of some pitfalls when removing, or moving references from/to another collection having the same data attached.

When you remove reference from collection, the data added by that collection are removed blindly - without considering other sources that might have added the same data (alias, or the new collection you are moving the reference into).

 

For example:

Collection A has a faction F attached to itself, "stamping" with it any added references.

Collection B has the same faction F (same FormID) attached, because reasons.

Now if you move some reference from collection A into collection B, by doing:

 

   A.RemoveRef(_ref)

   B.AddRef(_ref)

 

while removing from A, the faction F added to _ref by collection A is also removed, and then added again by collection B.

Obviously not a problem.

But now while testing your mod, you noticed a split second moment when the _ref is not in faction F as you need it to be.

Unfortunately, that split second moment if often enough to make that _ref turn hostile.

So, because you are such a smart monkey, you switch the order like this:

 

   B.AddRef(_ref)

   A.RemoveRef(_ref)

 

...makes sense, right? you might have learned to do that under some circumstances.

But with refCollections it is a BAD IDEA, because this is what actually happens:

 

   B.AddRef(_ref)

      _ref gets added into B

      _ref is added into faction F

 

   A.RemoveRef(_ref)

      _ref gets removed from A

      _ref is removed from faction F

 

And before you say nobody can be that stupid... well, let me tell you i actually do know about some guy who just spent several hours trying to figure out why the hell is he loosing that faction assignment.

Link to comment

"Assigned NPCs keep their normal day jobs, and work them while not attending to a customer.

They also count as normal beds, so assigned NPCs will use them for normal sleeping.
Each bed provides some small bonus to settlement happiness."

 

You had me sold at this part. I always disliked how the brothel interrupted the normal flow of my settlements, especially Sim Settlements. I wish you the best of luck with this project. 

Link to comment

hey Roggvir, excellent project here! 

 

 

concerning:

A problem:

After having his good time in the brothel, how do we return the customer back where he came from?

I am afraid i will have to create some kind of register of all npcs i "invite", to store their original location and position.

 

I guess you could learn by example, vinfamy somehow solved it in FPP.

Link to comment

A problem:

After having his good time in the brothel, how do we return the customer back where he came from?

I am afraid i will have to create some kind of register of all npcs i "invite", to store their original location and position.

 

Array of structures?

But Arrays suck, because i could easily go over the 128 limit - one brothel can have 30 npcs in queue, plus others still being animated, so lets say 50 total in worst case - now multiply that by the number of brothels (each settlement can have one - thats totally insane scenario, but even 3 brothels can go over that 128 limit).

Ok, so it cannot be global, but each brothel can have its own array, that would be perfectly ok.

Still, i dont like it, i wish there would be some way to set a property on the actor (without having to put the npc into an alias).

 

Hey, great project and great work so far man! Transforming settlements into brothels is one of the most fun things to do in my current FO4 experience. I made and carefully set-dressed around 6 of them so far using FP Prost and had a blast.

 

In regards to your questions,: Isn't there an automatic npc behavior where, when completed a certain script, it reverts to it's original packages and automatically wanders to that specific location? Or a command for it to speed up reverting to default behavior?

 

Alternative solution for these problems and the enemy race ones: generate npc's from scratch with their own faction. These could be fine tuned to resemble a varied, fitting collection of brothel customers from many factions and/or races. You could add a beautiful, shiny blue (or orange!) spawn point marker where they enter your settlements or make them wander in from further.

 

I know it decreases the sense of realism (i.e. compared to working with the actual npc's inhabiting the world) but it offers some advantages. Being able to choose a sex ratio of customers, for instance. Which is a biggie as it determines the kind of action your brothel displays. Allow the user to have a roaming band of super mutants visit the brothel occasionally, for instance. Or only well off men in tuxedo's in a really posh place ...

 

In any case, keep up the good work and good luck with scripting!

Link to comment

In regards to your questions,: Isn't there an automatic npc behavior where, when completed a certain script, it reverts to it's original packages and automatically wanders to that specific location? Or a command for it to speed up reverting to default behavior?

 

Well, yes and no, sometimes, depends...

 

Not all of the NPCs can simply revert to original packages which would tell them where to go and what to do.

But even IF, i still couldn't just immediately "release" them to roam freely.

 

In case of raiders, mutants, and other hostile entities, i cannot just let them roam free while still in the vicinity of the Brothel, because they would start fighting everyone else.

So i need to keep them calm and docile (using my neutral faction and calm spell ability), until they return back to where they came from.

 

Same thing with friendly npcs, although for slightly different reasons.

I have to babysit them until they return to where they came from, because otherwise something else might kill them.

For example - consider any NPC from Diamond City - toss any of those into the wilderness, and they won't survive 5 minutes.

The whole DC would be dead in an hour, if you build a brothel nearby, because all those NPC would eventually die on the way to/from the brothel :-D

Of course, you can make them protected/essential, but that can also cause problems, because you are creating a scenario for which the game is not ready - it has no means to deal with some situations you create this way, because understandably noone even considered these situations.

Simplest example would be an encounter between two protected/essential npcs, who are hostile to each other - they will start a fight that NEVER ends.

These things can easily break the game, or turn the game into annoying mess.

 

It's not a big problem though, the real challenge consist of deciding which one of all the possible crappy solutions to choose.

 

Alternative solution for these problems and the enemy race ones: generate npc's from scratch with their own faction. These could be fine tuned to resemble a varied, fitting collection of brothel customers from many factions and/or races. You could add a beautiful, shiny blue (or orange!) spawn point marker where they enter your settlements or make them wander in from further.

 

I know it decreases the sense of realism (i.e. compared to working with the actual npc's inhabiting the world) but it offers some advantages. Being able to choose a sex ratio of customers, for instance. Which is a biggie as it determines the kind of action your brothel displays. Allow the user to have a roaming band of super mutants visit the brothel occasionally, for instance. Or only well off men in tuxedo's in a really posh place ...

This is an interesting suggestion.

This could be a nice optional feature, i'll add it to the todo list.

Link to comment

Excelent work!

 

Will sugest a few things.

 

Based on the original vinfamy mod.

I´ll just change 2 things :

1- Modify the Time of a scene beyond 150 seconds (or even  specify a time range)

2- Get rid of "Question Dialogs" and let the Brothel Terminal Handle all options.

(just show question dialogs when its a solicitation to Player, or just a normal conversation)

 

For the additions... :

 

1-Maybe add a VIP Service. You go through the Wasteland and you can "Invite/Sell" a special pass to any Npc you find (with sucess %Chance) 

This way they go to a SPECIAL forniture beds for VIP clients (that pay more) (and can visit this VIP beds once a day).

 

2-Poppers! : Make a box to store  meds, so any Npc engaging in sex may use one (just a sound indicator, no need for a text one) And as a consecuence they pay more. (or they may endure more time, or want more sex afterwards...)

Link to comment

Just found this and having high hopes for it - I'm still looking for an immersive adult mod that doesn't go into the extremes but more into detail instead. I have no experience in scripting for FO, just did something way back in a RPG, but would focus mostly on a realistic presentation instead of doing too many extras.

In this case for instance, I'd first make sure the prostitute system works inside the settlement with settlers only, forget about all other factions until it's well fleshed out. Other than that, I hope for some realism when it comes to picking up customers, walking (not running/warping) to the lover's nest, maybe autoplay a series of animations without giving the player all the control - I like being surprised by my game.

Link to comment
  • 3 weeks later...

Just some things maybe to think about:

 

One thing I have notices is that NPC’s can get bugged especially after the main quest has completed and you get Minutemen and other factions holding posts across the wasteland near settlements that don’t seem to have great AI control (a bit like the random turrets when destroyed they respawn where the landed not where they are supposed to be) for instance during FP prostitution 5 minutemen were called to the brothel. Something happened and a fight broke out with a fly or something. From then on the 5 minutemen patrolled around the brothel calling it a minuteman post and never left. Leaving one solitary minuteman to hold the original post.

 

Other times I have had minutemen customers visiting the brothel again a fight broke out, and a minuteman or settler must have been hit by accident. Because they are different factions the settlers and minutemen started a war and I had to load a previous save and remove the threat before the minutemen and settlers reacted to it.

 

Finally the main thing that destroys any brothels ambience is a Trader that brings his Brahmin.

Link to comment

Just some things maybe to think about:

 

One thing I have notices is that NPC’s can get bugged especially after the main quest has completed and you get Minutemen and other factions holding posts across the wasteland near settlements that don’t seem to have great AI control (a bit like the random turrets when destroyed they respawn where the landed not where they are supposed to be) for instance during FP prostitution 5 minutemen were called to the brothel. Something happened and a fight broke out with a fly or something. From then on the 5 minutemen patrolled around the brothel calling it a minuteman post and never left. Leaving one solitary minuteman to hold the original post.

 

Other times I have had minutemen customers visiting the brothel again a fight broke out, and a minuteman or settler must have been hit by accident. Because they are different factions the settlers and minutemen started a war and I had to load a previous save and remove the threat before the minutemen and settlers reacted to it.

 

Finally the main thing that destroys any brothels ambience is a Trader that brings his Brahmin.

 

 

There is a bathtub specifically for brahmin in your workshop. It's what they eat out of. Place this bathtub far away from heavy traffic areas & the Brahmin will be drawn to it & not your buildings.

 

:D :D :D :D :D :D

Link to comment

 

Just some things maybe to think about:

 

One thing I have notices is that NPC’s can get bugged especially after the main quest has completed and you get Minutemen and other factions holding posts across the wasteland near settlements that don’t seem to have great AI control (a bit like the random turrets when destroyed they respawn where the landed not where they are supposed to be) for instance during FP prostitution 5 minutemen were called to the brothel. Something happened and a fight broke out with a fly or something. From then on the 5 minutemen patrolled around the brothel calling it a minuteman post and never left. Leaving one solitary minuteman to hold the original post.

 

Other times I have had minutemen customers visiting the brothel again a fight broke out, and a minuteman or settler must have been hit by accident. Because they are different factions the settlers and minutemen started a war and I had to load a previous save and remove the threat before the minutemen and settlers reacted to it.

 

Finally the main thing that destroys any brothels ambience is a Trader that brings his Brahmin.

 

 

There is a bathtub specifically for brahmin in your workshop. It's what they eat out of. Place this bathtub far away from heavy traffic areas & the Brahmin will be drawn to it & not your buildings.

 

:D :D :D :D :D :D

 

They have a follow Ai and won’t use the bathtub further than a few feet from the Trader.

Only settlement Brahmin will follow and use a bathtub anywhere in the settlement.

Link to comment

 

 

They have a follow Ai and won’t use the bathtub further than a few feet from the Trader.

Only settlement Brahmin will follow and use a bathtub anywhere in the settlement.

 

Right, but they won't be in your building any more, which is what you said you wanted, right?

 

:lol: :lol: :lol: :lol:

 

It would be a very small brothel if that were the case.

Link to comment

RE: Attracting customers

 

In the FO3 mod Quo Vagis and the FNV mod Coito Ergo Sum, you ran a brothel for which you advertised with posters. The more posters you have up the more customers you have, and the customer pool only draws from locations where posters are placed. Easy way to control who shows up where. And if you don't feel like micromanaging your clientel (for players who just want to build and go) you hire a hype man (assignable settlement job) who just travels around spamming posters everywhere.

Link to comment

GOOD! I was talking with vinfamy about this today.

I'm trying to settle a brothel, but his mod is still beta... now your contribution looks promising!

Congrats!

Link to comment
  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use