working on implementing a “Feature Flag” (Fast Flag) system and this is the very basic start of a single flag’s data hierarchy
Codez
local Flags = {
["TagRewards"] = {
Description = "Gives player reward amount based on the server type they're in",
kind = "multivariant",
key = "TagReward",
creationDate = 0,
variations = {
{
Value = 10,
Name = "Default"
},
{
Value = 5,
Name = "Five"
},
},
tags = {"reward", "money"},
Environments = {
["Production"] = {
on = true,
archived = false,
lastModified = 0,
version = 0,
targets = {
{
Values = {"normal"},
Varition = 1
},
{
Values = {"vip"},
Varition = 2
}
},
rules = {
{
variation = 1,
clauses = {
attribute = "ServerType",
op = "Matches",
Values = {"Normal Server"}
}
},
{
variation = 2,
clauses = {
attribute = "ServerType",
op = "Matches",
Values = {"VIP Server"}
}
}
},
fallthrough = {
rollout = {
variations = {
{
variation = 1,
weight = 100000
}
{
variation = 2,
weight = 0,
}
}
}
},
offVariation = 1,
}
}
}
}
My end goal is to eventually make it into a plugin that’d allow you to control the flags, which is pretty neat as you could do A/B testing and even release (or rollback) features to your game without needing to do a mass shutdown…