treshold
New Member
fiddling and tinkering lol
Posts: 9
|
Post by treshold on Dec 11, 2013 15:46:55 GMT 1
I'm fully satisfied what Squarebite inventory currently offer and I was going to test out how crafting system could be implemented to it Like starters crafting-window would be another container that you can move items and then there would be recipe check and if ingredients match with certain recipe - output would appear on one slot and after you click craft it would destroy ingredients and move output item to inventory.
|
|
|
Post by Super Admin on Dec 12, 2013 18:11:50 GMT 1
Sorry for my delay, had some celebration these days I am glad you like Squarebite inventory system and I like your idea very much crafting system would be very cool to make and it will be included in this system. I planned that in future updates but first wanted to see how people will react on Squarebite itself. As I can see you are satisfied and also I will be satisfied to add that feature to my system. Cheers!
|
|
treshold
New Member
fiddling and tinkering lol
Posts: 9
|
Post by treshold on Dec 15, 2013 11:37:43 GMT 1
Okay sounds cool!
|
|
|
Post by Fons on Feb 4, 2014 17:04:30 GMT 1
Hi, First of all, i bought your inventory system yesterday and i like it. The package is easy to understand and easy to implement (with help from the Youtube movies). I hope some movies will follow for the crafting system and maybe some movies on how to customize the GUI and stats later on. For the crafting system i have a question though. The way i'd like to use a crafting system in the game i'm working on is without recipies. I'd like the player to try different combinations without having to need the recipy in their inventory. Sort of like the alchemy game if you've ever played that. littlealchemy.com/The need of having recipies kinda spoils the gameplay in that sort of game. Is there an easy way possible to define the recipies (only show them if they are found or something like that) and let the player choose which elements he'd like to combine. And depending on the outcome (if the recipie exists, craft the item, if it doesn't exist tell the player) I'm sure i'll figure it out eventually since your code is very well documented and structured but it would be a huge help though if you'd give it a quick thought on where to start:) Tx
|
|
|
Post by Super Admin on Feb 5, 2014 14:14:39 GMT 1
Hi, thanks for support and I am glad you like the system. For crafting system will be a lot of improvements, I am working on FPS multiplayer game right now and that's why I am delayed to respond and to create additional videos for crafting system and other videos as well. This recipe system is kind of blueprint system, you have result, know what resources / ingredients are necessary and until you get them you can't craft certain item. According to your story you would like to have feature where you add ingredients and depends on combination you will get result like earth + water = mud or wood + rock = some weapon with rock and wooden handle or something like that? If that's the case I can rework my system to work in both ways, but it will take some time to come out on store updated, instead of that I can point you In right direction so you can modify it the way you want. First when you approach workbench instead of open inventory where your recipes will be displayed just go strait to workbench opening and set to display all items (InventoryDisplayArrayList set to nothing) then you have to create some GUI where you can click craft with window appear where you have to drop your items, click on items they will be transferred to that GUI (similar to transferring to chest or container), then you set your conditionals for what items you want to be created when certain items are dropped to your workbench. For example click on cube and sphere, they will both appear in workbench and in your code set if cube + sphere are in workbench create capsule in your inventory or in your workbench, depends on what you want. Do you understand how to make this? It will require some code for upcoming items and combinations, you can then expand those combinations to 3 or 4 items, just create some manager that will explicitly watch over your item combinations. I hope this helps and I will update package later on with some directions and similar system you requested Cheers!!!
|
|
|
Post by Fons on Feb 5, 2014 16:26:32 GMT 1
Tx for your response! I'm just getting to know playmaker (really seems like an awesome tool so far)but i'll certainly give your approach a try. And if it doesn't work out i'll focus on item creation (i'll need a huge amount of items in my game...) and wait for the update I'm also gonna rate your package on the unity store because it is quite a shame it didn't receive enough ratings yet... regards!
|
|
|
Post by Super Admin on Feb 5, 2014 17:05:43 GMT 1
Thanks man and yeah for your craft you will need a lot of stuff since you are doing similar crafting to little alchemy, lot of possibilities and combinations which will require thousands of items Playmaker is awesome, I love it and I am trying to do everything code related in my games with only playmaker and so far I did everything I wanted, pretty powerful system Playmaker is. If you have any issue or Playmaker question just let me know and I will help if I can, I will find time always for people like you I am glad you like the system and thanks for review Cheers!
|
|
|
Post by Fons on Feb 7, 2014 14:45:22 GMT 1
Making some progress here Since i got quite confused with the workbench flow i decided to start from scratch with the Container template. It is easier to understand for a beginner. Changed the "take all" button to "craft" repositioned it and made that button activate my crafting FSM It seems to be heading in the right direction but i still have some questions. Am i correct to assume that the content of the chest is stored in ChestItemDatabase in the playmaker hashtable proxy script? And can i call it with the "hash table contains value" action? regards, Stijn
|
|
|
Post by Super Admin on Feb 7, 2014 16:23:18 GMT 1
Hi Stijn, I am glad you have progress with this, you can change it anyway you want, it's just a GUI example Here is the thing about workbench, hash tables and how they work in short: First all items you have in your inventory are stored in Inventory/ItemDatabaseHashTable which is proxy component that stores game object and all numbers are stored in Inventory/ItemCountHashTable which is proxy component that will store all values into int variables (for example you have 10 potions in inventory, potion game object it will be stored into ItemDatabase and that number 10 will be stored in ItemCount). Same goes for all other containers even for workbench, this way you can always access reference of items, track how many items are for each kind and you can remove / add them from hash tables as you like, otherwise you will encounter serious problems When item is added to hash table, you have to add number also to be 1 because you have 1 item, and if you already have item in inventory then no need to add item, just change that number to exact number of items using action HashTableGet (item key) you get for that key how many items are in inventory, then add 1 to that number and using action HashTableSet you set that number in hash table using same key. In workbench you have two hash tables "Components" and "Result" because we have components for crafting and final result that will be crated, this is done because this way you can display you components on screen and at the same time result of crafting those components, if components get from result are in you inventory you can craft, if not you can't . And for your question ofc you can, but for items I am using HashTableContains, this will check if that key exist in your hash table or not, depends on result you send proper event, if you use HashTableContainsValue then you get certain value from hash table, not sure what exact value you want to get, but as I said it's easier to work with keys And items are separated as you notice, GUI component and 3D component, this is done for multiple reasons and one of them is referencing items from assets data base using keys, this is important because if you have item on scene and store that instance in hash table and if you destroy that item it will be removed from hash table, cause you destroyed reference, same goes if you remove item from hash table it will be removed from scene, but if item is referenced from Asset data base it can be used correctly. I am also working on this today and I plan new update soon with different workbench system where you can click on items and add them to workbench, and click craft, it crafting process is possible (if you have defined item for that combination) item will be crafted and added to workbench container and you can just pick it like you pick items from chest or loot container. This way you can add for example 3 items like wood, stone and rope, each of them will have crafting UID which will represent combination parts, then you add possible item combinations to your Workbench hash table (earth, water, wood.... and wood will be wood, stone will be stone and rope will be rope) and combining them using build string action you get woodstonerope UID and check that UID in you workbench hash table and if that UID exist there you just add that item to your inventory hash table, if not possible to combine you can just write some notification like that combination is not possible Hope this helps, and this update will be in store QA review in few days and they need maybe 5 days to test everything before launching it to store. Cheers!!!
|
|
|
Post by Super Admin on Feb 11, 2014 18:33:32 GMT 1
Better crafting system is on its way, you will be able to achieve something like LittleAlchemy with this one, it uses hash tables instead of game objects variabels and it will be followed by video tutorial, how to define everything and how to use crafting system overall/
Cheers!!!
|
|
|
Post by Fons on Feb 11, 2014 22:53:37 GMT 1
Great!! looking forward to the release regards, Stijn
|
|