Average User Rating

Description

This system will allow you to add inventory to your project that holds up to 24 objects of various types at the same time. And also create your own objects, with customizable effects. Inventory can save items between levels, and it also works with a standard system for saving and loading.

The system includes:
Inventory script.
The script of the item.
Script zone victory with saving inventory.
The script of the victory zone, if you have the required number of items.
Three examples of the item.
(Examples of items are in the databank folder)


The system does not include:
Sounds.

!Update 12/11/20
Item Creator can now be used to create items. For more details, see paragraph 2.2 (Program Item Creator is not part of this product and is not required for its performance).

!Update
"InventoryItems" folder moved from "GameGuru \ Files" to "GameGuru \ Files \ databank"

1) How to add inventory to level:
Add any entity to the level.
Set the dialogue script (stv233_inventory_system) in the Main property.
Set the Static Mod property to No.
Set the Always active property to Yes.
After starting, press the B key to open or close the inventory. 
You can also set sounds for inventory to the corresponding property of this entity:
Sound0 - Opening inventory
Sound1 - Closing inventory
Sound2 - Switching between cells
Sound3 - Using the item
Sound4 - Deleting an item


2) How to create an item, and add it to the level:
In GameGuru \ Files \ databank, create a folder and name it InventoryItems.
In GameGuru \ Files \ databank \ InventoryItems, create a folder and name it what you want to name the item.
Inside this folder, create the init.dat file.
Complete the file as follows:  
 ItemEffect = * Item effect number *
 EffectCount = * Number of effect of the item *
Image = * Item Image *
 CanUsed = * Can an item be used *
 CanDeleted = * Can I delete an item *
  The "ItemEffect" property indicates the number of the effect that will be applied after its use.
  The system includes 5 standard effects:
   1 - Add health
   2 - Add lives
   3 - Set health
   4 - Set lives
   5 - Cause damage to the player
  You can independently add a new effect in the ItemEffect function of the stv233_inventory_system file using the template proposed there.
  The "EffectCount" property indicates the number of effects that will be applied after using the item.
  The property "Image" indicates the relative path to the image of the subject.
  The "CanUsed" property indicates whether this item can be used. (1 - yes, 0 - no)
  The "CanDeleted" property indicates whether it is possible to delete this item. (1 - yes, 0 - no)
In the same folder, create the des.dat file.
Write a description of the subject in it.
In GameGuru, add inventory to the level, as described in paragraph 1.
Add any entity to the level.
In the Name property, specify the name of the item, the same as in the name of the folder.
In the Main property, set the item script (stv233_inventory_system_pickuppable).
In the Strength property, set the number of items to be obtained.
Set the Static Mod property to No.
Set the Always active property to No.
You can also specify sounds in the corresponding fields of this entity.
 Sound0 - Upon receipt of the item.
 Sound1 - Failure if inventory is full.

2.2 ) How to create an item using Item Creator:
To create items for this inventory system, you can use the Item Creator program (Program Item Creator is not part of this product and is not required for its performance).

Launch Item Creator and select "New Simple inventory system project". In the window that opens, enter a name and select a place where the project with your items will be stored, then click "Save". After that you will get into the project management form. To create an item, click the "Create new item" button in the upper left corner, then fill in all the necessary information about the item in the window that opens and click "OK".
The item you just created will appear on the right side of the project management form. Click the "Export" button located on the right of your item. Select the "GameGuru \ Files \ databank \ InventoryItems" folder and click "OK". Your item is now ready for use in the engine.

3) Victory, if the item is in the inventory.
In the Main property of the winzone, install the winzone_if_item_is_in_stock script.
Set the Name property according to the following pattern:
 Item Name|Minimum required quantity.


4) Saving inventory between levels.
In the Main property of the victory zone at the first level, install the winzone_is script
At the second level, create an inventory in as in paragraph 1.
Name property of the entity on which the inventory is installed, change to Load.


Keywords

items item inv inv inventory rpg inventory system rpg rpg system inventory

Product Details

Artist: Stv233
Category: GameGuru Scripts
Sub Category: Misc
Sales: 21

Engine Support

GameGuru Classic Yes

File Formats

LUA .lua
PNG .png

Comments

2nd Oct '20 15:28
This user owns this product
I wish I could edit comments. I messed up the image name as you stated. I need to sleep instead of program sometimes, it's the little things that start to trip you up. Thank you for your help, It works great!
stv233 Artist
30th Sep '20 17:21
Hello WoodwardWarwick, I am very sorry that you have encountered problems with this script. After your request, the script passed the checks and passed it successfully. The script works. When changing the file format or name, do not forget to change the relative path to it in the Image field of the init.dat file. It is also not recommended to use other image formats except .png, .jpg, .bmp. I hope these recommendations will help solve your problem. If the problem persists, please send an email to [email protected], then I can review your situation in more detail and provide assistance.
30th Sep '20 02:50
This user owns this product
I'm running into the same errors here. I used the same image of the knife in guru but changed the format to a png. How do I fix this error? The inventory opens, but when i pick up the item bad stuff happens. Did I just waste my money?
stv233 Artist
18th May '20 18:17
Fasold, I have accepted your request and will add an example file soon.
stv233 Artist
18th May '20 18:15
M I N I, in theory, there are no obstacles to creating an item effect that will add weapons to the player.
18th May '20 16:58
This user owns this product
I also cant get past the images, I have tried dozens of different Formats, File paths etc I keep getting Runtime Error 501: Image Number 9600 ()

please assist
18th May '20 13:49
I'm very interested, one question. Does it work with weapons?
18th May '20 10:06
This user owns this product
I bought the script, but as I am really new to scripting and such, could you include example files
for the Init.dat and the Des.dat?

Thanks!

PS. I got the script to work, only the filepath for the image causes a problem.
Does the image filepath need the .png at the end? Here, an example file would be great!

You must Login or Register to leave comments.

Related Products