Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Why is there no inventory documentation?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why is there no inventory documentation?

    Iv been looking for about 2 weeks now on any type of doucmentation even relevent to a inventory system and have nothing. There is none, its very annoying. please epic make some documentation we can folow.

  • #2
    There's an InventoryManager for each Pawn and all stuff the Pawn carries is organized in a linked list of Inventory objects there. Sounds simple enough, so why do you need a tutorial for that?

    Comment


    • #3
      He means documentation for something like this:

      Comment


      • #4
        or even some documentation for an inventory type like the one in diablo I where an item needs 6 field of an inventory and another on about 2 field or 1 and so you must place the items right on size

        Comment


        • #5
          go in your C:\UDK\UDK-2010-08\Development\Flash\CLIK\demos

          there is a file called "InventoryDemo".

          Comment


          • #6
            yeah sure but then can you help me to implent it a little bit into the udk per uscript? =)

            Comment


            • #7
              Sorry I can't code. When you play the demo hit "F10" there is an inventory that pops up.
              you could probably take some of that code and mash them together some how.

              Comment


              • #8
                Originally posted by awakeningfromobliv View Post
                go in your C:\UDK\UDK-2010-08\Development\Flash\CLIK\demos

                there is a file called "InventoryDemo".
                Oh nice just what i need ROFL!!

                Comment


                • #9
                  Because "inventory system" doesn't mean anything until you actually design what you want to have, which will ultimately likely be entirely unlike anything else anyone else designed. If you understand the various pieces that you would need to put your thing together, whatever that might be, then you'll know how to do it.

                  Comment


                  • #10
                    yeah but a starting help or a simple rpg inventory that is well documented would be really nice so you can learn something for yourself

                    Comment


                    • #11
                      heres a starting point, break down what you need your inventory system todo.
                      Then pick one part and start! example, it should store items of type x, then you would need to code yourself up a manager class that contains an array \ list \ whatever of x items, you would then need to add functionality to it to add / remove / equip these items.

                      for saving of the inventory you could use the config files to store them, by looking at the sapitu page on udn you should be able to adapt that.
                      here is my inventory system for a little rpg i did as an example of how not too complicated it is

                      Code:
                      class RPGInventoryManager extends Object 
                      Config(Inventory)
                      PerObjectConfig;
                      
                      var config array<string> invNames;
                      var array<InventoryItem> itemList;
                      
                      function initInventory()
                      {
                      	local int i;
                      	if(invNames.Length==0)
                      	{
                      		`log("###NOTHING TO INIT IN INVENTORY");
                      		return;
                      	}
                      	for(i = 0; i<invNames.Length;i++)
                      	{
                      		itemList.AddItem(new(None,invNames[i])class'RPG.InventoryItem');
                      	}
                      
                      }
                      
                      function listInventory()
                      {
                      	local int i;
                      	if(itemList.Length==0)
                      		`log("###NO INVENTORY TO LIST");
                      	for(i=0;i<itemList.Length;i++)
                      	{
                      		itemList[i].showInfo();
                      	}
                      
                      }
                      
                      function bool getItems(out array<InventoryItem> out_ItemList)
                      {
                      	if(itemList.Length>0)
                      	{
                      		out_ItemList = itemList;
                      		return true;
                      	}else{
                      		return false;
                      	}
                      }
                      
                      function bool addInventory(string invID)
                      {
                      	local InventoryItem tmp;
                      	local Item tmpItem;
                      	local int i;
                      
                      	//search for existing item
                      	for(i = 0; i<itemList.Length;i++)
                      	{
                      		//found existing item in the players inventory, so increment the amount possesed
                      		if(invID == itemList[i].displayName)
                      		{
                      			itemList[i].addMore();
                      			return true;
                      		}
                      	}
                      	//if no existing item of this type is found then create one and add it to the list
                      	tmpItem=createItem(invID);
                      	tmp = new(None,invID$"1")class'RPG.InventoryItem';
                      	if(tmp!=None && tmpItem !=None)
                      	{
                      		tmp.baseItem = tmpItem;
                      		tmp.initStats();
                      		itemList.AddItem(tmp);
                      		invNames.AddItem(invID$"1");
                      		saveInventory();
                      		return true;
                      	}else{
                      		return false;
                      	}
                      	
                      	//shouldnt be here
                      	`log("awww crap in add inventory");
                      	return false;
                      }
                      
                      function Item createItem(string itemID)
                      {
                      	local Item tmp;
                      	tmp = new(None,itemID)class'RPG.Item';
                      	if(tmp!=None)
                      		return tmp;
                      	else
                      		return None;
                      
                      }
                      
                      function saveInventory()
                      {
                      	local int i;
                      	SaveConfig();
                      	for(i = 0; i<itemList.Length;i++)
                      	{
                      		itemList[i].SaveConfig();
                      	}
                      }
                      
                      defaultproperties
                      {
                      
                      }

                      Comment


                      • #12
                        ouh thank you i will try my best and see if i can get something out of it =)

                        but why aren't you extending from the inventory that is already implented?

                        Comment


                        • #13
                          because these arnt weapons, they are items like health potions, and i need to be able to save them, using the UTinventorymanager would be extreme overkill for my needs.

                          Comment


                          • #14
                            and even the normal inventory manager ? not the ut based one ?

                            Comment


                            • #15
                              Originally posted by Gillies View Post
                              because these arnt weapons, they are items like health potions, and i need to be able to save them, using the UTinventorymanager would be extreme overkill for my needs.
                              Sounds like an int counter, to me. Inventory is really only needed for stuff that needs to run complex code ..

                              Comment

                              Working...
                              X