Author Topic: (Request/Idea) Stacking Items  (Read 1242 times)

Offline Machina

  • Newbie
  • *
  • Posts: 36
    • View Profile
(Request/Idea) Stacking Items
« on: January 14, 2007, 10:56:07 PM »
Sorry if it sounds nitpicky, but are there any plans for a way to stack many instances of the same item in one's inventory? Such as all of one's Turkey Tubesteaks, or every Shuriken one has is stacked under one entry in one's inventory.

Granted, this could be troublesome for things like mecha welding kits, or ammo, but "examine components" could tell how much is left of each one.

Or is this a bad idea?

Offline empath

  • Newbie
  • *
  • Posts: 28
    • View Profile
(Request/Idea) Stacking Items
« Reply #1 on: January 14, 2007, 11:25:48 PM »
Maybe for items that don't have variable 'uses' left, like simply food or ammo?  That'd leave the 'depletable' repair/medical/etc kits and the like as seperate items (technically, aren't they already a stack of component items you're consume bit-by-bit as you use your 'repair-esque' skills? ;) )

It does leave the issue of, say, wanting to split up that stack of 500 nutrient pills so you can have a half-dozen in your pack, and leave the rest in your mecha...or maybe share them out with your lancemates.  I dunno how much of a hassle it'd be to program in a new command to 'split' a stack; it's up to Mr. Hewitt...

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
(Request/Idea) Stacking Items
« Reply #2 on: January 15, 2007, 01:58:13 AM »
The trouble is, it's harder than it sounds to do this. Items in GearHead are all individually defined. In order to see if two items can stack, the game would have to check all an item's values, subcoms, and attributes to see if they match. There'd be the problem of items that look like they should stack not stacking because of some subtle difference.

Containers, on the other hand, might be easy to add.

Offline empath

  • Newbie
  • *
  • Posts: 28
    • View Profile
(Request/Idea) Stacking Items
« Reply #3 on: January 15, 2007, 01:41:01 PM »
That's what I was afraid of; I know just enough basic/vb/pascal/C++/FORTRAN(don't ask) to know "the simpler the feature, the harder it is to implement". XD

As for your alternative, maybe a cop-out would be a 'container' that's called "Stack of {item name}"?  <wink>

Seriously, the latter idea sounds like a winner for simplifying; those people who worry about having eight items of "Standard Ration (1)" instead of "Standard Ration(8)" would also be the sort of people to get several containers and organize them in categories; 'ammo', 'repair stuff', 'food', etc.  Here's hoping it's simpler to execute.

Offline SharkD

  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Isometricland
(Request/Idea) Stacking Items
« Reply #4 on: January 15, 2007, 02:05:33 PM »
Quoting: Joseph Hewitt
the game would have to check all an item's values, subcoms, and attributes to see if they match

Or, you could give each item a unique name and make sure beforehand that they're identical by going through and double-checking all items.
I sort of did this with my patch for GH1. I made sure that item names were identical and descriptive and that they always appeared in the same amounts.

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
(Request/Idea) Stacking Items
« Reply #5 on: January 15, 2007, 04:53:26 PM »
Quoting: SharkD
Or, you could give each item a unique name and make sure beforehand that they're identical by going through and double-checking all items.

This wouldn't work because it is still possible to have multiple items with the same name, items that start with the same name can change over the course of play, and there'd be no protection against end users modifying their design files and either accidentally or on purpose introducing new items with the same name as old ones.

Offline SharkD

  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Isometricland
(Request/Idea) Stacking Items
« Reply #6 on: January 15, 2007, 04:57:35 PM »
Quoting: Joseph Hewitt
This wouldn't work because it is still possible to have multiple items with the same name, items that start with the same name can change over the course of play,

How so? Could you provide an example?
Quoting: Joseph Hewitt
and there'd be no protection against end users modifying their design files and either accidentally or on purpose introducing new items with the same name as old ones.

I would be willing to take that risk.

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
(Request/Idea) Stacking Items
« Reply #7 on: January 15, 2007, 06:18:38 PM »
Quoting: SharkD
How so? Could you provide an example?

