📜CONFIG
Resource/Loot Generation for the "Stone" Resource Type
Configuration Overview
For the "stone" resource type, loot generation is governed by a sophisticated set of rules detailed within the LootTables. A player's interaction with resource entities can yield both "stone" and "iron", incorporating elements of certainty and chance to enhance gameplay dynamics.
Fixed Loots
Each contact with a resource precipitates the acquisition of 1 to 2 stones, courtesy of a randomized function (math.random(1, 2)). This ensures a consistent drop of stone, with variation only in the quantity per interaction.
Probability Loots
Beyond the guaranteed loot, there exists a certainty (100% probability) of obtaining iron with each interaction. The quantity of iron, fluctuating between 1 to 3 units, is subject to random determination, supplementing the loot mechanism with an element of unpredictability, albeit with assured drops.
Multiplicative Factors
Loot quantities can be further influenced by a loot multiplier, adjustable per tool in the GatherTools table. This multiplier, scaling from the base rate, allows for dynamic adjustments to resource yields, influencing both fixed and probability-based loots.
Expected Outcomes for 4 Hits
Considering a scenario with 4 hits to a resource:
Stones: Anticipated yield ranges from 4 to 8 stones, directly correlating to the fixed loot mechanism.
Iron: Every hit guarantees iron due to 100% probability, projecting total iron loot to span between 4 and 12 units.
Conclusion
Achieving 5 stones and 7 iron after 4 interactions aligns with the expectation set by the configured loot generation mechanism. Such a configuration underscores a balance between predictability in resource type and variability in quantity, enriching the gaming experience through dynamic resource gathering.
LootTables = {
["stone"] = {
fixedLoots = {
{
name = "stone",
count = function()
return math.random(1, 2)
end
}
},
probabilityLoots = {
loop = 1,
items = {
{ names = { 'iron' }, minValue = 1, maxValue = 3, probability = 100 },
}
}
},
["water"] = {
fixedLoots = {
{
name = "water",
count = function()
return math.random(1, 2)
end
}
},
probabilityLoots = {}
},
}
GatherTools = {
[-1810795771] = { -- POOL CUE
lootType = "pickaxe",
maxAttacks = 4,
delay = 2000,
lootMultipier = 1.0,
lootTier = 1,
},
[-853065399] = { -- BATTLE AXE
lootType = "axe",
maxAttacks = 4,
delay = 2000,
lootMultipier = 2.0,
lootTier = 3,
},
[406929569] = { -- FERTILIZER CAN
lootType = "water",
maxAttacks = 4,
delay = 2000,
lootMultipier = 1.5,
lootTier = 2,
},
}
Gathers = {
["prop_rock_4_big2"] = {
tool = 'pickaxe',
loot = 'stone',
required = 1,
},
}
StaticGathers = {
["water"] = {
text = '[E] - Pick up water',
loot = 'water',
required = 1,
},
}Last updated