This is a High performance persistent banking system using the built-in game database, no NWNX needed :)
You can allow players to save their items persistently without hindering server performance.
This system will NOT work in single player mode, it was specifically designed for a server vault server.
You can save ANY items, equipment, weapons, stacked items, and gold with no problems at all very fast and efficiently using the built-in game database. Containers (i.e. bags will not be saved to avoid any possible exploits, fair warning is given to the player).
You can also save gold persistently via the banker NPC. The Banker NPC uses listening patterns, you basically speak the amount you want to deposit/withdraw by typing it into the char bar.
Implementation:
1. Import the .erf file into your module.
2. Place the "Persistent Chests" anywhere you want in your module, and as many as you want (Chests are located in the placeable blueprint palette).
3. Place the "Banker" NPC anywhere you want in your module, as many as you want (The Banker is located in the creature blueprint palette, do not confuse the Banker with the Storage NPC, the storage NPC is not to be placed anywhere, it must remain in your blueprint palette).
4. You can adjust some settings in the "sfpb_config" script.
5. Use the "build Module" option and select to compile all scripts (this is very important).
All done.
I have not fully tested it as I really don't have much time, so I will leave that up to you guys :)
Enjoy :D
Scarface
* Update: 12-Feb-2007 *
Added the persistent chest placeable to the erf file, which I originally missed out by mistake.
I like the idea of this system, and have put it into my mod, but have not been able to get it to work. When talking to the banker and telling him I want to deposit, he says "Speak the amount and then click continue"...Well I tried to bring up the chat window...I type in 100, and hit enter then click continue.....Then the banker says...I'm sorry I didn't hear you. What am I doing wrong? please help.
Posted by puychaudko at 2007-10-0904:59:19
I have found same problems as Lil Clow - I hope you can fix this as we would miss it :)
Posted by +scarface+ at 2007-09-2005:17:20
@ Undertowe, it's quite simple really, once a player has discovered how to cause a server to crash (and they will, I have seen MANY server crash methods over the years in NWN1, and i'm sure NWN2 will have it's fair share too), they would store all of their stuff in a chest, then they would open the chest take all of the items out (now remember the items have not been updated in the database yet using your method), then they could save their character or pass the items over to a friend's character and have him relog to save the items in his inventory, then use whatever method they use to crash the server thus keeping the items just removed from the chest and having a new set of the same items (duplicates) in the chest, this is only one of the posibilities, over the years i've seen MANY ways to exploit these chests and right now they should be unexploitable through much testing, if you tamper about with anything then I can't guarantee it will be bug free. @ Lil Clow, I have no idea, I don't even play NWN2 because I don't think it's that good if i'm honest, perhaps a patch had broken it? I did test when I ported it over from NWN2 and it seemed to work so that's all I can assume. I'll take a look when I have time. _________________________ §çà®Fãçë? NWN1 Submissions: [Persistent Banking] - [Character Appearance Modifier] [XP/GP Distribution] - [Item Crafting] - [Socketed Items] NWN2 Submissions: [Persistent Banking]
Posted by Lil at 2007-09-1603:57:33
Worked flawless at first. After some rebuilds to the server (new areas etc) the gold storing still works as should, but theres severe problems with the storage chests. Content swap owner its locked to. Chest opend (after timer) still contains last persons items. Inventory from two different chests gets smacked together to one. All items disapears. This and much more is confirmed errors that we, with a minimum of testing, have been able to experience ourselfs after its been reported. Ideas why this happen and what we can do about it? _________________________ ?In a cruel and evil world, being cynical can allow you to get some entertainment out of it?
Posted by Undertowe at 2007-09-1312:46:39
Thanks for the response, Scarface. The server crashes do not appear to be something we have control over. We theorize that they are caused by the 100% CPU bug, and modified/conflicting client-side files, both detailed in the Bioware forums. Because it's not possible to fix the crashes at this time, we're in the unfortunate position of having to re-work several of our scripted systems to minimize the damage incurred when a crash does occur. That's what prompted me to consider modifying your persistent chest code to prevent item loss in the event of a server crash. Could you give more detail on the exploit you mentioned? I could make a better judgment about modifying that part of the code if I understood the exploit it was designed to prevent. I've already modified your code to associate the contents of a particular chest to the chest itself, rather than to the PC accessing the chest. Perhaps the exploit is no longer an issue in our particular circumstances? Thanks, Undertowe
Posted by +scarface+ at 2007-09-0206:17:07
@ Undertowe, The reason it's destroyed is because it's quite easy to exploit if not done this way, I wanted to avoid all possible exploits, if a server crashes then that isn't really an issue with my banking system, and the best remedy for this would be to find out why your server keeps crashing, and fix it :) -Scarface _________________________ §çà®Fãçë? NWN1 Submissions: [Persistent Banking] - [Character Appearance Modifier] [XP/GP Distribution] - [Item Crafting] - [Socketed Items] NWN2 Submissions: [Persistent Banking]
Posted by Undertowe at 2007-08-2900:03:19
Thanks for these scripts, Scarface. They saved me from the hassle of writing my own. Is there any particular reason why you're deleting the storage NPC from the database immediately after opening the chest, as opposed to just overwriting the NPC when the chest is closed? We're experiencing server crashes at our PW, and this creates a situation where the contents of a chest are liable to disappear if the chest is open when the server crashes. It seems to me that this could be easily remedied by not deleting the NPC from the database when the chest is opened. But, I wanted to check with you first because I might not be seeing the reason why you decided to do it the way you did. Thanks.
Posted by Alleyslink at on08/15/07
Hmm, I debated with myself on the ethics of voting on this system considering I voted on the NWN submission. All I can say is different game, different vote. 10 - A Masterpiece, Genuinely Groundbreaking Scarface is a master and this is a masterpiece. Genuinely Groundbreaking, This is the first system I have seen that works using the default db system instead of NWNX 4 or some form of SQL. _________________________ Lands of Intrigue Castle Spulzeer || Dungeon Crawler DC1
Posted by Alleyslink at on08/15/07
Awesome! I am still in the area building phase of my mod, but I will give it a try tonight. Get a vote back to you soon. Can't tell you how happy I am to see you making your valuable contributions to NWN2. Thanks in advance. _________________________ Lands of Intrigue Castle Spulzeer || Dungeon Crawler DC1
Posted by +scarface+ at 2007-03-3010:00:21
Hmmm, not sure, I s'pose anything is possible, but with my current schedule, I honestly don't have much time to work on this system other than simple bug fixes, not at the moment anyways. _________________________ §çà®Fãçë? NWN1 Submissions: [Persistent Banking] - [Character Appearance Modifier] [XP/GP Distribution] - [Item Crafting] - [Socketed Items] NWN2 Submissions: [Persistent Banking]
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone