I’m starting over in making a shop for my RPG demo. But I can’t find a reliable tutorial that doesn’t lead me to any dead-ends and isn’t too long. Can anyone help, please?
(This was posted under the wrong topic. Can I delete this thread and repost it under the Programming & Scripting topic?)
Shop type matters.
Online transaction style, or just in game standard asset stuff…spells, armor, weapons etc?
Large list of items or small capped list?
Will it be multiplayer as in shop inventory is affected by player interaction?
Details matter, that’s why you hit dead-ins with some random tutorial. Most tutorials are tailored to a specific niche/approach.
Right now, I’m trying to make a shop that sells healing items - drinks and foods, really. I also wanted to make one that sells tools as a separate shop. Weapons/Armor will come later; likely in a retail version. I hope that helps some.
What I’m aiming to do is make some shopping widgets for different types - field items (drinks, foods, etc.) and tools (parts, etc.). I will add weapon and armor shops in the full retail build; but right now, I want to make those shops functional - for buying and for selling.
I followed two tutorials, but I ended up not understanding every single detail. Also, one of the tutorials doesn’t explain how to make thumbnails on an image representing an item appear, nor does it explain how the first item on the data table doesn’t appear in the shop when it’s supposed to.
So in this case you need to make an item widget with a simple image in a size box. Also, expose the image variable “Expose on Spawn” under detail panel of the property
Next, where ever you have added listview, tileview, or grid whatever container you are using just clear it first and later add the widget in it by using “Create Widget” node and pass the image in the property from the datatable.
Well there can be multiple issues that cause the item from the data table doesn’t appear maybe there is a misspell of row name or program logic is not starting from ‘0’ if there is a loop.
Sorry for not responding sooner. I was on vacation, but now I’m back.
Anyway, while following tutorials, I’ve hit a snag on one of the widgets I’ve made - the one which shows the items for sale. I’ve made a Uniform Grid Panel, listed it under the Canvas Panel and checked it as a variable. But, instead of being an array variable, it’s just a variable for an object. On top of that, I can’t change the type of object variable because it’s a child object.
Is there something I missed?
Yes you cannot change the type of the variable if you just look into the code. However, you can add items in it as a child of it. Just in the graph look out for the add child and remove child method on the Itemgrid variable and you will all set from there
So are you saying that by using Add Child and Remove Child, I would be able to add some items to that variable, as if it were an array? Like, each item would be a child?
yes that’s what I mean
Okay. Next, how would I call items from the data table? And I can’t seem to just add a child when casting to a widget after it’s already been created. (You can see the BP for the particular shop UI in the link below.)
Get the Uniform Grid Panel from the Shop Widget and add the child in it
Something like this?
Since items are on a struct and on a data table, how would I extract each item and make it into a child for the shop window widget?
Can’t help here you can find tutorials on the forums and youtube too just check out for inventory over there
Do you have any suggestions? I’ve found two tutorials but I ran into a dead-end, trying to follow each because they both left out some crucial details.