How much space do Items in the database take up?

● ARCHIVED · READ-ONLY
Started by Zoltor 5 posts View original ↗
  1. I have this side quest, that really revolves around treasure hunting, and temp starting off from scratch, where only certian special item in the end will be beable to be kept. Now aside from the group of special items you maybe able to find, every other item(be that temp) can also be found.

    You could use one of the multi inventory scripts to do this, but I was thinking, why not just have technically 2 versions of nearly every item(only 1 version of the special items will be needed), and then remove all the 2nd versions of items from inventory when the side quest run is over.

    I don't think a database entry would take up much room, since both versions of the items will call the same common event/have the same spell tied to such, ect, so It's just a double listing in the item, weapon, and armor databases, that's it. However I just want to make sure.

    Say if I have like 300 items, how much space/memory would just the listings in the database eat up?  Whatever that is, it will be doubled in my game, using this method, so I would like to make sure It's even viable, before making all these listings, just to find out it eats an insane amount of space.
  2. For the actual file size, you can open the data folder of your project and check the file sizes before and after adding some of those items.


    That said, it is almost impossible to pin a fixed size "per item", because that depends on how long the descriptions are and how good they can be compressed.


    But for simple items, it's a small amount - what takes space are pictures and sounds, not database texts. Most database entries should be a few hundred bytes each (yes, bytes - not KB), and even that is only if you have full descriptions and some notetags on them. Without that added data, an entry can be below a hundred bytes.
  3. Andar said:
    For the actual file size, you can open the data folder of your project and check the file sizes before and after adding some of those items.

    That said, it is almost impossible to pin a fixed size "per item", because that depends on how long the descriptions are and how good they can be compressed.

    But for simple items, it's a small amount - what takes space are pictures and sounds, not database texts. Most database entries should be a few hundred bytes each (yes, bytes - not KB), and even that is only if you have full descriptions and some notetags on them. Without that added data, an entry can be below a hundred bytes.

    Ok that's what I thought. I know for the show text command, each char used, is literally 1 bite(well that's what it is in other RM programs, I don't see why it would be different now), but I wasn't sure if that was about the same for database entries as well.

    Then there's nothing to worry about, thanks.
  4. Andar pretty much answered your question but I'll chime in to agree.  Each item (RPG::Item, inherits RPG::UsableItem) is just a collection of a bunch of integer variables, a few string variables, and a couple of arrays (Features, Formula) that in themselves are just integers and strings.  Assuming you're not running scripts to instantiate items (and possibly even if you are), simply adding a couple hundred entries to the database shouldn't dramatically increase either your file size or your CPU commit.
  5. Wavelength said:
    Andar pretty much answered your question but I'll chime in to agree.  Each item (RPG::Item, inherits RPG::UsableItem) is just a collection of a bunch of integer variables, a few string variables, and a couple of arrays (Features, Formula) that in themselves are just integers and strings.  Assuming you're not running scripts to instantiate items (and possibly even if you are), simply adding a couple hundred entries to the database shouldn't dramatically increase either your file size or your CPU commit.
    Yea that's what I thought, just double checking. Even using a feature option like call common event, is really just a translation of a string of script, to call the common event, which is a script snippet only comprised of a dozen or so char anyway(providing each char is only a bite, is literally nothing noticeable).