Better way of listing weapons and armor than my current method

So I made this structure of where it lists all the Weapon’s and Armor specifically when they receive a new item and add it to their data table, here is the structure and code for each module

Structure:

image

Code:

-- Armors List Module
-- Username
-- November 19, 2020



local ArmorsListModule = {}

ArmorsListModule.List = {
    --[[
    -- Armors
    ["Chestplate"] = {
        Path = game.ServerStorage.PATH_HERE;
        Physical = 1;
        Stamina
        Spell = 1;
        Rarity = "Undefined";
        Chance = 30;
        BaseHealth = 1;
        CurrentHealth = 1;
        LevelRequired = 0;
        Upgrade = 0;
        MaxUpgrades = 0;
    }
    ]]
}


return ArmorsListModule
-- Weapons List Module
-- Username
-- November 19, 2020



local WeaponsListModule = {}

WeaponsListModule.WeaponList = {
    ["Wooden Sword"] = {
        Path = game.ServerStorage.GameObjects.Weapons["Wooden Sword"];
        Damage = 1;
        Type = "Sword";
        Rarity = "Common";
        Chance = 100;
        Physical = 1;
        Spell = 1;
        Upgrades = 0;
        MaxUpgrades = 15;
        SwingDebounce = false;
    };
}


return WeaponsListModule

Is it efficient or not? or just give criticism or feedback to it!

any suggestions??? so just, I can move on after my weapon system to other things

Seems like a pretty legit system. We can’t comment much on efficiency by just looking at a dictionary.

the dictionaries make the values so the weapon system I made would make it function properly, besides I am just asking if there is anything I can improve on this system!

1 Like