View previous topic :: View next topic |
Author |
Message |
TormentedBlood
Joined: 22 Jul 2008 Posts: 14
|
Posted: Sun Sep 28, 2008 1:23 Post subject: requesting a suggestion on a persistent bank system |
|
|
I would like a good persistent bank system that works well with mysql. I know that funky uses a pretty descent system on higherground and would like a suggestion. I need it to store money, allow for random investments and store items in a vault. thank you. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Wed Oct 01, 2008 18:25 Post subject: |
|
|
I suggest to anybody, that if you can script, script it yourself!
For the money, thats simplest thing ever.
For the items, there are more ways. I personally used MySQL and SetPersistentObject, there was minor lags, but if you restrict it on 50 items it should be fine.
Other way is to store resrefs, but disadvantage of this is, that if you put item with altered look, close it and open again, there was item with standart look...
And there was third way, but nothing to mention, bugged.
For the complete written bank system, I cannot serve, I tried some, but I was disappointment. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Zaith
Joined: 05 Jun 2007 Posts: 21
|
Posted: Thu Oct 02, 2008 1:45 Post subject: |
|
|
Another disadvantage with using the resref is that it can recharge items with charges.
Drop a wand with 1 charge left in the bank, pull it back out and it has 50 again because its technically a new item. |
|
Back to top |
|
|
Disco
Joined: 06 Dec 2006 Posts: 152
|
Posted: Thu Oct 02, 2008 8:53 Post subject: |
|
|
I made a banking system with a little twist. When you store an item with StorePersistenObject you get a receipt which includes the id of the item stored. You only get your stuff back with this receipt, and the receipt tells you what is stored and where. That way people can trade heavy items via those receipts. You could even add a mention of the price of the (id-ed) item. |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Fri Oct 03, 2008 3:46 Post subject: |
|
|
Zaith wrote: | Another disadvantage with using the resref is that it can recharge items with charges.
Drop a wand with 1 charge left in the bank, pull it back out and it has 50 again because its technically a new item. |
Actually, that's incorrect. You can store other information along with the resref, to set charges, crafting, whatever you like. Our system on HG does use resrefs, but we also store charges, and unique items id's - it's simply a matter of adding a few extra pieces of data, that would otherwise be included in the object blob. In fact, it makes review of that data easier, since it seperates it out. It just requires extra setup to begin with.
Funky |
|
Back to top |
|
|
TormentedBlood
Joined: 22 Jul 2008 Posts: 14
|
Posted: Fri Oct 03, 2008 18:40 Post subject: |
|
|
Thaks everyone. and Funky, i LOVE your legendary levels btw. awsome work on those scripts. |
|
Back to top |
|
|
Zaith
Joined: 05 Jun 2007 Posts: 21
|
Posted: Sat Oct 04, 2008 4:08 Post subject: |
|
|
FunkySwerve wrote: | Zaith wrote: | Another disadvantage with using the resref is that it can recharge items with charges.
Drop a wand with 1 charge left in the bank, pull it back out and it has 50 again because its technically a new item. |
Actually, that's incorrect. You can store other information along with the resref, to set charges, crafting, whatever you like. Our system on HG does use resrefs, but we also store charges, and unique items id's - it's simply a matter of adding a few extra pieces of data, that would otherwise be included in the object blob. In fact, it makes review of that data easier, since it seperates it out. It just requires extra setup to begin with.
Funky |
Actually, what I said is 100% correct. If all you store is the resref, then things come back out of the bank as a totally new item. What you are suggesting is a way to manipulate that new item as to appear as the item they put in the bank, but its still a new item. |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sat Oct 04, 2008 4:49 Post subject: |
|
|
Zaith wrote: | FunkySwerve wrote: | Zaith wrote: | Another disadvantage with using the resref is that it can recharge items with charges.
Drop a wand with 1 charge left in the bank, pull it back out and it has 50 again because its technically a new item. |
Actually, that's incorrect. You can store other information along with the resref, to set charges, crafting, whatever you like. Our system on HG does use resrefs, but we also store charges, and unique items id's - it's simply a matter of adding a few extra pieces of data, that would otherwise be included in the object blob. In fact, it makes review of that data easier, since it seperates it out. It just requires extra setup to begin with.
Funky |
Actually, what I said is 100% correct. If all you store is the resref, then things come back out of the bank as a totally new item. What you are suggesting is a way to manipulate that new item as to appear as the item they put in the bank, but its still a new item. |
No, that's not what you said. You said the disadvantage of USING the resref to store was item recharge. You said nothing about storing (or not storing) information besides resref. The omission of that rather critical point is how you were incorrect and why I corrected you. There's absolutely no problem with using the resref and preventing item recharge, despite what you indicated in your original post. Anyone reading your post would have been mislead if they didn't know better.
As for the item being a 'new item' after manipulation, it's a 'new item' whether or not you manipulate it past simple creation. Whether or not you have edited it, it's still an instance, not a palette item any longer - there's no inherent difference between those instances making one a 'not-new' item as far as the engine is concerned. That's why you can bring items in from out of game that don't exist in your module palette. And just fyi, the 'item' you pull out of the bank in an object-storage system isn't any more the 'same' item as one pulled from a resref system. It just had more data stored and retrieved than the other, but in such a way as to make that data much more difficult to access during storage (blob format).
Funky |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|