How can I make weapons and items for an rpg game

So I’m currently in the process of working on a turnb-based rpg battle system probably won’t make an actual just doing it for practicing because turn-based games are kind of cool, but I have a question when it comes to making weapons swords, staffs, armor etc. What’s the best way to do this?

Currently I have a datastore setup and it’s actually just the tutorial one on Documentation - Roblox Creator Hub with some changes but it seems to work pretty fine anyways I have a table called inventory for the player data which I plan to use to store any items the player owns and it seems to work fine when I tested it so the next step is actually making an item or at least the stats (pretty sure lol).

I think the best way to do this is have a module script and make a dictionary for every item and have it kind of look like this yeah

local items = {
	
	["Sword"] = {
		damage = 5;
		durability = 100;
		requiredLevel = 1;
		requiredClass = "Warrior";
		desc = ""; --description or info about the item
	};
}

return items

But now I’m like ok I wanna be able to equip this sword or have a physical version and I wanna have the sword have these stats and so that’s kind of where I’m at would I make a model with the same name as the item in the module script? And then just do checks like if the name of the sword equals the name of the thing in the module script then ok this player can do 5 damage per attack? Sorry if it’s confusing I’m not really sure what to ask, but hopefully someone gets it lol.

1 Like