Is this a good idea?

So I am making a system where I require a lot of int and string values which need to be saved and there are 3 sets of these int and string values.

I was thinking instead of making 3 folders with like 5 int / string values I use 1 string values and separate the different values with ‘_’.

For example:

--Quest Example:
local QuestType = "CollectCoins"
local Reward = 10
local Goal = 10

local Quest1 ="StringValue")

--So the string value will be:
Quest1.Value = QuestType .. "_" .. Reward .. "_" .. Goal

print(Quest1.Value)-- "CollectCoins_10_10"

Is this a good idea?

if you are making a quest system i suggest you to return these values because how will you access it when you are gonna reward the player

I do recommend this method, I use it with all my datastores and it makes it far easier to store and sort data.

Ill break it down so you can see how I use it.

----------- // Individual Values
local Val1 = 10 -- First value
local Val2 = 20 -- Second Value

local Combined = tostring(Val1) .. ";Split;" .. tostring(Val2)

------------ // Arrays
local ArrayVersion = {10,20}
local Combined = ""

local Combined = table.concat(ArrayVersion,";Split;")

------------ // Getting The Values Back Out
local Data = "10;Split;20"
local SplitVer = string.split(Data,";Split;")
-- This will give you an array to use so I recommend using arrays-
-- To start with

This is an example, I know that