After much contemplation, I decided that what the NWN community needed--or at least wanted--was a realistic, ambient brothel that worked. Since my upcoming module, Quest for Kadith, required one anyway, I set to work on this prefab area. The area includes a number of courtesans with you can talk to and hire, as well as the ambient effect of other customers coming in and hiring them. Workers come on and off duty based on personal schedules. The action is clean though for a bit more adult edge, the area could easily enough be recompiled with one of the many nude haks out there. I leave the choice up to you, but personal prefer tasteful understatement. Currently the area is only sparsely decorated, since I'm focusing on the scripting. This area extensively makes use of Rhone's outstanding HourWayPoints system. Thanks, Rhone! Without you, this could never have existed.
Everyone: your VOTES are highly appriciated. A vote is like gold for an author. No kiddin'. ;)
Posted by Lil Clow at 2005-11-10 14:44:40 Voted 8.00 on 11/10/05
Found an irritating bug I think. I was going to test this lil thing and then, reality hit with the dinner bell. So, I left it on just outside on the street and walked to ate. When I came back, I remembered that maybe money was a good idea and GMd around to find such (yepp I suck with spawning cash).
When I came back, and entered... I was meet by a leming train of "Client" heading outwards... bashing my lagity to kingdom come. Seems they had been spawning all the time I was away, but didnt start to exit until I entered myself... yikes.
A -very- nice lil thing otherwise, but Id love a posted quick fix for that. =) _________________________ �In a cruel and evil world, being cynical can allow you to get some entertainment out of it�
Posted by -=Lord Of Entropy=- at 2005-08-19 07:45:54 Voted 10.00 on 08/19/05
...Interesting... never seen anything like it before i give it a ten _________________________ Absolution at the sight of your demise, i know what i must do, CHOKE - Rain, Trivium
Why have you forsaken me, in your eyes forsaken me,in your thoughts forsaken me,in your heart Forsaken Forsaken Me - Chop suey, System of a down
Rise Throw away the charade of your life, let the flame of my heart burn away your complacence tonight, i command you to rise - Disturbed, Rise
Sounds pretty interesting. It's a bit out of my programming scope right now, though; I'll have to do some looking on arrays and how to use them. I like the idea, though.
Posted by Jerren ( 68.221.xxx.xxx ) at 2005-03-09 01:46:00
One suggestion if I may for a future version would be to allow an easy to manage array of names for the various clients that come and go. Not sure how practical this would be but it would certainly add more atmosphere to the place. Of course for ease of distribution the names would default to client or something similiar, IE: If no random names are set it uses client.
Thanks for the feedback. I think I'll be posting another update of this soon; I found another bug of my own involving excessive CreateObject calls from the onHeartbeat event. Thanks for pointing out the bug--somehow, in all the testing I did on this, that never happened to me. It should be an easy fix.
I'm also glad you've found this somewhat useful in your own endeavors.
Jason
Posted by Jerren ( 65.81.xxx.xxx ) at 2005-02-27 23:15:00
Not sure if anyone is still following this prefab but I've found it to be a good starting point for a house of ill reputes in the modules I've been working on (off and on since NWN came out). I have noticed one glaring bug though that jumped out at me when I loaded up the test module. If the PC is talking to one of the girls and a 'client' walks up she'll go off with the 'client' without a word said (and not even break the conversation).
Posted by Troi ( 137.151.xxx.xxx ) at 2004-12-02 16:30:00
Hmm. I don't mess with the onPerceived scripting; it's a bit scary for me. I will mess around with this when I get some time, though. What I'd recommend is this:
Place a post where you want her, and adjust the conversations however you want it to be. So long as you're okay with teleporting, it should be fine. If you're using the HourWayPoints system, which is what the Rose is set up on, it should be possible to make it a night-only waypoint, too. Anyway, however you set it up, just move her waypoints from inside to outside, or make new ones for a new NPC. You'll need to copy the User Defined Event scripts and mess with those a bit. Also, checking out Rhone's original scripting system instructions would probably be helpful.
The way I'd handle the "good time" thing would avoid the whole OnPerceive issue. I'd just plop the waypoint in the middle of a trigger. Using the waypoint system, I'd set the waypoint there to set her n_onDuty flag, just like it does normally for a prostitute when she reaches her waypoint in the bar. Then have the trigger look for her tag (or any of several tags) plus the gender of the Entering Object in its onEnter script, and if she's on duty, then have her say whatever it is you want with an ActionSpeakString() command. It's a bit inflexible, but it does let you control exactly how close the PC will be when the line gets put up there--a lot of creatures seem to perceive you pretty far away, and I don't know if it would look right for her to be shouting it to him at a distance of two city blocks or so--then again, it might be fine. I dunno. Then, once she's released from the "afterglow" conversation with the PC, she should automatically return to her post, however far away it is, so long as there's only one area transition between the brothel and her post. I don't know how it would work with two.
Maybe that'll help. Like I said, when I get some time I'll give it a try, too, unless you get it fixed up in the meantime. Right now my scripting time's been spent fixing up my Artillery Strike system. Hopefully I'll get that done soon, too, though.
Jason
Posted by Allyndn ( 4.226.xxx.xxx ) at 2004-11-30 16:13:00
I've placed the Twined Rose in a kind of back-alley area that no one is going to find unless they know what they're looking for. I wanted to have a few girls posted (probably at night) at some key areas around town. If they see a male character, they'll say something like, "Looking for a good time?" They can teleport the PC back to the house of ill repute normally, but then after a while, the prostitute should return to her "post." I'm guessing it's just a matter of placing a waypoint in the right place and writing an "on perceived" script. I tried to write my own and managed just to mess it up.
If you can give me a more specific idea of what behavior you want your town prostitutes to have, maybe I can help you to get it working. Do you want them to walk back with them, or to just teleport them back? Right now, it's hardcoded to teleport them into the single room in the back. We could pretty easily create a new one that brings the PC back to the lobby, if that's what you wanted.
Just let me know.
Jason
Posted by Allyndn ( 4.226.xxx.xxx ) at 2004-11-18 16:29:00
First off, let me say this is really well done. I needed something for a sleazy seaside town I've been developing as a base of operations for a series of modules and this is 85% exactly what I needed. I like how you get a sense of stuff "going on all the time." I like how you kept it PG13... though I tried (unsuccessfully) to add a few effective sound effects. The only real problem I had was that a bunch of the scripts needed to overwrite default scripts. This messed up a bunch of my regular NPCs who exist to do no more than walk way points. I saved all the default scripts under a different name.
I tried to make a few prostitutes who could be found in other parts of the city, who would take the player back to the brothell with her. But whenever I did that, the PC wound up by himself in the girl's room. Not sure what's up with that. I've also been modifying the dialogues to fit with some of the voices available in the toolset.
Posted by Troi ( 137.151.xxx.xxx ) at 2004-10-12 13:11:00
As another point I just noticed, I failed to mention the format the file is in. I didn't keep it as entirely erf, because there are factions that didn't export properly (i.e., at all), and so I made one a .mod file and then included the .erf file as well. Just in case the file size is deterring anyone--it's not all once monster erf.
Posted by Troi ( 137.151.xxx.xxx ) at 2004-10-12 13:05:00
Hey Rhone! Glad you stopped by. Thanks for the input. Actually, my "flood of guests" effect hasn't happened again since that one time I noticed it, so it was probably just some kind of a fluke. I'm still going to look into fixing it, though.
Thanks for some great scheduling code.
Jason
Posted by Rhone ( 66.234.xxx.xxx ) at 2004-10-07 13:27:00
Hey Troi,
It's nice to see people making use of my waypoint code. :)
To address the question of heartbeat scripts, my code does not use a module heartbeat script, but it does use an alteration of the standard NPC heartbeat script.
It should be noted that, by default, ALL NPCs have a heartbeat script. The standard heartbeat script includes a little code to make sure the NPC is walking its waypoints. My heartbeat does a little bit more (like checking the time of day), but it's not a LOT more.
I haven't yet seen any reports of my code actually slowing down a module. Admittedly, I haven't yet heard of my code being used on a large PW with lots of NPCs, which is the one situation where I'd worry that it might slow things down a bit. But in that case, it's not the heartbeat I'd be worried about--it's the fact that a builder could quite easily have dozens (hundreds!) of NPCs all performing various actions instead of standing still all day.
Posted by Rhone ( 66.234.xxx.xxx ) at 2004-10-07 13:26:00
Hey Troi,
It's nice to see people making use of my waypoint code. :)
To address the question of heartbeat scripts, my code does not use a module heartbeat script, but it does use an alteration of the standard NPC heartbeat script.
It should be noted that, by default, ALL NPCs have a heartbeat script. The standard heartbeat script includes a little code to make sure the NPC is walking its waypoints. My heartbeat does a little bit more (like checking the time of day), but it's not a LOT more.
I haven't yet seen any reports of my code actually slowing down a module. Admittedly, I haven't yet heard of my code being used on a large PW with lots of NPCs, which is the one situation where I'd worry that it might slow things down a bit. But in that case, it's not the heartbeat I'd be worried about--it's the fact that a builder could quite easily have dozens (hundreds!) of NPCs all performing various actions instead of standing still all day.
Posted by Troi ( 137.151.xxx.xxx ) at 2004-10-05 13:41:00
I just found a slight bug in the program code I uploaded. Apparently, the area heartbeat script is spawning off clients while you're not there, but they don't seem to LEAVE. Now, it is funny as hell to walk into a brothel and see a flood of escaping clients surge past you to the door, followed by a single, calmly walking courtesan who apparently did her day's work all at once, but I will have to fix this. I'm guessing I'll either stick in an if statement to prevent the spawning effect at all when you're not in the room, which is imperfect but less resource-intensive, or I'll try to turn the thing into a non-heartbeat check that calls itself with a delay every x seconds, and won't spawn any clients if there are more than 4 or 5 already out there.
I'll get to work on that soon. In the meantime, it still seems to work, it just looks funny when you come into the room somtimes.
Jason
Posted by Black Feather ( 216.251.xxx.xxx ) at 2004-10-01 09:17:00
I downloaded it. But I was curious. It doesn't use module wide heartbeats does it? I'm just trying to avoid those as much as possible.
You must be Logged In to post comments in this section.