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.
Posted by Quilistan at 2011-08-28 09:13:58 Voted 9.00 on 08/28/11
Love this system, I have used it for years. _________________________ Quilistan
PW: Balarand, Frontiers of the Horde Lands Link
Posted by shockwolf at 2010-06-21 21:04:36 Voted 8.50 on 06/21/10
OOPS!! Thanks for that Defiant Ivory. Now I feel a right idiot! Lol
Too late for me now though, as I've already moved on with other systems. I will higher my score though.
I will say that I think that by default that setting should be set to FALSE in the first place. It's not exactly an ideal factory setting and it came with no idiot proof warning.
Zhjaeve � Know that I must begin every sentence with the word �Know�. Know that everything I say must be known. Know that it is important that you know this.
Posted by DefiantIvory at 2010-06-20 11:25:54 Voted 9.00 on 06/20/10
Erik and Shock need to check sfpb_config there are options in that file to prevent sharing between characters...
// Do you want players to be able to share items and gold
// between their own characters....
// If this is set TRUE, then players will be able to retrieve
// their items and gold with any of their own characters, if set
// FALSE, then they will only be able to retrieve items or gold
// that were saved on particular characters.
const int CHARACTER_SHARING = FALSE;
Posted by shockwolf at 2010-05-22 21:38:50 Voted 8.50 on 06/21/10
4 = Some Merit, Requires Improvements
In addition to Erik's comments, characters across multiple accounts can also share the same gold and equipment if they are playing on the same computer, CD-Key and IP address.
It's a great effort Scarface, but unfortunately it is a highly exploitable system and on that note I cannot recommend this system to anyone.
Very sorry, but it needs those issues to be addressed in order for me to consider using it again. I will be removing it from my PW in the next update.
Zhjaeve � Know that I must begin every sentence with the word �Know�. Know that everything I say must be known. Know that it is important that you know this.
Posted by opiekun at 2009-10-14 15:30:45 Voted 10.00 on 10/14/09
Works perfectly. For not using NWNX, 10 points!
Thanks for sharing!
Posted by erikbreau at 2009-08-31 08:03:43 Voted 10.00 on 07/22/09
Just a quick question, to Scarface and anyone else... I implemented this in my PW/MPM, and noticed that players share the persistent coffer between their characters. That is, I log in and have 2 characters, as do most of my players, and all of MY characters (and their as well) can share the content of the persistent chest between each other... is that normal?
Erik.
Posted by erikbreau at 2009-07-22 20:40:08 Voted 10.00 on 07/22/09
Genial! Just implemented the chest and even after a server reset, the materials were available to the PC. Amazing work, will be added to my Europa campaign in the guild houses "and the skalds will sing their praises in your name!"
Erik.
Posted by smileordietrying at 2008-08-02 14:00:17 Voted 10.00 on 08/02/08
Nevermind lol.. i did some tweaking and got the chests to work how i wanted. Thanks alot for a great bit of scripting. See you on the flipside
Posted by smileordietrying at 2008-08-02 12:21:07 Voted 10.00 on 08/02/08
Great scripts, but quick question. Because I know you love questions.. :P
I get how these scripts are working, but what I was wondering is, if it is possible to have each chest being unique.. cause if i put some items in one chest, it appears in all of them. By possible, I mean, without making duplicate scripts and objects with a '2' on the end of it. lol
If you made the storage chests unique by giving them unique tags or even some kind of local variable identifier, that would be sweet. Any ideas, info, help you can offer? Other than that small detail, this is awesome. Thanks :)
@ Maj_Angel
Have you tried this as a DM? When you are invisible in DM mode the Banker indeed does not hear you (the invisible listener) as it does not perceive you. It does work using a PC or NPC, or visible DM.
I have to confirm though as well, that the banking system does not work anymore with the patches. Items get spread from one character to an other. Very sad, as I now have to set the bank out of order, which should have been a nice addition to my PW!
I hope you are willing to fix this Scarface, someday.
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.
@ 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ãçë�
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�
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?
@ 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 :)
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 2007-08-15 17:33:20 Voted 10.00 on 08/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 2007-08-13 15:21:42 Voted 10.00 on 08/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
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ãçë�
Is there an easy way to use this for private-common chests?
More then one player storing things to be persistent?
We have made factions, and we want persistent chests, but all who has the key should be able to see everything in the chest.
Sorry if this is mentioned in the readme. Didn't download anything yet.
And/or if you insert what energia asked for, you would have my "10".
Posted by energia at 2007-03-21 06:17:56 Voted 9.00 on 03/21/07
Fantastic! Could you insert a optional payment for service? For example X% of amount of money transfered and X gold for item service (when player put or retrieve object)?
Posted by commiebob at 2007-02-13 05:59:26 Voted 10.00 on 02/13/07
Installed this in my PW last night. Super easy, works great. Nicely done. _________________________ Village of Silence NWN2 PW Link
Posted by mwatson8 at 2007-02-12 13:27:24 Voted 10.00
* Update: 12-Feb-2007 *
Added the persistent chest placeable to the erf file, which I originally missed out by mistake. _________________________ §çà®Fãçë�
Posted by mwatson8 at 2007-02-12 08:54:40 Voted 10.00
the banker was there and the other npc storage guy was there but not the chests
Posted by mwatson8 at 2007-02-12 08:53:50 Voted 10.00
scarface...i have checked the mod version and its there ....i then went back to my mod that i imported the erf to and look at the placeables and the chests are not there.
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