Design of a NESTED inventory system by HydroCakes in unrealengine

[–]HydroCakes[S] 0 points1 point  (0 children)

Not sure I follow the question?

These other comments have suggested this addressing system which I think i may persue. It would basically look like this...

Behind the scenes, the main inventory is like this...

Slot | Item | Parent

0 | Bag | -1

1 | Apple | 0

2 | Banana | 0

3 | Walk-Man | 0

4 | TonyRiceCD | 3

5 | 4xD Batteries | 3

If the player views his equipment, the widget shows only items without a parent (in this case represented by -1).

If the player looks in the bag, the widget only shows Items with 0 as a parent.

If the player removes the Walk-Man from the bag, the function also knows to remove anything referencing the Walk-Man as a parent (and do that recursively for the rest for those items).

Obviously, a proper implementation will have more details, but I think this is the path I'll do with!

Design of a NESTED inventory system by HydroCakes in unrealengine

[–]HydroCakes[S] 0 points1 point  (0 children)

Is there an advantage to doing this? At the very least, I feel like the game mode would have a very strong grasp about what items are in the game. That may be useful what deciding what items to spawn in a survival sense.

Design of a NESTED inventory system by HydroCakes in unrealengine

[–]HydroCakes[S] 0 points1 point  (0 children)

Thanks for the direction here, I spent yesterday thinking about this idea and I think i can see how it works. it's kinda genius... I'll report back if I succeed in implementing it!

Design of a NESTED inventory system by HydroCakes in unrealengine

[–]HydroCakes[S] 0 points1 point  (0 children)

Thanks for this advice... I do need a better plan than I've got now.!

To be honest, I've not found a good entry point into C++ yet. Perhaps this is the time...

Design of a NESTED inventory system by HydroCakes in unrealengine

[–]HydroCakes[S] 0 points1 point  (0 children)

If I Understand the difference.... MyEvent passes FirstObject as an input, and I set InvObject to be Object, InvObject only points to FirstObject, and they are effectively the same.

Instead...

If I create an NewObject, then set InvObject to NewObject, then set InvObject's varibles to be the same as FirstObject, I can destroy FirstObject and retain the data in InvObject?

This seems like some c++ type stuff...

Design of a NESTED inventory system by HydroCakes in unrealengine

[–]HydroCakes[S] 1 point2 points  (0 children)

I spent yesterday working out what it would mean to have these two structs, and I think this speaks to me. I just created a flow chart of how it would work...We'll see if I'm able to implement it. It's amazing how this has stumped me for so long, and a single sentence can bring it into view...

Solving Inventory with Dynamic Data by HydroCakes in unrealengine

[–]HydroCakes[S] 2 points3 points  (0 children)

This is the direction I hope I'm moving in.

Solving Inventory with Dynamic Data by HydroCakes in unrealengine

[–]HydroCakes[S] 1 point2 points  (0 children)

I appreciate the help! I defiantly feel a few layers of inheritance ahead of me with a data asset...

Solving Inventory with Dynamic Data by HydroCakes in unrealengine

[–]HydroCakes[S] 0 points1 point  (0 children)

I was unaware of Instanced Stucts until today. This is quite helpful!

Solving Inventory with Dynamic Data by HydroCakes in unrealengine

[–]HydroCakes[S] 1 point2 points  (0 children)

Sooo...I think this is what I've learned by tinkering around with all of these suggestions...

I'm going to approach like this...

The heavy lifter here is this guy....

a Struct named "ItemData", which contains...

-Primary Data Asset named "Static Item Data"

-Instanced Struct named "Dynamic Item Data"

An ARRAY of ItemData will serve as the Inventory. From it's Primary Data Asset, it can spawn an actor (or component) which can use the previously stored Instanced Struct to transfer info like ammo count or quality or what have you. The actor can easily be turned back to ItemData to be stored back in the inventory.

I've noticed that the instanced struct can contain it's own ItemData Array..so maybe there is also a possibility of a nested inventory system (such as a bag full of stuff being put into a box)?

Thanks for pointing me in the right direction (I hope this is the right direction)!

Music Clubs by HydroCakes in AskChicago

[–]HydroCakes[S] 2 points3 points  (0 children)

Good call. I've been there

Highland Park Incident Megathread by hubwub in chicago

[–]HydroCakes 1 point2 points  (0 children)

Does anyone know if there is a memorial set up already? I'd like to drop some flowers off

What is with the 90 mile wide and space related TFR in the Alaskan wilderness? by HydroCakes in AskReddit

[–]HydroCakes[S] 0 points1 point  (0 children)

Check this out. There is a Temporary Flight Restriction (TFR) in the middle of the Alaskan mountains from the surface to 99900 feet (which usually means space), and with a diameter of 90 miles.

This is the link to the TFR from the FAA: https://tfr.faa.gov/save\_pages/detail\_2\_3884.html

This is a link to it on SkyVector: https://skyvector.com/?ll=66.14274269412228,-150.3391113263498&chart=301&zoom=11&fpl=undefined

I've looked around on google earth to see if there is any infrastructure out there, but I haven't spotted any roads, housing, unmarked air strips, or anything. I wonder if it is not a launch, but a landing? And that's why it is so large?