Items can get damaged, used, tagged with plot or episode variables.

Quoting: SharkD
I would be willing to take that risk.

I wouldn't be. Containers are a much better idea than stacking.

Offline Sabin Stargem

  • Full Member
  • ***
  • Posts: 162
    • View Profile
(Request/Idea) Stacking Items
« Reply #8 on: January 15, 2007, 06:41:32 PM »
I suppose an container-based system of inventory management would be good.  When an player gets an new kind of item that there is no container for, the container is created in the player's inventory and the item is automatically placed there.  Therefore, say an player picks up the following items and has nothing in the inventory...

EX1:

Player picks up two apples, one gun, an computer and Guardian Angel software.  This player opens up the inventory panel, and there are three containers listed, all three hi-lighted.

Food (2)
Weapons (1)
Computers (2)

EX2:  Based on what the player already picked up, the player closes the panel and moves on, picking up another two items, an corndog and jacket.Opening the panel again, the food entry is still hi-lighted, the number for that container increased by one, and there is an new container called 'clothing (1)'.  The weapons and computer containers are not hi-lighted, since there is nothing changed about them since when the player last had the panel open.

EX3: Entering the clothing container in the inventory, the player sees that only the jacket is in the container.  The player now equips the jacket, and automatically exits from the clothing container since it is no longer exists for the meantime*.  However, he now picks up a pair of shoes, so the container is remade to house the pair.

*This occurs in order to 'clean up' the inventory panel of unused containers.

EX4:  While in the top level of the inventory panel, the player can put the cursor over a container and a list of the contents will appear in the blank box to the right of the panel.  This allows a player to check the contents without entering that container.

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
(Request/Idea) Stacking Items
« Reply #9 on: January 15, 2007, 06:58:41 PM »
In that case, what about just filtering the inventory list? I already have plans to do something like that for the equipment list.

Edit- One possible problem. The "type" of an item isn't always clearly obvious to the game. Food and medicine are both the same gear type, for instance. Also, a data bracelet and an arm-mounted autocannon both count as harnesses despite their very different contents. This is not an insurmountable problem, but would require having some kind of type override that can be applied to items and then applying this manually to the exceptions.

Offline empath

  • Newbie
  • *
  • Posts: 28
    • View Profile
(Request/Idea) Stacking Items
« Reply #10 on: January 16, 2007, 07:08:57 AM »
Well, I guess this is a drawback with having customisible gear - they get hard to categorize. :S

And 'sorting' the inventory sounds simpler than creating more objects that store others - you'd also have to watch for things like limiting use of items that are inside containers or existential glitches like the old standby of "I'm going to put this nine-gallon bucket inside that nine-gallon bucket." :P

Offline Varil

  • Full Member
  • ***
  • Posts: 157
    • View Profile
(Request/Idea) Stacking Items
« Reply #11 on: January 17, 2007, 12:18:15 AM »
Pfft. I'm going to put this nine-gallon bucket inside this eight-gallon bucket. Eat that, Newton, and your stupid laws of physics!

Offline Sabin Stargem

  • Full Member
  • ***
  • Posts: 162
    • View Profile
(Request/Idea) Stacking Items
« Reply #12 on: January 17, 2007, 12:29:07 AM »
Eh...I say it is an Bucket of Holding.

Offline Machina

  • Newbie
  • *
  • Posts: 36
    • View Profile
(Request/Idea) Stacking Items
« Reply #13 on: January 17, 2007, 01:43:47 AM »
Quoting: Varil
Pfft. I'm going to put this nine-gallon bucket inside this eight-gallon bucket. Eat that, Newton, and your stupid laws of physics!


Bah. Since when has conservation of matter and energy meant anything in the mecha genre?

Offline Tung Nguyen

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • http://tunginobi.spheredev.org/
(Request/Idea) Stacking Items
« Reply #14 on: January 17, 2007, 03:43:17 AM »
If FreePascal had any form of reflection, comparing items would be ten times easier.

Putting that aside, why not just make it look like items are stacked, instead of actually stacking them? The backend data stays the same, but when you open the inventory, it groups similar items under the one menu item (with multiplier), and those have lists that point to representative items.