Sample Inn Implementation

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
User avatar
Runestaff
Dire Badger
Posts: 151
Joined: Sun Sep 05, 2004 11:47 pm

Sample Inn Implementation

Post by Runestaff »

AcadiusLost wrote:If you'd like to describe in brief what makes for a minimal, satisfactory inn to you, I'd find it helpful when we go to implement something. It could be there was a compromise solution that worked well in the earlier days of ALFA1 that had fallen into disuse by the time I got into building/scripting.
[edit: If you do write something up, please post it to Collective Discussion or the NWN2 ACR thread]
Since the Collective Discussion forum is restricted (and hence not very collective), you'll have to settle for reading it here.

Here is a possible system for handling inns in ALFA2. If memory serves, this was how they worked on the old DF and WD servers, more or less. The intent of this thread is to meet the need described by AL above, not to start a debate as to how inn A on WD differed in implementation from inn B.

1. Your inn has n rooms available for resting, all are locked, and all are marked restable.

2. An NPC innkeeper has n room keys available to purchase, one per room.

3. To rent a room, a PC enters dialogue with the innkeeper, purchasing a key from his/her shop inventory. The PC now has access to the room corresponding to said key. This room can also be entered by any cohorts the PC desires (e.g., for IC meetings, conspiracies, etc.).

4. When the key holding PC leaves the inn (via AT) a script removes the inn key from his/her inventory and replaces it in the shopkeeper's. The key is also replaced if the PC disposes of the key (such as by dumping it into a waste barrel).

5. Keys are also replaced on server reset, or after a set amount of time RL has elapsed. They are not removed from PC inventories until one of the conditions in step 4 is met (to prevent a PC from getting trapped in a room, such as from not logging in for a while).

In practice, my recollection is that the chances of "using up" all the keys is very rare with this system, as is the incidence of a PC logging into a room occupied by another PC. Hence it has seemed to work fairly well.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

This sounds pretty similar to what I did for the inns I made on NC and AC, don't think I ever stayed in an Inn in WD or DF in my ALFA time.

The main problem with this as a system, is that the single-instance keys in the merchant inventory are restocked every time there is a module reset- so getting "double-booked", so to speak, is pretty common. Module resets tend to happen at least several times a week, so logging off in "your" inn room may lead to unexpected circumstances in logging back in (IE, others are already in "your" room, having rented it hours (days?) ago.

It does make for a passably IC handling of the matter though, otherwise. You still have the problem of the key being OOC removed on exiting the Inn- so stepping out to meet someone means re-renting the room (not too bad once you get used to it, but very frustrating if you weren't expecting it and spent your last gold on the room).

The other downside is keys left in inventory when a module update resets your PC's location to the Start Area- though those can be cleaned up with a script that wipes the keys when entering via the exterior doors.
Rick7475
Haste Bear
Posts: 2097
Joined: Tue Jan 06, 2004 1:59 am
Location: Ottawa
Contact:

Post by Rick7475 »

Module restocking did not pose that big of a problem on DF and WD. Most people got a room for the fun of it and sometimes conducted clandestine businesses while locked inside a secure location. Others used the room for RP purposes and never really stored any valuables, so after a mod reload, duplicate keys were never an issue, and since they were 1 gp, not a cheat either. Most people were honest and returned the keys since they weren't any value.

The DF and WD systems worked fine for 3 years or more without any real issues to speak of.

I would recommend this system as the best possible one to use. Very easy to script and all you have to do is create the keys that match the doors.

Another question, I haven't seen the latest mod yet, but didn't Indio already implement this on one of the Inns on TSM?

angel_caller is building an Inn for Silverymoon, so I will ask him what he is using, though I am quite certain it is the DF Inn system.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

I'd agree that this is the simplest implementation to pursue for now. The inn Indio has set up in Rivermoot is more complicated, using a forced dialog to handle inn key assignments, levers for door locking, etc.

A more complex and nuanced system can always be added later as time becomes available for the development.
Thangorn
Haste Bear
Posts: 2081
Joined: Fri Oct 01, 2004 1:00 pm
Location: Queenstown, New Zealand

Post by Thangorn »

4. When the key holding PC leaves the inn (via AT) a script removes the inn key from his/her inventory and replaces it in the shopkeeper's. The key is also replaced if the PC disposes of the key (such as by dumping it into a waste barrel).
The only problem with my Inn template (which uses this system exactly) which I completed some months ago is that I couldn't get the keys to go back to the innkeeper merchant inventory upon leaving the inn.. AFAIK it was a developer coding issue and I'm not sure whether they fixed they've that particular coding issue.

everything else works (including beds you can sleep on) and all it needs is the new sitting anims added.
On indefinite real life hiatus

[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

It's flattering that you think my system is complicated AL.

I reckon it's straight forward....it just involves a conversation, which is already written, and modifying tags on doors and levers so they can be locked.
Image
User avatar
bartleby
Brown Bear
Posts: 276
Joined: Fri Apr 16, 2004 10:01 pm
Location: New York

Post by bartleby »

What about adding a Deposit to renting a room key that is refunded when the key is returned to the inn keep to offset the cost of replaceing the lock?

Seems like a decent IC solution if you dont return the key you lose the deposit and the lock on the door is eventualy replaced.

If the char is on the inside you could always add to the sleeping trigger a script that allows doors to always be openable from the inside out. Ie if youre standing here and try to open the door regardless of if you have a key or not the door is unlocked.

Not sure of particulars involving doors though in all honesty.
Locked