Results 1 to 10 of 54

Hybrid View

  1. #1
    Player
    Iscah's Avatar
    Join Date
    Nov 2017
    Posts
    14,078
    Character
    Aurelie Moonsong
    World
    Bismarck
    Main Class
    Summoner Lv 90
    Quote Originally Posted by Sjol View Post
    When I say they're imaginary I'm saying the slot space isn't taken up when the item isn't present. Yes, there's a hard limit on what the game will let you put in there because I imagine there's an enumerated list of spots for the item to go into, but if there's no item in that spot, there's no data to represent them. Items take up storage because they represent data. Empty item slots don't have data associated with them, so no storage cost.
    I'm not a programmer, so maybe I don't know what I'm talking about, but that doesn't sound right to me for this game.

    If it was an inventory that behaved like a plain list or like the key items pouch where everything auto-sorts itself and there are never any gaps in the list, that would make sense.

    But in the main inventory, there can be gaps, so presumably the game has to remember that "nothing" is the thing in that individual space, and wouldn't remembering that take up as much memory as any other item?
    (1)

  2. #2
    Player
    Sjol's Avatar
    Join Date
    Apr 2024
    Posts
    276
    Character
    Sjol Fantl
    World
    Mateus
    Main Class
    Dancer Lv 90
    Quote Originally Posted by Iscah View Post
    I'm not a programmer, so maybe I don't know what I'm talking about, but that doesn't sound right to me for this game.

    If it was an inventory that behaved like a plain list or like the key items pouch where everything auto-sorts itself and there are never any gaps in the list, that would make sense.

    But in the main inventory, there can be gaps, so presumably the game has to remember that "nothing" is the thing in that individual space, and wouldn't remembering that take up as much memory as any other item?
    I've modeled stuff like this before. What you get is records (e.g., rows in the database) that are something like this:

    [INVENTORY_ID][SLOT_ID][ITEM_ID][COUNT]

    where:

    INVENTORY_ID is the inventory being affected (the ID for you, your saddlebags, or a retainer)
    SLOT_ID is where it's being stored in that inventory
    ITEM_ID is the ID of the item being stored
    COUNT is the size of the stack

    Databases aren't implicitly ordered and so you need to store the ordering or location information explicitly and if you're doing that, you might as well not waste space on empty data. You can infer an empty slot from no record of data being there.
    (0)