View previous topic :: View next topic |
Author |
Message |
Makzimia De Graf
Joined: 31 Dec 2004 Posts: 55 Location: San Diego CA.
|
Posted: Thu Feb 03, 2005 3:32 Post subject: |
|
|
OK, give me a few days now, I have just spent 3-4 days on a problem that still existed after we managed to fix the death bug... and I am more than a little burnt out. _________________ Makzimia De Graf
DM/Creator Island of Fredian
fredian.game-host.org:5123
Forums at http://castille.us/fredian/Forums |
|
Back to top |
|
|
DarkstarsDad
Joined: 17 Jan 2005 Posts: 59 Location: Overland Park, Kansas USA
|
Posted: Mon Feb 07, 2005 7:06 Post subject: Why chests? |
|
|
Xildjian I was trying to make it for chests mostly for simplicity. the flexability of chests. if i can get a simpler script for saving then you could just drop the chest and wala storage anyware. with out the need to run more scripts, or have another npc standing about, using resources. the use of sco/rco made the item side of chest storage very easy. trying to apply the same to gold to see if i could get a smoother item based bank ing system. with out conversations or npc or layered scripting. so far not doing well. the game treats gold different than other items. got it down to 4 scripts to store the gold and 1 for items but trying to find a workaround for the create gold limit that seems to exist in the game. I can store any amount of gold but can only create the gold in 50000 gp units in the chest. which means that if you put enough items and gold you can go over the limit that can be retrieved from the db and created in the chest. and lose items or gp. _________________ Just because you think you can't. Is the best reason to try it anyway. |
|
Back to top |
|
|
Blayde Windwalker
Joined: 02 Jan 2005 Posts: 18
|
Posted: Mon Feb 07, 2005 17:24 Post subject: Chests/NPCs |
|
|
You are right about the way gold is stored/retreived in chests. That is probably why it would be better to do it with a banker NPC. Instead of all those piles of gold (storing/picking up/taking up space) a single token could be exchanged with the value of the amount of gold stored.
Just my meager thoughts.... |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Mon Feb 07, 2005 18:41 Post subject: |
|
|
There is a 50,000 stack size limit in NWN's object storage code that causes these issues. There are ways around it.
Take a look at OldManWhistler's persistent chests, it works well by breaking large gold amounts apart for storage. It might help with your problems....
http://nwvault.ign.com/Files/scripts/data/1064218751211.shtml |
|
Back to top |
|
|
DarkstarsDad
Joined: 17 Jan 2005 Posts: 59 Location: Overland Park, Kansas USA
|
Posted: Mon Feb 07, 2005 20:27 Post subject: |
|
|
Acrodania That is what I am currently working on. got it working well. Iwas hopeing that I might be able to get around the limit with the sco/rco functions. But alas as I stated earlier I can store it in one chunk but canot recreate it in one because of the limit. Blayde Windwalker Yes you are correct on that for the gold. I was just hopeing I could find a workaround that would let me store retrieve gold like we can stackables with the sco/rco function. _________________ Just because you think you can't. Is the best reason to try it anyway. |
|
Back to top |
|
|
NoMercy
Joined: 03 Jan 2005 Posts: 123 Location: UK
|
Posted: Mon Feb 07, 2005 20:50 Post subject: |
|
|
Ok, this is a stupid thing for me to be doing, but here goes :)
The PHB (D&D one) gives a to-scale image of a greyhawk gold coin, I'll imagine it's the same size for most D&D worlds. It's 3cm accross the depth of the coin seems to be missing but we can infer this from the weight of gold, and the fact that 50 coins euqals 1 pound in weight.
A cubic centimetre of gold will weighs 19.30 grams. A gold coin weights 9.07 grams, thus a gold coin has 0.47 cubic centimetres of gold in it.
h = 0.47 / 7.06 from ( pi * sq(r) * h )....
The height of a coin is 0.7mm
Ok that's completely rubbish, but the 1st edition coins weighed 5 times more, and a 3.5mm thickness to a coin is prefectly reasonable, but we'll stick with the 0.7mm thick coins for now
That's kinda de-railed me, but it shouln't affect the volume too much as some things cancel eachother out, the volume occupied by 1 coin comes to 0.63 cubic cm... 50,000 coins comes to 31,500 cubic cm or just over one cubic foot and weighs approximately 1000 lbs.
Given the average chest in NWN ranges from 2 cubic feet for the small ones up to mabe 5 cubic feet, it would be perfectly fine to stack a few piles of gold in it.
I guess that comes down pretty much to sit on the fence, storing upto 5 piles of gold in a chest is realistic, as is storing it all in the bank via dialog options. |
|
Back to top |
|
|
DarkstarsDad
Joined: 17 Jan 2005 Posts: 59 Location: Overland Park, Kansas USA
|
Posted: Mon Feb 07, 2005 22:50 Post subject: good point. |
|
|
that is a great argument for limiting the storage of gold and items. try to figure out how you can fit 30 or so sets of full plate in the same box? . alot would depend on how true to real life you wanted to keep the rules. I am still trying to figure out how i can carry almost a billion gold on my character and still walk let alone fight? some things I will never get I gues. That is why most bank scripts have a limit to the number of items that can be put into it. What i was trying to do was to see if using the new feature of nwnx2 object storing I could make banking scripts simpler and easier. To that end, we have. As all objects including containers and stacked items can be stored acurately with a simple script. instead of needing multiple scripts and controls. As with most things on nwn HOW it is implemented is a different story. That is up to the builders. _________________ Just because you think you can't. Is the best reason to try it anyway. |
|
Back to top |
|
|
Makzimia De Graf
Joined: 31 Dec 2004 Posts: 55 Location: San Diego CA.
|
Posted: Fri Feb 25, 2005 16:05 Post subject: |
|
|
Sorry has taken me more than a few days to get to this, RL stuff, and turning my server private has gotten in the way, I intend to export the chest and add a blank table in with an archive and upload it to the vault today. Will post a link once I see it up. This still has issues sometimes with TMI's on certain stackables, at least ones we have with ATS, does not allow for bags contents, for obvious reasons it's only storing the resref of what is put in. But, it does have autofix on stuck lids etc.
Makz. _________________ Makzimia De Graf
DM/Creator Island of Fredian
fredian.game-host.org:5123
Forums at http://castille.us/fredian/Forums |
|
Back to top |
|
|
Makzimia De Graf
Joined: 31 Dec 2004 Posts: 55 Location: San Diego CA.
|
Posted: Fri Feb 25, 2005 18:10 Post subject: |
|
|
Further small hold up... I exported the chest, did what I *THOUGHT* I only need to run it up in a test module, but it won't allow me to put anything in , keeps handing them back, works fine in original mod, SO...I am awaiting my head dev to see what I am missing... has to be something very simple... as soon as I have a working test module for you all, THEN, I'll upload it, already have documentation mostly done, and archive directories.
Makz. _________________ Makzimia De Graf
DM/Creator Island of Fredian
fredian.game-host.org:5123
Forums at http://castille.us/fredian/Forums |
|
Back to top |
|
|
Blayde Windwalker
Joined: 02 Jan 2005 Posts: 18
|
Posted: Fri Feb 25, 2005 18:52 Post subject: Thanks for your efforts so far! |
|
|
Appreciate you putting the time in for the rest of us. |
|
Back to top |
|
|
Makzimia De Graf
Joined: 31 Dec 2004 Posts: 55 Location: San Diego CA.
|
Posted: Fri Mar 04, 2005 16:27 Post subject: |
|
|
No problem Blayde, I am just waiting on my head dev, he has been busy with house modeling. I told him the brick wall I ran into with trying it outside our PW MOD, and he *SHOULD* have something for us soon I hope.
Makz. _________________ Makzimia De Graf
DM/Creator Island of Fredian
fredian.game-host.org:5123
Forums at http://castille.us/fredian/Forums |
|
Back to top |
|
|
Makzimia De Graf
Joined: 31 Dec 2004 Posts: 55 Location: San Diego CA.
|
Posted: Tue Mar 08, 2005 17:44 Post subject: |
|
|
NOTE: new version of chests as promised have been upload to the vault. I will let you know it's link when in. As I presumed, the problem was VERY minor... been so long, I had forgotten to place a WP down in mod all working nice.
Makz. _________________ Makzimia De Graf
DM/Creator Island of Fredian
fredian.game-host.org:5123
Forums at http://castille.us/fredian/Forums |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Tue Mar 08, 2005 23:51 Post subject: |
|
|
If anyone is interested, I am working on an NWNX database based persistant storage system. This system converts all items to string represetnations, retaining custom appearances and item properties.
Thus far, it is many times faster than using the Bioware DB for storing customized items. I am able to store about 80 customized items in less than 0.08 seconds. Attempting to store over 80 will give me TMI. (The limit using Bioware DB is 30, which is frightening considering the hoops I jump through in recreating customized items).
Lanthar has made a couple of suggestions which I'm going to implement that should take care of the TMI issue. CPU usage is at 4-5% when storing 80 customized items.
We've been beating on it pretty hard on my server, and so far have not found any issues with exploits such as duplicated items. And we have a couple of first class exploit finders -- the trick is usually catching them at it
Custom appearances restore 100% reliably. However, for 4-5 item properties, they are not getting restored properly. Once I have those sweated out, I'll be posting this to the Vault.
I have not tested with coin, as we've a banker for that, but I believe it will also handle coin without any difficulty. I'll check it out this weekend and confirm.
As a bonus, I've corrected the bioware implementation of IPGetItemPropertyById, which was bugged in some cases, and missing many item properties.
It offers three storage types*:
Unique (Chest-tag + exact location)
Area-specific (Chest-tag + area-tag)
Global (Chest-tag only).
*The different types of storage concept was based on something I found on the Vault, though the implementation is far different and much simplified. (I can't remember who made right now, but I gave credit in the code) .
If you're able to help out in further testing of this, please let me know... I haven't looked at this in a while, but I can have it 'pre-release test ready' within a couple of days. |
|
Back to top |
|
|
Blayde Windwalker
Joined: 02 Jan 2005 Posts: 18
|
Posted: Wed Mar 09, 2005 21:42 Post subject: |
|
|
Keep up the food work. I need a solution for storing both items and coins. If you have a good banker script, I could use that too. As usually, you would get a token representing what you have deposited in the bank. With the chest method, if you want more than 5000 gold, you have to pick up all the piles...
Thanks. |
|
Back to top |
|
|
Makzimia De Graf
Joined: 31 Dec 2004 Posts: 55 Location: San Diego CA.
|
|
Back to top |
|
|
|