Inventory for 2.55

Hello there,

This inventory allows you to pick up items,
hold them in inventory menu or equipment menu.
Drop or use them anytime you want.
If you more the mouse over them, they show information.

Easy changable items in the Items text (txt kept internal).

Controll:
Arrows to move
Mouse to look
Leftklick to pick
I for inventory

Inventory controll:
Leftklick for use
Rightklick for drop

You are able to pick an item when its name shows up.

Important
you have to have the PRIME item always in a secret place and
untouchable. (check out BLACKBOX object)

Only works with collision on on objects,
otherwise they are not targetable.

Any change to the shape, materials, physiks of
the clones is erased after you picked them
up. Because when you drop them, they copy
from the PRIME item once again.

This allowes things like make fruits hover, so
they look like they are connected to a plant but
after drop they roll around.
And other fun stuff.

Items shape has nothing to do with the item.
It is the ID of it that matters.
A Egg(normal id is 1) with set id to 3, will
be picked up and change to an dagger(dagger id is 3).

Items must have ID > 0 and a reset = 0 property.
Items Id’s are unique, egg is 1 and dagger is 3, they cant be both 1.

Now have fun
pls email or pm me any bugs.

Link: http://download980.mediafire.com/prwjmtlkkwzg/shktzjhs3o0hor5/Inventory.7z

Greets Equal

looks good. I like :slight_smile:

Nice inventory. Thanks. The place you’ve got it uploaded is the spammyest, most ad-covered upload site I’ve ever seen. Why not just use pasteall.org?

http://www.pasteall.org/blend/

Much less annoying. Unless that’s your website?

Looks OK thanks for releasing this, it will be good learning resource for the rest of us.

3dmedival, thats absolutly ok and i em always happy to get known better sites.
Renox777 i like you like it.
flopoloco, Yes thi is very very basic, and i em working currently to improve this system in huge steps, im working on a equimpent page(helm sword shild etc) and a better item<->icon handling.

greets Equal

Thanks for the setup.
Q:are you sure that the texture path is set to relative?

The new system has nice updates, i em nearly rdy to post it, just adding some eye candy.

@saga:
Yes i just checked the path’s and they are all //textures…

greets Equal

UPDATE:

  • added equipment menu
  • added 7 new items
  • reworked area a bit
    (-corrected the path’s, The problem was hiden by win7, as it did some strange things with capital latters infront, so i just manual
    synced them)

Can you find all items? :smiley:

greets Equal

Equal I first want to say great work here! Me and my friend just a few days ago were talking about how to go about making a inventory system pretty much like the one you have here, we had were tossing around the idea of drag and drop to equip thing only real difference from the one you made.

Just wanted to post i found a rather interesting bug, if you have a weapon on the player already and you repeatedly click to equip a item from the inventory you can dupe the item.

picked up and dagger and spam clicked the hammer got a lot of hammers lol.
again great work keep it up!

I so gonna check this out.

Edit( this looks like a serious problem, i will need more time. I rly cant find the bug )

Greets Equal

Bug fixed!, was a nasty one.

greets Equal

[QUOTE=Equal;1774707]Bug fixed!, was a nasty one.

Nice glad to hear that you were able to fix that bug! the link is down will you be reposting the inventory 2.5 scripts with the fix?

I’m really interested in seeing it, or could you explain the basics of how you went through fixing it?

Ok link repaired i hope.
BigDoo.
The source of the problem remains unknown. As whenever you picked or used a item, somhow 2 copies of of the same iteam where created. Now using 1 caused to make the system work, but the other still there was a problem.
But is solved it like this: Whenever 1 of those icons is used, the slot was getting “empty” (normal behaviour), so just check if its empty and remove anything that is related to this slot.
In other words using 1 of those 2 results in deleting the unused one.
But i dont know why there are always 2.

Another by the way thing that i removed was this nasty no-klick thing, like having mousebutton pressed and THEN moving over icon caused them to trigger. Turned this off.

Greets Equal

I’ve been playing with your inventory a bit. As I understand it, in the inventory screen, right click is to drop, and left is to use the item? In other words, left clicking an item would pass the item to another logic widget - so for example, eating an egg or food item would add health (I know you have not set that up)?

It’s commented nicely as well. I’m going to try adding some items (my first python scripting). I’ll post results here…Thanks!

Yes, commenting is a very important discipline in the Informatic.
And Yes you have understood it right. Leftklick is use (ex: the Egg) and rightklick is drop.
The passing is allowed due to the 2 list that can handle different happenings in both layers, like mb doubing items, or creat a Plant in Scene.
I thought of building in a Statistic Menu but i dont think it would be any helpful as different games have different stats.

Greets Equal

(ps: would love to see your creations.)

Oh that’s odd it made 2, I like the fix!

I was going to say maybe a solution would be make a script that takes the held items valve temp (like Preheld = 2) and swap the item IDs with the one being L clicked and then replace the inventory one with the “Preheld” valve.

But personally I like the fix you made, having to unequip a item and put a new one. it adds a bit of realism to it, because you cant just swap pares of pants instantly in life.

Oh that’s odd it made 2, I like the fix!

I was going to say maybe a solution would be make a script that takes the held items valve temp (like Preheld = 2) and swap the item IDs with the one being L clicked and then replace the inventory one with the “Preheld” valve.

But personally I like the fix you made, having to unequip a item and put a new one. it adds a bit of realism to it, because you cant just swap pares of pants instantly in life.

Do you have any plans for adding a “number of” functionality - now, in order to have 5 eggs, you have to use 5 slots, instead of having a number in the inventory box that simply says “5” over the picture of the egg. This would be mostly an issue with arrows for example- if my character goes around collecting arrows, it would be odd to have 20 slots with just arrows. Nice inventory though!

BigDoo:Ah, that is another thing, and has nothing to do with the bug :). It would just requier some more code lines but wouldnt be as difficult to make.
And as much as i understand you argument, i think that it is a standart that items should swap positions instantly(so i could include this on next version).
Imagine a full inventory, now you have to drop somthing just to switch … lame… (i should rly implement this).

Edit: 3dMedieval: yes it should be writen in the “items” script. I think about adding ~stack~. But this is a bit more work so i need some time.
Even worse is that i got exams in the near time so… lets see ^^

Greets Equal

I’m not saying anything about the bug…maybe that’s someone else. I was just curious about stacking, I guess it’s called. Sounds good. Thanks.