Frictional Games Forum (read-only)
Making a Custom Inventory Item - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Making a Custom Inventory Item (/thread-9209.html)



Making a Custom Inventory Item - convolution223 - 07-18-2011

Sooo I was wondering how one would go about making a custom inventory item that doesn't need to appear in-game, just in the player's inventory (they cut it out of something and voila! it's in their inventory). They would then use this to solve a puzzle. I think I can manage the coding for this, but the actual creation of the inventory item is where I'm totally lost.


RE: Making a Custom Inventory Item - Tanshaydar - 07-18-2011

GiveItem and GiveItemFromFile are two simple function to give player any item available.
For more information you can check the wiki http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

To create items, you can use Model Editor.


RE: Making a Custom Inventory Item - convolution223 - 07-18-2011

(07-18-2011, 04:33 AM)Tanshaydar Wrote: GiveItem and GiveItemFromFile are two simple function to give player any item available.
For more information you can check the wiki http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

To create items, you can use Model Editor.

I tried looking there, don't know what category an inventory item falls under:
Types of Objects


These are the kinds of objects that you can create and place in this editor. Details on each one and parameter listing in the following links:

Lights


Billboards


Particle Systems


Sounds


The following types are exclusive to the Model Editor

Shapes


Bodies


Joints


SubMeshes


Bones



RE: Making a Custom Inventory Item - Tanshaydar - 07-18-2011

It should have a model. Just model editor without a model cannot give you anything. If you really think the item you created won't be visible in game, just use another item from the game and modify it.


RE: Making a Custom Inventory Item - ThePaSch - 07-18-2011

I think he just wants to "warp" the item into the player's inventory without it physically appearing in the world.

convolution, to do that, you need to create a texture for your item (.tga, Photoshop does that) and place it in your custom story's directory. Then, use void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);, replacing asImageName with the name of your item image.
I don't think you need the model editor for that, but feel free to correct me.


RE: Making a Custom Inventory Item - Tanshaydar - 07-18-2011

Oh, if it's just for this, it's quite possible.
However, he said "but the actual creation of the inventory item" and actual creation of an item is through Model Editor.


RE: Making a Custom Inventory Item - convolution223 - 07-18-2011

(07-18-2011, 06:25 AM)ThePaSch Wrote: I think he just wants to "warp" the item into the player's inventory without it physically appearing in the world.

convolution, to do that, you need to create a texture for your item (.tga, Photoshop does that) and place it in your custom story's directory. Then, use void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);, replacing asImageName with the name of your item image.
I don't think you need the model editor for that, but feel free to correct me.

THANK YOU! I'm going to try this tomorrow. This is exactly the kind of solution I wanted since I can barely even be considered an amateur modeller.