TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

MAX - We should be able to put multiple copies of one collectible in the same container, or across multiple containers #4809

Open fearlesswee opened 1 year ago

fearlesswee commented 1 year ago

Right now, the "item container" variable appears to be globally shared across all instances of that collectible type, so it is impossible to for example, create a "MedKit" item, and then have multiple containers around the level that might contain a MedKit. It's also impossible to have multiple MedKits inside of a single container.

This is highly restrictive; the only "solution" currently is to create new MedKit types for each and every instance of a MedKit found throughout your game, which would be extremely tedious to set up, and confusing to a player who will loot "MedKit278" and "MedKit173" and wonder what the differences between them are.

The most simple solution to this problem would be to make the "item container" variable per-entity, and not shared globally/tied to the "collectible" entry of that item. This would mean you could on a per-item basis designate what container they belong to, and if multiple instances of one collectible type have the same container, then that container would have multiple instances of that item when looted.

LeeBamberTGC commented 1 year ago

@fearlesswee Thanks for the enhancement idea. For clarity, the end result would be the ability to create a new item called MediKit, that can be collected as a resource (stacking) so you can collect say 15 medikits in your inventory, and then have the ability to set up multiple containers in your level, and seed medikits in as many containers as you wish, so the player can discover them gradually as they play through your level.

fearlesswee commented 1 year ago

I think there's a bit of confusion, I don't mean allowing MedKits to stack (which I believe is already possible), but rather that there can be multiple instances of a MedKit in a single container or across multiple containers, stackable or not. Currently, since the "container" field is globally tied to the "collectible" properties of an item and not specific to that instance of the item, this is not possible.

I think this is pretty basic functionality of an inventory system, and I cannot fathom why they're currently handled the way that they are. Personally I'd consider it more of a bug since it prevents inventories/containers from behaving as expected, but I understand the team's decision to mark it as "enhancement".

fearlesswee commented 1 year ago

I'll use the game "MineCraft" to set up a little example to demonstrate what I mean.

Here are two separate chests. image

If I open the one on the left, there are two identical copies of a "Healing Potion". image

If I open the one on the right, it has an identical copy of a "Healing Potion", the very same item in the other chest. image

Currently, this basic setup is impossible to accomplish in MAX as a set of lootable containers placed by the developer. Right now, if I wanted to do this, I'd have to create 3 unique types of healing potions (and more and more if I wanted more chests or more instances of healing potions) which is extremely tedious to set up and confusing to a player, or I'd have to place down a bunch of healing potions on the floor, boot up the game in invulnerable mode, and then run around the entire game placing these in chests, make a save game file, and then tell players of my game to boot up the save game instead of clicking "new game", which again is extremely tedious and confusing to players, and not an ideal workaround.

LeeBamberTGC commented 1 year ago

@fearlesswee If I understand your requirement, it sounds like you want multiple containers with different contents, AND THEN add your collectable to both, and in the quantities you desire, correct?

fearlesswee commented 1 year ago

@LeeBamberTGC What I want is to be able to create a collectible item, such as a MedKit, and then, per-instance/copy of that item, designate what container that specific MedKit might belong to. So a player can loot a container near the start of the level and find say, 2 MedKits within it, and then later loot another container later which also has a MedKit in it, maybe then loot yet another container that has 25 9mm rounds and a MedKit, etc. Right now, ALL MedKits are forced to share a single container, and only one of them will actually show up, regardless of how many of them you place down, since the "container" field is tied to the collectible entry of the item and not the actual instance/copy of that item.

This means across my entire game, the player can loot a grand total of 1 singular MedKit from 1 singular container, which is extremely restrictive and counter-intuitive.

fearlesswee commented 1 year ago

As an example of what this problem looks like in MAX, here's a chest I set up, and I placed down 4 MedKits, each with their "container" variable stating that this chest is their container. Logic would dictate there should now be 4 MedKits in the chest, right?

image

Unfortunately no, there's only 1 singular MedKit within the chest, despite there being 4 different copies of a MedKit all pointing to this chest as their container.

image

This is because, for whatever reason, the "container" field is a global value tied to the collectible settings of the item, rather than being instance/entity-specific. This means that the chest is basically seeing that there is 1 collectible entry for a "MedKit", and that it belongs to this container, therefore there is 1 MedKit in this container. If I were to then try to place more containers each with their own MedKits inside of it, changing the "container" variable would instead now make it so this one singular MedKit instance appears in that chest instead, since the "container" variable is globally tied to the collectible entry, and not the specific entity/copy/instance of that MedKit in the level.

The ideal solution would be to break away the "item container" field from the globally-shared "collectible entry" settings, and instead making them per-entity, so you could place down as many instances of a MedKit as you wanted, and then per-copy/instance, designate what container they belong to. So if I placed down 4 MedKits and then assigned each of them to "chestMedical", then looting that chest would have 4 MedKits show up. I could then also make a new chest called "chestMedical2" and place down a new instance of a MedKit and set it's container to "chestMedical2", and now there's two chests, one has 4 MedKits in it, and the other has 1 MedKit in it.

LeeBamberTGC commented 1 year ago

@fearlesswee I agree the current system on reflection is a little counter intuitive. As you can see, to add the pot to the chest you specify the chest when describing the pot: image

Not very helpful. The chest on the other hand can be selected but does not really show what is in it, only a reference to the container name "chest": image

If we looked at this fresh, most users would just want to select a chest (or many chests), then start adding collectables into them with various quantities, like shelf filling. I feel this is best done in the level editor and in a visible way, so at any time you can select a chest in your game and see what it contains, and drag stuff in and out as fits your design and needs.

Sound better?

LeeBamberTGC commented 1 year ago

NOTE: A Simple Way: image image

Feel free to comment and feedback, but this seems the quickest and most natural way to populate the chest with objects

fearlesswee commented 1 year ago

That definitely sounds very intuitive from an average end-user perspective, and would allow for functionality like "multiple items per container" and "multiple instances of one item type across multiple containers" like I was asking for. I say this is definitely a great solution, but it might be worth asking around just to make sure this works for everyone :)

Thank you so much for being so quick to respond and willing to engage with me on this!

Quick sidenote, maybe this could be done with the visual logic system? I.e., you place down collectible items, then drag a visual logic link from them to the chest, and then any items linked to that chest are found in that chest? This is actually how I thought the system would've worked before I started experimenting with it.