Page 1 of 1

Creating Custom (Weed) Containers Using NWN Toolset

Posted: Sun Mar 12, 2006 10:00 am
by Buddha
Ok, all you smart people. I have this idea itching at the back of my brain, but am not entirely sure where to start. I'm curious what it would take to make a custom container using any current pallette item, and restricting it to holding only one type of item. In order to explain, let me give a theoretical (and whimsical) example. Picture Rob Schneider from SNL saying, "And you can put your weeeeed in there!":

Task: Make a weed container
Pallette Item: Empty Powder Keg (chosen since it is NOT a current container)
Item Type Restriction: Holds only mellowsmoke weed

Is this achieveable? Some questions:

1) Can you make a keg (or any other non-container) function as a container?
2) Can you restrict it to hold only a specific item?
3) How do you restrict it to hold only a class of items (like the gem pouch, which only holds gems)?

Any good web tutorials on doing this? I've messed with it a bit in the toolset and have had no luck, and I've searched here and also NWN vault. I just haven't stumbled across what I need.

Posted: Sun Mar 12, 2006 10:35 am
by Fifty
This probably belongs here unless for some reason you do not have access.

Posted: Sun Mar 12, 2006 10:41 am
by Krator
Not possible without using funky unique properties and such.

Posted: Sun Mar 12, 2006 11:10 am
by Buddha
*ignores Fifty*
Krator wrote:Not possible without using funky unique properties and such.
So how did someone make the gem bag? It's not in the standard game, as it shows up under "Custom Items" in the toolset. I guess I need to extract it and have a look at it.

Posted: Sun Mar 12, 2006 11:12 am
by Fifty
Er, I was just trying to be helpful. Sod you then.

Posted: Sun Mar 12, 2006 11:13 am
by Buddha
Fifty wrote:Er, I was just trying to be helpful. Sod you then.
:lol: Don't be sad. If this actually turns out to be even the least bit helpful (in other words, if I'm not just pissing up a rope), then perhaps I'll put my findings in the Library.

Posted: Sun Mar 12, 2006 11:38 am
by mortzestus
Buddha wrote:*ignores Fifty*
Krator wrote:Not possible without using funky unique properties and such.
So how did someone make the gem bag? It's not in the standard game, as it shows up under "Custom Items" in the toolset. I guess I need to extract it and have a look at it.
The gem bags came with CEP and you can put whatever you want inside, from diamonds to greatswords.

Posted: Sun Mar 12, 2006 11:42 am
by Buddha
mortzestus wrote:The gem bags came with CEP and you can put whatever you want inside, from diamonds to greatswords.
Well, I'll be damned. I just logged in and tried it, and sure enough, it holds anything. Odd, I thought it was restricted to only gems. Perhaps I was thinking of the time that I tried to drop a gem bag into a regular bag...

Posted: Sun Mar 12, 2006 12:11 pm
by Fifty
Gems can go in regular bags.

Posted: Sun Mar 12, 2006 12:27 pm
by Buddha
Fifty wrote:Gems can go in regular bags.
Yep, but what I was refering to above was the time that I tried to drop a gem bag into a regular bag. I thought it gave some kind of message about "You can't put this type of item into the bag," but I just logged on and tried it.

No message, it just didn't let me do it. I'm sure it's something that is hardcoded into the game. Now if I could just figure out how to replicate that hardcode with scripting, I might have an idea. Krator, what kind of "funky unique properties" are we talking about, exactly?

Posted: Sun Mar 12, 2006 12:31 pm
by Krator
You would have to make an item with a unique property, which you can target on another item or something.

Not worth the effort.

Posted: Sun Mar 12, 2006 12:55 pm
by Fifty
Buddha wrote:
Fifty wrote:Gems can go in regular bags.
Yep, but what I was refering to above was the time that I tried to drop a gem bag into a regular bag. I thought it gave some kind of message about "You can't put this type of item into the bag," but I just logged on and tried it.

No message, it just didn't let me do it. I'm sure it's something that is hardcoded into the game. Now if I could just figure out how to replicate that hardcode with scripting, I might have an idea. Krator, what kind of "funky unique properties" are we talking about, exactly?
I misread your post. I thought you wrote that gems can't go in regular bags, which would be rather daft :)

Posted: Sun Mar 12, 2006 3:04 pm
by Buddha
Krator wrote:You would have to make an item with a unique property, which you can target on another item or something.

Not worth the effort.
Drat. Here's what I was thinking. Perhaps there's another way.

I remember reading something posted by Zach about having so many keys, and needing a keyring. I recently picked up another key myself (actually 8), and began to think of it again. Here is the issue:

Keys for inn rooms, guilds, player housing, etc. are marked plot so that they always stay with you, even on DP. But when you begin to accumulate them, they can take up some space at 2 squares each -- and you can't put them in bags, because then they won't go with you to DP, and become subject to looting.

So, I thought, "Wouldn't it be nice if I could take the palette item for iron rings, and make it into a container?" Then, make that container plot, so that it (and by default) all of your keys go with you to DP? Of course, to avoid exploiting the keyring, you'd have to make sure that someone couldn't store their +5 Sword of Monkey Slaying and ten Potions of Uberness in it. So I was looking for a way to limit it to hold just keys.

Think that's achievable? I'd be willing to do the legwork, and of course, it would have to go CoPaP approval route. Another part of the "key plan" would be to adjust the keys so that they are only one inventory square, but that would be separate from this. Ideas?

Posted: Sun Mar 12, 2006 3:26 pm
by Krator
Really, not worth the effort. If you start on it, don't say I didn't warn you ;)

Posted: Sun Mar 12, 2006 5:29 pm
by apandapion
You can't put a bag inside of a bag to my knowledge - that's the gem pouch not going into the sack thing.

Posted: Sun Mar 12, 2006 6:32 pm
by Alexandru Stanicu
Ok here we go.

You can make a container look like almost anything. Simply edit a chest in the toolset and change the appearance to what you want it to look like.

You cna make contianters only hold certain things, but it requires a script in the on_unaquire event that checks the tag of the container vs the item and rejects it if its not the right one. The problem is that this would create lag.
(if it fired correctly as some of the events dont work correctly all the time or at all)

so it would go something like this:

Code: Select all

You move a item in to a bag (it would fire for all bags)
on_unaquire fires and gets the tag from the container and the item type from the item lost
then it checks the tag agaisnt the list (in the script or DB) 
       if the item tpye is not allowed for that container it takes it back out of the container and places it back in your inventory.
       if the item type is allowed for that container the script does nothing

Posted: Sun Mar 12, 2006 7:45 pm
by terror2001
Similarly in concept are the crop production plants and other varieties. Like the cotton plant for instance, you can take cotton out, but you can't put cotton back in it. Same concept of you just need to modify what it will and won't accept.

Posted: Sun Mar 12, 2006 8:39 pm
by spool32
A better idea would be to make an item that can absorb the properties of a key and destroy it, with a menu allowing you to remove the key (spawning one and removing the menu option) at some later date. This would allow you to carry all your keys on one ring, have that ring open everything you have access to, and allow you to remove and hand out keys as needed.

-spool32