Unique Equipment: How big is too big?

Started by KK20, February 25, 2013, 03:26:55 pm

Previous topic - Next topic

KK20

I've been working on a script recently that makes equipment items unique--rather than saying you have 2 Bronze Swords, you have 1 Bronze Sword (A) and 1 Bronze Sword (B). My intention is to create other add-ons to this system, but right now I'm just getting the basic idea down. My main focus has been making this script compatible with just about anything.

Currently I have it where new items are pushed to the end of $data_weapons/armors. I've got a whole sorting system and some method rewrites and what-not. The biggest trouble I have with, right now, is knowing when the equip no longer exists in the game (it's not equipped, not in inventory, not stored somewhere, etc.).

One solution I came up with is just let the item stay in the array forever. But now I don't know if this will become a huge issue. I have to save the $data_weapons/armors into the save files now--that's a lot of data isn't it? Especially how every equip is a new instance and such...

I'm currently running out of time typing this up. Be back later.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

I think it you went over a couple hundred of kB, that's really no big deal. The only problem might be loading times. A few MB might already be too much. But yet again, that's up to the game developer, isn't it? You only provide the tools. How they use it, is up to them.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

KK20

The initial problem that occurred to me was if the player happened to obtain a lot of weapons and armor to the point of eating up all the available memory. Granted, no player would probably ever receive more than a million equipment items in one game, but I don't know what type of game this may be.

If I were to create an add-on where using a scroll can enhance the weapon or destroy it, and somehow the player had the ability to access infinite scrolls and said weapon, $data_weapons would fill up quite a bit.

Probably what I should have asked is "How many elements of RPG::Weapon and RPG::Armor can I have loaded in an array before performance/issues arise?"

Maybe I'm over-thinking this too much and not being practical (would a player REALLY go out and buy/earn thousands of equipment pieces during his/her whole playthrough?), but I guess I'm kinda thinking in the long run as well.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

winkio

This problem is usually solved by a limited inventory, say of max size 100.  After the inventory fills up, you have to throw away old items before you can pick up new ones.  I would look at how any MMO or loot based RPG handles inventory for ideas.

KK20

I never considered that mainly because I never intended the script to put a limit. That's up to the game designer.

I've decided to just keep adding items to the end of the array. If the array sizes do become some kind of issue, I'll find some way. I've only made changes to a couple methods in Game_Party, Game_Actor, and RPG::Weapon/Armors, aliased Array, Hash, Scene_Save/Load, and Game_System, and created a few new classes. It's ugly as hell at the moment. :P

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!