Hello, i more or less get what you’re trying to say, therefore if this isn’t what you’re looking for then I’d apologize for misunderstanding (I’m writing this at 1 am lol).
My opinion about your second question : I usually like to make their rarity separate from each other, for example, the best of common tier should have less value than the worse of the next tier, that’s my opinion.
My opinion about your first question :
I think you mean like a system that tells the price of an item depending on its position with considering the amount of objects in the desired tier ? If thats what you’re looking for then I’ve made something similar.
local function Lerp(Start,End,X)
return ((End-Start)*X)+Start
end
local List={
[1]="car1",
[2]="car2",
[3]="car3",
[4]="car4",
[5]="car5",
[6]="car6",
[7]="car7",
[8]="car8",
[9]="car9",
[10]="car10",
[11]="car11",
}
local function Return_Price(Data)
local count=0
for index,value in next, Data.List do
count+=1
if count==1 and Data.ExcludeIndexOne then
print(Data.min)
else
print(Lerp(Data.min,Data.max,count/#Data.List))
end
end
end
Return_Price({
min=1000,
max=2000,
List=List,
ExcludeIndexOne=true
})
--[[ Prices with the current settings :
1000
1181.8181818182
1272.7272727273
1363.6363636364
1454.5454545455
1545.4545454545
1636.3636363636
1727.2727272727
1818.1818181818
1909.0909090909
2000.0
]]
local NewList ={
[1]="car1",
[2]="car2",
[3]="car3",
[4]="car4",
[5]="car5",
[6]="car6"
}
Return_Price({
min=1000,
max=2000,
List=NewList,
ExcludeIndexOne=true
})
--[[ prices with less amount of items in the list :
1000.0
1333.3333333333
1500.0
1666.6666666667
1833.3333333333
2000.0
]]
If this is what you’re looking for then I’m glad i was able to help you out about it, and also, this script requires editing, like getting the length of the table with the proper way and etc .