I want to make a Incremental game with Runes. Is it better to use Encoded StringValues than Normal StringValues with Eternity/Omega Num? bcs for 5 stats i would need 5 StringValues and with that i would need only 1. So my question is: “Is it bad practice to use that”? Because i need to encode and decode it.
Example:
local rs = game:GetService("ReplicatedStorage")
local on = require(rs.Shared.game.libs.OmegaNum)
local httpService = game:GetService("HttpService")
return {
Stats = function(player: Player)
local Stats = Instance.new("StringValue", player)
Stats.Name = "Stats"
local values = {
["Cash"] = {
["Name"] = "Cash",
["Value"] = on.toString(on.add(0, 0)),
["Unlocked"] = true,
},
["RobuxSpend"] = {
["Name"] = "RobuxSpend",
["Value"] = on.toString(on.add(0, 0)),
["Unlocked"] = true,
},
["Playtime"] = {
["Name"] = "Playtime",
["Value"] = on.toString(on.add(0, 0)),
["Unlocked"] = true,
},
["RuneLuck"] = {
["Name"] = "RuneLuck",
["Value"] = on.toString(on.add(1, 0)),
["Unlocked"] = true,
},
["RuneBulk"] = {
["Name"] = "RuneBulk",
["Value"] = on.toString(on.add(1, 0)),
["Unlocked"] = true,
},
["RuneSpeed"] = {
["Name"] = "RuneSpeed",
["Value"] = on.toString(on.add(1, 0)),
["Unlocked"] = true,
},
}
Stats.Value = httpService:JSONEncode(values)
end
}